forked from GNUsocial/gnu-social
[UI] Extracted public stream on login/register pages to a twig template
This commit is contained in:
parent
ac480e5018
commit
9351039a3b
@ -63,69 +63,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
{% if post_form is defined %}
|
||||
{{ form_start(post_form) }}
|
||||
<div class="create-notice">
|
||||
<div class="target">
|
||||
<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="scope">
|
||||
{{ form_row(post_form.visibility) }}
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<div class="content-input">
|
||||
{{ form_row(post_form.content) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice-options">
|
||||
<div class="attachments">
|
||||
{{ form_widget(post_form.attachments) }}
|
||||
<label for="{{ post_form.attachments.vars.id }}">
|
||||
<svg class="icon icon-attach">
|
||||
<use xlink:href="#icon-attach"></use>
|
||||
</svg>
|
||||
</label>
|
||||
</div>
|
||||
<div class="post">
|
||||
{{ form_row(post_form.post) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(post_form) }}
|
||||
{% endif %}
|
||||
<div class="main" id="login-main">
|
||||
<div class="notes-wrap" id="login-notes">
|
||||
<nav class='main-nav'>
|
||||
<ul>
|
||||
<li>
|
||||
<a class='hover-effect {{ active('login') }}'>Public</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="timeline">
|
||||
<div class="notes">
|
||||
{% if notes is defined and notes is not empty %}
|
||||
{% for note in notes %}
|
||||
{% set id = note.getId() - 1 %}
|
||||
{% include '/note/view.html.twig' with {'note': note, 'have_user': have_user} only %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h1>{% trans %}No notes here.{% endtrans %}</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
{% include '/security/public_stream.html.twig' with {'page': 'login'} %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}{% endblock %}
|
||||
|
63
templates/security/public_stream.html.twig
Normal file
63
templates/security/public_stream.html.twig
Normal file
@ -0,0 +1,63 @@
|
||||
<div class="content">
|
||||
{% if post_form is defined %}
|
||||
{{ form_start(post_form) }}
|
||||
<div class="create-notice">
|
||||
<div class="target">
|
||||
<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="scope">
|
||||
{{ form_row(post_form.visibility) }}
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<div class="content-input">
|
||||
{{ form_row(post_form.content) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice-options">
|
||||
<div class="attachments">
|
||||
{{ form_widget(post_form.attachments) }}
|
||||
<label for="{{ post_form.attachments.vars.id }}">
|
||||
<svg class="icon icon-attach">
|
||||
<use xlink:href="#icon-attach"></use>
|
||||
</svg>
|
||||
</label>
|
||||
</div>
|
||||
<div class="post">
|
||||
{{ form_row(post_form.post) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(post_form) }}
|
||||
{% endif %}
|
||||
<div class="main" id="login-main">
|
||||
<div class="notes-wrap" id="login-notes">
|
||||
<nav class='main-nav'>
|
||||
<ul>
|
||||
<li>
|
||||
<a class='hover-effect {{ active(page) }}'>Public</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="timeline">
|
||||
<div class="notes">
|
||||
{% if notes is defined and notes is not empty %}
|
||||
{% for note in notes %}
|
||||
{% set id = note.getId() - 1 %}
|
||||
{% include '/note/view.html.twig' with {'note': note, 'have_user': have_user} only %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h1>{% trans %}No notes here.{% endtrans %}</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -39,69 +39,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
{% if post_form is defined %}
|
||||
{{ form_start(post_form) }}
|
||||
<div class="create-notice">
|
||||
<div class="target">
|
||||
<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="scope">
|
||||
{{ form_row(post_form.visibility) }}
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<div class="content-input">
|
||||
{{ form_row(post_form.content) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice-options">
|
||||
<div class="attachments">
|
||||
{{ form_widget(post_form.attachments) }}
|
||||
<label for="{{ post_form.attachments.vars.id }}">
|
||||
<svg class="icon icon-attach">
|
||||
<use xlink:href="#icon-attach"></use>
|
||||
</svg>
|
||||
</label>
|
||||
</div>
|
||||
<div class="post">
|
||||
{{ form_row(post_form.post) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(post_form) }}
|
||||
{% endif %}
|
||||
<div class="main" id="login-main">
|
||||
<div class="notes-wrap" id="login-notes">
|
||||
<nav class='main-nav'>
|
||||
<ul>
|
||||
<li>
|
||||
<a class='hover-effect {{ active('register') }}'>Public</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="timeline">
|
||||
<div class="notes">
|
||||
{% if notes is defined and notes is not empty %}
|
||||
{% for note in notes %}
|
||||
{% set id = note.getId() - 1 %}
|
||||
{% include '/note/view.html.twig' with {'note': note, 'have_user': have_user} only %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h1>{% trans %}No notes here.{% endtrans %}</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
{% include '/security/public_stream.html.twig' with {'page': 'register'} %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user