Restyle footer and add FAQ

This commit is contained in:
Jannis Portmann 2022-01-19 12:49:07 +01:00
parent 9d640b9fd3
commit ed481d9083
5 changed files with 141 additions and 80 deletions

View file

@ -8,7 +8,7 @@ $primary: darken(#005035, 20%);
footer { footer {
background-color: #ddd; background-color: #ddd;
height: 6rem; height: auto;
} }
nav { nav {
@ -68,6 +68,11 @@ nav {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.link-list {
list-style: none;
padding: 0;
}
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
.show-img-container { .show-img-container {
margin-right: 2rem; margin-right: 2rem;

View file

@ -50,4 +50,4 @@ security:
access_control: access_control:
- { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin, roles: ROLE_ADMIN } - { path: ^/admin, roles: ROLE_ADMIN }
- { path: ^(?!/(login|register|reset-password|offers|offer/*|imprint)), roles: ROLE_USER } - { path: ^(?!/(login|register|reset-password|offers|offer/*|imprint|faq)), roles: ROLE_USER }

View file

@ -21,4 +21,10 @@ class AppController extends AbstractController
{ {
return $this->render('app/imprint.html.twig'); return $this->render('app/imprint.html.twig');
} }
#[Route('/faq', name: 'faq')]
public function faq(): Response
{
return $this->render('app/faq.html.twig');
}
} }

View file

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}Privacy Policy{% endblock %}
{% block body %}
<h1 class="mb-3">Frequently Asked Questions</h1>
<h2 class="mb-3">Is it free?</h2>
<p>Yes, pflänz.li is free to use and its source code is <a href="https://git.thisfro.ch/thisfro/pflaenz.li">publically accessible</a>.</p>
<h2 class="mb-3">Can I help?</h2>
Yes, feel free to contact <a href="mailto:jannis@thisfro.ch">@thisfro</a>!</p>
{% endblock %}

View file

@ -2,7 +2,9 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Pflänz.li - {% block title %}{% endblock %}</title> <title>Pflänz.li -
{% block title %}{% endblock %}
</title>
{% block stylesheets %} {% block stylesheets %}
{{ encore_entry_link_tags('app') }} {{ encore_entry_link_tags('app') }}
@ -14,16 +16,23 @@
<!-- Matomo --> <!-- Matomo -->
<script> <script>
var _paq = window._paq = window._paq || []; var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function () {
var u="//analytics.thisfro.ch/"; var u = "//analytics.thisfro.ch/";
_paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push([
_paq.push(['setSiteId', '2']); 'setTrackerUrl',
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; u + 'matomo.php'
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); ]);
})(); _paq.push(['setSiteId', '2']);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
</script> </script>
<!-- End Matomo Code --> <!-- End Matomo Code -->
{% endblock %} {% endblock %}
@ -32,7 +41,8 @@
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="{{ path('homepage') }}"><i class="fas fa-seedling"></i>Pflänz.li</a> <a class="navbar-brand" href="{{ path('homepage') }}">
<i class="fas fa-seedling"></i>Pflänz.li</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
@ -40,19 +50,31 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href=" {{ path('offers') }} "><i class="fas fa-seedling"></i> Offers</a> <a class="nav-link" href=" {{ path('offers') }} ">
<i class="fas fa-seedling"></i>
Offers</a>
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fas fa-user"></i> User</a> <a class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-user"></i>
User</a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<a class="dropdown-item" href="{{ path('own_offers') }}"><i class="fas fa-seedling"></i> My Offers</a> <a class="dropdown-item" href="{{ path('own_offers') }}">
<a class="dropdown-item" href="{{ path('wishlist') }}"><i class="fas fa-star"></i> Wishlist</a> <i class="fas fa-seedling"></i>
My Offers</a>
<a class="dropdown-item" href="{{ path('wishlist') }}">
<i class="fas fa-star"></i>
Wishlist</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ path('user_page') }}"><i class="fas fa-user"></i> User settings</a> <a class="dropdown-item" href="{{ path('user_page') }}">
<i class="fas fa-user"></i>
User settings</a>
</div> </div>
</li> </li>
<li> <li>
<a class="nav-link" href="{{ path('new_offer') }}"><i class="fas fa-plus-square"></i> New Offer</a> <a class="nav-link" href="{{ path('new_offer') }}">
<i class="fas fa-plus-square"></i>
New Offer</a>
</li> </li>
</ul> </ul>
<span> <span>
@ -65,22 +87,39 @@
</div> </div>
</nav> </nav>
<div class="container pt-5"> <div class="container pt-5"> {% block body %}{% endblock %}
{% block body %}{% endblock %}
</div> </div>
<footer class="text-center text-white"> <footer class="text-dark p-3">
<div class="pt-1"> <div class="row">
<div class="col-lg"></div>
<div class="col-lg text-center pt-3">
<section class="mb-1"> <section class="mb-1">
<h2 class="d-none">Footer Links</h2> <h2 class="d-none">Social Links</h2>
<a class="btn btn-link btn-floating btn-lg text-dark m-1" href="https://mastodon.social/" role="button" data-mdb-ripple-color="dark"><i class="fab fa-mastodon"></i></a> <a class="btn btn-link btn-floating btn-lg text-dark m-1" href="https://mastodon.social/" role="button" data-mdb-ripple-color="dark">
<a class="btn btn-link btn-floating btn-lg text-dark m-1" href="https://git.thisfro.ch/thisfro/pflaenz.li" role="button" data-mdb-ripple-color="dark"><i class="fab fa-git-alt"></i></a> <i class="fab fa-mastodon"></i>
</a>
<a class="btn btn-link btn-floating btn-lg text-dark m-1" href="https://git.thisfro.ch/thisfro/pflaenz.li" role="button" data-mdb-ripple-color="dark">
<i class="fab fa-git-alt"></i>
</a>
</section> </section>
</div> </div>
<div class="text-center text-dark"> <div class="col-lg pt-4">
<a href="https://creativecommons.org"><i class="fab fa-creative-commons"></i><i class="fab fa-creative-commons-by"></i></a> <section>
<a class="text-dark" href="{{ path('homepage') }}">pflänz.li</a> <h2 class="h5">Links</h2>
<ul class="link-list">
<li><a href="https://blog.pflänz.li">Blog</a></li>
<li><a href="{{ path('imprint') }}">Imprint</a></li>
<li><a href="{{ path('faq') }}">FAQ</a></li>
</ul>
</section>
</div>
</div>
<div class="row pt-3">
<div class="text-center text-dark w-100">
<a class="text-dark" href="{{ path('homepage') }}"><i class="far fa-copyright mr-1"></i>{{ 'now' | date('Y') }} pflänz.li</a>
</div>
</div> </div>
</footer> </footer>
</body> </body>
</html> </html>