[SECURITY] We can't really show a stream for this, was a nice concept, but not properly doable without requiring JS
This commit is contained in:
parent
d11615ded6
commit
29a215534d
|
@ -1,14 +1,12 @@
|
|||
.content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: calc(4 * var(--main-size));
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: var(--small-size);
|
||||
margin-left: var(--small-size);
|
||||
margin-bottom: var(--unit-size);
|
||||
}
|
||||
.navbar .left-nav > a {
|
||||
font-size: var(--unit-size);
|
||||
margin-left: 1%;
|
||||
margin-right: 1%;
|
||||
margin-bottom: 1%;
|
||||
}
|
||||
form {
|
||||
font-size: var(--medium-size);
|
|
@ -2,130 +2,45 @@
|
|||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/login/login.css') }}">
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/security/security.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Log in!{% endblock %}
|
||||
|
||||
{% block left %}
|
||||
<div id='left-panel'>
|
||||
<input type="checkbox" checked id="toggle">
|
||||
<div class="icon-menu">
|
||||
<label for="toggle" id='menu'></label>
|
||||
</div>
|
||||
<div class='navbar'>
|
||||
<div class="left-nav">
|
||||
<a href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>Login</a>
|
||||
<div class='content'>
|
||||
<form method="post">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if app.user %}
|
||||
<div class="mb-3">
|
||||
You are logged in as {{ app.user.username }}, <a
|
||||
href="{{ path('app_logout') }}">Logout</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="register-info">
|
||||
<label for="inputNickname">Nickname</label>
|
||||
<input type="text" value="{{ last_username }}" name="nickname" id="inputNickname"
|
||||
class="form-control" required autofocus>
|
||||
<label for="inputPassword">Password</label>
|
||||
<input type="password" name="password" id="inputPassword" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
Sign in
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<a href="{{ path('register') }}" class='hover-effect {{ active('register') }}'>Register</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>
|
||||
{% 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>
|
||||
<div class='content'>
|
||||
<form method="post">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
{% endif %}
|
||||
|
||||
</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 %}
|
||||
{% if app.user %}
|
||||
<div class="mb-3">
|
||||
You are logged in as {{ app.user.username }}, <a
|
||||
href="{{ path('app_logout') }}">Logout</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="register-info">
|
||||
<label for="inputNickname">Nickname</label>
|
||||
<input type="text" value="{{ last_username }}" name="nickname" id="inputNickname"
|
||||
class="form-control" required autofocus>
|
||||
<label for="inputPassword">Password</label>
|
||||
<input type="password" name="password" id="inputPassword" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
Sign in
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
||||
{% block javascripts %}{% endblock %}
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
<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>
|
|
@ -2,104 +2,19 @@
|
|||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/login/login.css') }}">
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/security/security.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Register{% endblock %}
|
||||
|
||||
{% block left %}
|
||||
<div id='left-panel'>
|
||||
<input type="checkbox" checked id="toggle">
|
||||
<div class="icon-menu">
|
||||
<label for="toggle" id='menu'></label>
|
||||
</div>
|
||||
<div class='navbar'>
|
||||
<div class="left-nav">
|
||||
<a href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>Login</a>
|
||||
<a href="{{ path('register') }}" class='hover-effect {{ active('register') }}'>Register</a>
|
||||
<div class='content'>
|
||||
{% for flashError in app.flashes('verify_email_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="register-info">
|
||||
{{ form(registration_form) }}
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
{% 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>
|
||||
<div class='content'>
|
||||
{% for flashError in app.flashes('verify_email_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||
{% endfor %}
|
||||
|
||||
</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 class="register-info">
|
||||
{{ form(registration_form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user