]> git.plutz.net Git - confetti/commitdiff
simplify css
authorPaul Hänsch <paul@plutz.net>
Wed, 10 Feb 2021 12:55:25 +0000 (13:55 +0100)
committerPaul Hänsch <paul@plutz.net>
Wed, 10 Feb 2021 12:55:25 +0000 (13:55 +0100)
cards/list.sh
cards/widgets.sh
courses/list.sh
index.cgi
style.css

index 9f1e1d8ec800eddbf05c952840769de4583c616e..5bfffbf8f840d4713b0b255bfd00828b2a180424 100755 (executable)
@@ -99,8 +99,8 @@ print_card(){
         $(card_item "$card" CATEGORIES)
       ]
       [div .control
         $(card_item "$card" CATEGORIES)
       ]
       [div .control
-        [a .item href="/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)]
-        [a .item href="/cards/export_card.sh?card=${cardfile##*/}" $(l10n vcf_export)]
+        [a .button .item href="/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)]
+        [a .button .item href="/cards/export_card.sh?card=${cardfile##*/}" $(l10n vcf_export)]
       ]
     ]
        EOF
       ]
     ]
        EOF
index 61a6938d9d96ec0f2e712c80a2be734140b5c763..09956a70559ac8f788b6da14e6f5cea2901addbb 100755 (executable)
@@ -39,12 +39,12 @@ cat <<EOF
     [legend $(l10n filter_item):]
 
     $(for field in any name street zip TEL BDAY CATEGORIES course; do
     [legend $(l10n filter_item):]
 
     $(for field in any name street zip TEL BDAY CATEGORIES course; do
-      printf '[input id="%s%i" type="radio" name="filter_type%i" value="%s" %s][label for="%s%i" %s ]' \
+      printf '[input .tab id="%s%i" type="radio" name="filter_type%i" value="%s" %s][label for="%s%i" %s ]' \
               "$field" "$n" "$n" "$field" "$([ "$1" = "$field" ] && printf checked )" \
               "$field" "$n" "$(l10n filter_$field)"
     done)
               "$field" "$n" "$n" "$field" "$([ "$1" = "$field" ] && printf checked )" \
               "$field" "$n" "$(l10n filter_$field)"
     done)
-    [input type="text" name="filter_text$n" value="$([ "$1" = CATEGORIES -o "$1" = course ] || HTML "$2")" placeholder="$(l10n filter_placeholder)"]
-    [fieldset .categories
+    [input .tab type="text" name="filter_text$n" value="$([ "$1" = CATEGORIES -o "$1" = course ] || HTML "$2")" placeholder="$(l10n filter_placeholder)"]
+    [fieldset .tab .categories
       $(list_categories | while read cat; do
           printf '[label [checkbox "filter_cat%i" "|%s" %s] %s ] ' \
                  "$n" "$(HTML "$cat")" \
       $(list_categories | while read cat; do
           printf '[label [checkbox "filter_cat%i" "|%s" %s] %s ] ' \
                  "$n" "$(HTML "$cat")" \
@@ -53,7 +53,7 @@ cat <<EOF
       done)
       [a href="/categories/" $(l10n edit_categories)]
     ]
       done)
       [a href="/categories/" $(l10n edit_categories)]
     ]
-    [fieldset .courses
+    [fieldset .tab .courses
       $(list_courses | while IFS=/ read course coursename; do
         printf '[label [checkbox "filter_course%i" "|%s" %s] %s ] ' \
                "$n" "$(HTML "${course##*/}")" \
       $(list_courses | while IFS=/ read course coursename; do
         printf '[label [checkbox "filter_course%i" "|%s" %s] %s ] ' \
                "$n" "$(HTML "${course##*/}")" \
index e9ae7bca263506c1a71f4f3b9c0a72cc0d526ee2..97356db9b6180c0c9e2f6b9f47b75a11eec1e498 100755 (executable)
@@ -66,10 +66,10 @@ print_course(){
         done |sort -k7)]
       ]
       [div .control
         done |sort -k7)]
       ]
       [div .control
-        [a .item href="/courses/edit_course.sh?course=${coursefile##*/}" $(l10n edit)]
-        [a .item href="/courses/export_pdf.sh?course=${coursefile##*/}" target="blank" $(l10n courselist)]
-        [a .item href="/courses/export_ical.sh?course=${coursefile##*/}" $(l10n ics_export)]
-        [a .item href="mailto:zack@vuesch.org?bcc=$(course_mail "${coursefile##*/}" |HTML)" $(l10n course_mail)]
+        [a .button .item href="/courses/edit_course.sh?course=${coursefile##*/}" $(l10n edit)]
+        [a .button .item href="/courses/export_pdf.sh?course=${coursefile##*/}" target="blank" $(l10n courselist)]
+        [a .button .item href="/courses/export_ical.sh?course=${coursefile##*/}" $(l10n ics_export)]
+        [a .button .item href="mailto:zack@vuesch.org?bcc=$(course_mail "${coursefile##*/}" |HTML)" $(l10n course_mail)]
       ]
     ]
        EOF
       ]
     ]
        EOF
index ee0d6f7200900df4e43ba1a2347da90fca72006b..1c4e7175ddf83f25dae4d7dc84ef7dd125734433 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -52,6 +52,7 @@ yield_page() {
        [html [head
           [title Confetti]
          [meta name="viewport" content="width=device-width"]
        [html [head
           [title Confetti]
          [meta name="viewport" content="width=device-width"]
+         [link rel="stylesheet" type="text/css" href="/cgilite/common.css"]
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '
     [ -n "$style" ] && printf '
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '
     [ -n "$style" ] && printf '
index 06aacdde32e5ff98dbc80debdbde025c83ea0d13..8394de8e66f2bb3e2d7a190aabba355b432f7ddd 100644 (file)
--- a/style.css
+++ b/style.css
@@ -1,90 +1,6 @@
-* {
-  position: relative;
-  box-sizing: border-box;
-  max-width: 100%;
-  font-family: sans-serif;
-  font-weight: normal;
-  font-size: initial;
-  font-style: normal;
-  text-decoration: none;
-  line-height: 1.5em;
-  color: inherit; background: transparent;
-  padding: 0; margin: 0;
-  border: none;
-}
-
-body {
-  color: #000; background-color: #FFF;
-}
-
-/* ======= GENERIC HTML STYLES =======*/
-
-p { margin-bottom: 1em; }
-
-a {
-  text-decoration: underline;
-  font-style: italic;
-  color: #068;
-}
-
-i, em { font-style: italic; }
-b, strong { font-weight: bolder; }
-ul, ol { margin-left: 1.125em; }
-table th { font-weight: bold; }
-
-h1, h2, h3 {
-  font-weight: bold;
-  margin-top: 1em;
-  margin-bottom: .5em;
-}
-
 h1:first-child, h2:first-child, h3:first-child,
 p + h1, p + h2, p + h3 {
 h1:first-child, h2:first-child, h3:first-child,
 p + h1, p + h2, p + h3 {
-  margin-top: 0;
-}
-
-h4, h5, h6, form legend {
-  font-weight: bolder;
-  margin-bottom: .25em;
-}
-
-h1 { font-size: 1.5em; }
-h2 { font-size: 1.125em; }
-
-select, input, button, textarea,
-.control a {
-  display: inline-block;
-  background-color: #FFF;
-  border: 1pt solid;
-  padding: .25em .75em;
-  vertical-align: text-bottom;
-}
-.control a {
-  color: inherit;
-  font-style: normal;
-  text-decoration: none;
-}
-
-select { padding: .375em 0; }
-
-input[type=radio], input[type=checkbox] {
-  vertical-align: baseline;
-}
-input[type=number] { text-align: right; padding-right: 0; }
-
-button, input[type=button],
-.control a {
-  box-shadow: .125em .125em .25em;
-  cursor: pointer;
-}
-input[type=radio], input[type=checkbox],
-input[type=radio] + label, input[type=checkbox] + label {
-  cursor: pointer;
-}
-
-label { margin-right: .75em; }
-input + label {
-  margin-left: .375em;
+  margin-top: 3pt;
 }
 
 /* ====== COMMON ELEMENTS ======*/
 }
 
 /* ====== COMMON ELEMENTS ======*/
@@ -127,37 +43,9 @@ form.filter > h1 { display: none; }
 
 form.filter fieldset { margin-top: .5em; }
 form.filter fieldset.item + fieldset.item legend { display: none; }
 
 form.filter fieldset { margin-top: .5em; }
 form.filter fieldset.item + fieldset.item legend { display: none; }
-form.filter fieldset.item input[type=radio] { display: none; }
-form.filter fieldset.item input[type=radio] + label {
-  display: table-cell;
-  padding: .5em 1em;
-  background-color: #EEE;
-  border-style: solid;
-  border-width: .5pt .25pt 0 .25pt;
-  white-space: normal;
-}
-form.filter fieldset.item input[type=radio] + label:first-of-type {
-  border-left: 1pt solid;
-}
-form.filter fieldset.item input[type=radio]:checked + label {
-  position: relative;
-  background-color: #FFF;
-  box-shadow: .125em -.125em .125em #888;
-  z-index: 1;
-}
-form.filter fieldset.item input[type=text],
-form.filter fieldset.item fieldset.courses,
-form.filter fieldset.item fieldset.categories {
-  position: relative;
-  display: block;
-  width: 100%;
-  margin-top: -1pt;
-  padding: .25em .75em;
-  border: 1pt solid;
-  box-shadow: .125em .125em .25em #888;
-}
-form.filter fieldset.item fieldset.courses,
-form.filter fieldset.item fieldset.categories { display: none; }
+
+form.filter fieldset.item input[value=course] ~ input[type=text],
+form.filter fieldset.item input[value=CATEGORIES] ~ input[type=text] { display: block; }
 form.filter fieldset.item input[value=course]:checked ~ input[type=text],
 form.filter fieldset.item input[value=CATEGORIES]:checked ~ input[type=text] { display: none; }
 form.filter fieldset.item input[value=course]:checked ~ fieldset.courses,
 form.filter fieldset.item input[value=course]:checked ~ input[type=text],
 form.filter fieldset.item input[value=CATEGORIES]:checked ~ input[type=text] { display: none; }
 form.filter fieldset.item input[value=course]:checked ~ fieldset.courses,