[TWIG][CSS] Panels are now animated when shown, main content width as well as panel's is now correctly configured. WIP: displaying side panels by default when space is available, "details" element state cannot be manipulated through CSS only, need a better solution.

This commit is contained in:
Eliseu Amaro 2021-07-20 19:30:49 +01:00 committed by Hugo Sales
parent 2084ae350e
commit b899c9fb2a
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
18 changed files with 850 additions and 741 deletions

View File

@ -88,16 +88,19 @@ a:link {
outline: 0; outline: 0;
color: var(--bg3); color: var(--bg3);
} }
a:visited { a:visited {
outline: 0; outline: 0;
color: var(--bg3); color: var(--bg3);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a:hover { a:hover {
color: var(--accent-blue); color: var(--accent-blue);
transition: all 0.8s ease; transition: all 0.8s ease;
} }
a:focus { a:focus {
color: var(--accent-blue); color: var(--accent-blue);
transition: all 0.8s ease; transition: all 0.8s ease;
@ -142,6 +145,7 @@ html {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
#instance a { #instance a {
display: flex; display: flex;
color: var(--white); color: var(--white);
@ -157,20 +161,50 @@ html {
.container { .container {
padding-top: calc(3 * var(--small-size) + var(--main-size)); padding-top: calc(3 * var(--small-size) + var(--main-size));
display: flex; display: flex;
justify-content: center;
} }
/* THE FOCUSED (middle) DIV */ /* THE FOCUSED (middle) DIV */
.content { .content {
order: 2; order: 2;
flex-grow: 5;
max-width: calc(100vw / 2); max-width: calc(100vw / 2);
margin-left: auto;
margin-right: auto;
} }
/* EVERY SIDE PANEL DETAIL ELEMENT */ /* EVERY SIDE PANEL DETAIL ELEMENT */
.panel {
all: unset;
}
.panel[open] { .panel[open] {
flex-grow: 1; width: calc((100vw / 4) - var(--small-size));
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: var(--small-size); padding: var(--small-size);
box-sizing: border-box; box-sizing: border-box;
} }
/*
[data-foo]::before {
open: attr(data-foo) "close";
}
*/
.content {
animation: fadeIn 200ms cubic-bezier(0, 0.55, 0.45, 1);
}
details[open] > div {
animation: fadeIn 200ms cubic-bezier(0, 0.55, 0.45, 1);
}
@keyframes fadeIn {
0% {
opacity: 0;
transform: translateY(-10px);
}
100% {
opacity: unset;
transform: none;
}
}

View File

@ -9,6 +9,7 @@
border-radius: var(--unit-size); border-radius: var(--unit-size);
width: 100%; width: 100%;
} }
.nav-content .timeline .actors > div:last-child { .nav-content .timeline .actors > div:last-child {
margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size); margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size);
} }

View File

@ -13,6 +13,7 @@
border-radius: var(--unit-size); border-radius: var(--unit-size);
width: 100%; width: 100%;
} }
.nav-content .timeline .groups > div:last-child { .nav-content .timeline .groups > div:last-child {
margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size); margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size);
} }

View File

@ -49,10 +49,12 @@
.faq-nav a { .faq-nav a {
color: #91B9D0; color: #91B9D0;
} }
.faq-nav a:hover { .faq-nav a:hover {
color: #F6F6F6; color: #F6F6F6;
transition: all 0.8s ease; transition: all 0.8s ease;
} }
.faq-nav a:focus { .faq-nav a:focus {
color: #F6F6F6; color: #F6F6F6;
transition: all 0.8s ease; transition: all 0.8s ease;
@ -66,6 +68,7 @@
padding-top: var(--unit-size); padding-top: var(--unit-size);
border-radius: 0 0 var(--small-size) var(--small-size); border-radius: 0 0 var(--small-size) var(--small-size);
} }
.markd-single { .markd-single {
border-radius: var(--small-size) !important; border-radius: var(--small-size) !important;
} }

View File

@ -11,23 +11,23 @@
stroke-width: 0; stroke-width: 0;
vertical-align: middle; vertical-align: middle;
} }
.icon-avatar { .icon-avatar {
width: var(--main-size); width: var(--main-size);
height: auto; height: auto;
} }
#left-container > div {
opacity: 0;
}
#left-container[open] > div { #left-container[open] > div {
opacity: 100%; opacity: 100%;
} }
#left-container[open] { #left-container[open] {
order: 1; order: 1;
border-right: solid 1px var(--bg2); border-right: solid 1px var(--bg2);
} }
#left-panel { #left-panel {
position: fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }

View File

@ -50,7 +50,6 @@
} }
/* FORMS ------------------------------*/ /* FORMS ------------------------------*/
.poll label { .poll label {
display: inline-block; display: inline-block;

View File

@ -2,15 +2,19 @@
font-size: var(--medium-size); font-size: var(--medium-size);
border: none !important; border: none !important;
} }
.note { .note {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
#save { #save {
display: flex; display: flex;
} }
#save div:nth-of-type(1) { #save div:nth-of-type(1) {
padding: var(--unit-size); padding: var(--unit-size);
} }
#save div:nth-of-type(1) textarea { #save div:nth-of-type(1) textarea {
padding: var(--unit-size); padding: var(--unit-size);
border-radius: var(--unit-size); border-radius: var(--unit-size);
@ -19,4 +23,5 @@
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
#save div:nth-of-type(2) #save div:nth-of-type(2)

View File

@ -1,13 +1,19 @@
/* link underlines tend to make hypertext less readable, /* link underlines tend to make hypertext less readable,
because underlines obscure the shapes of the lower halves of words */ because underlines obscure the shapes of the lower halves of words */
:link,:visited { text-decoration:none } :link, :visited {
text-decoration: none
}
/* no list-markers by default, since lists are used more often for semantics */ /* no list-markers by default, since lists are used more often for semantics */
ul,ol { list-style:none } ul, ol {
list-style: none
}
/* avoid browser default inconsistent heading font-sizes */ /* avoid browser default inconsistent heading font-sizes */
/* and pre/code too */ /* and pre/code too */
h1,h2,h3,h4,h5,h6,pre,code { font-size:1em; } h1, h2, h3, h4, h5, h6, pre, code {
font-size: 1em;
}
/* remove the inconsistent (among browsers) default ul,ol padding or margin */ /* remove the inconsistent (among browsers) default ul,ol padding or margin */
/* the default spacing on headings does not match nor align with /* the default spacing on headings does not match nor align with
@ -15,23 +21,48 @@ h1,h2,h3,h4,h5,h6,pre,code { font-size:1em; }
/* zero out the spacing around pre, form, body, html, p, blockquote as well */ /* zero out the spacing around pre, form, body, html, p, blockquote as well */
/* form elements are oddly inconsistent, and not quite CSS emulatable. */ /* form elements are oddly inconsistent, and not quite CSS emulatable. */
/* nonetheless strip their margin and padding as well */ /* nonetheless strip their margin and padding as well */
ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input,textarea ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, body, html, p, blockquote, fieldset, input, textarea {
{ margin:0; padding:0; border:none; } margin: 0;
padding: 0;
border: none;
}
/* whoever thought blue linked image borders were a good idea? */ /* whoever thought blue linked image borders were a good idea? */
a img,:link img,:visited img { border:none } a img, :link img, :visited img {
border: none
}
/* de-italicize address */ /* de-italicize address */
address { font-style:normal } address {
font-style: normal
}
/* firefox focus outline */ /* firefox focus outline */
:focus {outline:none;} :focus {
::-moz-focus-inner {border:0;} outline: none;
}
::-moz-focus-inner {
border: 0;
}
/* details element arrow */ /* details element arrow */
details > summary { details > summary {
list-style: none; list-style: none;
} }
details > summary::-webkit-details-marker { details > summary::-webkit-details-marker {
display: none; display: none;
} }
/* have IE ignore the detail elements altogether */
@supports not (-ms-ime-align: auto) {
details summary {
cursor: pointer;
}
details summary > * {
display: inline;
}
}

View File

@ -15,15 +15,18 @@
#right-container > div { #right-container > div {
opacity: 0; opacity: 0;
} }
#right-container[open] > div { #right-container[open] > div {
opacity: 100%; opacity: 100%;
} }
#right-container[open] { #right-container[open] {
order: 3; order: 3;
border-left: solid 1px var(--bg2); border-left: solid 1px var(--bg2);
} }
#right-panel { #right-panel {
position: fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }

View File

@ -8,6 +8,7 @@
margin-right: 1%; margin-right: 1%;
margin-bottom: 1%; margin-bottom: 1%;
} }
form { form {
font-size: var(--medium-size); font-size: var(--medium-size);
background-color: var(--bg2); background-color: var(--bg2);
@ -15,18 +16,20 @@ form {
border-radius: var(--unit-size); border-radius: var(--unit-size);
border: solid 2px var(--accent-low); border: solid 2px var(--accent-low);
} }
label { label {
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
font-weight: 700; font-weight: 700;
width: 100%; width: 100%;
} }
button { button {
margin-top: var(--unit-size); margin-top: var(--unit-size);
} }
input[type=text], input[type=text],
input[type=password], input[type=password],
input[type=email] input[type=email] {
{
margin-top: calc(var(--unit-size) * 0.5); margin-top: calc(var(--unit-size) * 0.5);
background-color: var(--bg1); background-color: var(--bg1);
color: var(--fg); color: var(--fg);
@ -37,16 +40,20 @@ input[type=email]
margin-bottom: var(--unit-size); margin-bottom: var(--unit-size);
width: calc(100% - var(--unit-size)); width: calc(100% - var(--unit-size));
} }
.active { .active {
color: var(--fg) !important; color: var(--fg) !important;
font-weight: 700; font-weight: 700;
} }
input { input {
filter: none; filter: none;
} }
form input[type="checkbox"] { form input[type="checkbox"] {
position: unset !important; position: unset !important;
} }
form button[type=submit] { form button[type=submit] {
background: var(--bg1); background: var(--bg1);
padding: 0.3em 1em; padding: 0.3em 1em;
@ -58,6 +65,7 @@ form button[type=submit] {
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
font-weight: 700; font-weight: 700;
} }
form button[type=submit]:focus, form button[type=submit]:focus,
form button[type=submit]:hover { form button[type=submit]:hover {
border-radius: var(--unit-size); border-radius: var(--unit-size);

View File

@ -80,6 +80,7 @@
width: 100%; width: 100%;
border-radius: 0 0 var(--small-size) var(--small-size); border-radius: 0 0 var(--small-size) var(--small-size);
} }
.form-single { .form-single {
order: 2; order: 2;
padding: calc(2 * var(--unit-size)); padding: calc(2 * var(--unit-size));
@ -87,6 +88,7 @@
width: 100%; width: 100%;
border-radius: var(--small-size); border-radius: var(--small-size);
} }
.form label, .form label,
.form-single label { .form-single label {
font-size: var(--medium-size); font-size: var(--medium-size);
@ -168,6 +170,7 @@ button[type=submit] {
border-radius: calc(var(--unit-size) * 0.5); border-radius: calc(var(--unit-size) * 0.5);
font-size: var(--medium-size); font-size: var(--medium-size);
} }
select { select {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
@ -194,10 +197,12 @@ select {
display: block; display: block;
max-width: 100%; max-width: 100%;
} }
#img-container { #img-container {
margin: var(--main-size) auto; margin: var(--main-size) auto;
max-width: 60%; max-width: 60%;
} }
.cropper-view-box, .cropper-view-box,
.cropper-face { .cropper-face {
border-radius: 50%; border-radius: 50%;
@ -208,9 +213,11 @@ select {
ul input[type=radio] + label { ul input[type=radio] + label {
color: var(--accent); color: var(--accent);
} }
ul input[type=radio]:checked + label { ul input[type=radio]:checked + label {
color: var(--fg); color: var(--fg);
} }
ul input[type=radio]:focus + label { ul input[type=radio]:focus + label {
color: var(--fg); color: var(--fg);
} }
@ -219,6 +226,7 @@ ul input[type=radio]:focus + label {
ul input[type=radio]:not(:checked) + label + div { ul input[type=radio]:not(:checked) + label + div {
display: none; display: none;
} }
ul input[type=radio]:checked + label + div { ul input[type=radio]:checked + label + div {
display: flex; display: flex;
} }
@ -239,6 +247,7 @@ input[type=radio] {
width: 100%; width: 100%;
font-size: var(--medium-size); font-size: var(--medium-size);
} }
#form-tabs ul { #form-tabs ul {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -247,6 +256,7 @@ input[type=radio] {
justify-content: space-evenly; justify-content: space-evenly;
width: 100%; width: 100%;
} }
#form-tabs ul label { #form-tabs ul label {
order: 1; order: 1;
flex: 0; flex: 0;
@ -269,9 +279,11 @@ input[type=radio] {
border-radius: 0 0 var(--unit-size) var(--unit-size); border-radius: 0 0 var(--unit-size) var(--unit-size);
font-size: var(--unit-size); font-size: var(--unit-size);
} }
#form-tabs ul .form form { #form-tabs ul .form form {
width: 100%; width: 100%;
} }
#form-tabs ul .form form div label { #form-tabs ul .form form div label {
margin-bottom: calc(var(--unit-size) * 0.5); margin-bottom: calc(var(--unit-size) * 0.5);
} }
@ -287,6 +299,7 @@ input[type=radio] {
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
font-weight: 700; font-weight: 700;
} }
.secondary button[type=submit]:focus, .secondary button[type=submit]:focus,
.secondary button[type=submit]:hover { .secondary button[type=submit]:hover {
border-radius: var(--unit-size); border-radius: var(--unit-size);

View File

@ -6,6 +6,7 @@
src: url("Inter-Thin.woff2?v=3.19") format("woff2"), src: url("Inter-Thin.woff2?v=3.19") format("woff2"),
url("Inter-Thin.woff?v=3.19") format("woff"); url("Inter-Thin.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -23,6 +24,7 @@
src: url("Inter-ExtraLight.woff2?v=3.19") format("woff2"), src: url("Inter-ExtraLight.woff2?v=3.19") format("woff2"),
url("Inter-ExtraLight.woff?v=3.19") format("woff"); url("Inter-ExtraLight.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -40,6 +42,7 @@
src: url("Inter-Light.woff2?v=3.19") format("woff2"), src: url("Inter-Light.woff2?v=3.19") format("woff2"),
url("Inter-Light.woff?v=3.19") format("woff"); url("Inter-Light.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -57,6 +60,7 @@
src: url("Inter-Regular.woff2?v=3.19") format("woff2"), src: url("Inter-Regular.woff2?v=3.19") format("woff2"),
url("Inter-Regular.woff?v=3.19") format("woff"); url("Inter-Regular.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -74,6 +78,7 @@
src: url("Inter-Medium.woff2?v=3.19") format("woff2"), src: url("Inter-Medium.woff2?v=3.19") format("woff2"),
url("Inter-Medium.woff?v=3.19") format("woff"); url("Inter-Medium.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -91,6 +96,7 @@
src: url("Inter-SemiBold.woff2?v=3.19") format("woff2"), src: url("Inter-SemiBold.woff2?v=3.19") format("woff2"),
url("Inter-SemiBold.woff?v=3.19") format("woff"); url("Inter-SemiBold.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -108,6 +114,7 @@
src: url("Inter-Bold.woff2?v=3.19") format("woff2"), src: url("Inter-Bold.woff2?v=3.19") format("woff2"),
url("Inter-Bold.woff?v=3.19") format("woff"); url("Inter-Bold.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -125,6 +132,7 @@
src: url("Inter-ExtraBold.woff2?v=3.19") format("woff2"), src: url("Inter-ExtraBold.woff2?v=3.19") format("woff2"),
url("Inter-ExtraBold.woff?v=3.19") format("woff"); url("Inter-ExtraBold.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -142,6 +150,7 @@
src: url("Inter-Black.woff2?v=3.19") format("woff2"), src: url("Inter-Black.woff2?v=3.19") format("woff2"),
url("Inter-Black.woff?v=3.19") format("woff"); url("Inter-Black.woff?v=3.19") format("woff");
} }
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
font-style: italic; font-style: italic;
@ -168,6 +177,7 @@ Usage:
font-named-instance: 'Regular'; font-named-instance: 'Regular';
src: url("Inter-roman.var.woff2?v=3.19") format("woff2"); src: url("Inter-roman.var.woff2?v=3.19") format("woff2");
} }
@font-face { @font-face {
font-family: 'Inter var'; font-family: 'Inter var';
font-weight: 100 900; font-weight: 100 900;

View File

@ -1,4 +1,5 @@
<details class="panel" id="left-container"> <details class="panel" id="left-container">
<summary>{{ icon('menu', 'icon icon-left') | raw }}</summary> <summary>{{ icon('menu', 'icon icon-left') | raw }}</summary>
{% if app.user %} {% if app.user %}
<div id='left-panel'> <div id='left-panel'>