1
Fork 0
e11sync/static/style.scss

327 lines
6.8 KiB
SCSS
Raw Normal View History

2023-12-15 11:51:39 +02:00
@use 'pure';
@use 'grids-responsive';
2024-01-18 21:54:52 +02:00
$darkTextColor: #ccc;
$darkTextColorStr: "ccc";
$darkBgGrey: #313131;
$blueLinkVisited: #007bff;
$grey: #666;
2024-01-20 13:02:47 +02:00
$lightBlue: #008ed4;
2024-01-25 09:36:00 +02:00
$lightBorderColor: #a3a3a3;
2024-01-18 21:54:52 +02:00
/************************/
/** Very Common Things **/
/************************/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html, button, input, select, textarea, .pure-g [class *= "pure-u"] {
font-family: "-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji";
line-height: 1.5;
}
.pure-button-primary {
2024-01-20 13:02:47 +02:00
background-color: $lightBlue;
}
a, a:visited {
text-decoration: none;
2024-01-18 21:54:52 +02:00
color: $blueLinkVisited;
}
a:hover, a:focus {
text-decoration: underline;
}
/* So switching between scrollable and non-scrollable pages
does not cause a 10px shift
*/
body {
overflow-y: scroll;
}
.clear {
clear: both;
}
.hidden {
position: absolute;
top: -9999px;
left: -9999px;
}
/* Override pure.css; standard headers are too big */
h1 {
font-size: 1.6rem;
}
2024-01-18 21:54:52 +02:00
$h2Size: 1.2rem;
h2 {
font-size: $h2Size;
}
/***************************/
/** Part of Base template **/
/***************************/
body > div {
padding-top: 2em;
padding-left: 1.2rem;
padding-right: 1.2rem;
}
h1.brand-title {
text-align: center;
}
2024-01-18 21:54:52 +02:00
h1.brand-title > a, h2.brand-subtitle {
2024-01-20 11:43:56 +02:00
color: #000;
2024-01-18 21:54:52 +02:00
}
2024-01-18 22:07:10 +02:00
h1.brand-title {
a {
font-variant: small-caps;
font-size: 3rem;
}
a:hover, a:focus {
text-decoration: none;
}
}
h2.brand-subtitle {
font-size: 1.6rem;
text-align: center;
}
main {
margin: 0 auto;
max-width: 1000px;
margin-top: 33px;
}
header {
margin-left: auto;
margin-right: auto;
padding: 1rem 2rem 2rem 2rem;
border-radius: 10px;
max-width: 1000px;
2024-01-18 22:07:10 +02:00
background-color: #e6e6e6;
2024-01-20 13:28:51 +02:00
background: radial-gradient(circle at top left, $lightBlue 0%, #aaa 50%, #666 100%);
}
nav {
2024-01-27 19:19:51 +02:00
margin: 0 auto;
max-width: 1000px;
padding: 10px 0;
text-align: right;
a {
padding-left: 15px;
}
}
/*******************************/
/* Shared by a couple of pages */
/*******************************/
$featuresGutter: 1rem;
#page-index .leftright {
padding-top: 1em;
2024-01-20 11:43:56 +02:00
margin: (0-$featuresGutter);
/* Tiles are vertically center-aligned, top margin is unnecessary */
h1 {
margin-top: 0;
}
article {
margin: 15px 0;
padding: 0 $featuresGutter;
}
2024-01-25 09:36:00 +02:00
}
2024-01-25 09:36:00 +02:00
blockquote {
border-left: 2px solid $lightBorderColor;
font-style: italic;
line-height: 1.8;
padding-left: 1.5em;
}
@function svgarrow($color) {
2024-01-26 10:53:36 +02:00
@return url("data:image/svg+xml;utf8,<svg width='19' height='10' xmlns='http://www.w3.org/2000/svg'><path d='M17.5 1.5l-8 7-8-7' stroke='%23"+$color+"' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>");
}
#page-index #faq {
margin: 4rem 0 8rem 0;
2024-01-25 09:36:00 +02:00
border-bottom: 1px solid $lightBorderColor;
> article {
2024-01-25 09:36:00 +02:00
border-top: 1px solid $lightBorderColor;
input {
display: none;
}
$rotateTransition: transform .2s ease-in-out;
$hideTransition: opacity .2s ease-out, max-height 0.2s ease-out;
> div {
max-height: 1000px;
max-width: 768px;
transition: $hideTransition;
> div {
padding-bottom: 30px;
}
}
$labelMargin: 1.5rem;
label {
position: relative;
> h2 {
padding: $labelMargin 0;
margin: 0;
// FIXME: hide the pointer in netsurf, since the sections
// are always expanded.
cursor: pointer;
}
}
$arrowHeight: 0.8rem;
label::before {
content: "";
float: right;
background-image: svgarrow("000");
background-position: 50%;
background-repeat: no-repeat;
background-size: contain;
margin-top: $labelMargin + $h2Size - $arrowHeight;
height: $arrowHeight;
width: 1rem;
transition: $rotateTransition;
transform: rotate(0deg);
}
input:checked ~ div {
overflow: hidden;
max-height: 0;
transition: $hideTransition;
opacity: 0;
}
input:checked ~ label::before {
transition: $rotateTransition;
transform: rotate(180deg);
}
} /* > article */
} /* #faq */
/*******************/
/** Page-specific **/
/*******************/
#page-index {
#subscribe-section {
margin-top: 50px;
background-color: #e6e6e6;
padding: 1rem 2rem 2rem 2rem;
border-radius: 10px;
max-width: 1000px;
margin-left: auto;
margin-right: auto;
text-align: center;
span.message-success, span.message-error {
font-weight: bold;
font-size: $h2Size - 0.2;
}
span.message-success {
color: #181;
}
span.message-error {
color: #e33;
}
input#email {
width: 100%;
text-align: center;
margin-top: 1rem;
margin-bottom: .5rem;
border-radius: 3px;
}
button {
width: 100%;
text-align: center;
border-radius: 3px;
}
> h2 {
color: $grey;
}
}
} /* #page-index */
/**********************************/
/** Media Media Responsive Media **/
/**********************************/
@media (prefers-color-scheme: dark) {
2024-01-18 21:54:52 +02:00
h1, h2, h3, body {
color: $darkTextColor;
}
body {
background-color: #222;
}
h1.brand-title > a {
color: #ececec;
}
header {
2024-01-18 21:54:52 +02:00
background-color: $darkBgGrey;
background: radial-gradient(circle at top left, $blueLinkVisited 0%, $darkBgGrey 50%, $darkTextColor 100%);
}
h2.brand-subtitle {
2024-01-25 09:36:00 +02:00
color: $darkTextColor;
}
blockquote {
border-left-color: $darkTextColor;
}
#page-index {
#subscribe-section {
2024-01-18 21:54:52 +02:00
background-color: $darkBgGrey;
> h2 {
2024-01-18 21:54:52 +02:00
color: $darkTextColor;
}
span.message-success {
color: #9c9;
}
input {
2024-01-18 21:54:52 +02:00
color: $darkTextColor;
border: 1px solid #555;
box-shadow: none;
-webkit-box-shadow: none;
background-color: #222;
}
}
}
#page-index #faq > article {
label::before {
// difference from the default version: the color of the
// shape is #ccc.
2024-01-18 21:54:52 +02:00
background-image: svgarrow($darkTextColorStr);
}
}
}