installation de tailwind + page home
This commit is contained in:
@@ -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 HomeController extends AbstractController
|
||||||
|
{
|
||||||
|
#[Route('/', name: 'app_home')]
|
||||||
|
public function index(): Response
|
||||||
|
{
|
||||||
|
return $this->render('home/index.html.twig', [
|
||||||
|
'controller_name' => 'HomeController',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,13 +2,19 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<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><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
<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><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
{% block importmap %}
|
||||||
|
{{ importmap('app') }}
|
||||||
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Accueil - Mon Site
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="container mx-auto px-4 py-8">
|
||||||
|
<h1 class="text-4xl font-bold text-blue-600 mb-6">Bienvenue sur Mon Site</h1>
|
||||||
|
|
||||||
|
<div class="bg-gray-100 rounded-lg p-6 shadow-md">
|
||||||
|
<h2 class="text-2xl font-semibold text-gray-800 mb-4">À propos de nous</h2>
|
||||||
|
<p class="text-gray-600 mb-4">
|
||||||
|
Ceci est une page de base utilisant Tailwind CSS dans un projet Symfony.
|
||||||
|
Si vous voyez cette page stylisée, cela signifie que Tailwind fonctionne correctement !
|
||||||
|
</p>
|
||||||
|
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||||
|
En savoir plus
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-8 grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
|
<div class="bg-green-100 p-4 rounded-lg">
|
||||||
|
<h3 class="text-xl font-semibold text-green-800 mb-2">Fonctionnalité 1</h3>
|
||||||
|
<p class="text-green-600">Description de la première fonctionnalité.</p>
|
||||||
|
</div>
|
||||||
|
<div class="bg-yellow-100 p-4 rounded-lg">
|
||||||
|
<h3 class="text-xl font-semibold text-yellow-800 mb-2">Fonctionnalité 2</h3>
|
||||||
|
<p class="text-yellow-600">Description de la deuxième fonctionnalité.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user