[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:
parent
9519891b92
commit
868dbbd44e
@ -208,3 +208,15 @@ details[open] > div {
|
|||||||
transform: none;
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -40,15 +40,34 @@
|
|||||||
{% endblock header %}
|
{% endblock header %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% block leftpanel %}
|
<details class="panel" id="left-container">
|
||||||
{% endblock leftpanel %}
|
<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 nav %}{% endblock %}
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
{% block javascripts %}{% endblock javascripts %}
|
{% block javascripts %}{% endblock javascripts %}
|
||||||
|
|
||||||
{% block rightpanel %}
|
<details class="panel" id="right-container">
|
||||||
{% endblock rightpanel %}
|
<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>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,71 +1,66 @@
|
|||||||
<details class="panel" id="left-container">
|
{% if app.user %}
|
||||||
|
<div id='left-panel'>
|
||||||
<summary>{{ icon('menu', 'icon icon-left') | raw }}</summary>
|
<div class='navbar'>
|
||||||
{% if app.user %}
|
<div class="left-nav">
|
||||||
<div id='left-panel'>
|
<div class='profile'>
|
||||||
<div class='navbar'>
|
{% for extra in profile_extras %}
|
||||||
<div class="left-nav">
|
{% include '/'~ extra.name ~ '/view.html.twig' with {'vars': extra.vars} only %}
|
||||||
<div class='profile'>
|
|
||||||
{% for extra in profile_extras %}
|
|
||||||
{% include '/'~ extra.name ~ '/view.html.twig' with {'vars': extra.vars} only %}
|
|
||||||
{% endfor %}
|
|
||||||
<a href="{{ path('settings_avatar') }}">
|
|
||||||
<img src='{{ user_avatar }}' alt="Your avatar." class="icon icon-avatar">
|
|
||||||
</a>
|
|
||||||
<a href="{{ path('settings_personal_info') }}">
|
|
||||||
<div class="info">
|
|
||||||
<b id="nick">{{ user_nickname }}</b>
|
|
||||||
<div class="tags">
|
|
||||||
{% if user_tags %}
|
|
||||||
{% for tag in user_tags %}
|
|
||||||
<a href='#'><i> #{{ tag }} </i></a>
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<i> {{ '(No tags)' | trans }} </i>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="stats">
|
|
||||||
<span> <b> {{ user_followers }} </b> {{ 'Followers' | trans }} </span>
|
|
||||||
<span> <b> {{ user_followed }} </b> {{ 'Followed' | trans }} </span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<a href='#'>Messages</a>
|
|
||||||
<a href="{{ path("replies", {'nickname' : user_nickname}) }}"
|
|
||||||
class='hover-effect {{ active("replies") }}'>Replies</a>
|
|
||||||
{% for link in handle_event('InsertLeftPanelLink', user_nickname) %}
|
|
||||||
{{ link | raw }}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{{ path('settings_personal_info') }}"
|
<a href="{{ path('settings_avatar') }}">
|
||||||
class='hover-effect {{ active('settings_') }}'>Settings</a>
|
<img src='{{ user_avatar }}' alt="Your avatar." class="icon icon-avatar">
|
||||||
<a href='{{ path('logout') }}'>Logout</a>
|
</a>
|
||||||
</div>
|
<a href="{{ path('settings_personal_info') }}">
|
||||||
<div class="footer">
|
<div class="info">
|
||||||
<a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a>
|
<b id="nick">{{ user_nickname }}</b>
|
||||||
<a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a>
|
<div class="tags">
|
||||||
<a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</a>
|
{% if user_tags %}
|
||||||
<a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a>
|
{% for tag in user_tags %}
|
||||||
<a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a>
|
<a href='#'><i> #{{ tag }} </i></a>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<i> {{ '(No tags)' | trans }} </i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="stats">
|
||||||
|
<span> <b> {{ user_followers }} </b> {{ 'Followers' | trans }} </span>
|
||||||
|
<span> <b> {{ user_followed }} </b> {{ 'Followed' | trans }} </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<a href='#'>Messages</a>
|
||||||
|
<a href="{{ path("replies", {'nickname' : user_nickname}) }}"
|
||||||
|
class='hover-effect {{ active("replies") }}'>Replies</a>
|
||||||
|
{% for link in handle_event('InsertLeftPanelLink', user_nickname) %}
|
||||||
|
{{ link | raw }}
|
||||||
|
{% endfor %}
|
||||||
|
<a href="{{ path('settings_personal_info') }}"
|
||||||
|
class='hover-effect {{ active('settings_') }}'>Settings</a>
|
||||||
|
<a href='{{ path('logout') }}'>Logout</a>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a>
|
||||||
|
<a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a>
|
||||||
|
<a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
</div>
|
||||||
<div id='left-panel'>
|
{% else %}
|
||||||
<div class='navbar'>
|
<div id='left-panel'>
|
||||||
<div class="left-nav">
|
<div class='navbar'>
|
||||||
<a href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>Login</a>
|
<div class="left-nav">
|
||||||
<a href="{{ path('register') }}">Register</a>
|
<a href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>Login</a>
|
||||||
</div>
|
<a href="{{ path('register') }}">Register</a>
|
||||||
<div class="footer">
|
</div>
|
||||||
<a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a>
|
<div class="footer">
|
||||||
<a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a>
|
<a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a>
|
||||||
<a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</a>
|
<a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a>
|
||||||
<a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a>
|
<a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</a>
|
||||||
<a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a>
|
<a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a>
|
||||||
</div>
|
<a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
</details>
|
{% endif %}
|
||||||
|
|
||||||
|
@ -1,58 +1,58 @@
|
|||||||
<details class="panel" id="right-container">
|
<div id='right-panel'>
|
||||||
<summary>{{ icon('drop', 'icon icon-right') | raw }}</summary>
|
|
||||||
<div id='right-panel'>
|
{% if post_form is defined %}
|
||||||
{% if post_form is defined %}
|
{{ post_form }}
|
||||||
{{ form_start(post_form) }}
|
|
||||||
<div class="create-notice">
|
{#{{ form_start(post_form) }}
|
||||||
<div class="target">
|
<div class="create-notice">
|
||||||
<div class="target-top">
|
<div class="target">
|
||||||
{{ form_label(post_form.to) }}
|
<div class="target-top">
|
||||||
|
{{ form_label(post_form.to) }}
|
||||||
|
</div>
|
||||||
|
<div class="target-bot">
|
||||||
|
{{ form_widget(post_form.to) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="create-right">
|
||||||
|
<div class="create-top-right">
|
||||||
|
<div class="scope">
|
||||||
|
{{ form_row(post_form.visibility) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="target-bot">
|
<div class="tabs">
|
||||||
{{ form_widget(post_form.to) }}
|
{% for tab in tabs %}
|
||||||
|
<a href={{ path(tab['href']) }}>{{ tab['title'] }}</a>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="create-right">
|
<div class="input-wrapper">
|
||||||
<div class="create-top-right">
|
<div class="content-input">
|
||||||
<div class="scope">
|
{{ form_row(post_form.content) }}
|
||||||
{{ form_row(post_form.visibility) }}
|
|
||||||
</div>
|
|
||||||
<div class="tabs">
|
|
||||||
{% for tab in tabs %}
|
|
||||||
<a href={{ path(tab['href']) }}>{{ tab['title'] }}</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="input-wrapper">
|
</div>
|
||||||
<div class="content-input">
|
<div class="notice-options">
|
||||||
{{ form_row(post_form.content) }}
|
<div class="attachments">
|
||||||
</div>
|
{{ form_widget(post_form.attachments) }}
|
||||||
|
<label for="{{ post_form.attachments.vars.id }}">
|
||||||
|
{{ icon('attach', 'icon icon-attach') | raw }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="notice-options">
|
<div class="post">
|
||||||
<div class="attachments">
|
{{ form_row(post_form.post) }}
|
||||||
{{ form_widget(post_form.attachments) }}
|
|
||||||
<label for="{{ post_form.attachments.vars.id }}">
|
|
||||||
{{ icon('attach', 'icon icon-attach') | raw }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
{{ form_row(post_form.post) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ form_end(post_form) }}
|
</div>
|
||||||
{% endif %}
|
{{ form_end(post_form) }}#}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% set current_path = app.request.get('_route') %}
|
{% set current_path = app.request.get('_route') %}
|
||||||
{% if right_panel_vars is defined %}
|
{% if right_panel_vars is defined %}
|
||||||
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path, 'vars': right_panel_vars}) %}
|
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path, 'vars': right_panel_vars}) %}
|
||||||
{{ block | raw }}
|
{{ block | raw }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path}) %}
|
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path}) %}
|
||||||
{{ block | raw }}
|
{{ block | raw }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</details>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user