add home page

This commit is contained in:
Simon Vieille 2020-11-11 21:50:16 +01:00
parent b3bd385cec
commit 9279176943
Signed by: deblan
GPG key ID: 03383D15A1D31745
5 changed files with 87 additions and 32 deletions

1
public/assets/icon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

@ -0,0 +1,18 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class AppController extends AbstractController
{
/**
* @Route("/", name="home")
*/
public function home(): Response
{
return $this->render('app/home.html.twig');
}
}

View file

@ -0,0 +1,30 @@
{% extends 'base.html.twig' %}
{% block title %}Mail RSS{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
#logo {
height: calc(100vh * 0.4)
}
</style>
{% endblock %}
{% block body %}
<div class="container-fluid">
<div class="row">
<div class="col-12 p-5 text-center">
<img id="logo" src="{{ asset('assets/icon.svg') }}" alt="Mail RSS">
</div>
<div class="col-12">
<p class="h4 p-2 text-center">
Développé par <a href="https://www.deblan.io" target="_blank">Simon Vieille</a>
et propulsé par <a href="https://gitnet.fr/deblan/mail-rss" target="_blank">Mail RSS</a>
</p>
</div>
</div>
</div>
{% endblock %}

View file

@ -2,8 +2,12 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}

View file

@ -1,32 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ mail.subject }}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<style>
body {
margin: 0;
padding: 10px 0 0 0;
}
{% extends 'base.html.twig' %}
.col-12 {
padding: 0;
}
{% block title %}{{ mail.subject }} - {{ mail.mailing.label }}{% endblock %}
.nav-tabs {
padding-left: 20px;
}
iframe {
width: 100%;
height: calc(100vh - 50px);
border: 0;
}
</style>
</head>
<body>
{% block body %}
<div class="container-fluid">
<div class="row">
<div class="col-12">
@ -47,8 +23,8 @@
</a>
</li>
<li class="nav-item text-dark ml-auto">
<a class="nav-link" href="{{ path('mailing_rss', {mailing: mail.mailing.id}) }}">
<li class="nav-item ml-auto">
<a class="nav-link text-dark" href="{{ path('mailing_rss', {mailing: mail.mailing.id}) }}">
Afficher le flux RSS
</a>
</li>
@ -91,8 +67,34 @@
</div>
</div>
</div>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
body {
margin: 0;
padding: 10px 0 0 0;
}
.col-12 {
padding: 0;
}
.nav-tabs {
padding-left: 20px;
}
iframe {
width: 100%;
height: calc(100vh - 50px);
border: 0;
}
</style>
{% endblock %}
{% block javascripts %}
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
</body>
</html>
{% endblock %}