add foo.sh layout to cups web interface

This commit is contained in:
Timo Makinen 2019-06-14 11:20:51 +03:00
parent a496da62b0
commit 84db430875
4 changed files with 95 additions and 0 deletions

View file

@ -0,0 +1,27 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>{title} - CUPS 1.6.3</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
<link rel="stylesheet" type="text/css" href="/local.css">
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
{refresh_page?<META HTTP-EQUIV="Refresh" CONTENT="{refresh_page}">:}
</HEAD>
<BODY>
<div id="navbar">
<div id="logo">
<a href="https://www.foo.sh/"><img src="/logo.png" alt="foo.sh"></a>
</div>
<div class="navigation">
<button class="navigation-button">Navigation</button>
<div class="navigation-content">
<a href="/admin">Administration</a><span class="hide"> - </span>
<a href="/classes/">Classes</a><span class="hide"> - </span>
<a href="/help/">Help</a><span class="hide"> - </span>
<a href="/jobs/">Jobs</a><span class="hide"> - </span>
<a href="/printers/">Printers</a>
</div>
</div>
</div>

View file

@ -0,0 +1,49 @@
body {
margin: 0;
color: #172b4d;
background: #f2f2f2;
position: absolute;
left: 0px;
right: 0px;
}
#navbar {
padding-top: 15px;
background-color: #000;
}
.navigation-button {
background-color: #000;
color: #fff;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.navigation {
position: absolute;
top: 10px;
right: 100px;
display: inline-block;
float: right;
}
.navigation-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow 0px 8px 16px 0px rgba(0,0,0,0,2);
padding: 12px 16px;
z-index: 1;
}
.navigation-content a {
display: block;
padding: 10px 10px;
}
.navigation:hover .navigation-content {
display: block;
}
.hide {
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -58,6 +58,25 @@
line: "SystemGroup root sysadm"
notify: restart cups
- name: add static files to cups web interface
copy:
dest: "/usr/share/cups/www/{{ item }}"
src: "{{ item }}"
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
with_items:
- logo.png
- local.css
- name: create custom header for cups web interface
copy:
dest: /usr/share/cups/templates/header.tmpl
src: header.tmpl
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
- name: disable cups socket service
systemd:
name: cups.socket