taler-www

Main taler.net website
Log | Files | Refs | Submodules | README | LICENSE

commit 3fdd250e645179c5020f8352033ffac1498e4a45
parent 9c0ebb46cc9e07596a6ba69be22826d140c32824
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 10 Nov 2026 09:33:12 +0100

remove redundant/duplicate CSS

Diffstat:
Mstatic/styles.css | 674+++++++++++++++++++++++++++++--------------------------------------------------
Mtemplate/cashier.html.j2 | 22+---------------------
Mtemplate/pos.html.j2 | 22+---------------------
3 files changed, 248 insertions(+), 470 deletions(-)

diff --git a/static/styles.css b/static/styles.css @@ -1,35 +1,243 @@ -.lang-slector { - float: right; - padding-top: 2mm; - padding-bottom: 4mm; - margin-left: 15px; - margin-right: 15px; +/* Hand-written styles for www.taler.net. Everything else under static/dist/ + * is an unmodified upstream distribution. This file is loaded after + * dist/bootstrap/bootstrap.min.css, so a rule here wins over Bootstrap's at + * equal specificity. + */ + +/* ---------------------------------------------------------------- tokens */ + +:root { + --brand-blue: #0042b3; + --brand-blue-dark: #003281; + --brand-blue-light: #eef4ff; + --brand-green: #a5c663; + --border: #d8dee8; + --text-muted: #545b66; + --focus-ring: #f5a623; } +/* ------------------------------------------------------------------ base */ + html { + /* always reserve the scrollbar, so navigating between a short and a long + * page does not shift the layout sideways + */ overflow-y: scroll; } -ul nav { - background-color: rgb(8, 8, 8); +a, +a:link, +a:visited { + text-decoration: grey underline; + color: black; +} + +nav a, +nav a:link, +nav a:visited { + text-decoration: none; +} + +/* The skip link is off-screen until it takes focus; display:none would + * take it out of the tab order as well. + */ +.skip { + position: absolute; + left: -10000px; + top: auto; + width: 1px; + height: 1px; + overflow: hidden; +} + +.skip:focus { + position: static; + width: auto; + height: auto; + background: white; + padding: 5px; +} + +/* ------------------------------------------------------------ page frame */ + +#mybody { + /* override ugly bootstrap defaults */ + color: black; + position: relative; + min-height: 100%; +} + +#mybody nav { border-radius: 0px; } +#body_content { + /* push footer down */ + min-height: 80vh; +} + +#body_content .container { + margin-bottom: 2em; + padding-top: 1em; + padding-bottom: 1em; +} + +#body_content a:hover { + transition: background-color 0.3s; + background-color: rgba(200, 200, 200, 0.5); +} + +footer { + position: relative; + height: 340px; + padding-top: 2em; + margin-top: 2em; +} + +.footer-list { + list-style: none; +} + +/* overrides bootstrap defaults. */ +.navbar-brand { + display: contents; +} + +.btn-dark { + background-color: #595959; +} + +/* ------------------------------------------------------------ components */ + .c_acronym { - background-color: #A5C663; + background-color: var(--brand-green); } -.wallet-page { - --wallet-blue: #0042b3; - --wallet-blue-dark: #003281; - --wallet-blue-light: #eef4ff; - --wallet-border: #d8dee8; - --wallet-muted: #545b66; +.checkmark { + height: 1em; + width: 1em; + margin-right: 0.3em; + vertical-align: baseline; + position: relative; + top: 0.2em; } +.checklist { + margin-top: 1em; + margin-bottom: 1em; + list-style-type: none; + padding-left: 0px; + font-size: 1.2rem; +} + +/* text highlighted with a translucent marker-pen stroke */ +.tlr { + display: inline-block; + position: relative; +} + +.tlr::before { + content: ""; + position: absolute; + width: 100%; + height: 25%; + bottom: 0; + left: 0.2em; + background: rgba(170, 57, 57, 0.3); + z-index: -1; +} + +.timeline header { + text-align: left; + margin-bottom: 5px; +} + +ul.timeline { + list-style-type: none; + position: relative; +} + +ul.timeline::before { + content: ' '; + background: #d4d9df; + display: inline-block; + position: absolute; + left: 29px; + width: 2px; + height: 100%; + z-index: 400; +} + +ul.timeline > li { + margin: 20px 0; + padding-left: 20px; +} + +ul.timeline > li::before { + content: ' '; + background: white; + display: inline-block; + position: absolute; + border-radius: 50%; + border: 3px solid var(--brand-blue); + left: 20px; + width: 20px; + height: 20px; + z-index: 400; +} + +/* ------------------------------------------- consortium (NGI Taler) page */ + +.consortium a, +.consortium a:link, +.consortium a:visited { + text-decoration: underline; + color: black; +} + +.consortium h4 { + color: #555; + text-align: left; + text-transform: uppercase; + font-weight: bold; + position: relative; + margin: 30px 0 60px; + padding: 5px; +} + +.consortium h4::after { + content: ""; + width: 170px; + position: absolute; + text-align: left; + height: 13%; + bottom: 0; + left: 0.2em; + background: #4e7bca; + z-index: -1; +} + +.consortium .list-group { + max-height: 400px; + margin-bottom: 10px; + overflow: scroll; + -webkit-overflow-scrolling: touch; +} + +.consortium .mb-1 { + color: #555; +} + +.consortium .list-group-item, +.consortium .list-group-item-action { + text-decoration: none; +} + +/* ----------------------------------------------------------- wallet page */ + .wallet-hero { - background: linear-gradient(135deg, #f7faff 0%, #eef4ff 100%); - border-bottom: 1px solid var(--wallet-border); + background: linear-gradient(135deg, #f7faff 0%, var(--brand-blue-light) 100%); + border-bottom: 1px solid var(--border); padding: 3.5rem 1rem 3rem; text-align: center; } @@ -73,10 +281,12 @@ ul nav { margin-right: 0.4rem; } +/* The element also carries .container, so its padding comes from + * #body_content .container above -- same specificity, and that rule has + * always come later. + */ #body_content .wallet-content { max-width: 1120px; - padding-bottom: 0; - padding-top: 1rem; } .wallet-section { @@ -97,7 +307,7 @@ ul nav { } .wallet-section-heading p { - color: var(--wallet-muted); + color: var(--text-muted); margin: 0; } @@ -109,7 +319,7 @@ ul nav { .wallet-card { background: #fff; - border: 1px solid var(--wallet-border); + border: 1px solid var(--border); border-radius: 0.75rem; box-shadow: 0 0.25rem 1rem rgba(21, 39, 68, 0.06); display: flex; @@ -125,11 +335,11 @@ ul nav { } .wallet-card p:not(.wallet-platform-label) { - color: var(--wallet-muted); + color: var(--text-muted); } .wallet-platform-label { - color: var(--wallet-blue); + color: var(--brand-blue); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; @@ -146,7 +356,7 @@ ul nav { #body_content .wallet-page a.wallet-button { align-items: center; - border: 2px solid var(--wallet-blue); + border: 2px solid var(--brand-blue); border-radius: 0.4rem; display: inline-flex; font-weight: 600; @@ -160,13 +370,13 @@ ul nav { #body_content .wallet-page a.wallet-button-primary, #body_content .wallet-page a.wallet-button-primary:link, #body_content .wallet-page a.wallet-button-primary:visited { - background: var(--wallet-blue); + background: var(--brand-blue); color: #fff; } #body_content .wallet-page a.wallet-button-primary:hover { - background: var(--wallet-blue-dark); - border-color: var(--wallet-blue-dark); + background: var(--brand-blue-dark); + border-color: var(--brand-blue-dark); color: #fff; } @@ -174,26 +384,26 @@ ul nav { #body_content .wallet-page a.wallet-button-secondary:link, #body_content .wallet-page a.wallet-button-secondary:visited { background: #fff; - color: var(--wallet-blue-dark); + color: var(--brand-blue-dark); } #body_content .wallet-page a.wallet-button-secondary:hover { - background: var(--wallet-blue-light); - color: var(--wallet-blue-dark); + background: var(--brand-blue-light); + color: var(--brand-blue-dark); } #body_content .wallet-page a.wallet-button:focus-visible, .wallet-action-direct:focus-visible { - outline: 3px solid #f5a623; + outline: 3px solid var(--focus-ring); outline-offset: 3px; } .wallet-advanced-options { - border-bottom: 1px solid var(--wallet-border); + border-bottom: 1px solid var(--border); } .wallet-advanced-options details { - border-top: 1px solid var(--wallet-border); + border-top: 1px solid var(--border); padding: 0; } @@ -205,7 +415,7 @@ ul nav { } .wallet-advanced-options summary:focus-visible { - outline: 3px solid #f5a623; + outline: 3px solid var(--focus-ring); outline-offset: 3px; } @@ -223,8 +433,8 @@ ul nav { .wallet-action-notice, .wallet-demo { align-items: center; - background: var(--wallet-blue-light); - border-left: 5px solid var(--wallet-blue); + background: var(--brand-blue-light); + border-left: 5px solid var(--brand-blue); border-radius: 0.5rem; display: flex; gap: 2rem; @@ -329,395 +539,3 @@ ul nav { width: 100%; } } - -a, -a:link, -a:visited { - text-decoration: grey underline; - color: black; -} - -nav a, -nav a:link, -nav a:visited { - text-decoration: none; -} - -.navbar-light .navbar-nav .nav-link { - /* 0,0,0,.5 makes it problematic to read, - simply black is less problematic */ - color: rgb(0, 0, 0); - text-decoration: underline; -} - -.skip { - position: absolute; - left: -10000px; - top: auto; - width: 1px; - height: 1px; - overflow: hidden; -} - -.skip:focus { - position: static; - width: auto; - height: auto; - background: white; - padding: 5px; -} - -#body_content a:hover { - transition: background-color 0.3s; - background-color: rgba(200, 200, 200, 0.5); -} - -.c_intro { - min-height: 97vh; -} - -/* don't show the language selector in the dropdown on mobile devices, - * since it's in the top bar already. - */ -.in .nav-lang { - display: none; -} - -.mobile-lang { - margin-left: 5px; - margin-top: 8px; -} - -#mybody { - /* override ugly bootstrap defaults */ - color: black; - position: relative; - min-height: 100%; -} - -#body_content { - height: 100%; -} - -footer { - position: relative; - bottom: 0; - height: 340px; -} - -.btn-dark { - background-color: #595959; -} - - -#mybody nav { - border-radius: 0px; -} - -footer { - padding-top: 2em; - margin-top: 2em; -} - - -#body_content .container { - margin-bottom: 2em; - padding-top: 1em; - padding-bottom: 1em; -} - -#body_content { - /* push footer down */ - min-height: 80vh; -} - -.footer-list { - list-style: none; -} - -.cushion-above { - padding-top: 2em; -} - -.cushion-below { - padding-bottom: 2em; -} - -.invert { - -webkit-filter: invert(100%); - filter: invert(100%); -} - -/* overrides bootstrap defaults. */ -.navbar-brand { - display: contents; -} - -.checkmark { - height: 1em; - width: 1em; - margin-right: 0.3em; - vertical-align: baseline; - position: relative; - top: 0.2em; -} - -.checklist { - margin-top: 1em; - margin-bottom: 1em; - list-style-type: none; - padding-left: 0px; - font-size: 1.2rem; -} - -.tlr { - display: inline-block; - position: relative; -} - -.tlr::before { - content: ""; - position: absolute; - width: 100%; - height: 25%; - bottom: 0; - left: 0.2em; - background: rgba(170, 57, 57, 0.3); - z-index: -1; -} - - -.timeline header { - text-align: left; - margin-bottom: 5px; -} - -ul.timeline { - list-style-type: none; - position: relative; -} - -ul.timeline:before { - content: ' '; - background: #d4d9df; - display: inline-block; - position: absolute; - left: 29px; - width: 2px; - height: 100%; - z-index: 400; -} - -ul.timeline>li { - margin: 20px 0; - padding-left: 20px; -} - -ul.timeline>li:before { - content: ' '; - background: white; - display: inline-block; - position: absolute; - border-radius: 50%; - border: 3px solid #0042b3; - left: 20px; - width: 20px; - height: 20px; - z-index: 400; -} - -.section-consortium .divider { - position: relative; - border-bottom: 1px solid #f0f0f0; - margin-bottom: 30px; - margin-top: 30px; -} - -.section-consortium .divider:before { - position: absolute; - content: ''; - width: 30px; - height: 30px; - border: 1px solid #f0f0f0; - left: 50%; - margin-left: -15px; - top: 50%; - background: #fff; - margin-top: -15px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); -} - -.section-consortium .divider:after { - position: absolute; - content: ''; - width: 20px; - height: 20px; - border: 1px solid #A5C663; - left: 50%; - margin-left: -10px; - top: 50%; - background: #A5C663; - margin-top: -10px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); -} - -.section-consortium .card-note { - overflow: hidden; - line-height: 1.5rem; - height: 4.5rem; - min-height: 4.5rem; -} - - -.consortium a, -.consortium a:link, -.consortium a:visited { - text-decoration: underline; - color: black; -} - -.consortium h4 { - color: #555; - text-align: left; - text-transform: uppercase; - font-weight: bold; - position: relative; - margin: 30px 0 60px; - padding: 5px; -} - -.consortium h4::after { - content: ""; - width: 170px; - position: absolute; - text-align: left; - height: 13%; - bottom: 0; - left: 0.2em; - background: #4e7bca; - z-index: -1; -} - -.consortium .list-group { - max-height: 400px; - margin-bottom: 10px; - overflow: scroll; - -webkit-overflow-scrolling: touch; -} - -.consortium .mb-1 { - color: #555; -} - -.consortium .list-group-item, -.consortium .list-group-item-action { - text-decoration: none; -} - -.announce .col-center { - margin: 0 auto; - float: none !important; -} - -.announce .carousel { - margin-bottom: 10px; - padding: 0 70px; -} - -.announce .description { - max-height: 100px; - min-height: 100px; - overflow: scroll; -} - -.announce .contact { - max-height: 90px; - min-height: 90px; - /* overflow: scroll; */ -} - -.announce .carousel .carousel-item { - color: #999; - font-size: 14px; - text-align: center; - overflow: hidden; - min-height: 290px; -} - -.announce .carousel .carousel-item .img-box { - width: 258px; - height: 160px; - margin: 0 auto; - padding: 5px; - border: 1px solid #ddd; - border-radius: 5%; -} - -.announce .carousel .img-box img { - width: 100%; - height: 100%; - display: block; - border-radius: 5px; -} - -.announce .carousel .testimonial { - padding: 30px 0 10px; -} - -.announce .carousel .overview { - font-style: italic; -} - -.announce .carousel .overview b { - text-transform: uppercase; - color: #4e7bca; -} - -.announce .carousel-control-prev, -.announce .carousel-control-next { - width: 40px; - height: 40px; - margin-top: -20px; - top: 50%; - background: none; -} - -.announce .carousel-control-prev i, -.announce .carousel-control-next i { - font-size: 68px; - line-height: 42px; - position: absolute; - display: inline-block; - color: rgba(0, 0, 0, 0.8); - text-shadow: 0 3px 3px #e6e6e6, 0 0 0 #000; -} - -.announce .carousel-indicators { - bottom: -40px; -} - -.announce .carousel-indicators button, -.announce .carousel-indicators button.active { - width: 12px; - height: 12px; - margin: 1px 3px; - border-radius: 50%; - border: none; -} - -.announce .carousel-indicators button { - background: #999; - border-color: transparent; - box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2); -} - -.announce .carousel-indicators button.active { - background: #555; - box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2); -} diff --git a/template/cashier.html.j2 b/template/cashier.html.j2 @@ -2,28 +2,8 @@ {% block subtitle %}{{ _("Cashier")}}{% endblock subtitle %} {% block head_content %} <style type="text/css"> - .greenbox { - background-color: #5EFF64; - border: solid; - border-radius: 5px; - padding: 0.5em; - } - .bluebox { - background-color: #C2C6FF; - border: solid; - border-radius: 5px; - padding: 0.5em; - } - .error { - font-style: italic; - display: none; - } - #install-result { - font-weight: bold; - } - main ul li { - margin-bottom: 1em; + margin-bottom: 1em; } </style> {% endblock head_content %} diff --git a/template/pos.html.j2 b/template/pos.html.j2 @@ -2,28 +2,8 @@ {% block subtitle %}{{ _("Point of Sale")}}{% endblock subtitle %} {% block head_content %} <style type="text/css"> - .greenbox { - background-color: #5EFF64; - border: solid; - border-radius: 5px; - padding: 0.5em; - } - .bluebox { - background-color: #C2C6FF; - border: solid; - border-radius: 5px; - padding: 0.5em; - } - .error { - font-style: italic; - display: none; - } - #install-result { - font-weight: bold; - } - main ul li { - margin-bottom: 1em; + margin-bottom: 1em; } </style> {% endblock head_content %}