[CSS][TWIG] Details element is now shown by default on larger screens, and hidden on smaller screens.

Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
This commit is contained in:
Eliseu Amaro 2021-07-24 17:38:57 +01:00 committed by Hugo Sales
parent 15cdcd3344
commit db8a1b125f
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
8 changed files with 66 additions and 72 deletions

View File

@ -114,8 +114,8 @@ a:hover {
transition: all 0.4s ease; transition: all 0.4s ease;
} }
summary:hover > *, summary:hover > svg,
summary:focus > * { summary:focus > svg {
border-radius: var(--unit-size); border-radius: var(--unit-size);
background: var(--white); background: var(--white);
fill: var(--bg1); fill: var(--bg1);
@ -123,8 +123,8 @@ summary:focus > * {
} }
hr { hr {
all: unset;
display: block; display: block;
border: none;
height: 2px; height: 2px;
background-image: linear-gradient(to right, var(--bg1), transparent 90%); background-image: linear-gradient(to right, var(--bg1), transparent 90%);
} }
@ -196,6 +196,7 @@ html {
.content { .content {
margin: var(--main-size); margin: var(--main-size);
margin-left: calc(2 * var(--main-size)); margin-left: calc(2 * var(--main-size));
margin-right: calc(2 * var(--main-size));
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: calc(3 * (100% / 5)); width: calc(3 * (100% / 5));
@ -253,30 +254,69 @@ html {
border-radius: var(--unit-size); border-radius: var(--unit-size);
background-color: #00000033; background-color: #00000033;
} }
.note-attachments > div figure { .note-attachments > div figure {
margin: 0; margin: 0;
padding: var(--small-size); padding: var(--small-size);
} }
figcaption a:link { figcaption a:link {
font-size: var(--small-size); font-size: var(--small-size);
color: var(--white); color: var(--white);
} }
/* EVERY SIDE PANEL DETAIL ELEMENT */ /* MEDIA QUERIES */
.panel { @media (min-width: 1200px) {
all: unset; .panel aside {
width: calc(1 * (100%/5)); position: fixed;
} display: flex !important;
flex-direction: column;
padding: var(--small-size);
box-sizing: border-box;
.panel[open] { font-size: var(--main-size);
height: 100%; width: calc(100vw / 5);
} height: calc(100vh - (3 * var(--small-size) + var(--main-size)));
/* ANIMATIONS */
details[open] > div {
animation: fadeIn 300ms cubic-bezier(0, 0.55, 0.45, 1); animation: fadeIn 300ms cubic-bezier(0, 0.55, 0.45, 1);
} }
.panel[open] aside {
display: none !important;
}
}
@media (max-width: 1200px) {
.content {
margin: var(--main-size);
display: flex;
flex-direction: column;
width: 100%;
}
.panel aside {
display: none !important;
}
.panel[open] aside {
background-image: radial-gradient(ellipse at 50% 5%, var(--bg1), var(--bg2)),
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;
background-attachment: fixed;
position: fixed;
display: flex !important;
flex-direction: column;
padding: var(--small-size);
box-sizing: border-box;
font-size: var(--main-size);
width: 100%;
height: calc(100vh - (3 * var(--small-size) + var(--main-size)));
animation: fadeIn 300ms cubic-bezier(0, 0.55, 0.45, 1);
}
}
/* ANIMATIONS */
@keyframes fadeIn { @keyframes fadeIn {
0% { 0% {
opacity: 0; opacity: 0;
@ -288,11 +328,3 @@ details[open] > div {
transform: none; transform: none;
} }
} }
/* MEDIA QUERIES */
@media (min-width: 900px) {
}
@media (max-width: 900px) {
}

View File

@ -17,28 +17,9 @@
height: auto; height: auto;
} }
#left-container[open] {
height: calc(100vh - (3 * var(--small-size) + var(--main-size)));
width: calc(100vw / 5);
}
#left-container[open] > div {
opacity: 100%;
}
#left-container[open] a {
tab-index: 0;
}
#left-panel { #left-panel {
position: fixed; top: inherit;
display: flex; left: 0;
flex-direction: column;
font-size: var(--main-size);
width: inherit;
height: inherit;
padding: var(--small-size);
box-sizing: border-box;
} }
/* PROFILE */ /* PROFILE */

View File

@ -12,20 +12,10 @@
vertical-align: middle; vertical-align: middle;
} }
#right-container[open] > div {
opacity: 100%;
}
#right-container[open] {
width: calc(100vw / 5);
}
#right-panel { #right-panel {
font-size: var(--main-size); font-size: var(--main-size);
width: inherit; top: inherit;
height: inherit; right: 0;
padding: var(--small-size);
box-sizing: border-box;
} }
.create-notice { .create-notice {

View File

@ -43,8 +43,9 @@
<details class="panel" id="left-container"> <details class="panel" id="left-container">
<summary tabindex="1"> <summary tabindex="1">
{{ icon('person', 'icon icon-left') | raw }} {{ icon('person', 'icon icon-left') | raw }}
</summary>
{{ block("leftpanel", "stdgrid.html.twig") }} {{ block("leftpanel", "stdgrid.html.twig") }}
</summary>
</details> </details>
{% block nav %}{% endblock %} {% block nav %}{% endblock %}
@ -54,8 +55,8 @@
<details class="panel" id="right-container"> <details class="panel" id="right-container">
<summary tabindex="3"> <summary tabindex="3">
{{ icon('notes', 'icon icon-right') | raw }} {{ icon('notes', 'icon icon-right') | raw }}
</summary>
{{ block("rightpanel", "stdgrid.html.twig") }} {{ block("rightpanel", "stdgrid.html.twig") }}
</summary>
</details> </details>
</div> </div>

View File

@ -1,4 +1,4 @@
<div id='left-panel'> <aside id='left-panel'>
<div class='profile-nav'> <div class='profile-nav'>
{% if app.user %} {% if app.user %}
@ -102,4 +102,4 @@
<a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a> <a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a>
<a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a> <a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a>
</div> </div>
</div> </aside>

View File

@ -1,6 +1 @@
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/left/left.css') }}" <link rel='stylesheet' type='text/css' href="{{ asset('assets/css/left/left.css') }}">
media="screen and (min-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/left/left_mid.css') }}"
media="screen and (max-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/left/left_small.css') }}"
media="screen and (max-width: 750px)">

View File

@ -1,4 +1,4 @@
<div id='right-panel'> <aside id='right-panel'>
{% if post_form is defined %} {% if post_form is defined %}
{{ form_start(post_form) }} {{ form_start(post_form) }}
@ -53,4 +53,4 @@
{{ block | raw }} {{ block | raw }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div> </aside>

View File

@ -1,6 +1 @@
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/right/right.css') }}" <link rel='stylesheet' type='text/css' href="{{ asset('assets/css/right/right.css') }}">
media="screen and (min-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/right/right_mid.css') }}"
media="screen and (max-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/right/right_small.css') }}"
media="screen and (max-width: 750px)">