From d45aedc71f2da245187d23b4e909992353adf040 Mon Sep 17 00:00:00 2001 From: Yuki Date: Sun, 30 Apr 2023 13:29:40 +0200 Subject: [PATCH] re-add files --- LICENSE.md | 41 + README.md | 6 +- css/iconify.css | 27 + css/mini-dark.css | 2086 +++++++++++++++++++++++++++++++++++++++++++++ index.html | 79 ++ script.js | 218 +++++ 6 files changed, 2456 insertions(+), 1 deletion(-) create mode 100644 LICENSE.md create mode 100644 css/iconify.css create mode 100644 css/mini-dark.css create mode 100644 index.html create mode 100644 script.js diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..36dc8db --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,41 @@ +# Creative Commons CC0 1.0 Universal + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. + +## Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. + +1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. + +2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. + +3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. + +4. __Limitations and Disclaimers.__ + + a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. diff --git a/README.md b/README.md index 6f19bbd..0614d47 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ -# veripride +# VeriPride +A customizable pride flag style verified badge generator. +By default, all images generated using this tool have the same license as the tool itself. +## License +See [LICENSE.md](LICENSE.md) diff --git a/css/iconify.css b/css/iconify.css new file mode 100644 index 0000000..4e2d5b9 --- /dev/null +++ b/css/iconify.css @@ -0,0 +1,27 @@ +iconify-icon { + height: 1rem; + vertical-align: middle; + position: relative; + top: -2px; + width: 1rem; +} + +.pink { + color: #f6d; +} + +.muted { + color: #fff3; +} + +.red { + color: #f34; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} \ No newline at end of file diff --git a/css/mini-dark.css b/css/mini-dark.css new file mode 100644 index 0000000..30346a9 --- /dev/null +++ b/css/mini-dark.css @@ -0,0 +1,2086 @@ +@charset "UTF-8"; +/* + Flavor name: Dark (mini-dark) + Author: Angelos Chalaris (chalarangelo@gmail.com) + Maintainers: Angelos Chalaris + mini.css version: v3.0.1 +*/ +/* + Browsers resets and base typography. +*/ +/* Core module CSS variable definitions */ +:root { + --fore-color: #fdfdfd; + --secondary-fore-color: #f0f0f0; + --back-color: #000; + --secondary-back-color: #222; + --blockquote-color: #f57c00; + --pre-color: #1565c0; + --border-color: #444; + --secondary-border-color: #333; + --heading-ratio: 1.19; + --universal-margin: 0.5rem; + --universal-padding: 0.5rem; + --universal-border-radius: 0.5rem; + --a-link-color: #0277bd; + --a-visited-color: #01579b; +} + +html { + font-size: 16px; +} + +a, b, del, em, i, ins, q, span, strong, u { + font-size: 1em; +} + +html, * { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; + line-height: 1.5; + -webkit-text-size-adjust: 100%; +} + +* { + font-size: 1rem; +} + +body { + margin: 0; + color: var(--fore-color); + background: var(--back-color); +} + +details { + display: block; +} + +summary { + display: list-item; +} + +abbr[title] { + border-bottom: none; + text-decoration: underline dotted; +} + +input { + overflow: visible; +} + +img { + max-width: 100%; + height: auto; +} + +h1, h2, h3, h4, h5, h6 { + line-height: 1.2; + margin: calc(1.5 * var(--universal-margin)) var(--universal-margin); + font-weight: 500; +} + +h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { + color: var(--secondary-fore-color); + display: block; + margin-top: -0.25rem; +} + +h1 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio)); +} + +h2 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio)); +} + +h3 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio)); +} + +h4 { + font-size: calc(1rem * var(--heading-ratio)); +} + +h5 { + font-size: 1rem; +} + +h6 { + font-size: calc(1rem / var(--heading-ratio)); +} + +p { + margin: var(--universal-margin); +} + +ol, ul { + margin: var(--universal-margin); + padding-left: calc(2 * var(--universal-margin)); +} + +b, strong { + font-weight: 700; +} + +hr { + box-sizing: content-box; + border: 0; + line-height: 1.25em; + margin: var(--universal-margin); + height: 0.0625rem; + background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent); +} + +blockquote { + display: block; + position: relative; + font-style: italic; + color: var(--secondary-fore-color); + margin: var(--universal-margin); + padding: calc(3 * var(--universal-padding)); + border: 0.0625rem solid var(--secondary-border-color); + border-left: 0.375rem solid var(--blockquote-color); + border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; +} + +blockquote:before { + position: absolute; + top: calc(0rem - var(--universal-padding)); + left: 0; + font-family: sans-serif; + font-size: 3rem; + font-weight: 700; + content: "\201c"; + color: var(--blockquote-color); +} + +blockquote[cite]:after { + font-style: normal; + font-size: 0.75em; + font-weight: 700; + content: "\a— " attr(cite); + white-space: pre; +} + +code, kbd, pre, samp { + font-family: Menlo, Consolas, monospace; + font-size: 0.85em; +} + +code { + background: var(--secondary-back-color); + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); +} + +kbd { + background: var(--fore-color); + color: var(--back-color); + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); +} + +pre { + overflow: auto; + background: var(--secondary-back-color); + padding: calc(1.5 * var(--universal-padding)); + margin: var(--universal-margin); + border: 0.0625rem solid var(--secondary-border-color); + border-left: 0.25rem solid var(--pre-color); + border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; +} + +sup, sub, code, kbd { + line-height: 0; + position: relative; + vertical-align: baseline; +} + +small, sup, sub, figcaption { + font-size: 0.75em; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +figure { + margin: var(--universal-margin); +} + +figcaption { + color: var(--secondary-fore-color); +} + +a { + text-decoration: none; +} + +a:link { + color: var(--a-link-color); +} + +a:visited { + color: var(--a-visited-color); +} + +a:hover, a:focus { + text-decoration: underline; +} + +/* + Definitions for the grid system, cards and containers. +*/ +.container { + margin: 0 auto; + padding: 0 calc(1.5 * var(--universal-padding)); +} + +.row { + box-sizing: border-box; + display: flex; + flex: 0 1 auto; + flex-flow: row wrap; +} + +.col-sm, +[class^='col-sm-'], +[class^='col-sm-offset-'], +.row[class*='cols-sm-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); +} + +.col-sm, +.row.cols-sm > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; +} + +.col-sm-1, +.row.cols-sm-1 > * { + max-width: 8.33333%; + flex-basis: 8.33333%; +} + +.col-sm-offset-0 { + margin-left: 0; +} + +.col-sm-2, +.row.cols-sm-2 > * { + max-width: 16.66667%; + flex-basis: 16.66667%; +} + +.col-sm-offset-1 { + margin-left: 8.33333%; +} + +.col-sm-3, +.row.cols-sm-3 > * { + max-width: 25%; + flex-basis: 25%; +} + +.col-sm-offset-2 { + margin-left: 16.66667%; +} + +.col-sm-4, +.row.cols-sm-4 > * { + max-width: 33.33333%; + flex-basis: 33.33333%; +} + +.col-sm-offset-3 { + margin-left: 25%; +} + +.col-sm-5, +.row.cols-sm-5 > * { + max-width: 41.66667%; + flex-basis: 41.66667%; +} + +.col-sm-offset-4 { + margin-left: 33.33333%; +} + +.col-sm-6, +.row.cols-sm-6 > * { + max-width: 50%; + flex-basis: 50%; +} + +.col-sm-offset-5 { + margin-left: 41.66667%; +} + +.col-sm-7, +.row.cols-sm-7 > * { + max-width: 58.33333%; + flex-basis: 58.33333%; +} + +.col-sm-offset-6 { + margin-left: 50%; +} + +.col-sm-8, +.row.cols-sm-8 > * { + max-width: 66.66667%; + flex-basis: 66.66667%; +} + +.col-sm-offset-7 { + margin-left: 58.33333%; +} + +.col-sm-9, +.row.cols-sm-9 > * { + max-width: 75%; + flex-basis: 75%; +} + +.col-sm-offset-8 { + margin-left: 66.66667%; +} + +.col-sm-10, +.row.cols-sm-10 > * { + max-width: 83.33333%; + flex-basis: 83.33333%; +} + +.col-sm-offset-9 { + margin-left: 75%; +} + +.col-sm-11, +.row.cols-sm-11 > * { + max-width: 91.66667%; + flex-basis: 91.66667%; +} + +.col-sm-offset-10 { + margin-left: 83.33333%; +} + +.col-sm-12, +.row.cols-sm-12 > * { + max-width: 100%; + flex-basis: 100%; +} + +.col-sm-offset-11 { + margin-left: 91.66667%; +} + +.col-sm-normal { + order: initial; +} + +.col-sm-first { + order: -999; +} + +.col-sm-last { + order: 999; +} + +@media screen and (min-width: 768px) { + .col-md, + [class^='col-md-'], + [class^='col-md-offset-'], + .row[class*='cols-md-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); + } + .col-md, + .row.cols-md > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; + } + .col-md-1, + .row.cols-md-1 > * { + max-width: 8.33333%; + flex-basis: 8.33333%; + } + .col-md-offset-0 { + margin-left: 0; + } + .col-md-2, + .row.cols-md-2 > * { + max-width: 16.66667%; + flex-basis: 16.66667%; + } + .col-md-offset-1 { + margin-left: 8.33333%; + } + .col-md-3, + .row.cols-md-3 > * { + max-width: 25%; + flex-basis: 25%; + } + .col-md-offset-2 { + margin-left: 16.66667%; + } + .col-md-4, + .row.cols-md-4 > * { + max-width: 33.33333%; + flex-basis: 33.33333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-5, + .row.cols-md-5 > * { + max-width: 41.66667%; + flex-basis: 41.66667%; + } + .col-md-offset-4 { + margin-left: 33.33333%; + } + .col-md-6, + .row.cols-md-6 > * { + max-width: 50%; + flex-basis: 50%; + } + .col-md-offset-5 { + margin-left: 41.66667%; + } + .col-md-7, + .row.cols-md-7 > * { + max-width: 58.33333%; + flex-basis: 58.33333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-8, + .row.cols-md-8 > * { + max-width: 66.66667%; + flex-basis: 66.66667%; + } + .col-md-offset-7 { + margin-left: 58.33333%; + } + .col-md-9, + .row.cols-md-9 > * { + max-width: 75%; + flex-basis: 75%; + } + .col-md-offset-8 { + margin-left: 66.66667%; + } + .col-md-10, + .row.cols-md-10 > * { + max-width: 83.33333%; + flex-basis: 83.33333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-11, + .row.cols-md-11 > * { + max-width: 91.66667%; + flex-basis: 91.66667%; + } + .col-md-offset-10 { + margin-left: 83.33333%; + } + .col-md-12, + .row.cols-md-12 > * { + max-width: 100%; + flex-basis: 100%; + } + .col-md-offset-11 { + margin-left: 91.66667%; + } + .col-md-normal { + order: initial; + } + .col-md-first { + order: -999; + } + .col-md-last { + order: 999; + } +} + +@media screen and (min-width: 1280px) { + .col-lg, + [class^='col-lg-'], + [class^='col-lg-offset-'], + .row[class*='cols-lg-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); + } + .col-lg, + .row.cols-lg > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; + } + .col-lg-1, + .row.cols-lg-1 > * { + max-width: 8.33333%; + flex-basis: 8.33333%; + } + .col-lg-offset-0 { + margin-left: 0; + } + .col-lg-2, + .row.cols-lg-2 > * { + max-width: 16.66667%; + flex-basis: 16.66667%; + } + .col-lg-offset-1 { + margin-left: 8.33333%; + } + .col-lg-3, + .row.cols-lg-3 > * { + max-width: 25%; + flex-basis: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66667%; + } + .col-lg-4, + .row.cols-lg-4 > * { + max-width: 33.33333%; + flex-basis: 33.33333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-5, + .row.cols-lg-5 > * { + max-width: 41.66667%; + flex-basis: 41.66667%; + } + .col-lg-offset-4 { + margin-left: 33.33333%; + } + .col-lg-6, + .row.cols-lg-6 > * { + max-width: 50%; + flex-basis: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66667%; + } + .col-lg-7, + .row.cols-lg-7 > * { + max-width: 58.33333%; + flex-basis: 58.33333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-8, + .row.cols-lg-8 > * { + max-width: 66.66667%; + flex-basis: 66.66667%; + } + .col-lg-offset-7 { + margin-left: 58.33333%; + } + .col-lg-9, + .row.cols-lg-9 > * { + max-width: 75%; + flex-basis: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66667%; + } + .col-lg-10, + .row.cols-lg-10 > * { + max-width: 83.33333%; + flex-basis: 83.33333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-11, + .row.cols-lg-11 > * { + max-width: 91.66667%; + flex-basis: 91.66667%; + } + .col-lg-offset-10 { + margin-left: 83.33333%; + } + .col-lg-12, + .row.cols-lg-12 > * { + max-width: 100%; + flex-basis: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66667%; + } + .col-lg-normal { + order: initial; + } + .col-lg-first { + order: -999; + } + .col-lg-last { + order: 999; + } +} + +/* Card component CSS variable definitions */ +:root { + --card-back-color: #111; + --card-fore-color: #eee; + --card-border-color: #333; +} + +.card { + display: flex; + flex-direction: column; + justify-content: space-between; + align-self: center; + position: relative; + width: 100%; + background: var(--card-back-color); + color: var(--card-fore-color); + border: 0.0625rem solid var(--card-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); + overflow: hidden; +} + +@media screen and (min-width: 320px) { + .card { + max-width: 320px; + } +} + +.card > .section { + background: var(--card-back-color); + color: var(--card-fore-color); + box-sizing: border-box; + margin: 0; + border: 0; + border-radius: 0; + border-bottom: 0.0625rem solid var(--card-border-color); + padding: var(--universal-padding); + width: 100%; +} + +.card > .section.media { + height: 200px; + padding: 0; + -o-object-fit: cover; + object-fit: cover; +} + +.card > .section:last-child { + border-bottom: 0; +} + +/* + Custom elements for card elements. +*/ +@media screen and (min-width: 240px) { + .card.small { + max-width: 240px; + } +} + +@media screen and (min-width: 480px) { + .card.large { + max-width: 480px; + } +} + +.card.fluid { + max-width: 100%; + width: auto; +} + +.card.warning { + --card-back-color: #ffca28; + --card-fore-color: #111; + --card-border-color: #e8b825; +} + +.card.error { + --card-back-color: #b71c1c; + --card-fore-color: #f8f8f8; + --card-border-color: #a71a1a; +} + +.card > .section.dark { + --card-back-color: #e0e0e0; + --card-fore-color: #111; +} + +.card > .section.double-padded { + padding: calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding)); +} + +/* + Definitions for forms and input elements. +*/ +/* Input_control module CSS variable definitions */ +:root { + --form-back-color: #222; + --form-fore-color: #fdfdfd; + --form-border-color: #333; + --input-back-color: #111; + --input-fore-color: #fdfdfd; + --input-border-color: #333; + --input-focus-color: #0288d1; + --input-invalid-color: #d32f2f; + --button-back-color: #212121; + --button-hover-back-color: #444; + --button-fore-color: #e2e2e2; + --button-border-color: transparent; + --button-hover-border-color: transparent; + --button-group-border-color: rgba(124, 124, 124, 0.54); +} + +form { + background: var(--form-back-color); + color: var(--form-fore-color); + border: 0.0625rem solid var(--form-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); + padding: calc(2 * var(--universal-padding)) var(--universal-padding); +} + +fieldset { + border: 0.0625rem solid var(--form-border-color); + border-radius: var(--universal-border-radius); + margin: calc(var(--universal-margin) / 4); + padding: var(--universal-padding); +} + +legend { + box-sizing: border-box; + display: table; + max-width: 100%; + white-space: normal; + font-weight: 700; + padding: calc(var(--universal-padding) / 2); +} + +label { + padding: calc(var(--universal-padding) / 2) var(--universal-padding); +} + +.input-group { + display: inline-block; +} + +.input-group.fluid { + display: flex; + align-items: center; + justify-content: center; +} + +.input-group.fluid > input { + max-width: 100%; + flex-grow: 1; + flex-basis: 0px; +} + +@media screen and (max-width: 767px) { + .input-group.fluid { + align-items: stretch; + flex-direction: column; + } +} + +.input-group.vertical { + display: flex; + align-items: stretch; + flex-direction: column; +} + +.input-group.vertical > input { + max-width: 100%; + flex-grow: 1; + flex-basis: 0px; +} + +[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { + height: auto; +} + +[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; +} + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"], +[type="password"], [type="url"], [type="tel"], [type="checkbox"], [type="radio"], textarea, select { + box-sizing: border-box; + background: var(--input-back-color); + color: var(--input-fore-color); + border: 0.0625rem solid var(--input-border-color); + border-radius: var(--universal-border-radius); + margin: calc(var(--universal-margin) / 2); + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); +} + +input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus { + border-color: var(--input-focus-color); + box-shadow: none; +} + +input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid { + border-color: var(--input-invalid-color); + box-shadow: none; +} + +input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] { + background: var(--secondary-back-color); +} + +select { + max-width: 100%; +} + +option { + overflow: hidden; + text-overflow: ellipsis; +} + +[type="checkbox"], [type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + position: relative; + height: calc(1rem + var(--universal-padding) / 2); + width: calc(1rem + var(--universal-padding) / 2); + vertical-align: text-bottom; + padding: 0; + flex-basis: calc(1rem + var(--universal-padding) / 2) !important; + flex-grow: 0 !important; +} + +[type="checkbox"]:checked:before, [type="radio"]:checked:before { + position: absolute; +} + +[type="checkbox"]:checked:before { + content: '\2713'; + font-family: sans-serif; + font-size: calc(1rem + var(--universal-padding) / 2); + top: calc(0rem - var(--universal-padding)); + left: calc(var(--universal-padding) / 4); +} + +[type="radio"] { + border-radius: 100%; +} + +[type="radio"]:checked:before { + border-radius: 100%; + content: ''; + top: calc(0.0625rem + var(--universal-padding) / 2); + left: calc(0.0625rem + var(--universal-padding) / 2); + background: var(--input-fore-color); + width: 0.5rem; + height: 0.5rem; +} + +:placeholder-shown { + color: var(--input-fore-color); +} + +::-ms-placeholder { + color: var(--input-fore-color); + opacity: 0.54; +} + +button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +button, html [type="button"], [type="reset"], [type="submit"] { + -webkit-appearance: button; +} + +button { + overflow: visible; + text-transform: none; +} + +button, [type="button"], [type="submit"], [type="reset"], +a.button, label.button, .button, +a[role="button"], label[role="button"], [role="button"] { + display: inline-block; + background: var(--button-back-color); + color: var(--button-fore-color); + border: 0.0625rem solid var(--button-border-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); + margin: var(--universal-margin); + text-decoration: none; + cursor: pointer; + transition: background 0.3s; +} + +button:hover, button:focus, [type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus, [type="reset"]:hover, [type="reset"]:focus, +a.button:hover, +a.button:focus, label.button:hover, label.button:focus, .button:hover, .button:focus, +a[role="button"]:hover, +a[role="button"]:focus, label[role="button"]:hover, label[role="button"]:focus, [role="button"]:hover, [role="button"]:focus { + background: var(--button-hover-back-color); + border-color: var(--button-hover-border-color); +} + +input:disabled, input[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled], button:disabled, button[disabled], .button:disabled, .button[disabled], [role="button"]:disabled, [role="button"][disabled] { + cursor: not-allowed; + opacity: 0.75; +} + +.button-group { + display: flex; + border: 0.0625rem solid var(--button-group-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); +} + +.button-group > button, .button-group [type="button"], .button-group > [type="submit"], .button-group > [type="reset"], +.button-group > .button, .button-group > [role="button"] { + margin: 0; + max-width: 100%; + flex: 1 1 auto; + text-align: center; + border: 0; + border-radius: 0; + box-shadow: none; +} + +.button-group > :not(:first-child) { + border-left: 0.0625rem solid var(--button-group-border-color); +} + +@media screen and (max-width: 767px) { + .button-group { + flex-direction: column; + } + .button-group > :not(:first-child) { + border: 0; + border-top: 0.0625rem solid var(--button-group-border-color); + } +} + +/* + Custom elements for forms and input elements. +*/ +button.primary, [type="button"].primary, [type="submit"].primary, [type="reset"].primary, .button.primary, [role="button"].primary { + --button-back-color: #1976d2; + --button-fore-color: #f8f8f8; +} + +button.primary:hover, button.primary:focus, [type="button"].primary:hover, [type="button"].primary:focus, [type="submit"].primary:hover, [type="submit"].primary:focus, [type="reset"].primary:hover, [type="reset"].primary:focus, .button.primary:hover, .button.primary:focus, [role="button"].primary:hover, [role="button"].primary:focus { + --button-hover-back-color: #1565c0; +} + +button.secondary, [type="button"].secondary, [type="submit"].secondary, [type="reset"].secondary, .button.secondary, [role="button"].secondary { + --button-back-color: #d32f2f; + --button-fore-color: #f8f8f8; +} + +button.secondary:hover, button.secondary:focus, [type="button"].secondary:hover, [type="button"].secondary:focus, [type="submit"].secondary:hover, [type="submit"].secondary:focus, [type="reset"].secondary:hover, [type="reset"].secondary:focus, .button.secondary:hover, .button.secondary:focus, [role="button"].secondary:hover, [role="button"].secondary:focus { + --button-hover-back-color: #c62828; +} + +button.tertiary, [type="button"].tertiary, [type="submit"].tertiary, [type="reset"].tertiary, .button.tertiary, [role="button"].tertiary { + --button-back-color: #308732; + --button-fore-color: #f8f8f8; +} + +button.tertiary:hover, button.tertiary:focus, [type="button"].tertiary:hover, [type="button"].tertiary:focus, [type="submit"].tertiary:hover, [type="submit"].tertiary:focus, [type="reset"].tertiary:hover, [type="reset"].tertiary:focus, .button.tertiary:hover, .button.tertiary:focus, [role="button"].tertiary:hover, [role="button"].tertiary:focus { + --button-hover-back-color: #277529; +} + +button.inverse, [type="button"].inverse, [type="submit"].inverse, [type="reset"].inverse, .button.inverse, [role="button"].inverse { + --button-back-color: #f8f8f8; + --button-fore-color: #212121; +} + +button.inverse:hover, button.inverse:focus, [type="button"].inverse:hover, [type="button"].inverse:focus, [type="submit"].inverse:hover, [type="submit"].inverse:focus, [type="reset"].inverse:hover, [type="reset"].inverse:focus, .button.inverse:hover, .button.inverse:focus, [role="button"].inverse:hover, [role="button"].inverse:focus { + --button-hover-back-color: #f0f0f0; +} + +button.small, [type="button"].small, [type="submit"].small, [type="reset"].small, .button.small, [role="button"].small { + padding: calc(0.5 * var(--universal-padding)) calc(0.75 * var(--universal-padding)); + margin: var(--universal-margin); +} + +button.large, [type="button"].large, [type="submit"].large, [type="reset"].large, .button.large, [role="button"].large { + padding: calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding)); + margin: var(--universal-margin); +} + +/* + Definitions for navigation elements. +*/ +/* Navigation module CSS variable definitions */ +:root { + --header-back-color: #111; + --header-hover-back-color: #222; + --header-fore-color: #f0f0f0; + --header-border-color: #333; + --nav-back-color: #111; + --nav-hover-back-color: #222; + --nav-fore-color: #f0f0f0; + --nav-border-color: #333; + --nav-link-color: #0277bd; + --footer-fore-color: #f0f0f0; + --footer-back-color: #111; + --footer-border-color: #333; + --footer-link-color: #0277bd; + --drawer-back-color: #111; + --drawer-hover-back-color: #222; + --drawer-border-color: #333; + --drawer-close-color: #f0f0f0; +} + +header { + height: 3.1875rem; + background: var(--header-back-color); + color: var(--header-fore-color); + border-bottom: 0.0625rem solid var(--header-border-color); + padding: calc(var(--universal-padding) / 4) 0; + white-space: nowrap; + overflow-x: auto; + overflow-y: hidden; +} + +header.row { + box-sizing: content-box; +} + +header .logo { + color: var(--header-fore-color); + font-size: 1.75rem; + padding: var(--universal-padding) calc(2 * var(--universal-padding)); + text-decoration: none; + line-height: 2rem; +} + +header button, header [type="button"], header .button, header [role="button"] { + box-sizing: border-box; + position: relative; + top: calc(0rem - var(--universal-padding) / 4); + height: calc(3.1875rem + var(--universal-padding) / 2); + background: var(--header-back-color); + line-height: calc(3.1875rem - var(--universal-padding) * 1.5); + text-align: center; + color: var(--header-fore-color); + border: 0; + border-radius: 0; + margin: 0; + text-transform: uppercase; +} + +header button:hover, header button:focus, header [type="button"]:hover, header [type="button"]:focus, header .button:hover, header .button:focus, header [role="button"]:hover, header [role="button"]:focus { + background: var(--header-hover-back-color); +} + +nav { + background: var(--nav-back-color); + color: var(--nav-fore-color); + border: 0.0625rem solid var(--nav-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); +} + +nav * { + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); +} + +nav a, nav a:visited { + display: block; + color: var(--nav-link-color); + border-radius: var(--universal-border-radius); + transition: background 0.3s; +} + +nav a:hover, nav a:focus, nav a:visited:hover, nav a:visited:focus { + text-decoration: none; + background: var(--nav-hover-back-color); +} + +nav .sublink-1 { + position: relative; + margin-left: calc(2 * var(--universal-padding)); +} + +nav .sublink-1:before { + position: absolute; + left: calc(var(--universal-padding) - 1 * var(--universal-padding)); + top: -0.0625rem; + content: ''; + height: 100%; + border: 0.0625rem solid var(--nav-border-color); + border-left: 0; +} + +nav .sublink-2 { + position: relative; + margin-left: calc(4 * var(--universal-padding)); +} + +nav .sublink-2:before { + position: absolute; + left: calc(var(--universal-padding) - 3 * var(--universal-padding)); + top: -0.0625rem; + content: ''; + height: 100%; + border: 0.0625rem solid var(--nav-border-color); + border-left: 0; +} + +footer { + background: var(--footer-back-color); + color: var(--footer-fore-color); + border-top: 0.0625rem solid var(--footer-border-color); + padding: calc(2 * var(--universal-padding)) var(--universal-padding); + font-size: 0.875rem; +} + +footer a, footer a:visited { + color: var(--footer-link-color); +} + +header.sticky { + position: -webkit-sticky; + position: sticky; + z-index: 1101; + top: 0; +} + +footer.sticky { + position: -webkit-sticky; + position: sticky; + z-index: 1101; + bottom: 0; +} + +.drawer-toggle:before { + display: inline-block; + position: relative; + vertical-align: bottom; + content: '\00a0\2261\00a0'; + font-family: sans-serif; + font-size: 1.5em; +} + +@media screen and (min-width: 768px) { + .drawer-toggle:not(.persistent) { + display: none; + } +} + +[type="checkbox"].drawer { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); +} + +[type="checkbox"].drawer + * { + display: block; + box-sizing: border-box; + position: fixed; + top: 0; + width: 320px; + height: 100vh; + overflow-y: auto; + background: var(--drawer-back-color); + border: 0.0625rem solid var(--drawer-border-color); + border-radius: 0; + margin: 0; + z-index: 1110; + right: -320px; + transition: right 0.3s; +} + +[type="checkbox"].drawer + * .drawer-close { + position: absolute; + top: var(--universal-margin); + right: var(--universal-margin); + z-index: 1111; + width: 2rem; + height: 2rem; + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: 0; + cursor: pointer; + transition: background 0.3s; +} + +[type="checkbox"].drawer + * .drawer-close:before { + display: block; + content: '\00D7'; + color: var(--drawer-close-color); + position: relative; + font-family: sans-serif; + font-size: 2rem; + line-height: 1; + text-align: center; +} + +[type="checkbox"].drawer + * .drawer-close:hover, [type="checkbox"].drawer + * .drawer-close:focus { + background: var(--drawer-hover-back-color); +} + +@media screen and (max-width: 320px) { + [type="checkbox"].drawer + * { + width: 100%; + } +} + +[type="checkbox"].drawer:checked + * { + right: 0; +} + +@media screen and (min-width: 768px) { + [type="checkbox"].drawer:not(.persistent) + * { + position: static; + height: 100%; + z-index: 1100; + } + [type="checkbox"].drawer:not(.persistent) + * .drawer-close { + display: none; + } +} + +/* + Definitions for the responsive table component. +*/ +/* Table module CSS variable definitions. */ +:root { + --table-border-color: #444; + --table-border-separator-color: #666; + --table-head-back-color: #212121; + --table-head-fore-color: #fdfdfd; + --table-body-back-color: #111; + --table-body-fore-color: #fdfdfd; + --table-body-alt-back-color: #444; +} + +table { + border-collapse: separate; + border-spacing: 0; + margin: 0; + display: flex; + flex: 0 1 auto; + flex-flow: row wrap; + padding: var(--universal-padding); + padding-top: 0; +} + +table caption { + font-size: 1.5rem; + margin: calc(2 * var(--universal-margin)) 0; + max-width: 100%; + flex: 0 0 100%; +} + +table thead, table tbody { + display: flex; + flex-flow: row wrap; + border: 0.0625rem solid var(--table-border-color); +} + +table thead { + z-index: 999; + border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; + border-bottom: 0.0625rem solid var(--table-border-separator-color); +} + +table thead th:first-of-type { + border-top-left-radius: var(--universal-border-radius); +} + +table thead th:last-of-type { + border-top-right-radius: var(--universal-border-radius); +} + +table tbody { + border-top: 0; + margin-top: calc(0 - var(--universal-margin)); + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); +} + +table tbody tr:last-of-type td:first-of-type { + border-bottom-left-radius: var(--universal-border-radius); +} + +table tbody tr:last-of-type td:last-of-type { + border-bottom-right-radius: var(--universal-border-radius); +} + +table tr { + display: flex; + padding: 0; +} + +table th, table td { + padding: calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding)); +} + +table th { + text-align: left; + background: var(--table-head-back-color); + color: var(--table-head-fore-color); +} + +table td { + background: var(--table-body-back-color); + color: var(--table-body-fore-color); + border-top: 0.0625rem solid var(--table-border-color); +} + +table:not(.horizontal) { + overflow: auto; + max-height: 400px; +} + +table:not(.horizontal) thead, table:not(.horizontal) tbody { + max-width: 100%; + flex: 0 0 100%; +} + +table:not(.horizontal) tr { + flex-flow: row wrap; + flex: 0 0 100%; +} + +table:not(.horizontal) th, table:not(.horizontal) td { + flex: 1 0 0%; + overflow: hidden; + text-overflow: ellipsis; +} + +table:not(.horizontal) thead { + position: sticky; + top: 0; +} + +table:not(.horizontal) tbody tr:first-child td { + border-top: 0; +} + +table.horizontal { + border: 0; +} + +table.horizontal thead, table.horizontal tbody { + border: 0; + flex: .2 0 0; + flex-flow: row nowrap; +} + +table.horizontal tbody { + overflow: auto; + justify-content: space-between; + flex: .8 0 0; + margin-left: 0; + padding-bottom: calc(var(--universal-padding) / 4); +} + +table.horizontal tr { + flex-direction: column; + flex: 1 0 auto; +} + +table.horizontal th, table.horizontal td { + width: auto; + border: 0; + border-bottom: 0.0625rem solid var(--table-border-color); +} + +table.horizontal th:not(:first-child), table.horizontal td:not(:first-child) { + border-top: 0; +} + +table.horizontal th { + text-align: right; + border-left: 0.0625rem solid var(--table-border-color); + border-right: 0.0625rem solid var(--table-border-separator-color); +} + +table.horizontal thead tr:first-child { + padding-left: 0; +} + +table.horizontal th:first-child, table.horizontal td:first-child { + border-top: 0.0625rem solid var(--table-border-color); +} + +table.horizontal tbody tr:last-child td { + border-right: 0.0625rem solid var(--table-border-color); +} + +table.horizontal tbody tr:last-child td:first-child { + border-top-right-radius: 0.25rem; +} + +table.horizontal tbody tr:last-child td:last-child { + border-bottom-right-radius: 0.25rem; +} + +table.horizontal thead tr:first-child th:first-child { + border-top-left-radius: 0.25rem; +} + +table.horizontal thead tr:first-child th:last-child { + border-bottom-left-radius: 0.25rem; +} + +@media screen and (max-width: 767px) { + table, table.horizontal { + border-collapse: collapse; + border: 0; + width: 100%; + display: table; + } + table thead, table th, table.horizontal thead, table.horizontal th { + border: 0; + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + } + table tbody, table.horizontal tbody { + border: 0; + display: table-row-group; + } + table tr, table.horizontal tr { + display: block; + border: 0.0625rem solid var(--table-border-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: var(--universal-margin); + margin-bottom: calc(2 * var(--universal-margin)); + } + table th, table td, table.horizontal th, table.horizontal td { + width: auto; + } + table td, table.horizontal td { + display: block; + border: 0; + text-align: right; + } + table td:before, table.horizontal td:before { + content: attr(data-label); + float: left; + font-weight: 600; + } + table th:first-child, table td:first-child, table.horizontal th:first-child, table.horizontal td:first-child { + border-top: 0; + } + table tbody tr:last-child td, table.horizontal tbody tr:last-child td { + border-right: 0; + } +} + +:root { + --table-body-alt-back-color: #444; +} + +table.striped tr:nth-of-type(2n) > td { + background: var(--table-body-alt-back-color); +} + +@media screen and (max-width: 768px) { + table.striped tr:nth-of-type(2n) { + background: var(--table-body-alt-back-color); + } +} + +:root { + --table-body-hover-back-color: #5c819f; +} + +table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td { + background: var(--table-body-hover-back-color); +} + +@media screen and (max-width: 768px) { + table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td { + background: var(--table-body-hover-back-color); + } +} + +/* + Definitions for contextual background elements, toasts and tooltips. +*/ +/* Contextual module CSS variable definitions */ +:root { + --mark-back-color: #0277bd; + --mark-fore-color: #fafafa; +} + +mark { + background: var(--mark-back-color); + color: var(--mark-fore-color); + font-size: 0.95em; + line-height: 1em; + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); +} + +mark.inline-block { + display: inline-block; + font-size: 1em; + line-height: 1.5; + padding: calc(var(--universal-padding) / 2) var(--universal-padding); +} + +:root { + --toast-back-color: #424242; + --toast-fore-color: #fafafa; +} + +.toast { + position: fixed; + bottom: calc(var(--universal-margin) * 3); + left: 50%; + transform: translate(-50%, -50%); + z-index: 1111; + color: var(--toast-fore-color); + background: var(--toast-back-color); + border-radius: calc(var(--universal-border-radius) * 16); + padding: var(--universal-padding) calc(var(--universal-padding) * 3); +} + +:root { + --tooltip-back-color: #fafafa; + --tooltip-fore-color: #212121; +} + +.tooltip { + position: relative; + display: inline-block; +} + +.tooltip:before, .tooltip:after { + position: absolute; + opacity: 0; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + transition: all 0.3s; + z-index: 1010; + left: 50%; +} + +.tooltip:not(.bottom):before, .tooltip:not(.bottom):after { + bottom: 75%; +} + +.tooltip.bottom:before, .tooltip.bottom:after { + top: 75%; +} + +.tooltip:hover:before, .tooltip:hover:after, .tooltip:focus:before, .tooltip:focus:after { + opacity: 1; + clip: auto; + -webkit-clip-path: inset(0%); + clip-path: inset(0%); +} + +.tooltip:before { + content: ''; + background: transparent; + border: var(--universal-margin) solid transparent; + left: calc(50% - var(--universal-margin)); +} + +.tooltip:not(.bottom):before { + border-top-color: #fafafa; +} + +.tooltip.bottom:before { + border-bottom-color: #fafafa; +} + +.tooltip:after { + content: attr(aria-label); + color: var(--tooltip-fore-color); + background: var(--tooltip-back-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + white-space: nowrap; + transform: translateX(-50%); +} + +.tooltip:not(.bottom):after { + margin-bottom: calc(2 * var(--universal-margin)); +} + +.tooltip.bottom:after { + margin-top: calc(2 * var(--universal-margin)); +} + +:root { + --modal-overlay-color: rgba(0, 0, 0, 0.45); + --modal-close-color: #f0f0f0; + --modal-close-hover-color: #222; +} + +[type="checkbox"].modal { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); +} + +[type="checkbox"].modal + div { + position: fixed; + top: 0; + left: 0; + display: none; + width: 100vw; + height: 100vh; + background: var(--modal-overlay-color); +} + +[type="checkbox"].modal + div .card { + margin: 0 auto; + max-height: 50vh; + overflow: auto; +} + +[type="checkbox"].modal + div .card .modal-close { + position: absolute; + top: 0; + right: 0; + width: 1.75rem; + height: 1.75rem; + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: 0; + cursor: pointer; + transition: background 0.3s; +} + +[type="checkbox"].modal + div .card .modal-close:before { + display: block; + content: '\00D7'; + color: var(--modal-close-color); + position: relative; + font-family: sans-serif; + font-size: 1.75rem; + line-height: 1; + text-align: center; +} + +[type="checkbox"].modal + div .card .modal-close:hover, [type="checkbox"].modal + div .card .modal-close:focus { + background: var(--modal-close-hover-color); +} + +[type="checkbox"].modal:checked + div { + display: flex; + flex: 0 1 auto; + z-index: 1200; +} + +[type="checkbox"].modal:checked + div .card .modal-close { + z-index: 1211; +} + +:root { + --collapse-label-back-color: #111; + --collapse-label-fore-color: #fafafa; + --collapse-label-hover-back-color: #222; + --collapse-selected-label-back-color: #444; + --collapse-border-color: #333; + --collapse-content-back-color: #212121; + --collapse-selected-label-border-color: #0277bd; +} + +.collapse { + width: calc(100% - 2 * var(--universal-margin)); + opacity: 1; + display: flex; + flex-direction: column; + margin: var(--universal-margin); + border-radius: var(--universal-border-radius); +} + +.collapse > [type="radio"], .collapse > [type="checkbox"] { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); +} + +.collapse > label { + flex-grow: 1; + display: inline-block; + height: 1.5rem; + cursor: pointer; + transition: background 0.3s; + color: var(--collapse-label-fore-color); + background: var(--collapse-label-back-color); + border: 0.0625rem solid var(--collapse-border-color); + padding: calc(1.5 * var(--universal-padding)); +} + +.collapse > label:hover, .collapse > label:focus { + background: var(--collapse-label-hover-back-color); +} + +.collapse > label + div { + flex-basis: auto; + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + transition: max-height 0.3s; + max-height: 1px; +} + +.collapse > :checked + label { + background: var(--collapse-selected-label-back-color); + border-bottom-color: var(--collapse-selected-label-border-color); +} + +.collapse > :checked + label + div { + box-sizing: border-box; + position: relative; + width: 100%; + height: auto; + overflow: auto; + margin: 0; + background: var(--collapse-content-back-color); + border: 0.0625rem solid var(--collapse-border-color); + border-top: 0; + padding: var(--universal-padding); + clip: auto; + -webkit-clip-path: inset(0%); + clip-path: inset(0%); + max-height: 400px; +} + +.collapse > label:not(:first-of-type) { + border-top: 0; +} + +.collapse > label:first-of-type { + border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; +} + +.collapse > label:last-of-type:not(:first-of-type) { + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); +} + +.collapse > label:last-of-type:first-of-type { + border-radius: var(--universal-border-radius); +} + +.collapse > :checked:last-of-type:not(:first-of-type) + label { + border-radius: 0; +} + +.collapse > :checked:last-of-type + label + div { + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); +} + +/* + Custom elements for contextual background elements, toasts and tooltips. +*/ +mark.secondary { + --mark-back-color: #d32f2f; +} + +mark.tertiary { + --mark-back-color: #308732; +} + +mark.tag { + padding: calc(var(--universal-padding)/2) var(--universal-padding); + border-radius: 1em; +} + +/* + Definitions for progress elements and spinners. +*/ +/* Progess module CSS variable definitions */ +:root { + --progress-back-color: #aaa; + --progress-fore-color: #555; +} + +progress { + display: block; + vertical-align: baseline; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 0.75rem; + width: calc(100% - 2 * var(--universal-margin)); + margin: var(--universal-margin); + border: 0; + border-radius: calc(2 * var(--universal-border-radius)); + background: var(--progress-back-color); + color: var(--progress-fore-color); +} + +progress::-webkit-progress-value { + background: var(--progress-fore-color); + border-top-left-radius: calc(2 * var(--universal-border-radius)); + border-bottom-left-radius: calc(2 * var(--universal-border-radius)); +} + +progress::-webkit-progress-bar { + background: var(--progress-back-color); +} + +progress::-moz-progress-bar { + background: var(--progress-fore-color); + border-top-left-radius: calc(2 * var(--universal-border-radius)); + border-bottom-left-radius: calc(2 * var(--universal-border-radius)); +} + +progress[value="1000"]::-webkit-progress-value { + border-radius: calc(2 * var(--universal-border-radius)); +} + +progress[value="1000"]::-moz-progress-bar { + border-radius: calc(2 * var(--universal-border-radius)); +} + +progress.inline { + display: inline-block; + vertical-align: middle; + width: 60%; +} + +:root { + --spinner-back-color: #ddd; + --spinner-fore-color: #555; +} + +@keyframes spinner-donut-anim { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.spinner { + display: inline-block; + margin: var(--universal-margin); + border: 0.25rem solid var(--spinner-back-color); + border-left: 0.25rem solid var(--spinner-fore-color); + border-radius: 50%; + width: 1.25rem; + height: 1.25rem; + animation: spinner-donut-anim 1.2s linear infinite; +} + +/* + Custom elements for progress bars and spinners. +*/ +progress.primary { + --progress-fore-color: #1976d2; +} + +progress.secondary { + --progress-fore-color: #d32f2f; +} + +progress.tertiary { + --progress-fore-color: #308732; +} + +.spinner.primary { + --spinner-fore-color: #1976d2; +} + +.spinner.secondary { + --spinner-fore-color: #d32f2f; +} + +.spinner.tertiary { + --spinner-fore-color: #308732; +} + +/* + Definitions for utilities and helper classes. +*/ +/* Utility module CSS variable definitions */ +:root { + --generic-border-color: rgba(0, 0, 0, 0.3); + --generic-box-shadow: 0 0.25rem 0.25rem 0 rgba(0, 0, 0, 0.125), 0 0.125rem 0.125rem -0.125rem rgba(0, 0, 0, 0.125); +} + +.hidden { + display: none !important; +} + +.visually-hidden { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; +} + +.bordered { + border: 0.0625rem solid var(--generic-border-color) !important; +} + +.rounded { + border-radius: var(--universal-border-radius) !important; +} + +.circular { + border-radius: 50% !important; +} + +.shadowed { + box-shadow: var(--generic-box-shadow) !important; +} + +.responsive-margin { + margin: calc(var(--universal-margin) / 4) !important; +} + +@media screen and (min-width: 768px) { + .responsive-margin { + margin: calc(var(--universal-margin) / 2) !important; + } +} + +@media screen and (min-width: 1280px) { + .responsive-margin { + margin: var(--universal-margin) !important; + } +} + +.responsive-padding { + padding: calc(var(--universal-padding) / 4) !important; +} + +@media screen and (min-width: 768px) { + .responsive-padding { + padding: calc(var(--universal-padding) / 2) !important; + } +} + +@media screen and (min-width: 1280px) { + .responsive-padding { + padding: var(--universal-padding) !important; + } +} + +@media screen and (max-width: 767px) { + .hidden-sm { + display: none !important; + } +} + +@media screen and (min-width: 768px) and (max-width: 1279px) { + .hidden-md { + display: none !important; + } +} + +@media screen and (min-width: 1280px) { + .hidden-lg { + display: none !important; + } +} + +@media screen and (max-width: 767px) { + .visually-hidden-sm { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; + } +} + +@media screen and (min-width: 768px) and (max-width: 1279px) { + .visually-hidden-md { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; + } +} + +@media screen and (min-width: 1280px) { + .visually-hidden-lg { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; + } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..5bd3c9a --- /dev/null +++ b/index.html @@ -0,0 +1,79 @@ + + + + + + + + Yuki + + + + + + + + + +

VeriPride Maker

+
+
+
+

Presets

+ +

Stripes

+
+
+
+
+
+
+
+
+
+
+
+

Output

+ + + + + + + + + + + + +
+
+
+ +
+
+ +
+
+
+

* recommended

+

! may cause lag

+
+
+
+ + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..4a6684c --- /dev/null +++ b/script.js @@ -0,0 +1,218 @@ +var presets = { + // gender + trans: ["5BCEFA", "F5A9B8", "FFFFFF", "F5A9B8", "5BCEFA"], + transfem: ["73deff","ffe0ed","ffb5d5","ff8cbe","ffb5d5","ffe0ed","73deff"], + transmasc: ["FF8ABD","CDF5FE","9AEBFF","74DFFF","9AEBFF","CDF5FE","FF8ABD"], + xenogender: ["ff6691","ff9997","ffb782","fbffa6","84bbff","9c84ff","a317ff"], + enby: ["FCF434", "FFFFFF", "9C59D1", "2C2C2C"], + agender: ["000000", "bababa", "ffffff", "b9f484", "ffffff", "bababa", "000000"], + genderfluid: ["FF76A4", "FFFFFF", "C011D7", "000000", "2F3CBE"], + opossum: ["2f2f2f","b0bfc6","e0e0e0","ffffff","f1ba94","f19f93","e37671"], + + // sexuality + lesbian: ["D52D00", "EF7627", "FF9A56", "FFFFFF", "D162A4", "B55690", "A30262"], + asexual: ["000000", "A3A3A3", "FFFFFF", "800080"], + sapphic: ["FD8BA8", "FBF2FF", "FD8BA8"], + bisexual: ["D60270", "D60270", "9B4F96", "0038A8", "0038A8"], + pansexual: ["FF218C", "FFD800", "21B1FF"], + omnisexual: ["FE9ACE", "FF53BF", "200044", "6760FE", "8EA6FF"], + + // romantic attraction + aromantic: ["3DA542", "A7D379", "FFFFFF", "A9A9A9", "000000"], + + // misc + aroace: ["ef9007", "f6d317", "ffffff", "45bcee", "1e3f54"], + polyam: ["00c2ff", "ff006a", "0a1027"], + pride: ["E40303", "FF8C00", "FFED00", "008026", "24408E", "732982"], + custom: [], +}; + +var stripediv = document.querySelector("div#stripes"); + +var add = document.querySelector("#addrow"); +var addColor = add.children[0].children[0]; +var addButton = add.children[1].children[0]; + +function addstripe(color) { + var del = add.cloneNode(true); + del.id = "delrow"; + var removeColor = del.children[0].children[0]; + removeColor.readonly = removeColor.disabled = true; + removeColor.value = color; + var removeButton = del.children[1].children[0]; + removeButton.children[0].icon = "ph:minus"; + removeButton.onclick = () => { + del.parentElement.removeChild(del); + updatestripes(); + }; + stripediv.appendChild(del); +} + +addButton.onclick = () => { + if (!/^#[0-9A-F]{6}$/i.test(addColor.value)) { + alert("Invalid color: " + addColor.value); + return false; + } + addstripe(addColor.value); + addColor.value = "#ff00ff"; + + updatestripes(); +}; + +function updatestripes() { + var stripes = []; + for (var stripe of document.querySelectorAll("#delrow")) { + stripes.push(stripe.children[0].children[0].value); + } + + var svgStripes = document.querySelector("g#stripes"); + var newStripes = []; + var count = stripes.length; + var height = (24 - 10 / 3) / count; + for (var stripe in stripes) { + var color = stripes[stripe]; + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("fill", color); + rect.setAttribute("width", 25); + rect.setAttribute("height", height + 0.1); + rect.setAttribute("x", 0); + rect.setAttribute("y", 10 / 6 + stripe * height); + newStripes.push(rect); + } + svgStripes.replaceChildren(...newStripes); +} + +function defaultcolors() { + if (location.host == "localhost") { + // opossumgender pride + addstripe("#2f2f2f"); + addstripe("#b0bfc6"); + addstripe("#e0e0e0"); + addstripe("#ffffff"); + addstripe("#f1ba94"); + addstripe("#f19f93"); + addstripe("#e37671"); + } else { + // trans pride + addstripe(); + addstripe(); + addstripe(); + addstripe(); + addstripe(); + } +} + +defaultcolors(); +updatestripes(); + +var presetDropdown = document.querySelector("#preset"); +for (var preset of Object.keys(presets).sort()) { + if(preset == "custom") + continue; + var option = document.createElement("option"); + option.value = option.innerText = preset; + presetDropdown.appendChild(option); +} + + +var option = document.createElement("option"); +option.value = option.innerText = "custom"; +presetDropdown.appendChild(option); + +presetDropdown.onchange = () => { + stripediv.replaceChildren([]); + for (var stripe of presets[presetDropdown.value]) { + addstripe("#" + stripe.toLowerCase()); + } + updatestripes(); +}; + +presetDropdown.onchange(); + +var svg = document.querySelector("svg"); + +var resolutionDropdown = document.querySelector("#res"); +var resolutions = [ + "16", + "32", + "64", + "128", + "256", + "512", + "1024", + "2048", + "4096", +]; + +for (var res of resolutions) { + var option = document.createElement("option"); + option.value = res; + option.innerText = res + "px"; + if (res == "64") { + option.selected = true; + option.innerText += " *"; + } else if (parseInt(res) > 256) { + option.innerText += " !"; + } + resolutionDropdown.appendChild(option); +} + +resolutionDropdown.onchange = () => { + var res = resolutionDropdown.value; + svg.setAttribute("width", res); + svg.setAttribute("height", res); +}; + +resolutionDropdown.onchange(); + +var download = function (href, name) { + var link = document.createElement("a"); + link.download = name; + link.style.opacity = "0"; + document.body.appendChild(link); + link.href = href; + link.click(); + link.remove(); +}; + +var downloadButton = document.querySelector("#dl"); +downloadButton.onclick = () => { + svgToPng(svg, (imgData) => { + download(imgData, "verified" + presetDropdown.value + ".png"); + }); +}; + +function svgToPng(svg, callback) { + svgUrlToPng(svg, (imgData) => { + callback(imgData); + }); +} + +function getSvgUrl(svg) { + return `data:image/svg+xml;base64,${btoa( + new XMLSerializer().serializeToString(svg) + )}`; +} + +function svgUrlToPng(svg, callback) { + const svgUrl = getSvgUrl(svg); + const svgImage = document.createElement("img"); + svgImage.style.opacity = 0; + svgImage.style.position = "absolute"; + svgImage.style.zIndex = -1; + svgImage.style.top = "-1000vh"; + document.body.appendChild(svgImage); + svgImage.onload = function () { + document.body.removeChild(svgImage); + const canvas = document.createElement("canvas"); + canvas.width = svg.getAttribute("width"); + canvas.height = svg.getAttribute("height"); + // document.body.appendChild(canvas); + const canvasCtx = canvas.getContext("2d"); + canvasCtx.drawImage(svgImage, 0, 0); + const imgData = canvas.toDataURL("image/png"); + callback(imgData); + // document.body.removeChild(imgPreview); + }; + svgImage.src = svgUrl; +}