More file formatting

This commit is contained in:
Adrián de la Rosa Martín 2021-03-07 10:21:58 +01:00
parent 73b6ad6143
commit 86c68e9df8
36 changed files with 7530 additions and 3067 deletions

View File

@ -2,9 +2,9 @@ name: tests
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
jobs:
build:

View File

@ -1,47 +1,51 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Basic */
// MSIE: Required for IEMobile.
@-ms-viewport {
width: device-width;
}
// MSIE: Prevents scrollbar from overlapping content.
body {
-ms-overflow-style: scrollbar;
}
// Ensures page width is always >=320px.
@include breakpoint('<=xsmall') {
html, body {
min-width: 320px;
}
}
// Set box model to border-box.
// Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
background: _palette(bg);
// Stops initial animations until page loads.
&.is-preload {
*, *:before, *:after {
@include vendor('animation', 'none !important');
@include vendor('transition', 'none !important');
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Basic */
// MSIE: Required for IEMobile.
@-ms-viewport {
width: device-width;
}
// MSIE: Prevents scrollbar from overlapping content.
body {
-ms-overflow-style: scrollbar;
}
// Ensures page width is always >=320px.
@include breakpoint("<=xsmall") {
html,
body {
min-width: 320px;
}
}
// Set box model to border-box.
// Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
background: _palette(bg);
// Stops initial animations until page loads.
&.is-preload {
*,
*:before,
*:after {
@include vendor("animation", "none !important");
@include vendor("transition", "none !important");
}
}
}

View File

@ -1,76 +1,159 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
// Reset.
// Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain)
html, body, div, span, applet, object,
iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
pre, a, abbr, acronym, address, big, cite,
code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b,
u, i, center, dl, dt, dd, ol, ul, li, fieldset,
form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption,
footer, header, hgroup, menu, nav, output, ruby,
section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style:none;
}
blockquote, q {
quotes: none;
&:before,
&:after {
content: '';
content: none;
}
}
table {
border-collapse: collapse;
border-spacing: 0;
}
body {
-webkit-text-size-adjust: none;
}
mark {
background-color: transparent;
color: inherit;
}
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input, select, textarea {
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
// Reset.
// Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain)
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
&:before,
&:after {
content: "";
content: none;
}
}
table {
border-collapse: collapse;
border-spacing: 0;
}
body {
-webkit-text-size-adjust: none;
}
mark {
background-color: transparent;
color: inherit;
}
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input,
select,
textarea {
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
}

View File

@ -1,189 +1,207 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Type */
body, input, select, textarea {
color: _palette(fg);
font-family: _font(family);
font-size: 14pt;
font-weight: _font(weight);
line-height: 1.75;
@include breakpoint('<=xlarge') {
font-size: 12pt;
}
@include breakpoint('<=large') {
font-size: 12pt;
}
}
a {
@include vendor('transition', (
'border-bottom-color #{_duration(transition)} ease',
'color #{_duration(transition)} ease'
));
text-decoration: none;
color: _palette(fg);
border-bottom: dotted 1px transparentize(_palette(fg), 0.5);
&:hover {
border-bottom-color: transparent;
color: _palette(accent1) !important;
}
}
strong, b {
color: _palette(fg-bold);
font-weight: _font(weight-bold);
}
em, i {
font-style: italic;
}
p {
margin: 0 0 _size(element-margin) 0;
}
h1 {
font-size: 2em;
color: _palette(fg-bold);
font-weight: _font(weight-bold-alt);
line-height: 1.3;
margin: 0 0 (_size(element-margin) * 0.5) 0;
letter-spacing: _font(letter-spacing-alt);
a {
color: inherit;
}
@include breakpoint('<=small') {
font-size: 2em;
margin: 0 0 (_size(element-margin) * 0.5) 0;
}
@include breakpoint('<=xxsmall') {
font-size: 1.75em;
}
}
h2, h3, h4, h5, h6 {
color: _palette(fg-bold);
font-weight: _font(weight-bold);
line-height: 1.5;
margin: 0 0 (_size(element-margin) * 1) 0;
text-transform: uppercase;
letter-spacing: _font(letter-spacing);
a {
color: inherit;
}
}
h2 {
font-size: 1.1em;
}
h3 {
font-size: 1em;
}
h4 {
font-size: 0.8em;
}
h5 {
font-size: 0.8em;
}
h6 {
font-size: 0.8em;
}
@include breakpoint('<=medium') {
h1, h2, h3, h4, h5, h6 {
br {
display: none;
}
}
}
@include breakpoint('<=small') {
h2 {
font-size: 1em;
}
h3 {
font-size: 0.8em;
}
}
sub {
font-size: 0.8em;
position: relative;
top: 0.5em;
}
sup {
font-size: 0.8em;
position: relative;
top: -0.5em;
}
blockquote {
border-left: solid (_size(border-width) * 4) _palette(border);
font-style: italic;
margin: 0 0 _size(element-margin) 0;
padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin);
}
code {
background: _palette(border-bg);
border-radius: _size(border-radius);
border: solid _size(border-width) _palette(border);
font-family: _font(family-fixed);
font-size: 0.9em;
margin: 0 0.25em;
padding: 0.25em 0.65em;
}
pre {
-webkit-overflow-scrolling: touch;
font-family: _font(family-fixed);
font-size: 0.9em;
margin: 0 0 _size(element-margin) 0;
code {
display: block;
line-height: 1.75;
padding: 1em 1.5em;
overflow-x: auto;
}
}
hr {
border: 0;
border-bottom: solid _size(border-width) _palette(border);
margin: _size(element-margin) 0;
&.major {
margin: (_size(element-margin) * 1.5) 0;
}
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Type */
body,
input,
select,
textarea {
color: _palette(fg);
font-family: _font(family);
font-size: 14pt;
font-weight: _font(weight);
line-height: 1.75;
@include breakpoint("<=xlarge") {
font-size: 12pt;
}
@include breakpoint("<=large") {
font-size: 12pt;
}
}
a {
@include vendor(
"transition",
(
"border-bottom-color #{_duration(transition)} ease",
"color #{_duration(transition)} ease"
)
);
text-decoration: none;
color: _palette(fg);
border-bottom: dotted 1px transparentize(_palette(fg), 0.5);
&:hover {
border-bottom-color: transparent;
color: _palette(accent1) !important;
}
}
strong,
b {
color: _palette(fg-bold);
font-weight: _font(weight-bold);
}
em,
i {
font-style: italic;
}
p {
margin: 0 0 _size(element-margin) 0;
}
h1 {
font-size: 2em;
color: _palette(fg-bold);
font-weight: _font(weight-bold-alt);
line-height: 1.3;
margin: 0 0 (_size(element-margin) * 0.5) 0;
letter-spacing: _font(letter-spacing-alt);
a {
color: inherit;
}
@include breakpoint("<=small") {
font-size: 2em;
margin: 0 0 (_size(element-margin) * 0.5) 0;
}
@include breakpoint("<=xxsmall") {
font-size: 1.75em;
}
}
h2,
h3,
h4,
h5,
h6 {
color: _palette(fg-bold);
font-weight: _font(weight-bold);
line-height: 1.5;
margin: 0 0 (_size(element-margin) * 1) 0;
text-transform: uppercase;
letter-spacing: _font(letter-spacing);
a {
color: inherit;
}
}
h2 {
font-size: 1.1em;
}
h3 {
font-size: 1em;
}
h4 {
font-size: 0.8em;
}
h5 {
font-size: 0.8em;
}
h6 {
font-size: 0.8em;
}
@include breakpoint("<=medium") {
h1,
h2,
h3,
h4,
h5,
h6 {
br {
display: none;
}
}
}
@include breakpoint("<=small") {
h2 {
font-size: 1em;
}
h3 {
font-size: 0.8em;
}
}
sub {
font-size: 0.8em;
position: relative;
top: 0.5em;
}
sup {
font-size: 0.8em;
position: relative;
top: -0.5em;
}
blockquote {
border-left: solid (_size(border-width) * 4) _palette(border);
font-style: italic;
margin: 0 0 _size(element-margin) 0;
padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4)
_size(element-margin);
}
code {
background: _palette(border-bg);
border-radius: _size(border-radius);
border: solid _size(border-width) _palette(border);
font-family: _font(family-fixed);
font-size: 0.9em;
margin: 0 0.25em;
padding: 0.25em 0.65em;
}
pre {
-webkit-overflow-scrolling: touch;
font-family: _font(family-fixed);
font-size: 0.9em;
margin: 0 0 _size(element-margin) 0;
code {
display: block;
line-height: 1.75;
padding: 1em 1.5em;
overflow-x: auto;
}
}
hr {
border: 0;
border-bottom: solid _size(border-width) _palette(border);
margin: _size(element-margin) 0;
&.major {
margin: (_size(element-margin) * 1.5) 0;
}
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}

View File

@ -1,101 +1,101 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Actions */
ul.actions {
@include vendor('display', 'flex');
cursor: default;
list-style: none;
margin-left: (_size(element-margin) * -0.5);
padding-left: 0;
li {
padding: 0 0 0 (_size(element-margin) * 0.5);
vertical-align: middle;
}
&.special {
@include vendor('justify-content', 'center');
width: 100%;
margin-left: 0;
li {
&:first-child {
padding-left: 0;
}
}
}
&.stacked {
@include vendor('flex-direction', 'column');
margin-left: 0;
li {
padding: (_size(element-margin) * 0.65) 0 0 0;
&:first-child {
padding-top: 0;
}
}
}
&.fit {
width: calc(100% + #{_size(element-margin) * 0.5});
li {
@include vendor('flex-grow', '1');
@include vendor('flex-shrink', '1');
width: 100%;
> * {
width: 100%;
}
}
&.stacked {
width: 100%;
}
}
@include breakpoint('<=xsmall') {
&:not(.fixed) {
@include vendor('flex-direction', 'column');
margin-left: 0;
width: 100% !important;
li {
@include vendor('flex-grow', '1');
@include vendor('flex-shrink', '1');
padding: (_size(element-margin) * 0.5) 0 0 0;
text-align: center;
width: 100%;
> * {
width: 100%;
}
&:first-child {
padding-top: 0;
}
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
width: 100%;
&.icon {
&:before {
margin-left: -0.5rem;
}
}
}
}
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Actions */
ul.actions {
@include vendor("display", "flex");
cursor: default;
list-style: none;
margin-left: (_size(element-margin) * -0.5);
padding-left: 0;
li {
padding: 0 0 0 (_size(element-margin) * 0.5);
vertical-align: middle;
}
&.special {
@include vendor("justify-content", "center");
width: 100%;
margin-left: 0;
li {
&:first-child {
padding-left: 0;
}
}
}
&.stacked {
@include vendor("flex-direction", "column");
margin-left: 0;
li {
padding: (_size(element-margin) * 0.65) 0 0 0;
&:first-child {
padding-top: 0;
}
}
}
&.fit {
width: calc(100% + #{_size(element-margin) * 0.5});
li {
@include vendor("flex-grow", "1");
@include vendor("flex-shrink", "1");
width: 100%;
> * {
width: 100%;
}
}
&.stacked {
width: 100%;
}
}
@include breakpoint("<=xsmall") {
&:not(.fixed) {
@include vendor("flex-direction", "column");
margin-left: 0;
width: 100% !important;
li {
@include vendor("flex-grow", "1");
@include vendor("flex-shrink", "1");
padding: (_size(element-margin) * 0.5) 0 0 0;
text-align: center;
width: 100%;
> * {
width: 100%;
}
&:first-child {
padding-top: 0;
}
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
width: 100%;
&.icon {
&:before {
margin-left: -0.5rem;
}
}
}
}
}
}
}

View File

@ -1,26 +1,26 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Box */
.box {
border-radius: _size(border-radius);
border: solid _size(border-width) _palette(border);
margin-bottom: _size(element-margin);
padding: 1.5em;
> :last-child,
> :last-child > :last-child,
> :last-child > :last-child > :last-child {
margin-bottom: 0;
}
&.alt {
border: 0;
border-radius: 0;
padding: 0;
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Box */
.box {
border-radius: _size(border-radius);
border: solid _size(border-width) _palette(border);
margin-bottom: _size(element-margin);
padding: 1.5em;
> :last-child,
> :last-child > :last-child,
> :last-child > :last-child > :last-child {
margin-bottom: 0;
}
&.alt {
border: 0;
border-radius: 0;
padding: 0;
}
}

View File

@ -1,86 +1,89 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Button */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
@include vendor('appearance', 'none');
@include vendor('transition', (
'background-color #{_duration(transition)} ease-in-out',
'color #{_duration(transition)} ease-in-out',
'box-shadow #{_duration(transition)} ease-in-out'
));
background-color: transparent;
border-radius: _size(border-radius);
border: 0;
box-shadow: inset 0 0 0 (_size(border-width) * 2) _palette(fg);
color: _palette(fg) !important;
cursor: pointer;
display: inline-block;
font-size: 0.8em;
font-weight: _font(weight-bold);
height: 3.5em;
letter-spacing: _font(letter-spacing);
line-height: 3.45em;
overflow: hidden;
padding: 0 1.25em 0 #{1.25em + _font(letter-spacing)};
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
text-transform: uppercase;
white-space: nowrap;
&.icon {
&:before {
margin-right: 0.5em;
}
}
&.fit {
width: 100%;
}
&:hover {
color: _palette(accent1) !important;
box-shadow: inset 0 0 0 (_size(border-width) * 2) _palette(accent1);
}
&:active {
background-color: transparentize(_palette(accent1), 0.9);
}
&.small {
font-size: 0.6em;
}
&.large {
font-size: 1em;
}
&.primary {
box-shadow: none;
background-color: _palette(fg);
color: _palette(bg) !important;
&:hover {
background-color: _palette(accent1);
}
&:active {
background-color: darken(_palette(accent1), 8);
}
}
&.disabled,
&:disabled {
@include vendor('pointer-events', 'none');
opacity: 0.25;
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Button */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
@include vendor("appearance", "none");
@include vendor(
"transition",
(
"background-color #{_duration(transition)} ease-in-out",
"color #{_duration(transition)} ease-in-out",
"box-shadow #{_duration(transition)} ease-in-out"
)
);
background-color: transparent;
border-radius: _size(border-radius);
border: 0;
box-shadow: inset 0 0 0 (_size(border-width) * 2) _palette(fg);
color: _palette(fg) !important;
cursor: pointer;
display: inline-block;
font-size: 0.8em;
font-weight: _font(weight-bold);
height: 3.5em;
letter-spacing: _font(letter-spacing);
line-height: 3.45em;
overflow: hidden;
padding: 0 1.25em 0 #{1.25em + _font(letter-spacing)};
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
text-transform: uppercase;
white-space: nowrap;
&.icon {
&:before {
margin-right: 0.5em;
}
}
&.fit {
width: 100%;
}
&:hover {
color: _palette(accent1) !important;
box-shadow: inset 0 0 0 (_size(border-width) * 2) _palette(accent1);
}
&:active {
background-color: transparentize(_palette(accent1), 0.9);
}
&.small {
font-size: 0.6em;
}
&.large {
font-size: 1em;
}
&.primary {
box-shadow: none;
background-color: _palette(fg);
color: _palette(bg) !important;
&:hover {
background-color: _palette(accent1);
}
&:active {
background-color: darken(_palette(accent1), 8);
}
}
&.disabled,
&:disabled {
@include vendor("pointer-events", "none");
opacity: 0.25;
}
}

View File

@ -1,212 +1,214 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Form */
form {
margin: 0 0 _size(element-margin) 0;
overflow-x: hidden;
> :last-child {
margin-bottom: 0;
}
> .fields {
$gutter: (_size(element-margin) * 0.75);
@include vendor('display', 'flex');
@include vendor('flex-wrap', 'wrap');
width: calc(100% + #{$gutter * 2});
margin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);
> .field {
@include vendor('flex-grow', '0');
@include vendor('flex-shrink', '0');
padding: $gutter 0 0 $gutter;
width: calc(100% - #{$gutter * 1});
&.half {
width: calc(50% - #{$gutter * 0.5});
}
&.third {
width: calc(#{100% / 3} - #{$gutter * (1 / 3)});
}
&.quarter {
width: calc(25% - #{$gutter * 0.25});
}
}
}
@include breakpoint('<=xsmall') {
> .fields {
$gutter: (_size(element-margin) * 0.75);
width: calc(100% + #{$gutter * 2});
margin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);
> .field {
padding: $gutter 0 0 $gutter;
width: calc(100% - #{$gutter * 1});
&.half {
width: calc(100% - #{$gutter * 1});
}
&.third {
width: calc(100% - #{$gutter * 1});
}
&.quarter {
width: calc(100% - #{$gutter * 1});
}
}
}
}
}
label {
display: block;
font-size: 0.9em;
font-weight: _font(weight-bold);
margin: 0 0 (_size(element-margin) * 0.5) 0;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
@include vendor('appearance', 'none');
background-color: transparent;
border: none;
border-radius: 0;
border-bottom: solid _size(border-width) _palette(border);
color: inherit;
display: block;
outline: 0;
padding: 0;
text-decoration: none;
width: 100%;
&:invalid {
box-shadow: none;
}
&:focus {
border-bottom-color: _palette(accent1);
box-shadow: inset 0 -1px 0 0 _palette(accent1);
}
}
select {
background-image: svg-url("<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'><path d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='#{_palette(border)}' /></svg>");
background-size: 1.25rem;
background-repeat: no-repeat;
background-position: calc(100% - 1rem) center;
height: _size(element-height);
padding-right: _size(element-height);
text-overflow: ellipsis;
option {
color: _palette(fg-bold);
background: _palette(bg);
}
&:focus {
&::-ms-value {
background-color: transparent;
}
}
&::-ms-expand {
display: none;
}
}
input[type="text"],
input[type="password"],
input[type="email"],
select {
height: _size(element-height);
}
textarea {
padding: 0;
min-height: (_size(element-height) * 1.25);
}
input[type="checkbox"],
input[type="radio"], {
@include vendor('appearance', 'none');
display: block;
float: left;
margin-right: -2em;
opacity: 0;
width: 1em;
z-index: -1;
& + label {
@include icon(false, solid);
color: _palette(fg);
cursor: pointer;
display: inline-block;
font-size: 1em;
font-weight: _font(weight);
padding-left: (_size(element-height) * 0.6) + 0.75em;
padding-right: 0.75em;
position: relative;
&:before {
border-radius: _size(border-radius);
border: solid _size(border-width) _palette(border);
content: '';
display: inline-block;
font-size: 0.8em;
height: (_size(element-height) * 0.75);
left: 0;
line-height: (_size(element-height) * 0.75);
position: absolute;
text-align: center;
top: 0;
width: (_size(element-height) * 0.75);
}
}
&:checked + label {
&:before {
background: _palette(fg);
border-color: _palette(fg);
color: _palette(bg);
content: '\f00c';
}
}
&:focus + label {
&:before {
border-color: _palette(accent1);
box-shadow: 0 0 0 _size(border-width) _palette(accent1);
}
}
}
input[type="checkbox"] {
& + label {
&:before {
border-radius: _size(border-radius);
}
}
}
input[type="radio"] {
& + label {
&:before {
border-radius: 100%;
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Form */
form {
margin: 0 0 _size(element-margin) 0;
overflow-x: hidden;
> :last-child {
margin-bottom: 0;
}
> .fields {
$gutter: (_size(element-margin) * 0.75);
@include vendor("display", "flex");
@include vendor("flex-wrap", "wrap");
width: calc(100% + #{$gutter * 2});
margin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);
> .field {
@include vendor("flex-grow", "0");
@include vendor("flex-shrink", "0");
padding: $gutter 0 0 $gutter;
width: calc(100% - #{$gutter * 1});
&.half {
width: calc(50% - #{$gutter * 0.5});
}
&.third {
width: calc(#{100% / 3} - #{$gutter * (1 / 3)});
}
&.quarter {
width: calc(25% - #{$gutter * 0.25});
}
}
}
@include breakpoint("<=xsmall") {
> .fields {
$gutter: (_size(element-margin) * 0.75);
width: calc(100% + #{$gutter * 2});
margin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);
> .field {
padding: $gutter 0 0 $gutter;
width: calc(100% - #{$gutter * 1});
&.half {
width: calc(100% - #{$gutter * 1});
}
&.third {
width: calc(100% - #{$gutter * 1});
}
&.quarter {
width: calc(100% - #{$gutter * 1});
}
}
}
}
}
label {
display: block;
font-size: 0.9em;
font-weight: _font(weight-bold);
margin: 0 0 (_size(element-margin) * 0.5) 0;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
@include vendor("appearance", "none");
background-color: transparent;
border: none;
border-radius: 0;
border-bottom: solid _size(border-width) _palette(border);
color: inherit;
display: block;
outline: 0;
padding: 0;
text-decoration: none;
width: 100%;
&:invalid {
box-shadow: none;
}
&:focus {
border-bottom-color: _palette(accent1);
box-shadow: inset 0 -1px 0 0 _palette(accent1);
}
}
select {
background-image: svg-url(
"<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'><path d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='#{_palette(border)}' /></svg>"
);
background-size: 1.25rem;
background-repeat: no-repeat;
background-position: calc(100% - 1rem) center;
height: _size(element-height);
padding-right: _size(element-height);
text-overflow: ellipsis;
option {
color: _palette(fg-bold);
background: _palette(bg);
}
&:focus {
&::-ms-value {
background-color: transparent;
}
}
&::-ms-expand {
display: none;
}
}
input[type="text"],
input[type="password"],
input[type="email"],
select {
height: _size(element-height);
}
textarea {
padding: 0;
min-height: (_size(element-height) * 1.25);
}
input[type="checkbox"],
input[type="radio"] {
@include vendor("appearance", "none");
display: block;
float: left;
margin-right: -2em;
opacity: 0;
width: 1em;
z-index: -1;
& + label {
@include icon(false, solid);
color: _palette(fg);
cursor: pointer;
display: inline-block;
font-size: 1em;
font-weight: _font(weight);
padding-left: (_size(element-height) * 0.6) + 0.75em;
padding-right: 0.75em;
position: relative;
&:before {
border-radius: _size(border-radius);
border: solid _size(border-width) _palette(border);
content: "";
display: inline-block;
font-size: 0.8em;
height: (_size(element-height) * 0.75);
left: 0;
line-height: (_size(element-height) * 0.75);
position: absolute;
text-align: center;
top: 0;
width: (_size(element-height) * 0.75);
}
}
&:checked + label {
&:before {
background: _palette(fg);
border-color: _palette(fg);
color: _palette(bg);
content: "\f00c";
}
}
&:focus + label {
&:before {
border-color: _palette(accent1);
box-shadow: 0 0 0 _size(border-width) _palette(accent1);
}
}
}
input[type="checkbox"] {
& + label {
&:before {
border-radius: _size(border-radius);
}
}
}
input[type="radio"] {
& + label {
&:before {
border-radius: 100%;
}
}
}

View File

@ -1,66 +1,69 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Icon */
.icon {
@include icon;
border-bottom: none;
position: relative;
> .label {
display: none;
}
&:before {
line-height: inherit;
}
&.solid {
&:before {
font-weight: 900;
}
}
&.brands {
&:before {
font-family: 'Font Awesome 5 Brands';
}
}
&.style1 {
}
&.style2 {
@include vendor('transition', (
'background-color #{_duration(transition)} ease-in-out',
'color #{_duration(transition)} ease-in-out',
'border-color #{_duration(transition)} ease-in-out'
));
background-color: transparent;
border: solid 1px _palette(border);
border-radius: _size(border-radius);
width: 2.65em;
height: 2.65em;
display: inline-block;
text-align: center;
line-height: 2.65em;
color: inherit;
&:before {
font-size: 1.1em;
}
&:hover {
color: _palette(accent1);
border-color: _palette(accent1);
}
&:active {
background-color: transparentize(_palette(accent1), 0.9);
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Icon */
.icon {
@include icon;
border-bottom: none;
position: relative;
> .label {
display: none;
}
&:before {
line-height: inherit;
}
&.solid {
&:before {
font-weight: 900;
}
}
&.brands {
&:before {
font-family: "Font Awesome 5 Brands";
}
}
&.style1 {
}
&.style2 {
@include vendor(
"transition",
(
"background-color #{_duration(transition)} ease-in-out",
"color #{_duration(transition)} ease-in-out",
"border-color #{_duration(transition)} ease-in-out"
)
);
background-color: transparent;
border: solid 1px _palette(border);
border-radius: _size(border-radius);
width: 2.65em;
height: 2.65em;
display: inline-block;
text-align: center;
line-height: 2.65em;
color: inherit;
&:before {
font-size: 1.1em;
}
&:hover {
color: _palette(accent1);
border-color: _palette(accent1);
}
&:active {
background-color: transparentize(_palette(accent1), 0.9);
}
}
}

View File

@ -6,14 +6,14 @@
/* Icons */
ul.icons {
cursor: default;
list-style: none;
padding-left: 0;
margin: -1em 0 _size(element-margin) -1em;
ul.icons {
cursor: default;
list-style: none;
padding-left: 0;
margin: -1em 0 _size(element-margin) -1em;
li {
display: inline-block;
padding: 1em 0 0 1em;
}
}
li {
display: inline-block;
padding: 1em 0 0 1em;
}
}

View File

@ -1,64 +1,64 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Image */
.image {
border-radius: _size(border-radius);
border: 0;
display: inline-block;
position: relative;
img {
border-radius: _size(border-radius);
display: block;
}
&.left,
&.right {
max-width: 40%;
img {
width: 100%;
}
}
&.left {
float: left;
padding: 0 1.5em 1em 0;
top: 0.25em;
}
&.right {
float: right;
padding: 0 0 1em 1.5em;
top: 0.25em;
}
&.fit {
display: block;
margin: 0 0 _size(element-margin) 0;
width: 100%;
img {
width: 100%;
}
}
&.main {
display: block;
margin: 0 0 (_size(element-margin) * 1.5) 0;
width: 100%;
img {
width: 100%;
}
@include breakpoint('<=small') {
margin: 0 0 _size(element-margin) 0;
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Image */
.image {
border-radius: _size(border-radius);
border: 0;
display: inline-block;
position: relative;
img {
border-radius: _size(border-radius);
display: block;
}
&.left,
&.right {
max-width: 40%;
img {
width: 100%;
}
}
&.left {
float: left;
padding: 0 1.5em 1em 0;
top: 0.25em;
}
&.right {
float: right;
padding: 0 0 1em 1.5em;
top: 0.25em;
}
&.fit {
display: block;
margin: 0 0 _size(element-margin) 0;
width: 100%;
img {
width: 100%;
}
}
&.main {
display: block;
margin: 0 0 (_size(element-margin) * 1.5) 0;
width: 100%;
img {
width: 100%;
}
@include breakpoint("<=small") {
margin: 0 0 _size(element-margin) 0;
}
}
}

View File

@ -1,56 +1,56 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* List */
ol {
list-style: decimal;
margin: 0 0 _size(element-margin) 0;
padding-left: 1.25em;
li {
padding-left: 0.25em;
}
}
ul {
list-style: disc;
margin: 0 0 _size(element-margin) 0;
padding-left: 1em;
li {
padding-left: 0.5em;
}
&.alt {
list-style: none;
padding-left: 0;
li {
border-top: solid _size(border-width) _palette(border);
padding: 0.5em 0;
&:first-child {
border-top: 0;
padding-top: 0;
}
}
}
}
dl {
margin: 0 0 _size(element-margin) 0;
dt {
display: block;
font-weight: _font(weight-bold);
margin: 0 0 (_size(element-margin) * 0.5) 0;
}
dd {
margin-left: _size(element-margin);
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* List */
ol {
list-style: decimal;
margin: 0 0 _size(element-margin) 0;
padding-left: 1.25em;
li {
padding-left: 0.25em;
}
}
ul {
list-style: disc;
margin: 0 0 _size(element-margin) 0;
padding-left: 1em;
li {
padding-left: 0.5em;
}
&.alt {
list-style: none;
padding-left: 0;
li {
border-top: solid _size(border-width) _palette(border);
padding: 0.5em 0;
&:first-child {
border-top: 0;
padding-top: 0;
}
}
}
}
dl {
margin: 0 0 _size(element-margin) 0;
dt {
display: block;
font-weight: _font(weight-bold);
margin: 0 0 (_size(element-margin) * 0.5) 0;
}
dd {
margin-left: _size(element-margin);
}
}

View File

@ -1,31 +1,31 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Row */
.row {
@include html-grid(2em);
@include breakpoint('<=xlarge') {
@include html-grid(2em, 'xlarge');
}
@include breakpoint('<=large') {
@include html-grid(2em, 'large');
}
@include breakpoint('<=medium') {
@include html-grid(1.5em, 'medium');
}
@include breakpoint('<=small') {
@include html-grid(1em, 'small');
}
@include breakpoint('<=xsmall') {
@include html-grid(1em, 'xsmall');
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Row */
.row {
@include html-grid(2em);
@include breakpoint("<=xlarge") {
@include html-grid(2em, "xlarge");
}
@include breakpoint("<=large") {
@include html-grid(2em, "large");
}
@include breakpoint("<=medium") {
@include html-grid(1.5em, "medium");
}
@include breakpoint("<=small") {
@include html-grid(1em, "small");
}
@include breakpoint("<=xsmall") {
@include html-grid(1em, "xsmall");
}
}

View File

@ -1,25 +1,26 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Section/Article */
section, article {
&.special {
text-align: center;
}
}
header {
p {
margin-top: _size(element-margin) * -0.5;
}
@include breakpoint('<=small') {
p {
margin-top: 0;
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Section/Article */
section,
article {
&.special {
text-align: center;
}
}
header {
p {
margin-top: _size(element-margin) * -0.5;
}
@include breakpoint("<=small") {
p {
margin-top: 0;
}
}
}

View File

@ -1,45 +1,45 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Table */
.table-wrapper {
-webkit-overflow-scrolling: touch;
overflow-x: auto;
}
table {
margin: 0 0 _size(element-margin) 0;
width: 100%;
tbody {
tr {
border: solid _size(border-width) _palette(border);
border-left: 0;
border-right: 0;
}
}
td {
padding: 0.75em 0.75em;
}
th {
color: _palette(fg-bold);
font-size: 0.9em;
font-weight: _font(weight-bold);
padding: 0 0.75em 0.75em 0.75em;
text-align: left;
}
thead {
border-bottom: solid (_size(border-width) * 2) _palette(border);
}
tfoot {
border-top: solid (_size(border-width) * 2) _palette(border);
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Table */
.table-wrapper {
-webkit-overflow-scrolling: touch;
overflow-x: auto;
}
table {
margin: 0 0 _size(element-margin) 0;
width: 100%;
tbody {
tr {
border: solid _size(border-width) _palette(border);
border-left: 0;
border-right: 0;
}
}
td {
padding: 0.75em 0.75em;
}
th {
color: _palette(fg-bold);
font-size: 0.9em;
font-weight: _font(weight-bold);
padding: 0 0.75em 0.75em 0.75em;
text-align: left;
}
thead {
border-bottom: solid (_size(border-width) * 2) _palette(border);
}
tfoot {
border-top: solid (_size(border-width) * 2) _palette(border);
}
}

View File

@ -1,258 +1,265 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Tiles */
.tiles {
$gutter: _size(gutter);
$duration: 0.5s;
$ease: 'ease';
@include vendor('display', 'flex');
@include vendor('flex-wrap', 'wrap');
postiion: relative;
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
@include vendor('transition', (
'transform #{$duration} #{$ease}',
'opacity #{$duration} #{$ease}'
));
position: relative;
width: calc(#{(100% / 3)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
> .image {
@include vendor('transition', 'transform #{$duration} #{$ease}');
position: relative;
display: block;
width: 100%;
border-radius: _size(border-radius);
overflow: hidden;
img {
display: block;
width: 100%;
}
&:before {
@include vendor('pointer-events', 'none');
@include vendor('transition', (
'background-color #{$duration} #{$ease}',
'opacity #{$duration} #{$ease}'
));
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 1.0;
z-index: 1;
opacity: 0.8;
}
&:after {
@include vendor('pointer-events', 'none');
@include vendor('transition', 'opacity #{$duration} #{$ease}');
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 0.25px; stroke: #ffffff; }</style><line x1="0" y1="0" x2="100" y2="100" /><line x1="100" y1="0" x2="0" y2="100" /></svg>');
background-position: center;
background-repeat: no-repeat;
background-size: 100% 100%;
opacity: 0.25;
z-index: 2;
}
}
> a {
@include vendor('display', 'flex');
@include vendor('flex-direction', 'column');
@include vendor('align-items', 'center');
@include vendor('justify-content', 'center');
@include vendor('transition', (
'background-color #{$duration} #{$ease}',
'transform #{$duration} #{$ease}'
));
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 1em;
border-radius: _size(border-radius);
border-bottom: 0;
color: _palette(fg-accent);
text-align: center;
text-decoration: none;
z-index: 3;
> :last-child {
margin: 0;
}
&:hover {
color: _palette(fg-accent) !important;
}
h2 {
margin: 0;
}
.content {
@include vendor('transition', (
'max-height #{$duration} #{$ease}',
'opacity #{$duration} #{$ease}'
));
width: 100%;
max-height: 0;
line-height: 1.5;
margin-top: 0.35em;
opacity: 0;
> :last-child {
margin-bottom: 0;
}
}
}
&.style1 {
> .image:before {
background-color: _palette(accent1);
}
}
&.style2 {
> .image:before {
background-color: _palette(accent2);
}
}
&.style3 {
> .image:before {
background-color: _palette(accent3);
}
}
&.style4 {
> .image:before {
background-color: _palette(accent4);
}
}
&.style5 {
> .image:before {
background-color: _palette(accent5);
}
}
&.style6 {
> .image:before {
background-color: _palette(accent6);
}
}
body:not(.is-touch) & {
&:hover {
> .image {
@include vendor('transform', 'scale(1.1)');
&:before {
background-color: _palette(bg-accent);
opacity: 0.35;
}
&:after {
opacity: 0;
}
}
.content {
max-height: 15em;
opacity: 1;
}
}
}
}
* + & {
margin-top: _size(element-margin);
}
body.is-preload & {
article {
@include vendor('transform', 'scale(0.9)');
opacity: 0;
}
}
body.is-touch & {
article {
.content {
max-height: 15em;
opacity: 1;
}
}
}
@include breakpoint('<=large') {
$gutter: _size(gutter) * 0.5;
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
width: calc(#{(100% / 3)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
}
}
@include breakpoint('<=medium') {
$gutter: _size(gutter);
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
width: calc(#{(100% / 2)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
}
}
@include breakpoint('<=small') {
$gutter: _size(gutter) * 0.5;
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
width: calc(#{(100% / 2)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
&:hover {
> .image {
@include vendor('transform', 'scale(1.0)');
}
}
}
}
@include breakpoint('<=xsmall') {
$gutter: _size(gutter) * 0.5;
margin: 0;
article {
width: 100%;
margin: $gutter 0 0 0;
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Tiles */
.tiles {
$gutter: _size(gutter);
$duration: 0.5s;
$ease: "ease";
@include vendor("display", "flex");
@include vendor("flex-wrap", "wrap");
postiion: relative;
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
@include vendor(
"transition",
("transform #{$duration} #{$ease}", "opacity #{$duration} #{$ease}")
);
position: relative;
width: calc(#{(100% / 3)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
> .image {
@include vendor("transition", "transform #{$duration} #{$ease}");
position: relative;
display: block;
width: 100%;
border-radius: _size(border-radius);
overflow: hidden;
img {
display: block;
width: 100%;
}
&:before {
@include vendor("pointer-events", "none");
@include vendor(
"transition",
(
"background-color #{$duration} #{$ease}",
"opacity #{$duration} #{$ease}"
)
);
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 1;
z-index: 1;
opacity: 0.8;
}
&:after {
@include vendor("pointer-events", "none");
@include vendor("transition", "opacity #{$duration} #{$ease}");
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: svg-url(
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 0.25px; stroke: #ffffff; }</style><line x1="0" y1="0" x2="100" y2="100" /><line x1="100" y1="0" x2="0" y2="100" /></svg>'
);
background-position: center;
background-repeat: no-repeat;
background-size: 100% 100%;
opacity: 0.25;
z-index: 2;
}
}
> a {
@include vendor("display", "flex");
@include vendor("flex-direction", "column");
@include vendor("align-items", "center");
@include vendor("justify-content", "center");
@include vendor(
"transition",
(
"background-color #{$duration} #{$ease}",
"transform #{$duration} #{$ease}"
)
);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 1em;
border-radius: _size(border-radius);
border-bottom: 0;
color: _palette(fg-accent);
text-align: center;
text-decoration: none;
z-index: 3;
> :last-child {
margin: 0;
}
&:hover {
color: _palette(fg-accent) !important;
}
h2 {
margin: 0;
}
.content {
@include vendor(
"transition",
("max-height #{$duration} #{$ease}", "opacity #{$duration} #{$ease}")
);
width: 100%;
max-height: 0;
line-height: 1.5;
margin-top: 0.35em;
opacity: 0;
> :last-child {
margin-bottom: 0;
}
}
}
&.style1 {
> .image:before {
background-color: _palette(accent1);
}
}
&.style2 {
> .image:before {
background-color: _palette(accent2);
}
}
&.style3 {
> .image:before {
background-color: _palette(accent3);
}
}
&.style4 {
> .image:before {
background-color: _palette(accent4);
}
}
&.style5 {
> .image:before {
background-color: _palette(accent5);
}
}
&.style6 {
> .image:before {
background-color: _palette(accent6);
}
}
body:not(.is-touch) & {
&:hover {
> .image {
@include vendor("transform", "scale(1.1)");
&:before {
background-color: _palette(bg-accent);
opacity: 0.35;
}
&:after {
opacity: 0;
}
}
.content {
max-height: 15em;
opacity: 1;
}
}
}
}
* + & {
margin-top: _size(element-margin);
}
body.is-preload & {
article {
@include vendor("transform", "scale(0.9)");
opacity: 0;
}
}
body.is-touch & {
article {
.content {
max-height: 15em;
opacity: 1;
}
}
}
@include breakpoint("<=large") {
$gutter: _size(gutter) * 0.5;
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
width: calc(#{(100% / 3)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
}
}
@include breakpoint("<=medium") {
$gutter: _size(gutter);
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
width: calc(#{(100% / 2)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
}
}
@include breakpoint("<=small") {
$gutter: _size(gutter) * 0.5;
margin: ($gutter * -1) 0 0 ($gutter * -1);
article {
width: calc(#{(100% / 2)} - #{$gutter * 1});
margin: $gutter 0 0 $gutter;
&:hover {
> .image {
@include vendor("transform", "scale(1.0)");
}
}
}
}
@include breakpoint("<=xsmall") {
$gutter: _size(gutter) * 0.5;
margin: 0;
article {
width: 100%;
margin: $gutter 0 0 0;
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,139 +1,139 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Footer */
#footer {
$gutter: _size(gutter);
@include padding(5em, 0, (0, 0, 3em, 0));
background-color: _palette(bg-alt);
> .inner {
@include vendor('display', 'flex');
@include vendor('flex-wrap', 'wrap');
@include vendor('flex-direction', 'row');
> * > :last-child {
margin-bottom: 0;
}
section:nth-child(1) {
width: calc(66% - #{$gutter});
margin-right: $gutter;
}
section:nth-child(2) {
width: calc(33% - #{$gutter});
margin-left: $gutter;
}
.copyright {
width: 100%;
padding: 0;
margin-top: 5em;
list-style: none;
font-size: 0.8em;
color: transparentize(_palette(fg), 0.5);
a {
color: inherit;
}
li {
display: inline-block;
border-left: solid 1px transparentize(_palette(fg), 0.85);
line-height: 1;
padding: 0 0 0 1em;
margin: 0 0 0 1em;
&:first-child {
border-left: 0;
padding-left: 0;
margin-left: 0;
}
}
}
}
@include breakpoint('<=large') {
$gutter: _size(gutter) * 0.5;
@include padding(5em, 0);
> .inner {
section:nth-child(1) {
width: calc(66% - #{$gutter});
margin-right: $gutter;
}
section:nth-child(2) {
width: calc(33% - #{$gutter});
margin-left: $gutter;
}
}
}
@include breakpoint('<=medium') {
$gutter: _size(gutter);
> .inner {
section:nth-child(1) {
width: 66%;
margin-right: 0;
}
section:nth-child(2) {
width: calc(33% - #{$gutter});
margin-left: $gutter;
}
}
}
@include breakpoint('<=small') {
@include padding(3em, 0);
> .inner {
@include vendor('flex-direction', 'column');
section:nth-child(1) {
width: 100%;
margin-right: 0;
margin: 3em 0 0 0;
}
section:nth-child(2) {
@include vendor('order', '-1');
width: 100%;
margin-left: 0;
}
.copyright {
margin-top: 3em;
}
}
}
@include breakpoint('<=xsmall') {
> .inner {
.copyright {
margin-top: 3em;
li {
border-left: 0;
padding-left: 0;
margin: 0.75em 0 0 0;
display: block;
line-height: inherit;
&:first-child {
margin-top: 0;
}
}
}
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Footer */
#footer {
$gutter: _size(gutter);
@include padding(5em, 0, (0, 0, 3em, 0));
background-color: _palette(bg-alt);
> .inner {
@include vendor("display", "flex");
@include vendor("flex-wrap", "wrap");
@include vendor("flex-direction", "row");
> * > :last-child {
margin-bottom: 0;
}
section:nth-child(1) {
width: calc(66% - #{$gutter});
margin-right: $gutter;
}
section:nth-child(2) {
width: calc(33% - #{$gutter});
margin-left: $gutter;
}
.copyright {
width: 100%;
padding: 0;
margin-top: 5em;
list-style: none;
font-size: 0.8em;
color: transparentize(_palette(fg), 0.5);
a {
color: inherit;
}
li {
display: inline-block;
border-left: solid 1px transparentize(_palette(fg), 0.85);
line-height: 1;
padding: 0 0 0 1em;
margin: 0 0 0 1em;
&:first-child {
border-left: 0;
padding-left: 0;
margin-left: 0;
}
}
}
}
@include breakpoint("<=large") {
$gutter: _size(gutter) * 0.5;
@include padding(5em, 0);
> .inner {
section:nth-child(1) {
width: calc(66% - #{$gutter});
margin-right: $gutter;
}
section:nth-child(2) {
width: calc(33% - #{$gutter});
margin-left: $gutter;
}
}
}
@include breakpoint("<=medium") {
$gutter: _size(gutter);
> .inner {
section:nth-child(1) {
width: 66%;
margin-right: 0;
}
section:nth-child(2) {
width: calc(33% - #{$gutter});
margin-left: $gutter;
}
}
}
@include breakpoint("<=small") {
@include padding(3em, 0);
> .inner {
@include vendor("flex-direction", "column");
section:nth-child(1) {
width: 100%;
margin-right: 0;
margin: 3em 0 0 0;
}
section:nth-child(2) {
@include vendor("order", "-1");
width: 100%;
margin-left: 0;
}
.copyright {
margin-top: 3em;
}
}
}
@include breakpoint("<=xsmall") {
> .inner {
.copyright {
margin-top: 3em;
li {
border-left: 0;
padding-left: 0;
margin: 0.75em 0 0 0;
display: block;
line-height: inherit;
&:first-child {
margin-top: 0;
}
}
}
}
}
}

View File

@ -1,165 +1,174 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Header */
#header {
@include padding(2em, 0, (0, 0, -5em, 0));
border-bottom: solid 5px #f56a6a;
margin-bottom: 1em;
.inner {
display: flex;
> * {
flex: 1;
margin-bottom: 0;
}
}
.header-icons {
text-align: right;
cursor: default;
list-style: none;
padding-left: 0;
li {
display: inline-block;
padding: 0 1em 0 0;
a {
color: #00000069;
}
}
}
.logo {
display: block;
border-bottom: 0;
margin: 0 0 (_size(element-margin) * 0.25) 0;
text-decoration: none;
display: inline-block;
font-size: 1.4rem;
.symbol {
margin-right: 0.65em;
img {
display: block;
width: 2em;
height: 2em;
}
}
}
nav {
position: fixed;
right: 2em;
top: 2em;
z-index: _misc(z-index-base);
ul {
@include vendor('display', 'flex');
@include vendor('align-items', 'center');
list-style: none;
margin: 0;
padding: 0;
li {
display: block;
padding: 0;
a {
display: block;
position: relative;
height: 3em;
line-height: 3em;
padding: 0 1.5em;
background-color: transparentize(_palette(bg), 0.5);
border-radius: _size(border-radius);
border: 0;
font-size: 0.8em;
font-weight: _font(weight-bold);
letter-spacing: _font(letter-spacing);
text-transform: uppercase;
}
a[href="#menu"] {
-webkit-tap-highlight-color: transparent;
width: 4em;
text-indent: 4em;
font-size: 1em;
overflow: hidden;
padding: 0;
white-space: nowrap;
&:before, &:after {
@include vendor('transition', 'opacity #{_duration(transition)} ease');
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: 2em 2em;
}
&:before {
background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(accent1)}; }</style><line x1="0" y1="25" x2="100" y2="25" /><line x1="0" y1="50" x2="100" y2="50" /><line x1="0" y1="75" x2="100" y2="75" /></svg>');
opacity: 0;
}
&:after {
background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(fg)}; }</style><line x1="0" y1="25" x2="100" y2="25" /><line x1="0" y1="50" x2="100" y2="50" /><line x1="0" y1="75" x2="100" y2="75" /></svg>');
opacity: 1;
}
&:hover {
&:before {
opacity: 1;
}
&:after {
opacity: 0;
}
}
}
}
}
}
@include breakpoint('<=small') {
@include padding(1em, 0, (0em, 0, -3em, 0));
text-align: center;
margin: 1em;
.logo {
font-size: 1.1em;
}
.header-icons {
display: none;
}
nav {
right: 0.5em;
top: 0.5em;
ul {
li {
a[href="#menu"] {
&:before, &:after {
background-size: 1.5em 1.5em;
}
}
}
}
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Header */
#header {
@include padding(2em, 0, (0, 0, -5em, 0));
border-bottom: solid 5px #f56a6a;
margin-bottom: 1em;
.inner {
display: flex;
> * {
flex: 1;
margin-bottom: 0;
}
}
.header-icons {
text-align: right;
cursor: default;
list-style: none;
padding-left: 0;
li {
display: inline-block;
padding: 0 1em 0 0;
a {
color: #00000069;
}
}
}
.logo {
display: block;
border-bottom: 0;
margin: 0 0 (_size(element-margin) * 0.25) 0;
text-decoration: none;
display: inline-block;
font-size: 1.4rem;
.symbol {
margin-right: 0.65em;
img {
display: block;
width: 2em;
height: 2em;
}
}
}
nav {
position: fixed;
right: 2em;
top: 2em;
z-index: _misc(z-index-base);
ul {
@include vendor("display", "flex");
@include vendor("align-items", "center");
list-style: none;
margin: 0;
padding: 0;
li {
display: block;
padding: 0;
a {
display: block;
position: relative;
height: 3em;
line-height: 3em;
padding: 0 1.5em;
background-color: transparentize(_palette(bg), 0.5);
border-radius: _size(border-radius);
border: 0;
font-size: 0.8em;
font-weight: _font(weight-bold);
letter-spacing: _font(letter-spacing);
text-transform: uppercase;
}
a[href="#menu"] {
-webkit-tap-highlight-color: transparent;
width: 4em;
text-indent: 4em;
font-size: 1em;
overflow: hidden;
padding: 0;
white-space: nowrap;
&:before,
&:after {
@include vendor(
"transition",
"opacity #{_duration(transition)} ease"
);
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: 2em 2em;
}
&:before {
background-image: svg-url(
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(accent1)}; }</style><line x1="0" y1="25" x2="100" y2="25" /><line x1="0" y1="50" x2="100" y2="50" /><line x1="0" y1="75" x2="100" y2="75" /></svg>'
);
opacity: 0;
}
&:after {
background-image: svg-url(
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(fg)}; }</style><line x1="0" y1="25" x2="100" y2="25" /><line x1="0" y1="50" x2="100" y2="50" /><line x1="0" y1="75" x2="100" y2="75" /></svg>'
);
opacity: 1;
}
&:hover {
&:before {
opacity: 1;
}
&:after {
opacity: 0;
}
}
}
}
}
}
@include breakpoint("<=small") {
@include padding(1em, 0, (0em, 0, -3em, 0));
text-align: center;
margin: 1em;
.logo {
font-size: 1.1em;
}
.header-icons {
display: none;
}
nav {
right: 0.5em;
top: 0.5em;
ul {
li {
a[href="#menu"] {
&:before,
&:after {
background-size: 1.5em 1.5em;
}
}
}
}
}
}
}

View File

@ -1,15 +1,15 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Main */
#main {
@include padding(5em, 0, (-5em, 0, 1em, 0));
@include breakpoint('<=small') {
@include padding(3em, 0, (-3em, 0, 1em, 0));
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Main */
#main {
@include padding(5em, 0, (-5em, 0, 1em, 0));
@include breakpoint("<=small") {
@include padding(3em, 0, (-3em, 0, 1em, 0));
}
}

View File

@ -1,164 +1,173 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Menu */
#wrapper {
@include vendor('transition', 'opacity #{_duration(menu)} ease');
opacity: 1;
}
#menu {
@include vendor('transform', 'translateX(#{_size(menu)})');
@include vendor('transition', ('transform #{_duration(menu)} ease', 'visibility #{_duration(menu)}'));
position: fixed;
top: 0;
right: 0;
width: _size(menu);
max-width: 80%;
height: 100%;
-webkit-overflow-scrolling: touch;
background: _palette(fg);
color: _palette(bg);
cursor: default;
visibility: hidden;
z-index: _misc(z-index-base) + 2;
> .inner {
@include vendor('transition', 'opacity #{_duration(menu)} ease');
-webkit-overflow-scrolling: touch;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 2.75em;
opacity: 0;
overflow-y: auto;
> ul {
list-style: none;
margin: 0 0 (_size(element-margin) * 0.5) 0;
padding: 0;
> li {
padding: 0;
border-top: solid 1px transparentize(_palette(bg), 0.85);
a {
display: block;
padding: 1em 0;
line-height: 1.5;
border: 0;
color: inherit;
}
&:first-child {
border-top: 0;
margin-top: -1em;
}
}
}
}
> .close {
@include vendor('transition', (
'opacity #{_duration(menu)} ease',
'transform #{_duration(menu)} ease'
));
@include vendor('transform', 'scale(0.25) rotate(180deg)');
-webkit-tap-highlight-color: transparent;
display: block;
position: absolute;
top: 2em;
left: -6em;
width: 6em;
text-indent: 6em;
height: 3em;
border: 0;
font-size: 1em;
opacity: 0;
overflow: hidden;
padding: 0;
white-space: nowrap;
&:before, &:after {
@include vendor('transition', 'opacity #{_duration(transition)} ease');
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: 2em 2em;
}
&:before {
background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(accent1)}; }</style><line x1="15" y1="15" x2="85" y2="85" /><line x1="85" y1="15" x2="15" y2="85" /></svg>');
opacity: 0;
}
&:after {
background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(fg)}; }</style><line x1="15" y1="15" x2="85" y2="85" /><line x1="85" y1="15" x2="15" y2="85" /></svg>');
opacity: 1;
}
&:hover {
&:before {
opacity: 1;
}
&:after {
opacity: 0;
}
}
}
@include breakpoint('<=small') {
@include vendor('transform', 'translateX(#{_size(menu) * 0.75})');
width: (_size(menu) * 0.75);
> .inner {
padding: 2.75em 1.5em;
}
> .close {
top: 0.5em;
left: -4.25em;
width: 4.25em;
text-indent: 4.25em;
&:before, &:after {
background-size: 1.5em 1.5em;
}
}
}
}
body.is-menu-visible {
#wrapper {
@include vendor('pointer-events', 'none');
cursor: default;
opacity: 0.25;
}
#menu {
@include vendor('transform', 'translateX(0)');
visibility: visible;
> * {
opacity: 1;
}
.close {
@include vendor('transform', 'scale(1.0) rotate(0deg)');
opacity: 1;
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Menu */
#wrapper {
@include vendor("transition", "opacity #{_duration(menu)} ease");
opacity: 1;
}
#menu {
@include vendor("transform", "translateX(#{_size(menu)})");
@include vendor(
"transition",
("transform #{_duration(menu)} ease", "visibility #{_duration(menu)}")
);
position: fixed;
top: 0;
right: 0;
width: _size(menu);
max-width: 80%;
height: 100%;
-webkit-overflow-scrolling: touch;
background: _palette(fg);
color: _palette(bg);
cursor: default;
visibility: hidden;
z-index: _misc(z-index-base) + 2;
> .inner {
@include vendor("transition", "opacity #{_duration(menu)} ease");
-webkit-overflow-scrolling: touch;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 2.75em;
opacity: 0;
overflow-y: auto;
> ul {
list-style: none;
margin: 0 0 (_size(element-margin) * 0.5) 0;
padding: 0;
> li {
padding: 0;
border-top: solid 1px transparentize(_palette(bg), 0.85);
a {
display: block;
padding: 1em 0;
line-height: 1.5;
border: 0;
color: inherit;
}
&:first-child {
border-top: 0;
margin-top: -1em;
}
}
}
}
> .close {
@include vendor(
"transition",
("opacity #{_duration(menu)} ease", "transform #{_duration(menu)} ease")
);
@include vendor("transform", "scale(0.25) rotate(180deg)");
-webkit-tap-highlight-color: transparent;
display: block;
position: absolute;
top: 2em;
left: -6em;
width: 6em;
text-indent: 6em;
height: 3em;
border: 0;
font-size: 1em;
opacity: 0;
overflow: hidden;
padding: 0;
white-space: nowrap;
&:before,
&:after {
@include vendor("transition", "opacity #{_duration(transition)} ease");
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: 2em 2em;
}
&:before {
background-image: svg-url(
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(accent1)}; }</style><line x1="15" y1="15" x2="85" y2="85" /><line x1="85" y1="15" x2="15" y2="85" /></svg>'
);
opacity: 0;
}
&:after {
background-image: svg-url(
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" preserveAspectRatio="none"><style>line { stroke-width: 8px; stroke: #{_palette(fg)}; }</style><line x1="15" y1="15" x2="85" y2="85" /><line x1="85" y1="15" x2="15" y2="85" /></svg>'
);
opacity: 1;
}
&:hover {
&:before {
opacity: 1;
}
&:after {
opacity: 0;
}
}
}
@include breakpoint("<=small") {
@include vendor("transform", "translateX(#{_size(menu) * 0.75})");
width: (_size(menu) * 0.75);
> .inner {
padding: 2.75em 1.5em;
}
> .close {
top: 0.5em;
left: -4.25em;
width: 4.25em;
text-indent: 4.25em;
&:before,
&:after {
background-size: 1.5em 1.5em;
}
}
}
}
body.is-menu-visible {
#wrapper {
@include vendor("pointer-events", "none");
cursor: default;
opacity: 0.25;
}
#menu {
@include vendor("transform", "translateX(0)");
visibility: visible;
> * {
opacity: 1;
}
.close {
@include vendor("transform", "scale(1.0) rotate(0deg)");
opacity: 1;
}
}
}

View File

@ -1,26 +1,26 @@
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Wrapper */
#wrapper {
> * {
> .inner {
$gutter: _size(gutter);
width: 100%;
max-width: 900px;
margin: 0 auto;
padding: 0 $gutter;
@include breakpoint('<=small') {
$gutter: _size(gutter) * 0.5;
padding: 0 $gutter;
}
}
}
}
///
/// Phantom by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Wrapper */
#wrapper {
> * {
> .inner {
$gutter: _size(gutter);
width: 100%;
max-width: 900px;
margin: 0 auto;
padding: 0 $gutter;
@include breakpoint("<=small") {
$gutter: _size(gutter) * 0.5;
padding: 0 $gutter;
}
}
}
}

View File

@ -2,222 +2,204 @@
// Vars.
/// Breakpoints.
/// @var {list}
$breakpoints: ();
/// Breakpoints.
/// @var {list}
$breakpoints: ();
// Mixins.
/// Sets breakpoints.
/// @param {map} $x Breakpoints.
@mixin breakpoints($x: ()) {
$breakpoints: $x !global;
}
/// Sets breakpoints.
/// @param {map} $x Breakpoints.
@mixin breakpoints($x: ()) {
$breakpoints: $x !global;
}
/// Wraps @content in a @media block targeting a specific orientation.
/// @param {string} $orientation Orientation.
@mixin orientation($orientation) {
@media screen and (orientation: #{$orientation}) {
@content;
}
}
/// Wraps @content in a @media block targeting a specific orientation.
/// @param {string} $orientation Orientation.
@mixin orientation($orientation) {
@media screen and (orientation: #{$orientation}) {
@content;
}
}
/// Wraps @content in a @media block using a given query.
/// @param {string} $query Query.
@mixin breakpoint($query: null) {
/// Wraps @content in a @media block using a given query.
/// @param {string} $query Query.
@mixin breakpoint($query: null) {
$breakpoint: null;
$op: null;
$media: null;
$breakpoint: null;
$op: null;
$media: null;
// Determine operator, breakpoint.
// Determine operator, breakpoint.
// Greater than or equal.
@if (str-slice($query, 0, 2) == ">=") {
$op: "gte";
$breakpoint: str-slice($query, 3);
}
// Greater than or equal.
@if (str-slice($query, 0, 2) == '>=') {
// Less than or equal.
@else if (str-slice($query, 0, 2) == "<=") {
$op: "lte";
$breakpoint: str-slice($query, 3);
}
$op: 'gte';
$breakpoint: str-slice($query, 3);
// Greater than.
@else if (str-slice($query, 0, 1) == ">") {
$op: "gt";
$breakpoint: str-slice($query, 2);
}
}
// Less than.
@else if (str-slice($query, 0, 1) == "<") {
$op: "lt";
$breakpoint: str-slice($query, 2);
}
// Less than or equal.
@else if (str-slice($query, 0, 2) == '<=') {
// Not.
@else if (str-slice($query, 0, 1) == "!") {
$op: "not";
$breakpoint: str-slice($query, 2);
}
$op: 'lte';
$breakpoint: str-slice($query, 3);
// Equal.
@else {
$op: "eq";
$breakpoint: $query;
}
}
// Build media.
@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {
$a: map-get($breakpoints, $breakpoint);
// Greater than.
@else if (str-slice($query, 0, 1) == '>') {
// Range.
@if (type-of($a) == "list") {
$x: nth($a, 1);
$y: nth($a, 2);
$op: 'gt';
$breakpoint: str-slice($query, 2);
// Max only.
@if ($x == null) {
// Greater than or equal (>= 0 / anything)
@if ($op == "gte") {
$media: "screen";
}
}
// Less than or equal (<= y)
@else if ($op == "lte") {
$media: "screen and (max-width: " + $y + ")";
}
// Less than.
@else if (str-slice($query, 0, 1) == '<') {
// Greater than (> y)
@else if ($op == "gt") {
$media: "screen and (min-width: " + ($y + 1) + ")";
}
$op: 'lt';
$breakpoint: str-slice($query, 2);
// Less than (< 0 / invalid)
@else if ($op == "lt") {
$media: "screen and (max-width: -1px)";
}
}
// Not (> y)
@else if ($op == "not") {
$media: "screen and (min-width: " + ($y + 1) + ")";
}
// Not.
@else if (str-slice($query, 0, 1) == '!') {
// Equal (<= y)
@else {
$media: "screen and (max-width: " + $y + ")";
}
}
$op: 'not';
$breakpoint: str-slice($query, 2);
// Min only.
@else if ($y == null) {
// Greater than or equal (>= x)
@if ($op == "gte") {
$media: "screen and (min-width: " + $x + ")";
}
}
// Less than or equal (<= inf / anything)
@else if ($op == "lte") {
$media: "screen";
}
// Equal.
@else {
// Greater than (> inf / invalid)
@else if ($op == "gt") {
$media: "screen and (max-width: -1px)";
}
$op: 'eq';
$breakpoint: $query;
// Less than (< x)
@else if ($op == "lt") {
$media: "screen and (max-width: " + ($x - 1) + ")";
}
}
// Not (< x)
@else if ($op == "not") {
$media: "screen and (max-width: " + ($x - 1) + ")";
}
// Build media.
@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {
// Equal (>= x)
@else {
$media: "screen and (min-width: " + $x + ")";
}
}
$a: map-get($breakpoints, $breakpoint);
// Min and max.
@else {
// Greater than or equal (>= x)
@if ($op == "gte") {
$media: "screen and (min-width: " + $x + ")";
}
// Range.
@if (type-of($a) == 'list') {
// Less than or equal (<= y)
@else if ($op == "lte") {
$media: "screen and (max-width: " + $y + ")";
}
$x: nth($a, 1);
$y: nth($a, 2);
// Greater than (> y)
@else if ($op == "gt") {
$media: "screen and (min-width: " + ($y + 1) + ")";
}
// Max only.
@if ($x == null) {
// Less than (< x)
@else if ($op == "lt") {
$media: "screen and (max-width: " + ($x - 1) + ")";
}
// Greater than or equal (>= 0 / anything)
@if ($op == 'gte') {
$media: 'screen';
}
// Not (< x and > y)
@else if ($op == "not") {
$media: "screen and (max-width: " +
($x - 1) +
"), screen and (min-width: " +
($y + 1) +
")";
}
// Less than or equal (<= y)
@else if ($op == 'lte') {
$media: 'screen and (max-width: ' + $y + ')';
}
// Equal (>= x and <= y)
@else {
$media: "screen and (min-width: " +
$x +
") and (max-width: " +
$y +
")";
}
}
}
// Greater than (> y)
@else if ($op == 'gt') {
$media: 'screen and (min-width: ' + ($y + 1) + ')';
}
// String.
@else {
// Missing a media type? Prefix with "screen".
@if (str-slice($a, 0, 1) == "(") {
$media: "screen and " + $a;
}
// Less than (< 0 / invalid)
@else if ($op == 'lt') {
$media: 'screen and (max-width: -1px)';
}
// Otherwise, use as-is.
@else {
$media: $a;
}
}
}
// Not (> y)
@else if ($op == 'not') {
$media: 'screen and (min-width: ' + ($y + 1) + ')';
}
// Equal (<= y)
@else {
$media: 'screen and (max-width: ' + $y + ')';
}
}
// Min only.
@else if ($y == null) {
// Greater than or equal (>= x)
@if ($op == 'gte') {
$media: 'screen and (min-width: ' + $x + ')';
}
// Less than or equal (<= inf / anything)
@else if ($op == 'lte') {
$media: 'screen';
}
// Greater than (> inf / invalid)
@else if ($op == 'gt') {
$media: 'screen and (max-width: -1px)';
}
// Less than (< x)
@else if ($op == 'lt') {
$media: 'screen and (max-width: ' + ($x - 1) + ')';
}
// Not (< x)
@else if ($op == 'not') {
$media: 'screen and (max-width: ' + ($x - 1) + ')';
}
// Equal (>= x)
@else {
$media: 'screen and (min-width: ' + $x + ')';
}
}
// Min and max.
@else {
// Greater than or equal (>= x)
@if ($op == 'gte') {
$media: 'screen and (min-width: ' + $x + ')';
}
// Less than or equal (<= y)
@else if ($op == 'lte') {
$media: 'screen and (max-width: ' + $y + ')';
}
// Greater than (> y)
@else if ($op == 'gt') {
$media: 'screen and (min-width: ' + ($y + 1) + ')';
}
// Less than (< x)
@else if ($op == 'lt') {
$media: 'screen and (max-width: ' + ($x - 1) + ')';
}
// Not (< x and > y)
@else if ($op == 'not') {
$media: 'screen and (max-width: ' + ($x - 1) + '), screen and (min-width: ' + ($y + 1) + ')';
}
// Equal (>= x and <= y)
@else {
$media: 'screen and (min-width: ' + $x + ') and (max-width: ' + $y + ')';
}
}
}
// String.
@else {
// Missing a media type? Prefix with "screen".
@if (str-slice($a, 0, 1) == '(') {
$media: 'screen and ' + $a;
}
// Otherwise, use as-is.
@else {
$media: $a;
}
}
}
// Output.
@media #{$media} {
@content;
}
}
// Output.
@media #{$media} {
@content;
}
}

View File

@ -1,90 +1,79 @@
/// Removes a specific item from a list.
/// @author Hugo Giraudel
/// @param {list} $list List.
/// @param {integer} $index Index.
/// @return {list} Updated list.
@function remove-nth($list, $index) {
$result: null;
@if type-of($index) != number {
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
}
@else if $index == 0 {
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
}
@else if abs($index) > length($list) {
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
}
@else {
$result: ();
$index: if($index < 0, length($list) + $index + 1, $index);
@for $i from 1 through length($list) {
@if $i != $index {
$result: append($result, nth($list, $i));
}
}
}
@return $result;
}
/// Gets a value from a map.
/// @author Hugo Giraudel
/// @param {map} $map Map.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function val($map, $keys...) {
@if nth($keys, 1) == null {
$keys: remove-nth($keys, 1);
}
@each $key in $keys {
$map: map-get($map, $key);
}
@return $map;
}
/// Gets a duration value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _duration($keys...) {
@return val($duration, $keys...);
}
/// Gets a font value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _font($keys...) {
@return val($font, $keys...);
}
/// Gets a misc value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _misc($keys...) {
@return val($misc, $keys...);
}
/// Gets a palette value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _palette($keys...) {
@return val($palette, $keys...);
}
/// Gets a size value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _size($keys...) {
@return val($size, $keys...);
}
/// Removes a specific item from a list.
/// @author Hugo Giraudel
/// @param {list} $list List.
/// @param {integer} $index Index.
/// @return {list} Updated list.
@function remove-nth($list, $index) {
$result: null;
@if type-of($index) != number {
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
} @else if $index == 0 {
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
} @else if abs($index) > length($list) {
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
} @else {
$result: ();
$index: if($index < 0, length($list) + $index + 1, $index);
@for $i from 1 through length($list) {
@if $i != $index {
$result: append($result, nth($list, $i));
}
}
}
@return $result;
}
/// Gets a value from a map.
/// @author Hugo Giraudel
/// @param {map} $map Map.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function val($map, $keys...) {
@if nth($keys, 1) == null {
$keys: remove-nth($keys, 1);
}
@each $key in $keys {
$map: map-get($map, $key);
}
@return $map;
}
/// Gets a duration value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _duration($keys...) {
@return val($duration, $keys...);
}
/// Gets a font value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _font($keys...) {
@return val($font, $keys...);
}
/// Gets a misc value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _misc($keys...) {
@return val($misc, $keys...);
}
/// Gets a palette value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _palette($keys...) {
@return val($palette, $keys...);
}
/// Gets a size value.
/// @param {string} $keys Key(s).
/// @return {string} Value.
@function _size($keys...) {
@return val($size, $keys...);
}

View File

@ -1,149 +1,138 @@
// html-grid.scss v1.0 | @ajlkn | MIT licensed */
// Mixins.
/// Initializes the current element as an HTML grid.
/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).
/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).
@mixin html-grid($gutters: 1.5em, $suffix: '') {
// Initialize.
$cols: 12;
$multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00;
$unit: 100% / $cols;
// Suffixes.
$suffixes: null;
@if (type-of($suffix) == 'list') {
$suffixes: $suffix;
}
@else {
$suffixes: ($suffix);
}
// Gutters.
$guttersCols: null;
$guttersRows: null;
@if (type-of($gutters) == 'list') {
$guttersCols: nth($gutters, 1);
$guttersRows: nth($gutters, 2);
}
@else {
$guttersCols: $gutters;
$guttersRows: 0;
}
// Row.
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
align-items: stretch;
// Columns.
> * {
box-sizing: border-box;
}
// Gutters.
&.gtr-uniform {
> * {
> :last-child {
margin-bottom: 0;
}
}
}
// Alignment.
&.aln-left {
justify-content: flex-start;
}
&.aln-center {
justify-content: center;
}
&.aln-right {
justify-content: flex-end;
}
&.aln-top {
align-items: flex-start;
}
&.aln-middle {
align-items: center;
}
&.aln-bottom {
align-items: flex-end;
}
// Step through suffixes.
@each $suffix in $suffixes {
// Suffix.
@if ($suffix != '') {
$suffix: '-' + $suffix;
}
@else {
$suffix: '';
}
// Row.
// Important.
> .imp#{$suffix} {
order: -1;
}
// Columns, offsets.
@for $i from 1 through $cols {
> .col-#{$i}#{$suffix} {
width: $unit * $i;
}
> .off-#{$i}#{$suffix} {
margin-left: $unit * $i;
}
}
// Step through multipliers.
@each $multiplier in $multipliers {
// Gutters.
$class: null;
@if ($multiplier != 1) {
$class: '.gtr-' + ($multiplier * 100);
}
&#{$class} {
margin-top: ($guttersRows * $multiplier * -1);
margin-left: ($guttersCols * $multiplier * -1);
> * {
padding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier);
}
// Uniform.
&.gtr-uniform {
margin-top: $guttersCols * $multiplier * -1;
> * {
padding-top: $guttersCols * $multiplier;
}
}
}
}
}
}
// html-grid.scss v1.0 | @ajlkn | MIT licensed */
// Mixins.
/// Initializes the current element as an HTML grid.
/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).
/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).
@mixin html-grid($gutters: 1.5em, $suffix: "") {
// Initialize.
$cols: 12;
$multipliers: 0, 0.25, 0.5, 1, 1.5, 2;
$unit: 100% / $cols;
// Suffixes.
$suffixes: null;
@if (type-of($suffix) == "list") {
$suffixes: $suffix;
} @else {
$suffixes: ($suffix);
}
// Gutters.
$guttersCols: null;
$guttersRows: null;
@if (type-of($gutters) == "list") {
$guttersCols: nth($gutters, 1);
$guttersRows: nth($gutters, 2);
} @else {
$guttersCols: $gutters;
$guttersRows: 0;
}
// Row.
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
align-items: stretch;
// Columns.
> * {
box-sizing: border-box;
}
// Gutters.
&.gtr-uniform {
> * {
> :last-child {
margin-bottom: 0;
}
}
}
// Alignment.
&.aln-left {
justify-content: flex-start;
}
&.aln-center {
justify-content: center;
}
&.aln-right {
justify-content: flex-end;
}
&.aln-top {
align-items: flex-start;
}
&.aln-middle {
align-items: center;
}
&.aln-bottom {
align-items: flex-end;
}
// Step through suffixes.
@each $suffix in $suffixes {
// Suffix.
@if ($suffix != "") {
$suffix: "-" + $suffix;
} @else {
$suffix: "";
}
// Row.
// Important.
> .imp#{$suffix} {
order: -1;
}
// Columns, offsets.
@for $i from 1 through $cols {
> .col-#{$i}#{$suffix} {
width: $unit * $i;
}
> .off-#{$i}#{$suffix} {
margin-left: $unit * $i;
}
}
// Step through multipliers.
@each $multiplier in $multipliers {
// Gutters.
$class: null;
@if ($multiplier != 1) {
$class: ".gtr-" + ($multiplier * 100);
}
&#{$class} {
margin-top: ($guttersRows * $multiplier * -1);
margin-left: ($guttersCols * $multiplier * -1);
> * {
padding: ($guttersRows * $multiplier)
0
0
($guttersCols * $multiplier);
}
// Uniform.
&.gtr-uniform {
margin-top: $guttersCols * $multiplier * -1;
> * {
padding-top: $guttersCols * $multiplier;
}
}
}
}
}
}

View File

@ -1,78 +1,69 @@
/// Makes an element's :before pseudoelement a FontAwesome icon.
/// @param {string} $content Optional content value to use.
/// @param {string} $category Optional category to use.
/// @param {string} $where Optional pseudoelement to target (before or after).
@mixin icon($content: false, $category: regular, $where: before) {
text-decoration: none;
&:#{$where} {
@if $content {
content: $content;
}
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
text-transform: none !important;
@if ($category == brands) {
font-family: 'Font Awesome 5 Brands';
}
@else if ($category == solid) {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
}
@else {
font-family: 'Font Awesome 5 Free';
font-weight: 400;
}
}
}
/// Applies padding to an element, taking the current element-margin value into account.
/// @param {mixed} $tb Top/bottom padding.
/// @param {mixed} $lr Left/right padding.
/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
/// @param {bool} $important If true, adds !important.
@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {
@if $important {
$important: '!important';
}
$x: 0.1em;
@if unit(_size(element-margin)) == 'rem' {
$x: 0.1rem;
}
padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};
}
/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).
/// @param {string} $svg SVG data URL.
/// @return {string} Encoded SVG data URL.
@function svg-url($svg) {
$svg: str-replace($svg, '"', '\'');
$svg: str-replace($svg, '%', '%25');
$svg: str-replace($svg, '<', '%3C');
$svg: str-replace($svg, '>', '%3E');
$svg: str-replace($svg, '&', '%26');
$svg: str-replace($svg, '#', '%23');
$svg: str-replace($svg, '{', '%7B');
$svg: str-replace($svg, '}', '%7D');
$svg: str-replace($svg, ';', '%3B');
@return url("data:image/svg+xml;charset=utf8,#{$svg}");
}
/// Makes an element's :before pseudoelement a FontAwesome icon.
/// @param {string} $content Optional content value to use.
/// @param {string} $category Optional category to use.
/// @param {string} $where Optional pseudoelement to target (before or after).
@mixin icon($content: false, $category: regular, $where: before) {
text-decoration: none;
&:#{$where} {
@if $content {
content: $content;
}
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
text-transform: none !important;
@if ($category == brands) {
font-family: "Font Awesome 5 Brands";
} @else if ($category == solid) {
font-family: "Font Awesome 5 Free";
font-weight: 900;
} @else {
font-family: "Font Awesome 5 Free";
font-weight: 400;
}
}
}
/// Applies padding to an element, taking the current element-margin value into account.
/// @param {mixed} $tb Top/bottom padding.
/// @param {mixed} $lr Left/right padding.
/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
/// @param {bool} $important If true, adds !important.
@mixin padding($tb, $lr, $pad: (0, 0, 0, 0), $important: null) {
@if $important {
$important: "!important";
}
$x: 0.1em;
@if unit(_size(element-margin)) == "rem" {
$x: 0.1rem;
}
padding: ($tb + nth($pad, 1)) ($lr + nth($pad, 2))
max($x, $tb - _size(element-margin) + nth($pad, 3)) ($lr + nth($pad, 4)) #{$important};
}
/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).
/// @param {string} $svg SVG data URL.
/// @return {string} Encoded SVG data URL.
@function svg-url($svg) {
$svg: str-replace($svg, '"', "'");
$svg: str-replace($svg, "%", "%25");
$svg: str-replace($svg, "<", "%3C");
$svg: str-replace($svg, ">", "%3E");
$svg: str-replace($svg, "&", "%26");
$svg: str-replace($svg, "#", "%23");
$svg: str-replace($svg, "{", "%7B");
$svg: str-replace($svg, "}", "%7D");
$svg: str-replace($svg, ";", "%3B");
@return url("data:image/svg+xml;charset=utf8,#{$svg}");
}

View File

@ -1,50 +1,56 @@
// Misc.
$misc: (
z-index-base: 10000
);
// Duration.
$duration: (
menu: 0.45s,
transition: 0.2s
);
// Size.
$size: (
border-radius: 4px,
border-width: 1px,
element-height: 3em,
element-margin: 2em,
gutter: 2.5em,
field-gutter: 2em,
inner: 68em,
menu: 22em
);
// Font.
$font: (
family: (Helvetica, sans-serif),
family-fixed: ('Courier New', monospace),
weight: 300,
weight-bold: 900,
weight-bold-alt: 700,
letter-spacing: 0.35em,
letter-spacing-alt: -0.035em
);
// Palette.
$palette: (
bg: #ffffff,
bg-accent: #333333,
bg-alt: #f6f6f6,
fg: #585858,
fg-accent: #ffffff,
border: #c9c9c9,
border-bg: rgba(144,144,144,0.075),
accent1: #f2849e,
accent2: #7ecaf6,
accent3: #7bd0c1,
accent4: #c75b9b,
accent5: #ae85ca,
accent6: #8499e7,
);
// Misc.
$misc: (
z-index-base: 10000,
);
// Duration.
$duration: (
menu: 0.45s,
transition: 0.2s,
);
// Size.
$size: (
border-radius: 4px,
border-width: 1px,
element-height: 3em,
element-margin: 2em,
gutter: 2.5em,
field-gutter: 2em,
inner: 68em,
menu: 22em,
);
// Font.
$font: (
family: (
Helvetica,
sans-serif,
),
family-fixed: (
"Courier New",
monospace,
),
weight: 300,
weight-bold: 900,
weight-bold-alt: 700,
letter-spacing: 0.35em,
letter-spacing-alt: -0.035em,
);
// Palette.
$palette: (
bg: #ffffff,
bg-accent: #333333,
bg-alt: #f6f6f6,
fg: #585858,
fg-accent: #ffffff,
border: #c9c9c9,
border-bg: rgba(144, 144, 144, 0.075),
accent1: #f2849e,
accent2: #7ecaf6,
accent3: #7bd0c1,
accent4: #c75b9b,
accent5: #ae85ca,
accent6: #8499e7,
);

View File

@ -2,375 +2,323 @@
// Vars.
/// Vendor prefixes.
/// @var {list}
$vendor-prefixes: (
'-moz-',
'-webkit-',
'-ms-',
''
);
/// Vendor prefixes.
/// @var {list}
$vendor-prefixes: ("-moz-", "-webkit-", "-ms-", "");
/// Properties that should be vendorized.
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
/// @var {list}
$vendor-properties: (
/// Properties that should be vendorized.
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
/// @var {list}
$vendor-properties: (
// Animation.
"animation",
"animation-delay",
"animation-direction",
"animation-duration",
"animation-fill-mode",
"animation-iteration-count",
"animation-name",
"animation-play-state",
"animation-timing-function",
// Appearance.
"appearance",
// Backdrop filter.
"backdrop-filter",
// Background image options.
"background-clip",
"background-origin",
"background-size",
// Box sizing.
"box-sizing",
// Clip path.
"clip-path",
// Filter effects.
"filter",
// Flexbox.
"align-content",
"align-items",
"align-self",
"flex",
"flex-basis",
"flex-direction",
"flex-flow",
"flex-grow",
"flex-shrink",
"flex-wrap",
"justify-content",
"order",
// Font feature.
"font-feature-settings",
"font-language-override",
"font-variant-ligatures",
// Font kerning.
"font-kerning",
// Fragmented borders and backgrounds.
"box-decoration-break",
// Grid layout.
"grid-column",
"grid-column-align",
"grid-column-end",
"grid-column-start",
"grid-row",
"grid-row-align",
"grid-row-end",
"grid-row-start",
"grid-template-columns",
"grid-template-rows",
// Hyphens.
"hyphens",
"word-break",
// Masks.
"mask",
"mask-border",
"mask-border-outset",
"mask-border-repeat",
"mask-border-slice",
"mask-border-source",
"mask-border-width",
"mask-clip",
"mask-composite",
"mask-image",
"mask-origin",
"mask-position",
"mask-repeat",
"mask-size",
// Multicolumn.
"break-after",
"break-before",
"break-inside",
"column-count",
"column-fill",
"column-gap",
"column-rule",
"column-rule-color",
"column-rule-style",
"column-rule-width",
"column-span",
"column-width",
"columns",
// Object fit.
"object-fit",
"object-position",
// Regions.
"flow-from",
"flow-into",
"region-fragment",
// Scroll snap points.
"scroll-snap-coordinate",
"scroll-snap-destination",
"scroll-snap-points-x",
"scroll-snap-points-y",
"scroll-snap-type",
// Shapes.
"shape-image-threshold",
"shape-margin",
"shape-outside",
// Tab size.
"tab-size",
// Text align last.
"text-align-last",
// Text decoration.
"text-decoration-color",
"text-decoration-line",
"text-decoration-skip",
"text-decoration-style",
// Text emphasis.
"text-emphasis",
"text-emphasis-color",
"text-emphasis-position",
"text-emphasis-style",
// Text size adjust.
"text-size-adjust",
// Text spacing.
"text-spacing",
// Transform.
"transform",
"transform-origin",
// Transform 3D.
"backface-visibility",
"perspective",
"perspective-origin",
"transform-style",
// Transition.
"transition",
"transition-delay",
"transition-duration",
"transition-property",
"transition-timing-function",
// Unicode bidi.
"unicode-bidi",
// User select.
"user-select",
// Writing mode.
"writing-mode"
);
// Animation.
'animation',
'animation-delay',
'animation-direction',
'animation-duration',
'animation-fill-mode',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
// Appearance.
'appearance',
// Backdrop filter.
'backdrop-filter',
// Background image options.
'background-clip',
'background-origin',
'background-size',
// Box sizing.
'box-sizing',
// Clip path.
'clip-path',
// Filter effects.
'filter',
// Flexbox.
'align-content',
'align-items',
'align-self',
'flex',
'flex-basis',
'flex-direction',
'flex-flow',
'flex-grow',
'flex-shrink',
'flex-wrap',
'justify-content',
'order',
// Font feature.
'font-feature-settings',
'font-language-override',
'font-variant-ligatures',
// Font kerning.
'font-kerning',
// Fragmented borders and backgrounds.
'box-decoration-break',
// Grid layout.
'grid-column',
'grid-column-align',
'grid-column-end',
'grid-column-start',
'grid-row',
'grid-row-align',
'grid-row-end',
'grid-row-start',
'grid-template-columns',
'grid-template-rows',
// Hyphens.
'hyphens',
'word-break',
// Masks.
'mask',
'mask-border',
'mask-border-outset',
'mask-border-repeat',
'mask-border-slice',
'mask-border-source',
'mask-border-width',
'mask-clip',
'mask-composite',
'mask-image',
'mask-origin',
'mask-position',
'mask-repeat',
'mask-size',
// Multicolumn.
'break-after',
'break-before',
'break-inside',
'column-count',
'column-fill',
'column-gap',
'column-rule',
'column-rule-color',
'column-rule-style',
'column-rule-width',
'column-span',
'column-width',
'columns',
// Object fit.
'object-fit',
'object-position',
// Regions.
'flow-from',
'flow-into',
'region-fragment',
// Scroll snap points.
'scroll-snap-coordinate',
'scroll-snap-destination',
'scroll-snap-points-x',
'scroll-snap-points-y',
'scroll-snap-type',
// Shapes.
'shape-image-threshold',
'shape-margin',
'shape-outside',
// Tab size.
'tab-size',
// Text align last.
'text-align-last',
// Text decoration.
'text-decoration-color',
'text-decoration-line',
'text-decoration-skip',
'text-decoration-style',
// Text emphasis.
'text-emphasis',
'text-emphasis-color',
'text-emphasis-position',
'text-emphasis-style',
// Text size adjust.
'text-size-adjust',
// Text spacing.
'text-spacing',
// Transform.
'transform',
'transform-origin',
// Transform 3D.
'backface-visibility',
'perspective',
'perspective-origin',
'transform-style',
// Transition.
'transition',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
// Unicode bidi.
'unicode-bidi',
// User select.
'user-select',
// Writing mode.
'writing-mode',
);
/// Values that should be vendorized.
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
/// @var {list}
$vendor-values: (
// Cross fade.
'cross-fade',
// Element function.
'element',
// Filter function.
'filter',
// Flexbox.
'flex',
'inline-flex',
// Grab cursors.
'grab',
'grabbing',
// Gradients.
'linear-gradient',
'repeating-linear-gradient',
'radial-gradient',
'repeating-radial-gradient',
// Grid layout.
'grid',
'inline-grid',
// Image set.
'image-set',
// Intrinsic width.
'max-content',
'min-content',
'fit-content',
'fill',
'fill-available',
'stretch',
// Sticky position.
'sticky',
// Transform.
'transform',
// Zoom cursors.
'zoom-in',
'zoom-out',
);
/// Values that should be vendorized.
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
/// @var {list}
$vendor-values: (
// Cross fade.
"cross-fade",
// Element function.
"element",
// Filter function.
"filter",
// Flexbox.
"flex",
"inline-flex",
// Grab cursors.
"grab",
"grabbing",
// Gradients.
"linear-gradient",
"repeating-linear-gradient",
"radial-gradient",
"repeating-radial-gradient",
// Grid layout.
"grid",
"inline-grid",
// Image set.
"image-set",
// Intrinsic width.
"max-content",
"min-content",
"fit-content",
"fill",
"fill-available",
"stretch",
// Sticky position.
"sticky",
// Transform.
"transform",
// Zoom cursors.
"zoom-in",
"zoom-out"
);
// Functions.
/// Removes a specific item from a list.
/// @author Hugo Giraudel
/// @param {list} $list List.
/// @param {integer} $index Index.
/// @return {list} Updated list.
@function remove-nth($list, $index) {
/// Removes a specific item from a list.
/// @author Hugo Giraudel
/// @param {list} $list List.
/// @param {integer} $index Index.
/// @return {list} Updated list.
@function remove-nth($list, $index) {
$result: null;
$result: null;
@if type-of($index) != number {
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
} @else if $index == 0 {
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
} @else if abs($index) > length($list) {
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
} @else {
$result: ();
$index: if($index < 0, length($list) + $index + 1, $index);
@if type-of($index) != number {
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
}
@else if $index == 0 {
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
}
@else if abs($index) > length($list) {
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
}
@else {
@for $i from 1 through length($list) {
@if $i != $index {
$result: append($result, nth($list, $i));
}
}
}
$result: ();
$index: if($index < 0, length($list) + $index + 1, $index);
@return $result;
}
@for $i from 1 through length($list) {
/// Replaces a substring within another string.
/// @author Hugo Giraudel
/// @param {string} $string String.
/// @param {string} $search Substring.
/// @param {string} $replace Replacement.
/// @return {string} Updated string.
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
@if $i != $index {
$result: append($result, nth($list, $i));
}
@if $index {
@return str-slice($string, 1, $index - 1) + $replace +
str-replace(
str-slice($string, $index + str-length($search)),
$search,
$replace
);
}
}
@return $string;
}
}
/// Replaces a substring within each string in a list.
/// @param {list} $strings List of strings.
/// @param {string} $search Substring.
/// @param {string} $replace Replacement.
/// @return {list} Updated list of strings.
@function str-replace-all($strings, $search, $replace: "") {
@each $string in $strings {
$strings: set-nth(
$strings,
index($strings, $string),
str-replace($string, $search, $replace)
);
}
@return $result;
}
/// Replaces a substring within another string.
/// @author Hugo Giraudel
/// @param {string} $string String.
/// @param {string} $search Substring.
/// @param {string} $replace Replacement.
/// @return {string} Updated string.
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
/// Replaces a substring within each string in a list.
/// @param {list} $strings List of strings.
/// @param {string} $search Substring.
/// @param {string} $replace Replacement.
/// @return {list} Updated list of strings.
@function str-replace-all($strings, $search, $replace: '') {
@each $string in $strings {
$strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));
}
@return $strings;
}
@return $strings;
}
// Mixins.
/// Wraps @content in vendorized keyframe blocks.
/// @param {string} $name Name.
@mixin keyframes($name) {
/// Wraps @content in vendorized keyframe blocks.
/// @param {string} $name Name.
@mixin keyframes($name) {
@-moz-keyframes #{$name} {
@content;
}
@-webkit-keyframes #{$name} {
@content;
}
@-ms-keyframes #{$name} {
@content;
}
@keyframes #{$name} {
@content;
}
}
@-moz-keyframes #{$name} { @content; }
@-webkit-keyframes #{$name} { @content; }
@-ms-keyframes #{$name} { @content; }
@keyframes #{$name} { @content; }
/// Vendorizes a declaration's property and/or value(s).
/// @param {string} $property Property.
/// @param {mixed} $value String/list of value(s).
@mixin vendor($property, $value) {
// Determine if property should expand.
$expandProperty: index($vendor-properties, $property);
}
// Determine if value should expand (and if so, add '-prefix-' placeholder).
$expandValue: false;
/// Vendorizes a declaration's property and/or value(s).
/// @param {string} $property Property.
/// @param {mixed} $value String/list of value(s).
@mixin vendor($property, $value) {
@each $x in $value {
@each $y in $vendor-values {
@if $y == str-slice($x, 1, str-length($y)) {
$value: set-nth($value, index($value, $x), "-prefix-" + $x);
$expandValue: true;
}
}
}
// Determine if property should expand.
$expandProperty: index($vendor-properties, $property);
// Expand property?
@if $expandProperty {
@each $vendor in $vendor-prefixes {
#{$vendor}#{$property}: #{str-replace-all($value, "-prefix-", $vendor)};
}
}
// Determine if value should expand (and if so, add '-prefix-' placeholder).
$expandValue: false;
// Expand just the value?
@else if $expandValue {
@each $vendor in $vendor-prefixes {
#{$property}: #{str-replace-all($value, "-prefix-", $vendor)};
}
}
@each $x in $value {
@each $y in $vendor-values {
@if $y == str-slice($x, 1, str-length($y)) {
$value: set-nth($value, index($value, $x), '-prefix-' + $x);
$expandValue: true;
}
}
}
// Expand property?
@if $expandProperty {
@each $vendor in $vendor-prefixes {
#{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
}
}
// Expand just the value?
@else if $expandValue {
@each $vendor in $vendor-prefixes {
#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
}
}
// Neither? Treat them as a normal declaration.
@else {
#{$property}: #{$value};
}
}
// Neither? Treat them as a normal declaration.
@else {
#{$property}: #{$value};
}
}

View File

@ -1,302 +1,302 @@
@import "libs/vars";
@import "libs/functions";
@import "libs/mixins";
@import "libs/vendor";
@import "libs/breakpoints";
@import "libs/html-grid";
@import "fontawesome-all.min.css";
/*
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
// Breakpoints.
@include breakpoints(
(
xlarge: (
1281px,
1680px,
),
large: (
981px,
1280px,
),
medium: (
737px,
980px,
),
small: (
481px,
736px,
),
xsmall: (
361px,
480px,
),
xxsmall: (
null,
360px,
),
)
);
// Base.
@import "base/reset";
@import "base/page";
@import "base/typography";
// Component.
@import "components/row";
@import "components/section";
@import "components/icon";
@import "components/list";
@import "components/actions";
@import "components/icons";
@import "components/form";
@import "components/box";
@import "components/image";
@import "components/table";
@import "components/button";
@import "components/tiles";
// Layout.
@import "layout/header";
@import "layout/menu";
@import "layout/main";
@import "layout/footer";
@import "layout/wrapper";
// Custom styles
h1 {
color: rgb(100, 149, 237);
text-align: center;
}
small {
font-size: 0.85em;
}
section {
margin-bottom: 1em;
}
hr {
clear: both;
}
#main p.button {
display: block;
max-width: 390px;
margin: 3em auto;
}
#main p.button a {
color: rgb(255, 67, 67);
}
p#banner-cta {
padding: 1px 4px;
background-color: #ffc;
text-align: center;
border-top: 1px solid;
border-bottom: 1px solid;
border-color: #0003;
font-size: 0.85em;
}
button.provincia {
margin-bottom: 9px;
font-size: 0.6em;
}
tr.danger {
background-color: #d9534f6e;
}
tr.severe {
background-color: #d9534f45;
}
tr.moderate {
background-color: #f0ad4e45;
}
tr.safe {
background-color: #3fad4645;
}
tr.unknown {
background-color: #eee8e8;
}
span.emoticon {
font-size: 2em;
}
ul.iconify li {
list-style: none;
margin: 1em 0;
line-height: 1.7em;
}
li.icon-list {
list-style: none;
padding-left: 0;
margin-left: -1em;
a {
margin-left: 4px;
}
}
p.subtitle {
margin: 2em 0 0.85em 0;
font-size: 1.1em;
}
.score-container {
max-width: 370px;
margin: auto;
.score-bar {
position: relative;
height: 12px;
width: 100%;
border-radius: 5px;
background: #f25757;
.score-progress {
position: absolute;
height: 12px;
background: #34ca96;
border-radius: 5px 0 0 5px;
}
}
p {
font-size: 0.85em;
text-align: center;
margin-top: 1em;
}
}
p.centered {
text-align: center;
}
p.featured {
font-weight: bold;
text-align: center;
}
p.featured .emoticon {
display: block;
}
p.featured .cta-twitter {
background-color: rgb(29, 161, 242);
color: #fff;
padding: 4px;
border-radius: 3px;
display: block;
max-width: 600px;
margin: auto;
}
#resultados table {
table-layout: fixed;
word-wrap: break-word;
}
#resultados table th#nota {
width: 65px;
}
#resultados table th#share {
width: 30%;
}
p.tablefooter {
float: right;
font-size: 0.8em;
font-style: italic;
}
#score {
color: #fff;
font-weight: bold;
font-size: 80px;
width: 128px;
border-radius: 12px;
display: inline-block;
height: 128px;
padding: 0;
text-align: center;
float: right;
border: 6px solid;
}
@include breakpoint("<=small") {
#score {
width: 80px;
height: 80px;
font-size: 45px;
}
}
#score.danger {
border-color: #801515;
background: #aa3939;
}
#score.severe {
border-color: #801515;
background: #aa3939;
}
#score.moderate {
border-color: #64482145;
background: #f0ad4eb3;
}
#score.safe {
border-color: #2d882d;
background: #161;
}
#score.unknown {
background: #eee8e8;
}
img[src*="#thumbnail"] {
width: 250px;
display: block;
float: left;
padding-right: 1em;
@include breakpoint("<=small") {
float: none;
margin: auto;
width: 100%;
}
}
.score-list-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-bottom: 3em;
.score-container {
flex: 1;
min-width: 300px;
margin: 0 0.5em 1em;
}
}
@import "libs/vars";
@import "libs/functions";
@import "libs/mixins";
@import "libs/vendor";
@import "libs/breakpoints";
@import "libs/html-grid";
@import "fontawesome-all.min.css";
/*
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
// Breakpoints.
@include breakpoints(
(
xlarge: (
1281px,
1680px,
),
large: (
981px,
1280px,
),
medium: (
737px,
980px,
),
small: (
481px,
736px,
),
xsmall: (
361px,
480px,
),
xxsmall: (
null,
360px,
),
)
);
// Base.
@import "base/reset";
@import "base/page";
@import "base/typography";
// Component.
@import "components/row";
@import "components/section";
@import "components/icon";
@import "components/list";
@import "components/actions";
@import "components/icons";
@import "components/form";
@import "components/box";
@import "components/image";
@import "components/table";
@import "components/button";
@import "components/tiles";
// Layout.
@import "layout/header";
@import "layout/menu";
@import "layout/main";
@import "layout/footer";
@import "layout/wrapper";
// Custom styles
h1 {
color: rgb(100, 149, 237);
text-align: center;
}
small {
font-size: 0.85em;
}
section {
margin-bottom: 1em;
}
hr {
clear: both;
}
#main p.button {
display: block;
max-width: 390px;
margin: 3em auto;
}
#main p.button a {
color: rgb(255, 67, 67);
}
p#banner-cta {
padding: 1px 4px;
background-color: #ffc;
text-align: center;
border-top: 1px solid;
border-bottom: 1px solid;
border-color: #0003;
font-size: 0.85em;
}
button.provincia {
margin-bottom: 9px;
font-size: 0.6em;
}
tr.danger {
background-color: #d9534f6e;
}
tr.severe {
background-color: #d9534f45;
}
tr.moderate {
background-color: #f0ad4e45;
}
tr.safe {
background-color: #3fad4645;
}
tr.unknown {
background-color: #eee8e8;
}
span.emoticon {
font-size: 2em;
}
ul.iconify li {
list-style: none;
margin: 1em 0;
line-height: 1.7em;
}
li.icon-list {
list-style: none;
padding-left: 0;
margin-left: -1em;
a {
margin-left: 4px;
}
}
p.subtitle {
margin: 2em 0 0.85em 0;
font-size: 1.1em;
}
.score-container {
max-width: 370px;
margin: auto;
.score-bar {
position: relative;
height: 12px;
width: 100%;
border-radius: 5px;
background: #f25757;
.score-progress {
position: absolute;
height: 12px;
background: #34ca96;
border-radius: 5px 0 0 5px;
}
}
p {
font-size: 0.85em;
text-align: center;
margin-top: 1em;
}
}
p.centered {
text-align: center;
}
p.featured {
font-weight: bold;
text-align: center;
}
p.featured .emoticon {
display: block;
}
p.featured .cta-twitter {
background-color: rgb(29, 161, 242);
color: #fff;
padding: 4px;
border-radius: 3px;
display: block;
max-width: 600px;
margin: auto;
}
#resultados table {
table-layout: fixed;
word-wrap: break-word;
}
#resultados table th#nota {
width: 65px;
}
#resultados table th#share {
width: 30%;
}
p.tablefooter {
float: right;
font-size: 0.8em;
font-style: italic;
}
#score {
color: #fff;
font-weight: bold;
font-size: 80px;
width: 128px;
border-radius: 12px;
display: inline-block;
height: 128px;
padding: 0;
text-align: center;
float: right;
border: 6px solid;
}
@include breakpoint("<=small") {
#score {
width: 80px;
height: 80px;
font-size: 45px;
}
}
#score.danger {
border-color: #801515;
background: #aa3939;
}
#score.severe {
border-color: #801515;
background: #aa3939;
}
#score.moderate {
border-color: #64482145;
background: #f0ad4eb3;
}
#score.safe {
border-color: #2d882d;
background: #161;
}
#score.unknown {
background: #eee8e8;
}
img[src*="#thumbnail"] {
width: 250px;
display: block;
float: left;
padding-right: 1em;
@include breakpoint("<=small") {
float: none;
margin: auto;
width: 100%;
}
}
.score-list-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-bottom: 3em;
.score-container {
flex: 1;
min-width: 300px;
margin: 0 0.5em 1em;
}
}

View File

@ -1,23 +1,23 @@
@import 'libs/vars';
@import 'libs/functions';
@import 'libs/mixins';
@import 'libs/vendor';
@import 'libs/breakpoints';
@import 'libs/html-grid';
/*
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Tiles */
.tiles {
body.is-preload & {
article {
@include vendor('transform', 'none');
opacity: 1;
}
}
}
@import "libs/vars";
@import "libs/functions";
@import "libs/mixins";
@import "libs/vendor";
@import "libs/breakpoints";
@import "libs/html-grid";
/*
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Tiles */
.tiles {
body.is-preload & {
article {
@include vendor("transform", "none");
opacity: 1;
}
}
}

View File

@ -7,27 +7,32 @@
* Más información en:
* https://github.com/mozilla/http-observatory/blob/master/httpobs/docs/api.md
*/
const axios = require('axios');
const Bottleneck = require('bottleneck');
const parser = require('./sites-parser');
const axios = require("axios");
const Bottleneck = require("bottleneck");
const parser = require("./sites-parser");
const MOZILLA_API_BASE_URL = 'https://http-observatory.security.mozilla.org/api/v1';
const MOZILLA_API_BASE_URL =
"https://http-observatory.security.mozilla.org/api/v1";
const MAX_CONCURRENT_REQUESTS = 20;
const limiter = new Bottleneck({maxConcurrent: MAX_CONCURRENT_REQUESTS});
const limiter = new Bottleneck({ maxConcurrent: MAX_CONCURRENT_REQUESTS });
async function analyze() {
const sites = await parser.parse();
const promises = sites.map((site, i) => limiter.schedule(() => {
console.log(`${i} Scanning ${site} using Mozilla HTTP Observatory API`);
return axios.post(`${MOZILLA_API_BASE_URL}/analyze?host=${site}&rescan=true`);
}));
const promises = sites.map((site, i) =>
limiter.schedule(() => {
console.log(`${i} Scanning ${site} using Mozilla HTTP Observatory API`);
return axios.post(
`${MOZILLA_API_BASE_URL}/analyze?host=${site}&rescan=true`
);
})
);
await Promise.all(promises);
}
analyze().catch(err => {
analyze().catch((err) => {
console.error(err);
process.exit(1);
});

View File

@ -5,30 +5,38 @@
* Más información en:
* https://github.com/mozilla/http-observatory/blob/master/httpobs/docs/api.md
*/
const fs = require('fs/promises');
const axios = require('axios');
const Bottleneck = require('bottleneck');
const parser = require('./sites-parser');
const fs = require("fs/promises");
const axios = require("axios");
const Bottleneck = require("bottleneck");
const parser = require("./sites-parser");
const MOZILLA_API_BASE_URL = 'https://http-observatory.security.mozilla.org/api/v1';
const MOZILLA_API_BASE_URL =
"https://http-observatory.security.mozilla.org/api/v1";
const MAX_CONCURRENT_REQUESTS = 20;
// TODO use the limiter (see analyze)
const limiter = new Bottleneck({maxConcurrent: MAX_CONCURRENT_REQUESTS});
const limiter = new Bottleneck({ maxConcurrent: MAX_CONCURRENT_REQUESTS });
async function results() {
const sites = await parser.parse();
for (const site of sites) {
const fileName = site.replace(/\./g, '!') + '.json';
const fileName = site.replace(/\./g, "!") + ".json";
try {
console.log(`Request ${site} scan history`);
const history = await axios.get(`${MOZILLA_API_BASE_URL}/getHostHistory?host=${site}&rescan=true`);
await fs.writeFile(`_data/results/history/${fileName}`, JSON.stringify(history.data, null, 2));
const history = await axios.get(
`${MOZILLA_API_BASE_URL}/getHostHistory?host=${site}&rescan=true`
);
await fs.writeFile(
`_data/results/history/${fileName}`,
JSON.stringify(history.data, null, 2)
);
} catch (e) {
if (e.response) {
console.error(`Failed request (${e.response.status}): ${e.response.statusText}`);
console.error(
`Failed request (${e.response.status}): ${e.response.statusText}`
);
} else {
console.error(e);
}
@ -36,13 +44,20 @@ async function results() {
try {
console.log(`Request ${site} scan results`);
const result = await axios.get(`${MOZILLA_API_BASE_URL}/analyze?host=${site}`);
if (result.data.state === 'FINISHED') {
await fs.writeFile(`_data/results/${fileName}`, JSON.stringify(result.data, null, 2));
const result = await axios.get(
`${MOZILLA_API_BASE_URL}/analyze?host=${site}`
);
if (result.data.state === "FINISHED") {
await fs.writeFile(
`_data/results/${fileName}`,
JSON.stringify(result.data, null, 2)
);
}
} catch (e) {
if (e.response) {
console.error(`Failed (${e.response.status}): ${e.response.statusText}`);
console.error(
`Failed (${e.response.status}): ${e.response.statusText}`
);
} else {
console.error(e);
}
@ -50,7 +65,7 @@ async function results() {
}
}
results().catch(err => {
results().catch((err) => {
console.error(err);
process.exit(1);
});

View File

@ -3,6 +3,7 @@ layout: base
title: Preguntas frecuentes sobre una web segura
permalink: "/faq/"
---
[España](/) - {{ title }}
# 📌 Preguntas frecuentes sobre una web segura
@ -14,7 +15,7 @@ permalink: "/faq/"
- [¿Qué tipo de problemas podría haber en webs que no tienen esa nota?](#{{ '¿Qué tipo de problemas podría haber en webs que no tienen esa nota?' | slug }})
- [¿Debemos exigir webs seguras?](#{{ '¿Debemos exigir webs seguras?' | slug }})
- [¿Cómo puedo participar en #websegura?](#{{ '¿Cómo puedo participar en #websegura?' | slug }})
- __🎬 [Vídeo-resumen explicativo sobre los peligros](https://twitter.com/PucelaBits/status/1359577471016910855)__
- **🎬 [Vídeo-resumen explicativo sobre los peligros](https://twitter.com/PucelaBits/status/1359577471016910855)**
<a id="{{ '¿Qué es esta web?' | slug }}"></a>
@ -25,6 +26,7 @@ Websegura usa el servicio [Mozilla Observatory](https://observatory.mozilla.org/
<a id="{{ '¿Qué es una conexión segura (HTTPS)?' | slug }}"></a>
## ¿Qué es una conexión segura (HTTPS)?
Cuando nos conectamos a una página web, nuestros datos viajan ida y vuelta desde nuestro dispositivo hasta el servidor de la página web por medio de cables y servidores intermedios.
Si la dirección de la web incluye HTTPS, esto quiere decir que estos datos viajan cifrados, pero no todas las webs HTTPS tienen una implementación segura.
@ -91,6 +93,6 @@ De otro modo, las diversas entidades, y sobre todo las entidades públicas, han
Si te interesa nuestro proyecto, tienes varias formas de participar en él:
- Puedes participar añadiendo nuevas páginas web. [En nuestro GitHub](https://github.com/PucelaBits/websegura#a%C3%B1adir-una-web) tienes todas las instrucciones necesarias.
- Puedes participar añadiendo nuevas páginas web. [En nuestro GitHub](https://github.com/PucelaBits/websegura#a%C3%B1adir-una-web) tienes todas las instrucciones necesarias.
- Puedes hacer saber a las diversas entidades que sus páginas web no son seguras. En esta web puedes enviarles mensajes a Twitter con la opción “tuitear” que aparece al lado de cada enlace.
- Si te gusta crear contenido, puedes utilizar la información que aquí aparece para elaborar piezas informativas que difundan la importancia de tener una web segura.
- Si te gusta crear contenido, puedes utilizar la información que aquí aparece para elaborar piezas informativas que difundan la importancia de tener una web segura.

View File

@ -3,6 +3,7 @@ layout: base
title: Menciones en los medios
permalink: "/medios/"
---
[España](/) - {{ title }}
# 📰 {{ title }}

View File

@ -1,10 +1,13 @@
const test = require('ava');
const { beautify } = require('../crawler/sites-parser')
const test = require("ava");
const { beautify } = require("../crawler/sites-parser");
test.serial('verify url beautifier', (t) => {
test.serial("verify url beautifier", (t) => {
t.is(beautify("pucelabits.org"), "pucelabits.org");
t.is(beautify("www.pucelabits.org"), "www.pucelabits.org");
t.is(beautify("http://pucelabits.org"), "pucelabits.org");
t.is(beautify("https://www.pucelabits.org/"), "www.pucelabits.org");
t.is(beautify("https://foo.bar.pucelabits.org/a/b"), "foo.bar.pucelabits.org");
t.is(
beautify("https://foo.bar.pucelabits.org/a/b"),
"foo.bar.pucelabits.org"
);
});

View File

@ -1,13 +1,13 @@
const test = require('ava');
const { getAllUrls } = require('../crawler/sites-parser')
const findDuplicates = require('array-find-duplicates');
const test = require("ava");
const { getAllUrls } = require("../crawler/sites-parser");
const findDuplicates = require("array-find-duplicates");
test.serial('verify duplicates', (t) => {
test.serial("verify duplicates", (t) => {
const urls = getAllUrls();
const duplicates = findDuplicates(urls);
if (duplicates.length > 0) {
return t.fail("Found duplicated URLs: " + duplicates.join(", "));
} else {
return t.pass()
return t.pass();
}
});