[TWIG][CSS] Found solution to show details content by default in desktop view. However, post_form is being rendered multiple times, it was already rendered in the Posting Component. Needs to be fixed.

This commit is contained in:
Eliseu Amaro 2021-07-21 00:17:05 +01:00 committed by Hugo Sales
parent b899c9fb2a
commit f687c7b315
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 144 additions and 118 deletions

View File

@ -208,3 +208,15 @@ details[open] > div {
transform: none;
}
}
/* SIDE PANELS OPEN BY DEFAULT ON DESKTOP */
@media (min-width: 900px) {
.panel-mobile {
display: none;
}
}
@media (max-width: 900px) {
.panel-desktop {
display: none;
}
}

View File

@ -40,15 +40,34 @@
{% endblock header %}
<div class="container">
{% block leftpanel %}
{% endblock leftpanel %}
<details class="panel" id="left-container">
<summary>
{{ icon('menu', 'icon icon-left') | raw }}
<div class="panel-desktop">
{{ block("leftpanel", "stdgrid.html.twig") }}
</div>
</summary>
<div class="panel-mobile">
{{ block("leftpanel", "stdgrid.html.twig") }}
</div>
</details>
{% block nav %}{% endblock %}
{% block body %}{% endblock %}
{% block javascripts %}{% endblock javascripts %}
{% block rightpanel %}
{% endblock rightpanel %}
<details class="panel" id="right-container">
<summary>
{{ icon('drop', 'icon icon-right') | raw }}
<div class="panel-desktop">
{{ block("rightpanel", "stdgrid.html.twig") }}
</div>
</summary>
<div class="panel-mobile">
{{ block("rightpanel", "stdgrid.html.twig") }}
</div>
</details>
</div>
</body>

View File

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

View File

@ -1,8 +1,9 @@
<details class="panel" id="right-container">
<summary>{{ icon('drop', 'icon icon-right') | raw }}</summary>
<div id='right-panel'>
{% if post_form is defined %}
{{ form_start(post_form) }}
{{ post_form }}
{#{{ form_start(post_form) }}
<div class="create-notice">
<div class="target">
<div class="target-top">
@ -41,7 +42,7 @@
</div>
</div>
</div>
{{ form_end(post_form) }}
{{ form_end(post_form) }}#}
{% endif %}
{% set current_path = app.request.get('_route') %}
@ -55,4 +56,3 @@
{% endfor %}
{% endif %}
</div>
</details>