[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 95c81cc741
commit 9519891b92
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
11 changed files with 427 additions and 331 deletions

View File

@ -88,16 +88,19 @@ a:link {
outline: 0;
color: var(--bg3);
}
a:visited {
outline: 0;
color: var(--bg3);
margin: 0;
padding: 0;
}
a:hover {
color: var(--accent-blue);
transition: all 0.8s ease;
}
a:focus {
color: var(--accent-blue);
transition: all 0.8s ease;
@ -142,6 +145,7 @@ html {
height: 100%;
width: 100%;
}
#instance a {
display: flex;
color: var(--white);
@ -157,20 +161,50 @@ html {
.container {
padding-top: calc(3 * var(--small-size) + var(--main-size));
display: flex;
justify-content: center;
}
/* THE FOCUSED (middle) DIV */
.content {
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 */
.panel {
all: unset;
}
.panel[open] {
flex-grow: 1;
width: calc((100vw / 4) - var(--small-size));
display: flex;
flex-direction: column;
padding: var(--small-size);
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

@ -1,5 +1,5 @@
/*actors stream*/
.actors{
.actors {
display: flex;
flex-wrap: wrap;
}
@ -9,11 +9,12 @@
border-radius: var(--unit-size);
width: 100%;
}
.nav-content .timeline .actors > div:last-child {
margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size);
}
.actor{
.actor {
display: flex;
flex-wrap: wrap;
border: solid 2px var(--accent-low);
@ -33,13 +34,13 @@
justify-content: space-between;
}
.actor-info{
.actor-info {
order: 3;
display: flex;
flex-wrap: wrap;
}
.actor-bio{
.actor-bio {
order: 3;
word-break: break-word;
padding: var(--small-size);

View File

@ -1,5 +1,5 @@
/*groups stream*/
.groups{
.groups {
display: flex;
flex-wrap: wrap;
}
@ -13,11 +13,12 @@
border-radius: var(--unit-size);
width: 100%;
}
.nav-content .timeline .groups > div:last-child {
margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size);
}
.group{
.group {
display: flex;
flex-wrap: wrap;
border: solid 2px var(--accent-low);
@ -37,13 +38,13 @@
justify-content: space-between;
}
.group-info{
.group-info {
order: 3;
display: flex;
flex-wrap: wrap;
}
.group-description{
.group-description {
order: 3;
word-break: break-word;
padding: var(--small-size);

View File

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

View File

@ -1,8 +1,8 @@
.simple-stream .nav-content{
.simple-stream .nav-content {
border: none;
box-shadow: none;
}
.simple-stream .main-nav li{
.simple-stream .main-nav li {
width: auto;
}

View File

@ -1,13 +1,19 @@
/* link underlines tend to make hypertext less readable,
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 */
ul,ol { list-style:none }
ul, ol {
list-style: none
}
/* avoid browser default inconsistent heading font-sizes */
/* 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 */
/* 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 */
/* form elements are oddly inconsistent, and not quite CSS emulatable. */
/* 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
{ margin:0; padding:0; border:none; }
ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, body, html, p, blockquote, fieldset, input, textarea {
margin: 0;
padding: 0;
border: none;
}
/* 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 */
address { font-style:normal }
address {
font-style: normal
}
/* firefox focus outline */
:focus {outline:none;}
::-moz-focus-inner {border:0;}
:focus {
outline: none;
}
::-moz-focus-inner {
border: 0;
}
/* details element arrow */
details > summary {
list-style: none;
}
details > summary::-webkit-details-marker {
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 {
opacity: 0;
}
#right-container[open] > div {
opacity: 100%;
}
#right-container[open] {
order: 3;
border-left: solid 1px var(--bg2);
}
#right-panel {
position: fixed;
display: flex;
flex-direction: column;
}

View File

@ -1,66 +1,81 @@
form {
width: 50%;
margin-left: auto;
margin-right: auto;
padding: var(--main-size);
background-image: radial-gradient(ellipse at 10% 10%, var(--bg3), var(--accent-blue)),
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAElBMVEUAAACUkpSEhoSMioyMjoyEgoRr6djFAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAU1JREFUKJEVUcl1xTAIpAVLSgECXIAYUoCAX0Bi919LlCPLm5ValiOUUe2+ZRVFuYpKXFsUX9aIp0V6GtC8VRhNL0X2fikvswhKrNDhes7pbpPkufFAtI0B76LEjfc2bgdHDk6RX4A/sjt6LCylfoYpNYYJx/9COhIugsjluzN9VGZ/Hnl51jIH2ba+Ywsy2RJCFdoDe8Obw61TXGAv+ewExMRJs7gd7YcimPuk42uMqY2VJ1fK+bDL32rb7kwok/la/u7Mrz7Xf0DTssSP2Btp1ZS0zw35tM/SsJKgWNLcRh+/th1QqntwtM3Tx0LNosoBYbM3qjJFiMeLsMH2i5BcQdU3n9sJHOE1Hoqn1GA/bm4s0YkVB/y4r0PbltF32FpljXmdlOOwbDvFWkoDYLppSG4pnM6UxX3Src1lhXeU36FOu3o+R2vNaHME/wESUl9/3zMniwAAAABJRU5ErkJggg==);
background-blend-mode: multiply;
border-radius: var(--unit-size);
}
fieldset {
.content {
display: flex;
flex-direction: column;
font-family: var(--display-font);
font-size: var(--main-size);
flex-wrap: wrap;
margin-top: calc(4 * var(--main-size));
justify-content: center;
align-items: center;
margin-left: 1%;
margin-right: 1%;
margin-bottom: 1%;
}
fieldset legend {
margin-bottom: var(--main-size);
}
br {
margin-bottom: var(--unit-size);
form {
font-size: var(--medium-size);
background-color: var(--bg2);
padding: calc(2 * var(--unit-size));
border-radius: var(--unit-size);
border: solid 2px var(--accent-low);
}
label {
font-family: var(--display-font);
font-size: var(--medium-size);
}
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
background: var(--white) !important;
color: var(--bg1) !important;
transition: all 0.4s ease;
}
input[type="text"],
input[type="password"],
input[type="email"] {
all: unset;
background: var(--translucent);
padding: var(--unit-size) var(--small-size);
box-sizing: border-box;
border-radius: var(--unit-size);
font-size: var(--medium-size);
font-family: 'Montserrat', sans-serif;
font-weight: 700;
width: 100%;
}
button {
font-family: var(--display-font);
font-size: var(--medium-size);
align-self: flex-end;
padding: var(--unit-size) var(--small-size);
margin-top: var(--unit-size);
}
fieldset div:last-child {
text-align: end;
input[type=text],
input[type=password],
input[type=email] {
margin-top: calc(var(--unit-size) * 0.5);
background-color: var(--bg1);
color: var(--fg);
border-style: none;
padding: calc(var(--unit-size) * 0.5);
border-radius: calc(var(--unit-size) * 0.5);
font-size: var(--unit-size);
margin-bottom: var(--unit-size);
width: calc(100% - var(--unit-size));
}
.active {
color: var(--fg) !important;
font-weight: 700;
}
input {
filter: none;
}
form input[type="checkbox"] {
position: unset !important;
}
form button[type=submit] {
background: var(--bg1);
padding: 0.3em 1em;
color: var(--fg);
border-style: solid;
border-color: var(--accent);
border-radius: var(--unit-size);
border-width: 2px;
font-family: 'Montserrat', sans-serif;
font-weight: 700;
}
form button[type=submit]:focus,
form button[type=submit]:hover {
border-radius: var(--unit-size);
box-shadow: 0 0 8px var(--accent);
}
#login-notes {
margin: 0;
}
#login-main {
border: 0;
}

View File

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

View File

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