finished user prfile and passwords

This commit is contained in:
2022-11-01 14:57:36 +01:00
parent a488e489da
commit 560e96cf18
61 changed files with 1581 additions and 852 deletions

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

@ -21,7 +21,7 @@
{% if is_granted('ROLE_USER') %}
<li class="nav-item dropdown me-auto">
<button type="button" id="navbar-dropdown" data-bs-target="#dropdown-menu" data-bs-toggle="dropdown"
class="btn btn-primary dropdown-toggle ml-auto mb-2 button-login">
class="btn btn-primary dropdown-toggle button-login">
{{ app.user.username }}
</button>

@ -38,36 +38,36 @@
{% include '@default/_header.html.twig' %}
<!-- sidebar -->
<nav id="sidebar" class="m-3">
<ul class="list-group ml1" id="main-menu">
<li class="list-group-item list-group-item-action">
<a href="{{ path('app_projects') }}" class="text-decoration-none">
<i class="fa fa-lg fa-fw fa-file-code-o" aria-hidden="true" title="Projects"></i>
<span class="menuText">&nbsp;Projects</span>
</a>
</li>
<li class="list-group-item list-group-item-action">
<a href="//git.24unix.net" class="text-decoration-none" target="_blank">
<i class="fa fa-lg fa-fw fa-gitea" aria-hidden="true" title="Gitea"></i>
<span class="menuText">&nbsp;Gitea</span>
</a>
<span class="menuText"><i class="fa fa-external-link" aria-hidden="true"></i></span>
</li>
<li class="list-group-item list-group-item-action">
<a href="//cloud.24unix.net" class="text-decoration-none" target="_blank">
<i class="fa fa-lg fa-fw fa-nextcloud" aria-hidden="true" title="NextCloud"></i>
<span class="menuText">&nbsp;NextCloud</span>
</a>
<span class="menuText"><i class="fa fa-external-link" aria-hidden="true"></i></span>
</li>
<li class="list-group-item list-group-item-action">
<a href="#" id="toggleSidebar">
<i id="toggleIcon" class="fa fa-lg fa-caret-square-o-left"></i>
</a>
</li>
<!-- <a href="//pastebin.24unix.net">pastebin.24unix.net</a>-->
</ul>
</nav>
<nav id="sidebar" class="m-3">
<ul class="list-group ml1" id="main-menu">
<li class="list-group-item list-group-item-action">
<a href="{{ path('app_projects') }}" class="text-decoration-none">
<i class="fa fa-lg fa-fw fa-file-code-o" aria-hidden="true" title="Projects"></i>
<span class="menuText">&nbsp;Projects</span>
</a>
</li>
<li class="list-group-item list-group-item-action">
<a href="//git.24unix.net" class="text-decoration-none" target="_blank">
<i class="fa fa-lg fa-fw fa-gitea" aria-hidden="true" title="Gitea"></i>
<span class="menuText">&nbsp;Gitea</span>
</a>
<span class="menuText"><i class="fa fa-external-link" aria-hidden="true"></i></span>
</li>
<li class="list-group-item list-group-item-action">
<a href="//cloud.24unix.net" class="text-decoration-none" target="_blank">
<i class="fa fa-lg fa-fw fa-nextcloud" aria-hidden="true" title="NextCloud"></i>
<span class="menuText">&nbsp;NextCloud</span>
</a>
<span class="menuText"><i class="fa fa-external-link" aria-hidden="true"></i></span>
</li>
<li class="list-group-item list-group-item-action">
<a href="#" id="toggleSidebar">
<i id="toggleIcon" class="fa fa-lg fa-caret-square-o-left"></i>
</a>
</li>
<!-- <a href="//pastebin.24unix.net">pastebin.24unix.net</a>-->
</ul>
</nav>
<div class="container-fluid" id="content">
{% for message in app.flashes('success') %}
@ -82,7 +82,7 @@
</div>
{% endfor %}
<div class="col">
<div class="col m-3" id="main_content">
{% block body %}
<h1 class="q-title-show">Quote of the Moment</h1>
<div class="q-display p-3">

@ -1,13 +1,16 @@
{% extends template_dir ~ 'base.html.twig' %}
{% extends '@default/base.html.twig' %}
{% block title %}Imprint{% endblock %}
{% block body %}
<div class="imprint-wrapper">
<p>This page is only available in German, as the server is located in Germany.</p>
<h2>This page is only available in German, as the server is located in Germany.</h2>
<p>Inhaltlich Verantwortlicher gemäß § 55 Abs. 2RStV: Michael Espey, Große Kirchreihe 27, 25377 Kollmar</p>
<p>Inhaltlich Verantwortlicher gemäß § 55 Abs. 2RStV:<br><br>
Michael Espey<br>
Große Kirchreihe 27<br>
25377 Kollmar</p>
<p>eMail: webmaster (AT) 24unix.net</p>

@ -1,4 +1,4 @@
{% extends template_dir ~'base.html.twig' %}
{% extends '@default/base.html.twig' %}
{% block title %}Privacy{% endblock %}

@ -0,0 +1,70 @@
{# templates/projects/index.html.twig #}
{% extends '@default/base.html.twig' %}
{% block title %} Projects {% endblock %}
{% block body %}
<div class="container-fluid box">
<div class="row">
<h2>This is an overview of my current public (and open source) projects.</h2>
<!-- projects List -->
<div class="col-sm-12">
{% for project in projects %}
<div class="project-container bg-dark my-4">
<div class="row">
<div class="col-sm-3">
<a href="{{ path('app_projects', { name: project.name }) }}">
{% if project.teaserImage %}
<img
class="blog-img"
src="/uploads/projects/{{ project.teaserImage }}"
alt="Teaser">
{% else %}
<img
class="blog-img"
src="{{ asset('build/images/24unix/24_logo_bg_96x96.png') }}"
alt="Teaser">
{% endif %}
</a>
<br>
<div>
{% for developer in project.developer %}
<a class="align-left blog-details"
href="{{ path('app_profile', { 'username':developer.username }) }}">
<img class="article-author-img rounded-circle"
src="{{ asset('build/images/tracer_schmolle.png') }}"
alt="profile"></a>
<a href="{{ path('app_profile', { 'username':developer.username }) }}">{{ developer.username }}</a>
{% endfor %}
</div>
</div>
<div class="col-sm-8 mt-2">
<a href="{{ path('app_projects', { name: project.name }) }}">
<div class="article-title d-inline-block pl-3 align-middle">
<h2>{{ project.name }}</h2>
</div>
</a>
<br>
<div class="blog-teaser mb-2 pb-2 text-xl-start">
{{ project.description }}
<br>
<br>
started: {{ project.createdAt | ago }}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% if is_granted('ROLE_ADMIN') %}
<div class="text-xl-start">
<a href="{{ path('app_main') }}"><i class="fa fa-plus-circle"></i></a>
</div>
{% endif %}
</div>
</div>
{% endblock %}

@ -0,0 +1,35 @@
{# templates/blog/blog_show.html.twig #}
{% extends '@default/base.html.twig' %}
{% block title %}Projects{% endblock %}
{% block body %}
<div class="row">
<div class="col-sm-12">
{% if is_granted('ROLE_ADMIN') %}
<div class="d-flex justify-content-end">
<a href="{{ path('app_main', { id : project.id }) }}"><i class="fa fa-3x fa-fw fa-edit"></i></a>
<a href="{{ path('app_main', { id : project.id }) }}"><i class="fa fa-3x fa-fw fa-trash"></i></a>
</div>
{% endif %}
<div class="show-article-container p-3 mt-4">
<div class="show-article-title-container d-inline-block pl-3 align-middle">
<h2>{{ project.name }}</h2>
</div>
<div>
Source: <a href="{{ project.url }}" target="_blank">{{ project.url }}</a>&nbsp;<i
class="fa fa-external-link" aria-hidden="true"></i>
</div>
<div class="row">
<div class="col-sm-12">
<div class="article-text">
{{ readme | markdown_to_html }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

@ -0,0 +1,22 @@
{% extends '@default/base.html.twig' %}
{% block title %}Reset your password{% endblock %}
{% block body %}
{% for flash_error in app.flashes('reset_password_error') %}
<div class="alert alert-danger" role="alert">{{ flash_error }}</div>
{% endfor %}
<h1>Reset your password</h1>
{{ form_start(requestForm) }}
{{ form_row(requestForm.account) }}
<div>
<small>
Enter your email address or your username and we will send you a
link to reset your password.
</small>
</div>
<button class="btn btn-primary float-end">Send password reset email</button>
{{ form_end(requestForm) }}
{% endblock %}

@ -1,23 +1,27 @@
{% extends '../themes/default/base.html.twig' %}
{% extends '@default/base.html.twig' %}
{% block title %}Log In!{% endblock %}
{% block body %}
<div class="container box">
<div class="container rounded">
<div class="row">
<div class="login-form bg-dark mt-4 p-4">
<form method="post" class="row g-3">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
{% if error %}
{% if error %}
<div class="alert-dark alert-danger">
{{ error.messageKey|trans(error.messageData, 'security') }}
</div>
{% endif %}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="col-12">
<label for="inputEmail">Username or eMail</label>
<input type="text" name="username" id="inputUsername" class="form-control" value="{{ last_username }}" required autofocus>
<label for="inputUsername">Username or eMail</label>
<input type="text" name="username" id="inputUsername"
class="form-control" {# value="{{ last_username }}" #} required autofocus>
</div>
<div class="col-12">
<label for="inputPassword">Password</label>
@ -28,13 +32,9 @@
<input type="checkbox" name="_remember_me" class="form-check-input">Remember me
</label>
</div>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="col-12">
<button class="btn btn-lg btn-primary float-end" type="submit">
Sign in
</button>
</div>
<button class="btn btn-lg btn-primary float-end" type="submit">
Sign in
</button>
</form>
</div>
</div>

@ -0,0 +1,9 @@
<h1>Hi!</h1>
<p>To reset your password, please visit the following link</p>
<a href="{{ url('security_recovery_reset', {token: resetToken.token}) }}">Reset password</a>
<p>This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.</p>
<p>Cheers!</p>

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" style="margin:0;padding:0;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<style type="text/css">
@media screen and (max-width: 599px) {
div {
max-width: 100% !important;
}
}
body {
background-color: #1e1f1e;
margin:25px;
padding:0;
}
</style>
</head>
<body>
<div style="border-collapse:collapse;border-spacing:0;">
<h1>Hi {{ username }}, please confirm your email!</h1>
<p>
Please confirm your email address by clicking the following link: <br><br>
<a href="{{ signedUrl|raw }}">Confirm my Email</a>.
<br>
This link will expire in {{ expiresAtMessageKey|trans(expiresAtMessageData, 'VerifyEmailBundle') }}.
</p>
<p>
Kind regards,
24unix.net
</p>
</div>
</body>
</html>

@ -0,0 +1,11 @@
{% extends '@default/base.html.twig' %}
{% block title %}Password Reset Email Sent{% endblock %}
{% block body %}
<p>
If an account matching your email exists, then an email was just sent that contains a link that you can use to reset your password.
This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.
</p>
<p>If you don't receive an email please check your spam folder or <a href="{{ path('security_forgot_password') }}">try again</a>.</p>
{% endblock %}

@ -0,0 +1,60 @@
{% extends '@default/base.html.twig' %}
{% form_theme registrationForm _self %}
{% block title %}Register{% endblock %}
{% block form_row %}
{%- set widget_attr = {} -%}
{%- if help is not empty -%}
{%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%}
{%- endif -%}
{{- form_label(form, null, {
label_attr: { class: 'sr-only' }
}) -}}
{{- form_errors(form) -}}
{{- form_widget(form, widget_attr) -}}
{{- form_help(form) -}}
{% endblock %}
{% block body %}
{% for flash_error in app.flashes('verify_email_error') %}
<div class="alert alert-danger" role="alert">{{ flash_error }}</div>
{% endfor %}
<div class="container rounded">
<div class="row">
<div class="login-form bg-dark mt-4 p-4">
<h1 class="h3 mb-3 font-weight-normal">Register</h1>
{{ form_start(registrationForm, {
attr: { class: 'form-signin' }
}) }}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
{{ form_row(registrationForm.username, {
attr: { placeholder: 'User name' }
}) }}
{{ form_row(registrationForm.email, {
attr: { placeholder: 'eMail' }
}) }}
{{ form_row(registrationForm.password.first, {
attr: { placeholder: 'Password'}
}) }}
{{ form_row(registrationForm.password.second, {
attr: { placeholder: 'Confirm password'}
}) }}
{{ form_row(registrationForm.agreeTerms) }}
<button type="submit" class="btn btn-primary float-end">Register</button>
{{ form_end(registrationForm) }}
</div>
</div>
</div>
{% endblock %}

@ -0,0 +1,19 @@
{% extends '@default/base.html.twig' %}
{% block title %}Registration finished{% endblock %}
{% block body %}
<div class="container rounded">
<div class="row">
<div class="login-form bg-dark mt-4 p-4">
<h1 class="h3 mb-3 font-weight-normal">Registration finished</h1>
<p>You'll receive an email soon to confirm your identity.</p>
</div>
</div>
</div>
{% endblock %}

@ -0,0 +1,12 @@
{% extends '@default/base.html.twig' %}
{% block title %}Reset your password{% endblock %}
{% block body %}
<h1>Reset your password</h1>
{{ form_start(resetForm) }}
{{ form_row(resetForm.plainPassword) }}
<button class="btn btn-primary">Reset password</button>
{{ form_end(resetForm) }}
{% endblock %}

@ -1,4 +1,4 @@
{% extends '../themes/default/base.html.twig' %}
{% extends '@default/base.html.twig' %}
{% block title %}
Profile of {{ user.username }}
@ -13,37 +13,29 @@
<img class="rounded-circle mt-5"
width="150px"
src=" {{ asset('build/images/tracer_schmolle150x150.png') }}" alt="profile image">
<span class="font-weight-bold">{{ user.username }}</span>
<span class="text-white-50"><i class="fa fa-lg fa-envelope me-1"></i>{{ user.email }}</span>
</div>
</div>
<div class="col-md-5 border-right">
{{ form_start(userForm) }}
<div class="p-3 py-5">
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="text-right">User Profile</h4>
</div>
<div class="row mt-2">
<div class="col-md-6">
<label class="labels" for="first-name">First Name</label>
<input type="text" id="first-name" class="form-control" placeholder="First Name" value="{{ user.firstName }}">
</div>
<div class="col-md-6">
<label class="labels" for="last-name">Last Name</label>
<input type="text" id="last-name" class="form-control" value="{{ user.lastName }}" placeholder="Last Name">
</div>
{{ form_row(userForm.username) }}
{{ form_row(userForm.firstName) }}
{{ form_row(userForm.lastName) }}
{{ form_row(userForm.email) }}
{{ form_row(userForm.newPassword.first) }}
{{ form_row(userForm.newPassword.second) }}
{{ form_rest(userForm) }}
</div>
<div class="col-md-6">
<label class="labels" for="username">Username</label>
<input type="text" class="form-control" id="username" placeholder="eMail address" value="{{ user.email }}">
<div class="mb-5 text-center float-end">
<button class="btn btn-primary profile-button" type="submit">Save Profile</button>
</div>
<!--
<div class="mt-5 text-center">
<button class="btn btn-primary profile-button" type="button">Save Profile</button>
</div>
-->
</div>
</div>
</div>

@ -1,4 +1,4 @@
{% extends '../themes/default/base.html.twig' %}
{% extends '@default/base.html.twig' %}
{% block title %}
Profile of {{ user.username }}