templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title>E S F</title>
            <link rel="icon" href="{{ asset('image/logo.png') }}">
            <link rel="stylesheet" href="{{ asset('bootstrap/dist/css/bootstrap.min.css') }}">
            <link rel="stylesheet" href="{{ asset('fontawesome/css/all.min.css') }}">
            <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
            {% block stylesheets %}
                {{ encore_entry_link_tags('app') }}
            {% endblock %}
            <style>
                html,body{
                    height: 100%;
                    max-height: 100vh;
                    margin: 0;
                    padding: 0;
                    overflow: hidden;
                }
                .welcome-logo{
                    width: 100px;
                    height: auto;
                }
                header .row .col-4{
                    text-align: center;
                }
                .menu-logo .col-4{
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #38b6ff;
                }
                .menu-logo .col-8{
                    display: flex;
                    align-items: center;
                    justify-content: left;
                }
                .menu-icon:hover{
                    cursor: pointer;
                }
                .welcome-wordLogo{
                     margin-top: 0.8em ; 
                     font: 2rem sans-serif;
                    background-clip: text;
                    -webkit-background-clip: text;
                    color: transparent;
                    background-image: linear-gradient(to right, #38b6ff, #00bf63);
                }
                .login{
                    font: 1rem sans-serif;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 0em 8em;
                }
                .connect{
                    color: white;
                    background-color: #38b6ff;
                    padding: 0.5em;
                }
                .connect:hover{
                    text-decoration: none;
                }
                .register{
                    padding: 0.5em 1em;
    
                }
                .register:hover{
                    text-decoration: none;
                    background-color: #38b6ff;
                    color: white;
                }
                .deconnect{
                    padding: 0.5em;
                }
                .deconnect:hover{
                    text-decoration: none;
                    background-color: #00bf63;
                    color: white;
                }
                body section{
                    background-image: linear-gradient(to right, #38b6ff, #00bf63);
                }
                body section ul{
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 0em 15%;
                    list-style-type: none;
                    margin-bottom:0px;
                }
                body section ul li a{
                    color: white;
                }
                body section ul li a:hover{
                    text-decoration: none;
                }
                body{
                    display: flex;
                    flex-direction: column;
                }
                .header{
                    flex: 0 0 auto;
                }
                .body-section{
                    flex: 1 1 100%;
                    min-height: max-content;
                    bottom: 0%;
                    position: relative;
                    overflow: auto;
                    word-wrap: break-word;
                }
               .verticalNavbar{
                    top: 123px;
                    width: 250px;
                    height: 100%;
                    position: absolute;
                    box-shadow: 0px 3px 3px 0px;
                    border-radius: 0px 3px 3px 0px;
                    /*background-image: linear-gradient(to bottom, #38b6ff, #00bf63);*/
                    animation: moveRight 1s forwards;
                }
                @keyframes moveRight{
                    from {
                        transform: translateX(-100px);
                    }
                    to {
                        transform: translateX(0px);
                    }
                }
            </style>
        </head>
        <body>
            <header class="header">
                <div class="row">
                    <div class="col-4 row menu-logo">
                        <div class="col-4">
                            <i class="fas fa-list menu-icon" id="menuIcon"></i>
                        </div>
                        <div class="col-8">
                            <a href="{{ path('app_home') }}">
                                <img class="welcome-logo" src="{{ asset('image/logo.png')}}" alt="Logo ESF">
                            </a>
                        </div>
                    </div>
                    <div class="col-4 welcome-wordLogo">Écrire Sans Frontière</div>
                    <div class="col-4 login">
                        {% if app.user %}
                            {% if is_granted('ROLE_ADMIN') %}
                                <a href="#" class="register">Administration</a>
                            {% elseif is_granted('ROLE_JOURNALIST')%}
                                <a href="#" class="register">My Space</a>
                            {% endif %}
                            <a href="{{ path('app_logout') }}" class="deconnect">Deconnexion</a>
                        {% else %}
                            <a href="{{ path('app_login') }}" class="connect">Se Connecter</a>
                            <a href="{{ path('app_register') }}" class="register">S'inscrire</a>
                        {% endif %}                    
                    </div>
                </div>
            </header>
            <section>
                <ul>
                    <li><a href="#">Actualités</a></li>
                    <li><a href="#">Politique</a></li>
                    <li><a href="#">Economie</a></li>
                    <li><a href="#">Sport</a></li>
                    <li><a href="#">Technologie</a></li>
                    <li><a href="#">Santé</a></li>
                    <li><a href="#">Culture</a></li>
                    <li><a href="#">Voyage</a></li>
                    <li><a href="#">Mode</a></li>
                    <li><a href="#">Cuisine</a></li>
                </ul>
            </section>
            <div class="body-section">
                {% block body %}{% endblock %}
            </div>
            <div class="verticalNavbar" id="verticalNavbar">
                {% include "components/verticalNavbar.html.twig" %}
            </div>
            <script>
                var menuIcon = document.getElementById('menuIcon');
                var verticalNavbar = document.getElementById('verticalNavbar');
                menuIcon.addEventListener('click' ,()=>{
                    if(verticalNavbar.style.display == "none"){
                        verticalNavbar.style.display = "block";
                    }else{
                        verticalNavbar.style.display = "none";
                    }
                })
                verticalNavbar.style.display = "none";
            </script>
            {% block javascripts %}
                {{ encore_entry_script_tags('app') }}
            {% endblock %}
        </body>
    </html>