First commit
This commit is contained in:
commit
d78f0c6476
6 changed files with 4138 additions and 0 deletions
607
css.css
Normal file
607
css.css
Normal file
|
@ -0,0 +1,607 @@
|
|||
:root {
|
||||
--primary: #cc2027;
|
||||
--primary-darken: #8E161B;
|
||||
--primary-lighten: #D64C52;
|
||||
--primary-text-contrast: #FFF;
|
||||
|
||||
--secondary: #20ccc5;
|
||||
--secondary-darken: #168E89;
|
||||
--secondary-lighten: #4CD6D0;
|
||||
--secondary-text-contrast: #000;
|
||||
|
||||
--error: #c43933;
|
||||
--error-darken: #892723;
|
||||
--error-lighten: #CF605B;
|
||||
--error-text-contrast: #FFF;
|
||||
|
||||
--info: #206ccc;
|
||||
--info-darken: #164B8E;
|
||||
--info-lighten: #4C89D6;
|
||||
--info-text-contrast: #FFF;
|
||||
|
||||
--success: #7dcc20;
|
||||
--success-darken: #578E16;
|
||||
--success-lighten: #97D64C;
|
||||
--success-text-contrast: #000;
|
||||
|
||||
--warning: #cc5e20;
|
||||
--warning-darken: #8E4116;
|
||||
--warning-lighten: #D67E4C;
|
||||
--warning-text-contrast: #FFF;
|
||||
|
||||
--background-color: light-dark(#fffbfb, #171414);
|
||||
--background-color-darken: light-dark(#B2AFAF, #100E0E);
|
||||
--background-color-lighten: light-dark(#FFFBFB, #454343);
|
||||
|
||||
--text-color: light-dark(#171414, #fffbfb);
|
||||
--text-color-secondary: #ffffffb3;
|
||||
--text-color-disable: light-dark(#454343, #ffffff80);
|
||||
|
||||
--h1-color: var(--primary);
|
||||
--h2-color: #c33d35;
|
||||
--h3-color: #b94f44;
|
||||
--h4-color: #ae5e52;
|
||||
--h5-color: #a16a61;
|
||||
--h6-color: #927671;
|
||||
}
|
||||
|
||||
[data-theme=dark] {
|
||||
/* DEF */
|
||||
--pico-background-color: #13171f;
|
||||
--pico-color: #c2c7d0;
|
||||
--pico-text-selection-color: rgba(1, 170, 255, 0.1875);
|
||||
--pico-muted-color: #7b8495;
|
||||
--pico-muted-border-color: var(--background-color-lighten);
|
||||
/* KT */
|
||||
--pico-background-color: var(--background-color);
|
||||
--pico-color: var(--text-color);
|
||||
--pico-muted-color: var(--text-color-disable);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-primary: #01aaff;
|
||||
--pico-primary-background: #0172ad;
|
||||
--pico-primary-border: var(--pico-primary-background);
|
||||
--pico-primary-underline: rgba(1, 170, 255, 0.5);
|
||||
--pico-primary-hover: #79c0ff;
|
||||
--pico-primary-hover-background: #017fc0;
|
||||
--pico-primary-hover-border: var(--pico-primary-hover-background);
|
||||
--pico-primary-hover-underline: var(--pico-primary-hover);
|
||||
--pico-primary-focus: rgba(1, 170, 255, 0.375);
|
||||
--pico-primary-inverse: #fff;
|
||||
/* KT */
|
||||
--pico-primary: var(--primary);
|
||||
--pico-primary-background: var(--primary);
|
||||
--pico-primary-hover-background: var(--primary-darken);
|
||||
--pico-primary-hover: var(--primary-lighten);
|
||||
--pico-primary-inverse: var(--primary-text-contrast);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-secondary: #969eaf;
|
||||
--pico-secondary-background: #525f7a;
|
||||
--pico-secondary-border: var(--pico-secondary-background);
|
||||
--pico-secondary-underline: rgba(150, 158, 175, 0.5);
|
||||
--pico-secondary-hover: #b3b9c5;
|
||||
--pico-secondary-hover-background: #5d6b89;
|
||||
--pico-secondary-hover-border: var(--pico-secondary-hover-background);
|
||||
--pico-secondary-hover-underline: var(--pico-secondary-hover);
|
||||
--pico-secondary-focus: rgba(144, 158, 190, 0.25);
|
||||
--pico-secondary-inverse: #fff;
|
||||
/* KT */
|
||||
--pico-secondary: var(--secondary);
|
||||
--pico-secondary-background: var(--secondary);
|
||||
--pico-secondary-hover-background: var(--secondary-darken);
|
||||
--pico-secondary-hover: var(--secondary-lighten);
|
||||
--pico-secondary-inverse: var(--secondary-text-contrast);
|
||||
|
||||
--pico-success: var(--success);
|
||||
--pico-success-background: var(--success);
|
||||
--pico-success-hover-background: var(--success-darken);
|
||||
--pico-success-hover: var(--success-lighten);
|
||||
--pico-success-inverse: var(--success-text-contrast);
|
||||
|
||||
--pico-error: var(--error);
|
||||
--pico-error-background: var(--error);
|
||||
--pico-error-hover-background: var(--error-darken);
|
||||
--pico-error-hover: var(--error-lighten);
|
||||
--pico-error-inverse: var(--error-text-contrast);
|
||||
|
||||
--pico-warning: var(--warning);
|
||||
--pico-warning-background: var(--warning);
|
||||
--pico-warning-hover-background: var(--warning-darken);
|
||||
--pico-warning-hover: var(--warning-lighten);
|
||||
--pico-warning-inverse: var(--warning-text-contrast);
|
||||
|
||||
--pico-info: var(--info);
|
||||
--pico-info-background: var(--info);
|
||||
--pico-info-hover-background: var(--info-darken);
|
||||
--pico-info-hover: var(--info-lighten);
|
||||
--pico-info-inverse: var(--info-text-contrast);
|
||||
|
||||
/* DEF */
|
||||
--pico-contrast: #dfe3eb;
|
||||
--pico-contrast-background: #eff1f4;
|
||||
--pico-contrast-border: var(--pico-contrast-background);
|
||||
--pico-contrast-underline: rgba(223, 227, 235, 0.5);
|
||||
--pico-contrast-hover: #fff;
|
||||
--pico-contrast-hover-background: #fff;
|
||||
--pico-contrast-hover-border: var(--pico-contrast-hover-background);
|
||||
--pico-contrast-hover-underline: var(--pico-contrast-hover);
|
||||
--pico-contrast-focus: rgba(207, 213, 226, 0.25);
|
||||
--pico-contrast-inverse: #000;
|
||||
|
||||
--pico-box-shadow: 0.0145rem 0.029rem 0.174rem rgba(7, 9, 12, 0.01698), 0.0335rem 0.067rem 0.402rem rgba(7, 9, 12, 0.024), 0.0625rem 0.125rem 0.75rem rgba(7, 9, 12, 0.03), 0.1125rem 0.225rem 1.35rem rgba(7, 9, 12, 0.036), 0.2085rem 0.417rem 2.502rem rgba(7, 9, 12, 0.04302), 0.5rem 1rem 6rem rgba(7, 9, 12, 0.06), 0 0 0 0.0625rem rgba(7, 9, 12, 0.015);
|
||||
|
||||
/* DEF */
|
||||
--pico-h1-color: #f0f1f3;
|
||||
--pico-h2-color: #e0e3e7;
|
||||
--pico-h3-color: #c2c7d0;
|
||||
--pico-h4-color: #b3b9c5;
|
||||
--pico-h5-color: #a4acba;
|
||||
--pico-h6-color: #8891a4;
|
||||
/* KT */
|
||||
--pico-h1-color: var(--h1-color);
|
||||
--pico-h2-color: var(--h2-color);
|
||||
--pico-h3-color: var(--h3-color);
|
||||
--pico-h4-color: var(--h4-color);
|
||||
--pico-h5-color: var(--h5-color);
|
||||
--pico-h6-color: var(--h6-color);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-mark-background-color: #014063;
|
||||
--pico-mark-color: #fff;
|
||||
--pico-ins-color: #62af9a;
|
||||
--pico-del-color: #ce7e7b;
|
||||
--pico-blockquote-border-color: var(--pico-muted-border-color);
|
||||
--pico-blockquote-footer-color: var(--pico-muted-color);
|
||||
--pico-button-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||
--pico-button-hover-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||
--pico-table-border-color: var(--pico-muted-border-color);
|
||||
--pico-table-row-stripped-background-color: rgba(111, 120, 135, 0.0375);
|
||||
--pico-code-background-color: #1a1f28;
|
||||
--pico-code-color: #8891a4;
|
||||
--pico-code-kbd-background-color: var(--pico-color);
|
||||
--pico-code-kbd-color: var(--pico-background-color);
|
||||
/* KT */
|
||||
--pico-mark-background-color: var(--secondary-darken);
|
||||
--pico-mark-color: var(--secondary-text-contrast);
|
||||
--pico-ins-color: var(--success-lighten);
|
||||
--pico-del-color: var(--error-lighten);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-form-element-background-color: #1c212c;
|
||||
--pico-form-element-selected-background-color: #2a3140;
|
||||
--pico-form-element-border-color: #2a3140;
|
||||
--pico-form-element-color: #e0e3e7;
|
||||
--pico-form-element-placeholder-color: #8891a4;
|
||||
--pico-form-element-active-background-color: #1a1f28;
|
||||
--pico-form-element-active-border-color: var(--pico-primary-border);
|
||||
--pico-form-element-focus-color: var(--pico-primary-border);
|
||||
--pico-form-element-disabled-opacity: 0.5;
|
||||
--pico-form-element-invalid-border-color: #964a50;
|
||||
--pico-form-element-invalid-active-border-color: #b7403b;
|
||||
--pico-form-element-invalid-focus-color: var(--pico-form-element-invalid-active-border-color);
|
||||
--pico-form-element-valid-border-color: #2a7b6f;
|
||||
--pico-form-element-valid-active-border-color: #16896a;
|
||||
--pico-form-element-valid-focus-color: var(--pico-form-element-valid-active-border-color);
|
||||
/* KT */
|
||||
--pico-form-element-background-color: var(--background-color);
|
||||
--pico-form-element-selected-background-color: var(--background-color);
|
||||
--pico-form-element-border-color: var(--primary-darken);
|
||||
--pico-form-element-placeholder-color: var(--text-color-disable);
|
||||
--pico-form-element-active-background-color: var(--background-color-lighten);
|
||||
--pico-form-element-active-border-color: var(--primary-darken);
|
||||
--pico-form-element-focus-color: var(--pico-primary-border);
|
||||
--pico-form-element-invalid-border-color: var(--error);
|
||||
--pico-form-element-invalid-active-border-color: var(--error-darken);
|
||||
--pico-form-element-invalid-focus-color: var(--error-darken);
|
||||
--pico-form-element-valid-border-color: var(--success);
|
||||
--pico-form-element-valid-active-border-color: var(--success-darken);
|
||||
--pico-form-element-valid-focus-color: var(--success-darken);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-switch-background-color: #333c4e;
|
||||
--pico-switch-checked-background-color: var(--pico-primary-background);
|
||||
--pico-switch-color: #fff;
|
||||
--pico-switch-thumb-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||
/* KT */
|
||||
--pico-switch-background-color: var(--background-color-lighten);
|
||||
--pico-switch-color: var(--text-color);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-range-border-color: #202632;
|
||||
--pico-range-active-border-color: #2a3140;
|
||||
--pico-range-thumb-border-color: var(--pico-background-color);
|
||||
--pico-range-thumb-color: var(--pico-secondary-background);
|
||||
--pico-range-thumb-active-color: var(--pico-primary-background);
|
||||
/* KT */
|
||||
--pico-range-border-color: var(--text-color-disable);
|
||||
--pico-range-active-border-color: var(--text-color);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-accordion-border-color: var(--pico-muted-border-color);
|
||||
--pico-accordion-active-summary-color: var(--pico-primary-hover);
|
||||
--pico-accordion-close-summary-color: var(--pico-color);
|
||||
--pico-accordion-open-summary-color: var(--pico-muted-color);
|
||||
/* KT */
|
||||
--pico-accordion-border-color: var(--pico-muted-border-color);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-card-background-color: #181c25;
|
||||
--pico-card-border-color: var(--pico-card-background-color);
|
||||
--pico-card-box-shadow: var(--pico-box-shadow);
|
||||
--pico-card-sectioning-background-color: #1a1f28;
|
||||
/* KT */
|
||||
--pico-card-background-color: var(--background-color-lighten);
|
||||
--pico-card-border-color: var(--background-color);
|
||||
--pico-card-sectioning-background-color: var(--background-color-darken);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-dropdown-background-color: #181c25;
|
||||
--pico-dropdown-border-color: #202632;
|
||||
--pico-dropdown-box-shadow: var(--pico-box-shadow);
|
||||
--pico-dropdown-color: var(--pico-color);
|
||||
--pico-dropdown-hover-background-color: #202632;
|
||||
/* KT */
|
||||
--pico-dropdown-background-color: var(--background-color);
|
||||
--pico-dropdown-border-color: var(--background-color-darken);
|
||||
--pico-dropdown-hover-background-color: var(--primary-lighten);
|
||||
|
||||
|
||||
/* DEF */
|
||||
--pico-loading-spinner-opacity: 0.5;
|
||||
--pico-modal-overlay-background-color: rgba(8, 9, 10, 0.75);
|
||||
--pico-progress-background-color: #202632;
|
||||
--pico-progress-color: var(--pico-primary-background);
|
||||
--pico-tooltip-background-color: var(--pico-contrast-background);
|
||||
--pico-tooltip-color: var(--pico-contrast-inverse);
|
||||
/* KT */
|
||||
--pico-progress-background-color: var(--background-color-darken);
|
||||
--pico-progress-color: var(--background-color-lighten);
|
||||
--pico-tooltip-background-color: var(--background-color-lighten);
|
||||
--pico-tooltip-color: var(--text-color);
|
||||
|
||||
|
||||
|
||||
|
||||
--pico-icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(42, 123, 111)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
||||
--pico-icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(150, 74, 80)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
||||
color-scheme: dark
|
||||
}
|
||||
|
||||
|
||||
:root:not([data-theme="dark"]),
|
||||
[data-theme="light"] {
|
||||
/* KT */
|
||||
--pico-background-color: var(--background-color);
|
||||
--pico-color: var(--text-color);
|
||||
--pico-muted-color: var(--text-color-disable);
|
||||
|
||||
--pico-primary: var(--primary);
|
||||
--pico-primary-background: var(--primary);
|
||||
--pico-primary-hover-background: var(--primary-darken);
|
||||
--pico-primary-hover: var(--primary-lighten);
|
||||
--pico-primary-inverse: var(--primary-text-contrast);
|
||||
|
||||
--pico-secondary: var(--secondary);
|
||||
--pico-secondary-background: var(--secondary);
|
||||
--pico-secondary-hover-background: var(--secondary-darken);
|
||||
--pico-secondary-hover: var(--secondary-lighten);
|
||||
--pico-secondary-inverse: var(--secondary-text-contrast);
|
||||
|
||||
--pico-success: var(--success);
|
||||
--pico-success-background: var(--success);
|
||||
--pico-success-hover-background: var(--success-darken);
|
||||
--pico-success-hover: var(--success-lighten);
|
||||
--pico-success-inverse: var(--success-text-contrast);
|
||||
|
||||
--pico-error: var(--error);
|
||||
--pico-error-background: var(--error);
|
||||
--pico-error-hover-background: var(--error-darken);
|
||||
--pico-error-hover: var(--error-lighten);
|
||||
--pico-error-inverse: var(--error-text-contrast);
|
||||
|
||||
--pico-warning: var(--warning);
|
||||
--pico-warning-background: var(--warning);
|
||||
--pico-warning-hover-background: var(--warning-darken);
|
||||
--pico-warning-hover: var(--warning-lighten);
|
||||
--pico-warning-inverse: var(--warning-text-contrast);
|
||||
|
||||
--pico-info: var(--info);
|
||||
--pico-info-background: var(--info);
|
||||
--pico-info-hover-background: var(--info-darken);
|
||||
--pico-info-hover: var(--info-lighten);
|
||||
--pico-info-inverse: var(--info-text-contrast);
|
||||
|
||||
--pico-h1-color: var(--h1-color);
|
||||
--pico-h2-color: var(--h2-color);
|
||||
--pico-h3-color: var(--h3-color);
|
||||
--pico-h4-color: var(--h4-color);
|
||||
--pico-h5-color: var(--h5-color);
|
||||
--pico-h6-color: var(--h6-color);
|
||||
|
||||
|
||||
--pico-mark-background-color: var(--secondary-darken);
|
||||
--pico-mark-color: var(--secondary-text-contrast);
|
||||
--pico-ins-color: var(--success-lighten);
|
||||
--pico-del-color: var(--error-lighten);
|
||||
|
||||
|
||||
--pico-form-element-background-color: var(--background-color);
|
||||
--pico-form-element-selected-background-color: var(--background-color);
|
||||
--pico-form-element-border-color: var(--primary-darken);
|
||||
--pico-form-element-placeholder-color: var(--text-color-disable);
|
||||
--pico-form-element-active-background-color: var(--background-color-lighten);
|
||||
--pico-form-element-active-border-color: var(--primary-darken);
|
||||
--pico-form-element-focus-color: var(--pico-primary-border);
|
||||
--pico-form-element-invalid-border-color: var(--error);
|
||||
--pico-form-element-invalid-active-border-color: var(--error-darken);
|
||||
--pico-form-element-invalid-focus-color: var(--error-darken);
|
||||
--pico-form-element-valid-border-color: var(--success);
|
||||
--pico-form-element-valid-active-border-color: var(--success-darken);
|
||||
--pico-form-element-valid-focus-color: var(--success-darken);
|
||||
|
||||
--pico-switch-background-color: var(--background-color-darken);
|
||||
--pico-switch-color: var(--text-color);
|
||||
|
||||
--pico-range-border-color: var(--text-color-disable);
|
||||
--pico-range-active-border-color: var(--text-color);
|
||||
|
||||
--pico-accordion-border-color: var(--pico-muted-border-color);
|
||||
|
||||
|
||||
--pico-card-background-color: var(--background-color-lighten);
|
||||
--pico-card-border-color: var(--background-color);
|
||||
--pico-card-sectioning-background-color: var(--background-color-darken);
|
||||
|
||||
|
||||
--pico-dropdown-background-color: var(--background-color);
|
||||
--pico-dropdown-border-color: var(--background-color-darken);
|
||||
--pico-dropdown-hover-background-color: var(--primary-lighten);
|
||||
|
||||
|
||||
--pico-progress-background-color: #fff;
|
||||
--pico-progress-color: var(--background-color-darken);
|
||||
--pico-tooltip-background-color: var(--background-color-lighten);
|
||||
--pico-tooltip-color: var(--text-color);
|
||||
--pico-icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(76, 155, 138)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
||||
--pico-icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(200, 79, 72)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
||||
color-scheme: light
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).error,
|
||||
[type=file]::file-selector-button,
|
||||
[type=reset] {
|
||||
--pico-background-color: var(--pico-error-background);
|
||||
--pico-border-color: var(--pico-error-border);
|
||||
--pico-color: var(--pico-error-inverse);
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).error:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-background-color: var(--pico-error-hover-background);
|
||||
--pico-border-color: var(--pico-error-hover-border);
|
||||
--pico-color: var(--pico-error-inverse)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).success,
|
||||
[type=file]::file-selector-button,
|
||||
[type=reset] {
|
||||
--pico-background-color: var(--pico-success-background);
|
||||
--pico-border-color: var(--pico-success-border);
|
||||
--pico-color: var(--pico-success-inverse);
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).success:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-background-color: var(--pico-success-hover-background);
|
||||
--pico-border-color: var(--pico-success-hover-border);
|
||||
--pico-color: var(--pico-success-inverse)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).warning,
|
||||
[type=file]::file-selector-button,
|
||||
[type=reset] {
|
||||
--pico-background-color: var(--pico-warning-background);
|
||||
--pico-border-color: var(--pico-warning-border);
|
||||
--pico-color: var(--pico-warning-inverse);
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).warning:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-background-color: var(--pico-warning-hover-background);
|
||||
--pico-border-color: var(--pico-warning-hover-border);
|
||||
--pico-color: var(--pico-warning-inverse)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).info,
|
||||
[type=file]::file-selector-button,
|
||||
[type=reset] {
|
||||
--pico-background-color: var(--pico-info-background);
|
||||
--pico-border-color: var(--pico-info-border);
|
||||
--pico-color: var(--pico-info-inverse);
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).info:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-background-color: var(--pico-info-hover-background);
|
||||
--pico-border-color: var(--pico-info-hover-border);
|
||||
--pico-color: var(--pico-info-inverse)
|
||||
}
|
||||
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).secondary,
|
||||
[type=file]::file-selector-button,
|
||||
[type=reset] {
|
||||
--pico-background-color: var(--pico-secondary-background);
|
||||
--pico-border-color: var(--pico-secondary-border);
|
||||
--pico-color: var(--pico-secondary-inverse);
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).secondary:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-background-color: var(--pico-secondary-hover-background);
|
||||
--pico-border-color: var(--pico-secondary-hover-border);
|
||||
--pico-color: var(--pico-secondary-inverse)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).secondary:focus,
|
||||
:is(button, [type=submit], [type=button], [role=button]).secondary:is([aria-current]:not([aria-current=false])):focus,
|
||||
[type=file]::file-selector-button:focus,
|
||||
[type=file]::file-selector-button:is([aria-current]:not([aria-current=false])):focus,
|
||||
[type=reset]:focus,
|
||||
[type=reset]:is([aria-current]:not([aria-current=false])):focus {
|
||||
--pico-box-shadow: var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--pico-outline-width) var(--pico-secondary-focus)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline,
|
||||
[type=reset].outline {
|
||||
--pico-background-color: transparent;
|
||||
--pico-color: var(--pico-primary);
|
||||
--pico-border-color: var(--pico-primary)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.secondary,
|
||||
[type=reset].outline {
|
||||
--pico-color: var(--pico-secondary);
|
||||
--pico-border-color: var(--pico-secondary);
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.error,
|
||||
[type=reset].outline {
|
||||
--pico-color: var(--pico-error);
|
||||
--pico-border-color: var(--pico-error);
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.success,
|
||||
[type=reset].outline {
|
||||
--pico-color: var(--pico-success);
|
||||
--pico-border-color: var(--pico-success);
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.warning,
|
||||
[type=reset].outline {
|
||||
--pico-color: var(--pico-warning);
|
||||
--pico-border-color: var(--pico-warning);
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.info,
|
||||
[type=reset].outline {
|
||||
--pico-color: var(--pico-info);
|
||||
--pico-border-color: var(--pico-info);
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset].outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-background-color: transparent;
|
||||
--pico-color: var(--pico-primary-hover);
|
||||
--pico-border-color: var(--pico-primary-hover)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.secondary:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset].outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-secondary-hover);
|
||||
--pico-border-color: var(--pico-secondary-hover)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.error:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset].outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-error-hover);
|
||||
--pico-border-color: var(--pico-error-hover)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.success:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset].outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-success-hover);
|
||||
--pico-border-color: var(--pico-success-hover)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.warning:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset].outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-warning-hover);
|
||||
--pico-border-color: var(--pico-warning-hover)
|
||||
}
|
||||
|
||||
:is(button, [type=submit], [type=button], [role=button]).outline.info:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[type=reset].outline:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-info-hover);
|
||||
--pico-border-color: var(--pico-info-hover)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).secondary,
|
||||
[role=link].secondary {
|
||||
--pico-color: var(--pico-secondary);
|
||||
--pico-underline: var(--pico-secondary-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).error,
|
||||
[role=link].error {
|
||||
--pico-color: var(--pico-error);
|
||||
--pico-underline: var(--pico-error-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).success,
|
||||
[role=link].success {
|
||||
--pico-color: var(--pico-success);
|
||||
--pico-underline: var(--pico-success-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).warning,
|
||||
[role=link].warning {
|
||||
--pico-color: var(--pico-warning);
|
||||
--pico-underline: var(--pico-warning-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).info,
|
||||
[role=link].info {
|
||||
--pico-color: var(--pico-info);
|
||||
--pico-underline: var(--pico-info-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).secondary:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[role=link].secondary:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-secondary-hover);
|
||||
--pico-underline: var(--pico-secondary-hover-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).error:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[role=link].error:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-error-hover);
|
||||
--pico-underline: var(--pico-error-hover-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).success:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[role=link].success:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-success-hover);
|
||||
--pico-underline: var(--pico-success-hover-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).warning:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[role=link].warning:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-warning-hover);
|
||||
--pico-underline: var(--pico-warning-hover-underline)
|
||||
}
|
||||
|
||||
:where(a:not([role=button])).info:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
||||
[role=link].info:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
--pico-color: var(--pico-info-hover);
|
||||
--pico-underline: var(--pico-info-hover-underline)
|
||||
}
|
BIN
img/aleksandar-jason-a562ZEFKW8I-unsplash-2000x1000.jpg
Normal file
BIN
img/aleksandar-jason-a562ZEFKW8I-unsplash-2000x1000.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 484 KiB |
497
index.html
Normal file
497
index.html
Normal file
|
@ -0,0 +1,497 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<title>Preview • Pico CSS</title>
|
||||
<meta name="description" content="A pure HTML example, without dependencies." />
|
||||
|
||||
<!-- Pico.css -->
|
||||
<link rel="stylesheet" href="pico.min.css" />
|
||||
<link rel="stylesheet" href="css.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Header -->
|
||||
<header class="container">
|
||||
<hgroup>
|
||||
<h1>Pico</h1>
|
||||
<p>A pure HTML example, without dependencies.</p>
|
||||
</hgroup>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<details class="dropdown">
|
||||
<summary role="button" class="primary">Theme</summary>
|
||||
<ul>
|
||||
<li><a href="#" data-theme-switcher="auto">Auto</a></li>
|
||||
<li><a href="#" data-theme-switcher="light">Light</a></li>
|
||||
<li><a href="#" data-theme-switcher="dark">Dark</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#preview">Preview</a></li>
|
||||
<li><a href="#typography">Typography</a></li>
|
||||
<li><a href="#buttons">Buttons</a></li>
|
||||
<li><a href="#form">Form</a></li>
|
||||
<li><a href="#tables">Tables</a></li>
|
||||
<li><a href="#modal">Modal</a></li>
|
||||
<li><a href="#accordions">Accordions</a></li>
|
||||
<li><a href="#article">Article/card</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- ./ Header -->
|
||||
|
||||
<!-- Main -->
|
||||
<main class="container">
|
||||
<!-- Preview -->
|
||||
<section id="preview">
|
||||
<h2>Preview</h2>
|
||||
<p>
|
||||
Sed ultricies dolor non ante vulputate hendrerit. Vivamus sit amet suscipit sapien. Nulla
|
||||
iaculis eros a elit pharetra egestas.
|
||||
</p>
|
||||
<form>
|
||||
<div class="grid">
|
||||
<input type="text" name="firstname" placeholder="First name" aria-label="First name" required />
|
||||
<input type="email" name="email" placeholder="Email address" aria-label="Email address"
|
||||
autocomplete="email" required />
|
||||
<button type="submit">Subscribe</button>
|
||||
</div>
|
||||
<fieldset>
|
||||
<label for="terms">
|
||||
<input type="checkbox" role="switch" id="terms" name="terms" />
|
||||
I agree to the
|
||||
<a href="#" onclick="event.preventDefault()">Privacy Policy</a>
|
||||
</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
<!-- ./ Preview -->
|
||||
|
||||
<!-- Typography-->
|
||||
<section id="typography">
|
||||
<h2>Typography</h2>
|
||||
<p>
|
||||
Aliquam lobortis vitae nibh nec rhoncus. Morbi mattis neque eget efficitur feugiat.
|
||||
Vivamus porta nunc a erat mattis, mattis feugiat turpis pretium. Quisque sed tristique
|
||||
felis.
|
||||
</p>
|
||||
|
||||
<!-- Blockquote-->
|
||||
<blockquote>
|
||||
"Maecenas vehicula metus tellus, vitae congue turpis hendrerit non. Nam at dui sit amet
|
||||
ipsum cursus ornare."
|
||||
<footer>
|
||||
<cite>- Phasellus eget lacinia</cite>
|
||||
</footer>
|
||||
</blockquote>
|
||||
|
||||
<!-- Lists-->
|
||||
<h3>Lists</h3>
|
||||
<ul>
|
||||
<li>Aliquam lobortis lacus eu libero ornare facilisis.</li>
|
||||
<li>Nam et magna at libero scelerisque egestas.</li>
|
||||
<li>Suspendisse id nisl ut leo finibus vehicula quis eu ex.</li>
|
||||
<li>Proin ultricies turpis et volutpat vehicula.</li>
|
||||
</ul>
|
||||
|
||||
<!-- Inline text elements-->
|
||||
<h3>Inline text elements</h3>
|
||||
<div class="grid">
|
||||
<p><a href="#" onclick="event.preventDefault()">Primary link</a></p>
|
||||
<p><a href="#" class="secondary" onclick="event.preventDefault()">Secondary link</a></p>
|
||||
<p><a href="#" class="error" onclick="event.preventDefault()">Error link</a></p>
|
||||
<p><a href="#" class="success" onclick="event.preventDefault()">Success link</a></p>
|
||||
<p><a href="#" class="warning" onclick="event.preventDefault()">Warning link</a></p>
|
||||
<p><a href="#" class="info" onclick="event.preventDefault()">Info link</a></p>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<p><strong>Bold</strong></p>
|
||||
<p><em>Italic</em></p>
|
||||
<p><u>Underline</u></p>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<p><del>Deleted</del></p>
|
||||
<p><ins>Inserted</ins></p>
|
||||
<p><s>Strikethrough</s></p>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<p><small>Small </small></p>
|
||||
<p>Text <sub>Sub</sub></p>
|
||||
<p>Text <sup>Sup</sup></p>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<p>
|
||||
<abbr title="Abbreviation" data-tooltip="Abbreviation">Abbr.</abbr>
|
||||
</p>
|
||||
<p><kbd>Kbd</kbd></p>
|
||||
<p><mark>Highlighted</mark></p>
|
||||
</div>
|
||||
|
||||
<!-- Headings-->
|
||||
<h1>Heading 1</h1>
|
||||
<p>
|
||||
Integer bibendum malesuada libero vel eleifend. Fusce iaculis turpis ipsum, at efficitur
|
||||
sem scelerisque vel. Aliquam auctor diam ut purus cursus fringilla. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
|
||||
</p>
|
||||
<h2>Heading 2</h2>
|
||||
<p>
|
||||
Integer bibendum malesuada libero vel eleifend. Fusce iaculis turpis ipsum, at efficitur
|
||||
sem scelerisque vel. Aliquam auctor diam ut purus cursus fringilla. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
|
||||
</p>
|
||||
<h3>Heading 3</h3>
|
||||
<p>
|
||||
Integer bibendum malesuada libero vel eleifend. Fusce iaculis turpis ipsum, at efficitur
|
||||
sem scelerisque vel. Aliquam auctor diam ut purus cursus fringilla. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
|
||||
</p>
|
||||
<h4>Heading 4</h4>
|
||||
<p>
|
||||
Cras fermentum velit vitae auctor aliquet. Nunc non congue urna, at blandit nibh. Donec ac
|
||||
fermentum felis. Vivamus tincidunt arcu ut lacus hendrerit, eget mattis dui finibus.
|
||||
</p>
|
||||
<h5>Heading 5</h5>
|
||||
<p>
|
||||
Donec nec egestas nulla. Sed varius placerat felis eu suscipit. Mauris maximus ante in
|
||||
consequat luctus. Morbi euismod sagittis efficitur. Aenean non eros orci. Vivamus ut diam
|
||||
sem.
|
||||
</p>
|
||||
<h6>Heading 6</h6>
|
||||
<p>
|
||||
Ut sed quam non mauris placerat consequat vitae id risus. Vestibulum tincidunt nulla ut
|
||||
tortor posuere, vitae malesuada tortor molestie. Sed nec interdum dolor. Vestibulum id
|
||||
auctor nisi, a efficitur sem. Aliquam sollicitudin efficitur turpis, sollicitudin
|
||||
hendrerit ligula semper id. Nunc risus felis, egestas eu tristique eget, convallis in
|
||||
velit.
|
||||
</p>
|
||||
|
||||
<!-- Medias-->
|
||||
<figure>
|
||||
<img src="img/aleksandar-jason-a562ZEFKW8I-unsplash-2000x1000.jpg" alt="Minimal landscape" />
|
||||
<figcaption>
|
||||
Image from
|
||||
<a href="https://unsplash.com/photos/a562ZEFKW8I" target="_blank">unsplash.com</a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
<!-- ./ Typography-->
|
||||
|
||||
<!-- Buttons-->
|
||||
<section id="buttons">
|
||||
<h2>Buttons</h2>
|
||||
<p class="grid">
|
||||
<button data-tooltip="Tooltip">Primary</button>
|
||||
<button class="secondary">Secondary</button>
|
||||
<button class="error">Error</button>
|
||||
<button class="success">Success</button>
|
||||
<button class="warning">Warning</button>
|
||||
<button class="info">Info</button>
|
||||
</p>
|
||||
<p class="grid">
|
||||
<button class="outline">Primary outline</button>
|
||||
<button class="outline secondary">Secondary outline</button>
|
||||
<button class="outline error">Contrast outline</button>
|
||||
<button class="outline success">Contrast outline</button>
|
||||
<button class="outline warning">Contrast outline</button>
|
||||
<button class="outline info">Contrast outline</button>
|
||||
</p>
|
||||
</section>
|
||||
<!-- ./ Buttons -->
|
||||
|
||||
<!-- Form elements-->
|
||||
<section id="form">
|
||||
<form>
|
||||
<h2>Form elements</h2>
|
||||
|
||||
<!-- Search -->
|
||||
<label for="search">Search</label>
|
||||
<input type="search" id="search" name="search" placeholder="Search" />
|
||||
|
||||
<!-- Text -->
|
||||
<label for="text">Text</label>
|
||||
<input type="text" id="text" name="text" placeholder="Text" />
|
||||
<small>Curabitur consequat lacus at lacus porta finibus.</small>
|
||||
|
||||
<!-- Select -->
|
||||
<label for="select">Select</label>
|
||||
<select id="select" name="select" required>
|
||||
<option value="" selected>Select…</option>
|
||||
<option>…</option>
|
||||
</select>
|
||||
|
||||
<!-- File browser -->
|
||||
<label for="file">File browser
|
||||
<input type="file" id="file" name="file" />
|
||||
</label>
|
||||
|
||||
<!-- Range slider control -->
|
||||
<label for="range">Range slider
|
||||
<input type="range" min="0" max="100" value="50" id="range" name="range" />
|
||||
</label>
|
||||
|
||||
<!-- States -->
|
||||
<div class="grid">
|
||||
<label for="valid">
|
||||
Valid
|
||||
<input type="text" id="valid" name="valid" placeholder="Valid" aria-invalid="false" />
|
||||
</label>
|
||||
<label for="invalid">
|
||||
Invalid
|
||||
<input type="text" id="invalid" name="invalid" placeholder="Invalid" aria-invalid="true" />
|
||||
</label>
|
||||
<label for="disabled">
|
||||
Disabled
|
||||
<input type="text" id="disabled" name="disabled" placeholder="Disabled" disabled />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<!-- Date-->
|
||||
<label for="date">Date
|
||||
<input type="date" id="date" name="date" />
|
||||
</label>
|
||||
|
||||
<!-- Time-->
|
||||
<label for="time">Time
|
||||
<input type="time" id="time" name="time" />
|
||||
</label>
|
||||
|
||||
<!-- Color-->
|
||||
<label for="color">Color
|
||||
<input type="color" id="color" name="color" value="#0eaaaa" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<!-- Checkboxes -->
|
||||
<fieldset>
|
||||
<legend><strong>Checkboxes</strong></legend>
|
||||
<label for="checkbox-1">
|
||||
<input type="checkbox" id="checkbox-1" name="checkbox-1" checked />
|
||||
Checkbox
|
||||
</label>
|
||||
<label for="checkbox-2">
|
||||
<input type="checkbox" id="checkbox-2" name="checkbox-2" />
|
||||
Checkbox
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<!-- Radio buttons -->
|
||||
<fieldset>
|
||||
<legend><strong>Radio buttons</strong></legend>
|
||||
<label for="radio-1">
|
||||
<input type="radio" id="radio-1" name="radio" value="radio-1" checked />
|
||||
Radio button
|
||||
</label>
|
||||
<label for="radio-2">
|
||||
<input type="radio" id="radio-2" name="radio" value="radio-2" />
|
||||
Radio button
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<!-- Switch -->
|
||||
<fieldset>
|
||||
<legend><strong>Switches</strong></legend>
|
||||
<label for="switch-1">
|
||||
<input type="checkbox" id="switch-1" name="switch-1" role="switch" checked />
|
||||
Switch
|
||||
</label>
|
||||
<label for="switch-2">
|
||||
<input type="checkbox" id="switch-2" name="switch-2" role="switch" />
|
||||
Switch
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<!-- Buttons -->
|
||||
<input type="reset" value="Reset" onclick="event.preventDefault()" />
|
||||
<input type="submit" value="Submit" onclick="event.preventDefault()" />
|
||||
</form>
|
||||
</section>
|
||||
<!-- ./ Form elements-->
|
||||
|
||||
<!-- Tables -->
|
||||
<section id="tables">
|
||||
<h2>Tables</h2>
|
||||
<div class="overflow-auto">
|
||||
<table class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">3</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- ./ Tables -->
|
||||
|
||||
<!-- Modal -->
|
||||
<section id="modal">
|
||||
<h2>Modal</h2>
|
||||
<button class="contrast" data-target="modal-example" onclick="toggleModal(event)">
|
||||
Launch demo modal
|
||||
</button>
|
||||
</section>
|
||||
<!-- ./ Modal -->
|
||||
|
||||
<!-- Accordions -->
|
||||
<section id="accordions">
|
||||
<h2>Accordions</h2>
|
||||
<details>
|
||||
<summary>Accordion 1</summary>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque urna diam,
|
||||
tincidunt nec porta sed, auctor id velit. Etiam venenatis nisl ut orci consequat, vitae
|
||||
tempus quam commodo. Nulla non mauris ipsum. Aliquam eu posuere orci. Nulla convallis
|
||||
lectus rutrum quam hendrerit, in facilisis elit sollicitudin. Mauris pulvinar pulvinar
|
||||
mi, dictum tristique elit auctor quis. Maecenas ac ipsum ultrices, porta turpis sit
|
||||
amet, congue turpis.
|
||||
</p>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>Accordion 2</summary>
|
||||
<ul>
|
||||
<li>Vestibulum id elit quis massa interdum sodales.</li>
|
||||
<li>Nunc quis eros vel odio pretium tincidunt nec quis neque.</li>
|
||||
<li>Quisque sed eros non eros ornare elementum.</li>
|
||||
<li>Cras sed libero aliquet, porta dolor quis, dapibus ipsum.</li>
|
||||
</ul>
|
||||
</details>
|
||||
</section>
|
||||
<!-- ./ Accordions -->
|
||||
|
||||
<!-- Article-->
|
||||
<article id="article">
|
||||
<h2>Article</h2>
|
||||
<p>
|
||||
Nullam dui arcu, malesuada et sodales eu, efficitur vitae dolor. Sed ultricies dolor non
|
||||
ante vulputate hendrerit. Vivamus sit amet suscipit sapien. Nulla iaculis eros a elit
|
||||
pharetra egestas. Nunc placerat facilisis cursus. Sed vestibulum metus eget dolor pharetra
|
||||
rutrum.
|
||||
</p>
|
||||
<footer>
|
||||
<small>Duis nec elit placerat, suscipit nibh quis, finibus neque.</small>
|
||||
</footer>
|
||||
</article>
|
||||
<article>
|
||||
<header>Card Header</header>
|
||||
Card Body
|
||||
<footer>Card Footer</footer>
|
||||
</article>
|
||||
<!-- ./ Article-->
|
||||
|
||||
<!-- Group -->
|
||||
<section id="group">
|
||||
<h2>Group</h2>
|
||||
<form>
|
||||
<fieldset role="group">
|
||||
<input name="email" type="email" placeholder="Enter your email" autocomplete="email" />
|
||||
<input type="submit" value="Subscribe" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
<!-- ./ Group -->
|
||||
|
||||
<!-- Progress -->
|
||||
<section id="progress">
|
||||
<h2>Progress bar</h2>
|
||||
<progress id="progress-1" value="25" max="100"></progress>
|
||||
<progress id="progress-2"></progress>
|
||||
</section>
|
||||
<!-- ./ Progress -->
|
||||
|
||||
<!-- Loading -->
|
||||
<section id="loading">
|
||||
<h2>Loading</h2>
|
||||
<article aria-busy="true"></article>
|
||||
<button aria-busy="true">Please wait…</button>
|
||||
</section>
|
||||
<!-- ./ Loading -->
|
||||
</main>
|
||||
<!-- ./ Main -->
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="container">
|
||||
<small>Built with <a href="https://picocss.com">Pico</a> •
|
||||
<a href="https://github.com/picocss/examples/blob/master/v2-html/index.html">Source code</a></small>
|
||||
</footer>
|
||||
<!-- ./ Footer -->
|
||||
|
||||
<!-- Modal example -->
|
||||
<dialog id="modal-example">
|
||||
<article>
|
||||
<header>
|
||||
<button aria-label="Close" rel="prev" data-target="modal-example" onclick="toggleModal(event)"></button>
|
||||
<h3>Confirm your action!</h3>
|
||||
</header>
|
||||
<p>
|
||||
Cras sit amet maximus risus. Pellentesque sodales odio sit amet augue finibus
|
||||
pellentesque. Nullam finibus risus non semper euismod.
|
||||
</p>
|
||||
<footer>
|
||||
<button role="button" class="secondary" data-target="modal-example" onclick="toggleModal(event)">
|
||||
Cancel</button><button autofocus data-target="modal-example" onclick="toggleModal(event)">
|
||||
Confirm
|
||||
</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
<!-- ./ Modal example -->
|
||||
|
||||
<!-- Minimal theme switcher -->
|
||||
<script src="js/minimal-theme-switcher.js"></script>
|
||||
|
||||
<!-- Modal -->
|
||||
<script src="js/modal.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
79
js/minimal-theme-switcher.js
Normal file
79
js/minimal-theme-switcher.js
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*!
|
||||
* Minimal theme switcher
|
||||
*
|
||||
* Pico.css - https://picocss.com
|
||||
* Copyright 2019-2024 - Licensed under MIT
|
||||
*/
|
||||
|
||||
const themeSwitcher = {
|
||||
// Config
|
||||
_scheme: "auto",
|
||||
menuTarget: "details.dropdown",
|
||||
buttonsTarget: "a[data-theme-switcher]",
|
||||
buttonAttribute: "data-theme-switcher",
|
||||
rootAttribute: "data-theme",
|
||||
localStorageKey: "picoPreferredColorScheme",
|
||||
|
||||
// Init
|
||||
init() {
|
||||
this.scheme = this.schemeFromLocalStorage;
|
||||
this.initSwitchers();
|
||||
},
|
||||
|
||||
// Get color scheme from local storage
|
||||
get schemeFromLocalStorage() {
|
||||
return window.localStorage?.getItem(this.localStorageKey) ?? this._scheme;
|
||||
},
|
||||
|
||||
// Preferred color scheme
|
||||
get preferredColorScheme() {
|
||||
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
},
|
||||
|
||||
// Init switchers
|
||||
initSwitchers() {
|
||||
const buttons = document.querySelectorAll(this.buttonsTarget);
|
||||
buttons.forEach((button) => {
|
||||
button.addEventListener(
|
||||
"click",
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
// Set scheme
|
||||
this.scheme = button.getAttribute(this.buttonAttribute);
|
||||
// Close dropdown
|
||||
document.querySelector(this.menuTarget)?.removeAttribute("open");
|
||||
},
|
||||
false
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
// Set scheme
|
||||
set scheme(scheme) {
|
||||
if (scheme == "auto") {
|
||||
this._scheme = this.preferredColorScheme;
|
||||
} else if (scheme == "dark" || scheme == "light") {
|
||||
this._scheme = scheme;
|
||||
}
|
||||
this.applyScheme();
|
||||
this.schemeToLocalStorage();
|
||||
},
|
||||
|
||||
// Get scheme
|
||||
get scheme() {
|
||||
return this._scheme;
|
||||
},
|
||||
|
||||
// Apply scheme
|
||||
applyScheme() {
|
||||
document.querySelector("html")?.setAttribute(this.rootAttribute, this.scheme);
|
||||
},
|
||||
|
||||
// Store scheme to local storage
|
||||
schemeToLocalStorage() {
|
||||
window.localStorage?.setItem(this.localStorageKey, this.scheme);
|
||||
},
|
||||
};
|
||||
|
||||
// Init
|
||||
themeSwitcher.init();
|
75
js/modal.js
Normal file
75
js/modal.js
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Modal
|
||||
*
|
||||
* Pico.css - https://picocss.com
|
||||
* Copyright 2019-2024 - Licensed under MIT
|
||||
*/
|
||||
|
||||
// Config
|
||||
const isOpenClass = "modal-is-open";
|
||||
const openingClass = "modal-is-opening";
|
||||
const closingClass = "modal-is-closing";
|
||||
const scrollbarWidthCssVar = "--pico-scrollbar-width";
|
||||
const animationDuration = 400; // ms
|
||||
let visibleModal = null;
|
||||
|
||||
// Toggle modal
|
||||
const toggleModal = (event) => {
|
||||
event.preventDefault();
|
||||
const modal = document.getElementById(event.currentTarget.dataset.target);
|
||||
if (!modal) return;
|
||||
modal && (modal.open ? closeModal(modal) : openModal(modal));
|
||||
};
|
||||
|
||||
// Open modal
|
||||
const openModal = (modal) => {
|
||||
const { documentElement: html } = document;
|
||||
const scrollbarWidth = getScrollbarWidth();
|
||||
if (scrollbarWidth) {
|
||||
html.style.setProperty(scrollbarWidthCssVar, `${scrollbarWidth}px`);
|
||||
}
|
||||
html.classList.add(isOpenClass, openingClass);
|
||||
setTimeout(() => {
|
||||
visibleModal = modal;
|
||||
html.classList.remove(openingClass);
|
||||
}, animationDuration);
|
||||
modal.showModal();
|
||||
};
|
||||
|
||||
// Close modal
|
||||
const closeModal = (modal) => {
|
||||
visibleModal = null;
|
||||
const { documentElement: html } = document;
|
||||
html.classList.add(closingClass);
|
||||
setTimeout(() => {
|
||||
html.classList.remove(closingClass, isOpenClass);
|
||||
html.style.removeProperty(scrollbarWidthCssVar);
|
||||
modal.close();
|
||||
}, animationDuration);
|
||||
};
|
||||
|
||||
// Close with a click outside
|
||||
document.addEventListener("click", (event) => {
|
||||
if (visibleModal === null) return;
|
||||
const modalContent = visibleModal.querySelector("article");
|
||||
const isClickInside = modalContent.contains(event.target);
|
||||
!isClickInside && closeModal(visibleModal);
|
||||
});
|
||||
|
||||
// Close with Esc key
|
||||
document.addEventListener("keydown", (event) => {
|
||||
if (event.key === "Escape" && visibleModal) {
|
||||
closeModal(visibleModal);
|
||||
}
|
||||
});
|
||||
|
||||
// Get scrollbar width
|
||||
const getScrollbarWidth = () => {
|
||||
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
||||
return scrollbarWidth;
|
||||
};
|
||||
|
||||
// Is scrollbar visible
|
||||
const isScrollbarVisible = () => {
|
||||
return document.body.scrollHeight > screen.height;
|
||||
};
|
2880
pico.min.css
vendored
Normal file
2880
pico.min.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue