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 {
background-color: #ddd;
height: 6rem;
height: auto;
}
nav {
@ -68,6 +68,11 @@ nav {
margin-bottom: 0 !important;
}
.link-list {
list-style: none;
padding: 0;
}
@include media-breakpoint-up(sm) {
.show-img-container {
margin-right: 2rem;

View file

@ -50,4 +50,4 @@ security:
access_control:
- { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { 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');
}
#[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

@ -1,86 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pflänz.li - {% block title %}{% endblock %}</title>
<head>
<meta charset="UTF-8">
<title>Pflänz.li -
{% block title %}{% endblock %}
</title>
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.thisfro.ch/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_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>
<!-- End Matomo Code -->
{% endblock %}
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "//analytics.thisfro.ch/";
_paq.push([
'setTrackerUrl',
u + 'matomo.php'
]);
_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>
<!-- End Matomo Code -->
{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<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>
<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>
</button>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<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>
<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>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href=" {{ path('offers') }} "><i class="fas fa-seedling"></i> Offers</a>
</li>
<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>
<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('wishlist') }}"><i class="fas fa-star"></i> Wishlist</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ path('user_page') }}"><i class="fas fa-user"></i> User settings</a>
</div>
</li>
<li>
<a class="nav-link" href="{{ path('new_offer') }}"><i class="fas fa-plus-square"></i> New Offer</a>
</li>
</ul>
<span>
{% if is_granted('ROLE_USER') %}
<a class="btn btn-light" href="{{ path('app_logout') }}">Log out</a>
{% else %}
<a class="btn btn-light" href="{{ path('app_login') }}">Log in</a>
{% endif %}
</span>
</div>
</nav>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href=" {{ path('offers') }} ">
<i class="fas fa-seedling"></i>
Offers</a>
</li>
<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>
<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('wishlist') }}">
<i class="fas fa-star"></i>
Wishlist</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ path('user_page') }}">
<i class="fas fa-user"></i>
User settings</a>
</div>
</li>
<li>
<a class="nav-link" href="{{ path('new_offer') }}">
<i class="fas fa-plus-square"></i>
New Offer</a>
</li>
</ul>
<span>
{% if is_granted('ROLE_USER') %}
<a class="btn btn-light" href="{{ path('app_logout') }}">Log out</a>
{% else %}
<a class="btn btn-light" href="{{ path('app_login') }}">Log in</a>
{% endif %}
</span>
</div>
</nav>
<div class="container pt-5">
{% block body %}{% endblock %}
</div>
<div class="container pt-5"> {% block body %}{% endblock %}
</div>
<footer class="text-center text-white">
<div class="pt-1">
<section class="mb-1">
<h2 class="d-none">Footer 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://git.thisfro.ch/thisfro/pflaenz.li" role="button" data-mdb-ripple-color="dark"><i class="fab fa-git-alt"></i></a>
</section>
</div>
<div class="text-center text-dark">
<a href="https://creativecommons.org"><i class="fab fa-creative-commons"></i><i class="fab fa-creative-commons-by"></i></a>
<a class="text-dark" href="{{ path('homepage') }}">pflänz.li</a>
</div>
</footer>
</body>
</html>
<footer class="text-dark p-3">
<div class="row">
<div class="col-lg"></div>
<div class="col-lg text-center pt-3">
<section class="mb-1">
<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://git.thisfro.ch/thisfro/pflaenz.li" role="button" data-mdb-ripple-color="dark">
<i class="fab fa-git-alt"></i>
</a>
</section>
</div>
<div class="col-lg pt-4">
<section>
<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>
</footer>
</body>
</html>