templates/mdl/base.html.twig line 1

Open in your IDE?
  1. {# templates/mdl/base.html.twig #}
  2. {% set AppMenu = AppObject.menu ?? [ {'name' : 'System', 'url' : '/'} ]
  3. %}
  4. {% set AppMenu = AppMenu|merge( app.user
  5.         ? [ 
  6.             {'name' : 'Profile', 'url' : '/profile'}, 
  7.             {'name' : 'Subscription', 'url' : '/subscription'},
  8.             {'name' : 'Sign Out', 'url' : '/sign-out'} 
  9.         ]
  10.         : [ 
  11.             {'name' : 'Sign In', 'url' : '/sign-in'},
  12.             {'name' : 'Ask Access', 'url' : '/ask-access'},
  13.             {'name' : 'Sign Up', 'url' : '/sign-up'}
  14.         ]
  15.     )
  16. %}
  17. <!doctype html>
  18. <html lang="en">
  19. <head>
  20.     <meta charset="utf-8" />
  21.     <!-- Title -->
  22.     <title>{{ htmlTitle ?? 'htmlTitle' }}</title>
  23.     <!-- General meta -->
  24.     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  25.     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
  26.     <meta name="description" content="{{ htmlDescription ?? 'htmlDescription' }}" />
  27.     <meta name="mobile-web-app-capable" content="yes" />
  28.     <!-- Icons -->
  29.     {% block icons %}
  30.         {# <link rel="shortcut icon" href="#" /> #}
  31.     {% endblock %}
  32.     {% block fonts %}
  33.         <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
  34.         <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
  35.     {% endblock %}
  36.     <!-- Styles -->
  37.     {% block stylesheets %}
  38.         <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css" />
  39.         {# <link rel="stylesheet" href="{{ asset('/styles/base.css') }}" /> #}
  40.         <style type="text/css">
  41.             main.mdl-layout__content > div.mdl-grid {
  42.                 justify-content: center;
  43.             }
  44.         </style>
  45.     {% endblock %}
  46.     <!-- Scirpts at the HEAD -->
  47.     {% block javascriptsHead %}
  48.         
  49.     {% endblock %}
  50. </head>
  51. <body class="mdl-app-body">
  52.     <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
  53.         {{ include('@mdl/page_sections/header_and_drawer.html.twig') }}
  54.         <main class="mdl-layout__content">
  55.             <div class="mdl-grid">
  56.                 <div class="mdl-cell mdl-cell--6-col mdl-shadow--2dp" style="padding: 10px;">
  57.                     {% block main %}{% endblock %}
  58.                 </div>
  59.             </div>
  60.         </main>
  61.         {{ include('@mdl/page_sections/footer.html.twig') }}
  62.     </div>
  63.     {% block javascriptsEndOfPage %}
  64.         <script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
  65.         {#<script src="{{ asset('/scripts/base.js') }}"></script>#}
  66.     {% endblock %}
  67.     {{ include('@mdl/page_sections/snackbar.html.twig') }}
  68. </body>
  69. </html>