templates/Default/project.html.twig line 1

  1. {% set iconColor = "#1F4878" %}
  2. {% set titleColor = "#ffffff" %} 
  3. {% set bgColor = "#81B0B1" %}
  4. {% set title = project.name %}
  5. {% if project.banner %}
  6. {% set thumbnail = project.banner.thumbnail %}
  7. {% set banner = asset(project.banner.file) %}
  8. {% endif %}
  9. {% extends 'Default/base.html.twig' %}
  10. {% import "Default/macros.html.twig" as macros %}
  11.                     
  12. {% block content %}
  13. <div class='{{desktop("gpadding top-60-in bottom-30-in")}} {{mobile("hz-20-in")}}'>
  14.     <div class='{{desktop("")}}'>
  15.         <div id='article' class='w100'>
  16.             <div class='h4 {{desktop("flex row middle space bottom-60")}} {{mobile("vt-15")}}'>
  17.                 {#<figure class="oeuvre-fig flex row center mrect {{desktop('third-40')}} {{mobile('w100')}}" >
  18.                     <img src="{{asset(project.banner ? project.banner.thumbnail ? project.banner.thumbnail : project.banner.file ? 'oeuvre1.jpg')}}" class="h100">  
  19.                 </figure>#}
  20.                 <div class="article w100 w100 h4 {{desktop('')}} {{mobile('top-20')}}">{{project.details|raw}}</div>
  21.             </div>
  22.             
  23.             {% if project.document %}
  24.             <div class='bg-success {{desktop("top-40 padding-40")}}{{mobile("top-20 padding-20")}}'>
  25.                 <h2 class="h3 warning-alt">Fiche de présentation du projet</h2>
  26.                 <div class='doc flex row top {{desktop("half-20")}} relative bottom-20 hz-25-in vt-20-in {{desktop("")}} {{mobile("")}}'>
  27.                     {% set doc = project.document %}
  28.                     <span class="">
  29.                         <i class="fa fa-file gray fa-3x"></i>
  30.                     </span>
  31.                     <div class='text-left flex col space relative left-20 right-40-in'>
  32.                         <h3 class='medium white p text-left nomargin lh-1x'>{{doc.name ? doc.name : doc.source}}</h3>
  33.                         <div class="flex col middle space top-10">
  34.                             <div class='gray text-left p-alt'>
  35.                                 <span class=''>{{doc.formatSize}}</span> |
  36.                                 <span class=''>{{doc.reading|number_format}} lect.</span> |
  37.                                 <span>{{doc.downloads|number_format}} téléch.</span>
  38.                             </div>
  39.                             <div class='flex row middle p upper medium top-20 nowrap'>
  40.                                 <i class="w100 top-2-in bg-gray right-40"></i>
  41.                                 <span class='os-read warning-alt' data-target="{{path('file-read',{id:doc.id})}}">Lire</span>
  42.                                 <a class='left-30 warning-alt' href="{{path('file-download',{id:doc.id})}}" target='_blank' download>Télécharger</a>
  43.                             </div>
  44.                         </div>
  45.                     </div>
  46.                     <i class="triangle gradient-bannerm bg-white"></i>
  47.                 </div>
  48.             </div>
  49.             {% endif %}
  50.             
  51.             {% if project.album and project.album.pictures|length %}
  52.             <h2 class='h3 top-40 adapt'>{{project.album.title ? project.album.title : "Album photos"}}</h2>
  53.             <figure class="bg-white slide-box mrect slide-container fill nohover relative vt-40 shadow-alt" tabindex="1">
  54.                 <div class="fill slides radius-10 adapt">
  55.                 {% for o in project.album.pictures %}
  56.                 <div class='relative slide {{loop.index == 1 ? "active"}}'>
  57.                     <img src='{{asset(o)}}' class='contain'/>
  58.                 </div>
  59.                 {% endfor %}
  60.                 </div>
  61.                 <span class="slide-prev radius-50 h100 padding-30 absolute top left pointer" data-target="#article .slide-box">
  62.                     <span class="fill flex col middle"><i class="flex col middle fa fa-chevron-left h1 black"></i></span>
  63.                 </span>
  64.                 <span class="slide-next radius-50 h100 padding-30 absolute top right pointer"  data-target="#article .slide-box">
  65.                     <span class="fill flex col middle"><i class="flex col middle fa fa-chevron-right h1 black"></i></span>
  66.                 </span>
  67.             </figure>
  68.             {% endif %}
  69.         </div>
  70.         {#<div class='{{desktop("top-60 adapt")}} {{mobile("w100 top-20")}}'>
  71.             <h3 class='h4 warning-alt {{desktop("bottom-20")}} {{mobile("bottom-10")}}'>Autres Oeuvres</h3>
  72.             <div class='{{desktop("flex row space")}}'>
  73.             {% for o in list %}
  74.             {{ macros.projectAlt(o) }}
  75.             {% endfor %}
  76.             </div>
  77.         </div>#}
  78.     </div>
  79. </div>
  80. {% endblock %}