Skip to content

Commit 171f563

Browse files
committed
More web interface cleanup (Issue #1207)
1 parent 22f8fba commit 171f563

47 files changed

Lines changed: 131 additions & 74 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/cups.css

Lines changed: 89 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* Base styles */
2+
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Source+Code+Pro&display=swap');
3+
14
/* Layout CSS */
25
.cups-header {
36
background: rgba(46,46,46,.9);
@@ -48,8 +51,9 @@
4851
}
4952

5053
.cups-body {
51-
margin-top: 40px;
52-
padding: 40px 20px;
54+
margin-bottom: 20px;
55+
margin-top: 65px;
56+
padding: 20px;
5357
}
5458
.row .cups-body {
5559
padding: 0;
@@ -101,6 +105,11 @@
101105
.row .halves:first-child {
102106
margin-left: 0;
103107
}
108+
109+
.row .thirds h1, .row .halves h1 {
110+
margin-top: 0;
111+
}
112+
104113
.mobile {
105114
display: none;
106115
}
@@ -112,27 +121,31 @@
112121
body {
113122
background: white;
114123
color: black;
115-
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
124+
font-family: 'Open Sans', sans-serif;
125+
font-size: 16px;
116126
margin: 0;
117127
}
118128

119129
h1, h2, h3, h4, h5, h6, p, td, th {
120-
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
130+
font-family: 'Open Sans', sans-serif;
121131
}
122132

123133
h1 { font-size: 2em; }
124134
h2 { font-size: 1.75em; }
125135
h3 { font-size: 1.5em; }
126136
h4 { font-size: 1.25em; }
127137

138+
code, kbd, pre, tt, input[type=text], p.command, p.summary, p code, li code, p.code, ul.code li, textarea {
139+
font-family: 'Source Code Pro', monospace;
140+
}
141+
128142
kbd {
129143
color: #006600;
130-
font-family: monaco, courier, monospace;
131144
font-weight: bold;
132145
}
133146

134147
pre {
135-
font-family: monaco, courier, monospace;
148+
white-space: pre-wrap;
136149
}
137150

138151
blockquote {
@@ -169,12 +182,10 @@ pre.man {
169182

170183
pre.command EM, pre.example EM {
171184
color: #3f0000;
172-
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
173185
}
174186

175187
p.command {
176188
color: #7f0000;
177-
font-family: monaco, courier, monospace;
178189
margin-left: 36pt;
179190
}
180191

@@ -196,12 +207,12 @@ a:link:hover img {
196207
a:link, a:visited {
197208
font-weight: inherit;
198209
text-decoration: none;
199-
color: #000099;
210+
color: #317BFF;
200211
}
201212

202213
a:link:hover, a:visited:hover, a:active {
203214
text-decoration: underline;
204-
color: #990099;
215+
color: #4C80BF;
205216
}
206217

207218
table.page {
@@ -234,8 +245,47 @@ form {
234245
display: inline;
235246
}
236247

237-
input[type="text"], textarea {
238-
font-family: monaco, courier, monospace;
248+
button, input[type=button], input[type=submit], select {
249+
border: none;
250+
border-radius: 5px;
251+
cursor: pointer;
252+
font-family: inherit;
253+
font-size: 14px;
254+
font-weight: normal;
255+
padding: 4px 8px;
256+
text-decoration: none;
257+
white-space: nowrap;
258+
-moz-appearance: none;
259+
-webkit-appearance: none;
260+
}
261+
button, input[type=button], input[type=file], input[type=submit] {
262+
background: #317BFF;
263+
color: #FFF;
264+
}
265+
button:hover, input[type=button]:hover, input[type=file]:hover, input[type=submit]:hover {
266+
background: #65ABFF;
267+
color: #FFF;
268+
}
269+
button:active, input[type=button]:active, input[type=file]:active, input[type=submit]:active {
270+
background: #317BFF;
271+
color: #FFF;
272+
}
273+
input[type=search] {
274+
-webkit-appearance: textfield;
275+
}
276+
input[type=search], input[type=text] {
277+
padding: 4px 8px;
278+
}
279+
select {
280+
background: #ccc url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23000000' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
281+
color: black;
282+
padding: 4px 32px 4px 8px;
283+
}
284+
select:hover {
285+
background: #ddd url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23000000' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
286+
}
287+
textarea {
288+
width: 100%;
239289
}
240290

241291
input[type="image"] {
@@ -342,11 +392,7 @@ th.conflict {
342392
text-align: right;
343393
}
344394

345-
h1.title {
346-
display: none;
347-
}
348-
349-
h2.title, h3.title, .row .cups-body h2, .row .cups-body h3 {
395+
h1.title, h2.title, h3.title, .row .cups-body h2, .row .cups-body h3 {
350396
border-bottom: solid 2pt black;
351397
}
352398

@@ -470,7 +516,6 @@ dl.category dt {
470516

471517
p.summary {
472518
margin-left: 36pt;
473-
font-family: monaco, courier, monospace;
474519
}
475520

476521
div.summary table {
@@ -578,7 +623,6 @@ p code, li code {
578623
background: rgba(191,191,191,0.3);
579624
}
580625
p code, li code, p.code, pre, ul.code li {
581-
font-family: monospace;
582626
hyphens: manual;
583627
margin: 18pt 0;
584628
-webkit-hyphens: manual;
@@ -693,10 +737,10 @@ ul.contents li ul.code, ul.contents li ul.subcontents {
693737
color: #ccc;
694738
}
695739
a:link, a:visited, table.list th a {
696-
color: #6666ff;
740+
color: #4C80BF;
697741
}
698742
a:link:hover, a:visited:hover, a:active, table.list th a {
699-
color: #ff66ff;
743+
color: #65ABFF;
700744
}
701745
hr {
702746
color: #666;
@@ -713,4 +757,28 @@ ul.contents li ul.code, ul.contents li ul.subcontents {
713757
table.list th {
714758
color: #666;
715759
}
760+
button, input[type=button], input[type=file], input[type=submit] {
761+
background: #255CBF;
762+
color: #DDD;
763+
}
764+
button:hover, input[type=button]:hover, input[type=file]:hover, input[type=submit]:hover {
765+
background: #4C80BF;
766+
color: #EEE;
767+
}
768+
button:active, input[type=button]:active, input[type=file]:active, input[type=submit]:active {
769+
background: #255CBF;
770+
color: #DDD;
771+
}
772+
input[type=search], input[type=text], textarea {
773+
background: #333;
774+
color: #ccc;
775+
}
776+
select {
777+
background: #333 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23CCCCCC' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
778+
color: #ccc;
779+
padding: 4px 32px 4px 8px;
780+
}
781+
select:hover {
782+
background: #444 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23DDDDDD' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
783+
}
716784
}

templates/add-class.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">Add Class</H2>
1+
<H1 CLASS="title">Add Class</H1>
22

33
<FORM METHOD="POST" ACTION="/admin">
44
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">

templates/add-printer.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">Add Printer</H2>
1+
<H1 CLASS="title">Add Printer</H1>
22

33
<FORM METHOD="POST" ACTION="/admin">
44
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">

templates/admin.tmpl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
<div class="row">
21
<div class="halves">
3-
<H2 CLASS="title">Printers</H2>
2+
<H1 CLASS="title">Printers</H1>
43

54
<P>
65
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-printer"><INPUT TYPE="SUBMIT" VALUE="Add Printer"></FORM>
76
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="find-new-printers"><INPUT TYPE="SUBMIT" VALUE="Find New Printers"></FORM>
87
<FORM ACTION="/printers/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Printers"></FORM>
98
</P>
109

11-
<H2 CLASS="title">Classes</H2>
10+
<H1 CLASS="title">Classes</H1>
1211

1312
<P>
1413
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-class"><INPUT TYPE="SUBMIT" VALUE="Add Class"></FORM>
1514
<FORM ACTION="/classes/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Classes"></FORM>
1615
</P>
1716

18-
<H2 CLASS="title">Jobs</H2>
17+
<H1>Jobs</H1>
1918

2019
<P>
2120
<FORM ACTION="/jobs/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Jobs"></FORM>
2221
</P>
2322
</div>
2423
<div class="halves">
25-
<H2 CLASS="title">Server</H2>
24+
<H1 CLASS="title">Server</H1>
2625

2726
<P>
2827
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server"><INPUT TYPE="SUBMIT" VALUE="Edit Configuration File"></FORM>
@@ -74,4 +73,3 @@
7473

7574
</FORM>}
7675
</div>
77-
</div>

templates/choose-device.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H2>
1+
<H1 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H1>
22

33
{CUPS_GET_DEVICES_DONE?<FORM METHOD="POST" ACTION="/admin">
44
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">

templates/choose-make.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H2>
1+
<H1 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H1>
22

33
<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
44
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">

templates/choose-model.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H2>
1+
<H1 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H1>
22

33
<SCRIPT TYPE="text/javascript"><!--
44
function filterItems(el) {

templates/choose-serial.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H2>
1+
<H1 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H1>
22

33
<FORM METHOD="POST" ACTION="/admin">
44
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">

templates/choose-uri.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H2>
1+
<H1 CLASS="title">{op=modify-printer?Modify {printer_name}:Add Printer}</H1>
22

33
<FORM METHOD="POST" ACTION="/admin">
44
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">

templates/class-added.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<H2 CLASS="title">Add Class</H2>
1+
<H1 CLASS="title">Add Class</H1>
22

33
<P>Class <A HREF="/classes/{printer_name}">{printer_name}</A> has been added
44
successfully.

0 commit comments

Comments
 (0)