ninefolio/templates/Home/home.html.twig

541 lines
26 KiB
Twig
Raw Normal View History

2024-09-17 14:02:17 +02:00
{% extends "base.html.twig" %}
{% block localstyle %}
#main {
padding: 0px;
display:none;
margin-bottom:200px;
}
{% if app.session.get("appthumbfilter")=="1" %}
.cssfilter {
filter: grayscale({{app.session.get("appthumbfiltergrayscale")}}%) opacity({{app.session.get("appthumbfilteropacity")}}%) sepia({{app.session.get("appthumbfiltersepia")}}%);
transition: -webkit-filter 0.1s;
}
.cssfilter:hover {
filter: unset;
-webkit-filter: unset;
-moz-filter: unset;
-o-filter: unset;
-ms-filter: unset;
-webkit-transition: -webkit-filter 0.1s;
transition: -webkit-filter 0.1s;
}
{% endif %}
{% endblock %}
{% block body %}
<!-- FOLIOMENU -----------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 21:15:16 +01:00
<div class="foliomenu">
<a href="#top"><img src="{{ asset("uploads/logo/"~app.session.get("logodark")) }}" class="logo"></a>
2024-09-17 14:02:17 +02:00
2024-10-29 21:15:16 +01:00
<div>
{% if users is not empty %}
<i class="fa fa-circle fa-fw"></i> <a href="#membre">Membres</a>&nbsp;
{% endif %}
2024-09-17 14:02:17 +02:00
2024-10-29 21:15:16 +01:00
{% if illustrations is not empty %}
<i class="fa fa-circle fa-fw"></i> <a href="#illustration">Illustrations</a>&nbsp;
{% endif %}
2024-09-17 14:02:17 +02:00
2024-10-29 21:15:16 +01:00
{% if not webzines is empty %}
<i class="fa fa-circle fa-fw"></i> <a href="#webzine">Webzines</a>&nbsp;
{% endif %}
{% if not links is empty %}
<i class="fa fa-circle fa-fw"></i> <a href="#link">Liens</a>&nbsp;
{% endif %}
</div>
2024-09-17 14:02:17 +02:00
2024-10-29 21:15:16 +01:00
<div class="float-right">
{% if app.user %}
<a href="{{path("app_user_profil")}}">
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
2024-09-17 14:02:17 +02:00
</a>
2024-10-29 21:15:16 +01:00
{% if is_granted('ROLE_ADMIN') %}
2024-10-30 17:58:39 +01:00
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
2024-10-29 21:15:16 +01:00
<i class="fa fa-cog fa-fw"></i>
</a>
{% endif %}
2024-10-30 22:06:14 +01:00
<a href="" data-toggle="modal" data-target="#addmodal">
<i class="fa fa-plus fa-fw"></i>
</a>
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
<i class="fa fa-sign-out-alt fa-fw"></i>
</a>
2024-10-29 21:15:16 +01:00
{% else %}
2024-11-03 10:12:33 +01:00
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
<i class="fa fa-user-plus fa-fw"></i>
</a>
{% endif %}
2024-10-29 21:15:16 +01:00
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
<i class="fa fa-sign-in-alt fa-fw"></i>
</a>
{% endif %}
</div>
2024-09-17 14:02:17 +02:00
</div>
2024-10-29 21:15:16 +01:00
<div class="foliotop">
<a href="#top"><i class="fa fa-chevron-up"></i></a>
</div>
2024-09-17 14:02:17 +02:00
<!-- HEROHEADER ------------------------------------------------------------------------------------------------------------------------------------------------!-->
<div id="top" class="heroheader" displaynone>
{%if not app.session.get("hero01") is empty %}
<div class="cssfilter" style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero01")}})"></div>
{%endif%}
{%if not app.session.get("hero02") is empty %}
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero02")}})"></div>
{%endif%}
{%if not app.session.get("hero03") is empty %}
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero03")}})"></div>
{%endif%}
{%if not app.session.get("hero04") is empty %}
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero04")}})"></div>
{%endif%}
{%if not app.session.get("hero05") is empty %}
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero05")}})"></div>
{%endif%}
</div>
<div class="herofloatmenu" style="position: absolute; top: 0px; right: 10px;">
{% if app.user %}
<a href="{{path("app_user_profil")}}">
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
</a>
{% if is_granted('ROLE_ADMIN') %}
2024-10-30 17:58:39 +01:00
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
2024-09-17 14:02:17 +02:00
<i class="fa fa-cog fa-fw"></i>
</a>
{% endif %}
2024-10-30 22:06:14 +01:00
<a href="" data-toggle="modal" class="btn btn-link" data-target="#addmodal">
<i class="fa fa-plus fa-fw"></i>
</a>
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
<i class="fa fa-sign-out-alt fa-fw"></i>
</a>
2024-09-17 14:02:17 +02:00
{% else %}
2024-11-03 10:12:33 +01:00
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
<i class="fa fa-user-plus fa-fw"></i>
</a>
{% endif %}
2024-09-17 14:02:17 +02:00
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
<i class="fa fa-sign-in-alt fa-fw"></i>
</a>
{% endif %}
</div>
2024-10-29 21:15:16 +01:00
2024-09-17 14:02:17 +02:00
<div class="herobox"></div>
2024-10-29 21:15:16 +01:00
2024-09-17 14:02:17 +02:00
<div class="herotitle">
2024-10-29 21:15:16 +01:00
<h1><a href="#site">{{ (app.session.get("appname")) }}</a></h1>
2024-09-17 14:02:17 +02:00
<div class="heromenu" >
{% if not app.session.get("appsubname") is empty %}
<i style="font-size:80%;">{{ app.session.get("appsubname") }}</i><br>
{% endif %}
<div class="linkmenu" style="clear:both">
{% if app.session.get('email') is not empty %}
<a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email"><i class="fas fa-envelope fa-2x"></i></a>
{% endif %}
{% if app.session.get('facebook') is not empty %}
<a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook"><i class="fab fa-facebook fa-2x"></i></a>
{% endif %}
{% if app.session.get('instagram') is not empty %}
<a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram"><i class="fab fa-instagram fa-2x"></i></a>
{% endif %}
{% if app.session.get('twitter') is not empty %}
<a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter"><i class="fab fa-twitter fa-2x"></i></a>
{% endif %}
{% if app.session.get('google') is not empty %}
<a href="{{ app.session.get('google') }}" target="_blank" title="Google"><i class="fab fa-google-plus fa-2x"></i></a>
{% endif %}
{% if app.session.get('youtube') is not empty %}
<a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube"><i class="fab fa-youtube fa-2x"></i></a>
{% endif %}
2024-11-03 14:47:30 +01:00
<a href="{{ path("app_feedhome") }}" target="_blank" title="RSS"><i class="fa fa-rss-square fa-2x"></i></a>
2024-09-17 14:02:17 +02:00
</div>
<div class="catmenu">
2024-10-29 21:15:16 +01:00
{% if not users is empty %}
<a href="#membre"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Membres</a><br>
{% endif %}
{% if not illustrations is empty %}
<a href="#illustration"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Illustrations</a><br>
{% endif %}
2024-10-26 12:08:33 +02:00
2024-09-17 14:02:17 +02:00
{% if not webzines is empty %}
2024-10-26 12:08:33 +02:00
<a href="#webzine"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Webzines</a><br>
2024-09-17 14:02:17 +02:00
{% endif %}
2024-10-26 12:08:33 +02:00
{% if not links is empty %}
<a href="#link"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Liens</a><br>
{% endif %}
2024-09-17 14:02:17 +02:00
</div>
2024-11-02 20:16:52 +01:00
{% if not items is empty %}
<div class="itemmenu" style="width:270px; display:flex; margin:20px auto 0px auto; flex-wrap: wrap;">
{% for item in items %}
{% if item.title|lower != "ninefolio" %}
<a href="{{ item.url }}" target="_blank">
<div class="item" style="display:flex; flex-direction: column; align-items: center; font-size:10px; padding:5px; width:90px;">
<img src="{{ item.icon }}" style="width:50px;height:50px">
<span style="margin-top:10px">{{ item.title }}</span>
</div>
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
2024-09-17 14:02:17 +02:00
</div>
</div>
2024-10-26 12:08:33 +02:00
2024-09-17 14:02:17 +02:00
<div class="herologo">
<img src="/{{ appAlias }}/uploads/logo/{{ app.session.get('logodark') }}">
</div>
2024-10-28 22:37:24 +01:00
2024-09-17 14:02:17 +02:00
<!-- GRID ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 16:54:40 +01:00
{% set style="margin:30px" %}
{% if app.session.get("appmaxthumbwidth")!="0" %}
{% set style="max-width:"~app.session.get("appmaxthumbwidth")~"px; margin:30px auto;" %}
{% endif %}
<div class="grid" style="{{ style }}">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
2024-10-28 22:37:24 +01:00
<!-- SITE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 16:54:40 +01:00
<div>
2024-10-29 21:15:16 +01:00
<div id="site" class="grid-item grid-item-full"><h1 class="mt-5 mb-3"></h1></div>
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imgcontact")}});">
2024-10-29 16:54:40 +01:00
</div>
2024-11-01 09:38:34 +01:00
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize" style="padding:0px 15px;word-break:break-word;">
2024-10-29 16:54:40 +01:00
<h1 style="border:none; padding:0px;">{{ app.session.get("appname")}}</h1>
2024-10-28 22:37:24 +01:00
2024-10-29 16:54:40 +01:00
{% if not app.session.get("appsubname") is empty %}
{{ app.session.get("appsubname")}}<br>
{%endif%}
2024-10-28 22:37:24 +01:00
2024-10-29 16:54:40 +01:00
{% if not app.session.get("appdescription") is empty %}
<br>{{ app.session.get("appdescription")|raw}}
{%endif%}
{% if app.session.get('email') is not empty or app.session.get('facebook') is not empty or app.session.get('instagram') is not empty or app.session.get('twitter') is not empty or app.session.get('google') is not empty or app.session.get('youtube') is not empty %}
<br><br>
{% endif %}
{% if app.session.get('email') is not empty %}
<i class="fas fa-envelope"></i> Email = <a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email">{{ app.session.get('email') }}</a><br>
{% endif %}
{% if app.session.get('facebook') is not empty %}
<i class="fab fa-facebook"></i> Facebook = <a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook">{{ app.session.get('facebook') }}</a><br>
{% endif %}
{% if app.session.get('instagram') is not empty %}
<i class="fab fa-instagram"></i> Instagram = <a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram">{{ app.session.get('instagram') }}</a><br>
{% endif %}
{% if app.session.get('twitter') is not empty %}
<i class="fab fa-twitter"></i> Twitter = <a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter">{{ app.session.get('twitter') }}</a><br>
{% endif %}
{% if app.session.get('google') is not empty %}
<i class="fab fa-google-plus"></i> Google = <a href="{{ app.session.get('google') }}" target="_blank" title="Google">{{ app.session.get('google') }}</a><br>
{% endif %}
{% if app.session.get('youtube') is not empty %}
<i class="fab fa-youtube"></i> Youtube = <a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube">{{ app.session.get('youtube') }}</a><br>
{% endif %}
2024-10-28 22:37:24 +01:00
</div>
2024-10-29 16:54:40 +01:00
</div>
2024-10-28 22:37:24 +01:00
<!-- MEMBRE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 21:15:16 +01:00
{% if not users is empty %}
<div>
<div id="membre" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Membres</h1></div>
{% for user in users %}
<div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;">
<a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}">
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2">
<small>{{user.pseudo}}</small>
</a>
</div>
{% endfor %}
</div>
{% endif %}
2024-10-28 22:37:24 +01:00
<!-- ILLUSTRATION ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 21:15:16 +01:00
{% if not illustrations is empty %}
<div>
<div id="illustration" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Illustrations</h1></div>
{% for illustration in illustrations %}
{% set appthumbwidth=app.session.get("appthumbwidth") %}
{% set appthumbheight=app.session.get("appthumbheight") %}
2024-11-01 10:28:07 +01:00
{% set classmini="" %}
2024-10-29 21:15:16 +01:00
{% if appthumbwidth==0 %}
{% set class="" %}
{% if loop.index < 40 %}
{% if loop.index == 1 %}
{% set class="grid-item-size-4" %}
{% elseif loop.index is divisible by(28) %}
{% set class="grid-item-size-4" %}
{% elseif loop.index is divisible by(7) %}
{% set class="grid-item-size-2" %}
{% elseif loop.index is divisible by(46) %}
{% set class="grid-item-size-4" %}
{% endif %}
{% elseif loop.index > 48 %}
{% if loop.index == 49 %}
{% set class="grid-item-size-4" %}
{% elseif (loop.index-49) is divisible by(28) %}
{% set class="grid-item-size-4" %}
{% elseif (loop.index-49) is divisible by(7) %}
{% set class="grid-item-size-2" %}
{% endif %}
2024-09-17 14:02:17 +02:00
{% endif %}
2024-11-01 10:28:07 +01:00
{% set position = (loop.index - 1) % 10 + 1 %}
{% if position == 1 or position == 8 %}
{% set classmini = 'grid-item-mini-50' %}
{% else %}
{% set classmini = 'grid-item-mini-25' %}
{% endif %}
2024-10-29 21:15:16 +01:00
{% elseif appthumbwidth==1 %} {% set class="" %}
{% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %}
2024-09-17 14:02:17 +02:00
{% endif %}
2024-10-29 21:15:16 +01:00
{%if appthumbheight==0 %}
{% set class=class~" grid-item-size-square" %}
{% elseif appthumbheight==1 %}
{% set class=class~" grid-item-size-proportion" %}
{% else %}
{% set class=class~" grid-item-size-page" %}
{% endif %}
2024-09-17 14:02:17 +02:00
2024-10-29 21:15:16 +01:00
{% set source="thumb_"~illustration.illustration %}
{% if appthumbheight!=0 %}
{% set source="thumbori_"~illustration.illustration %}
{% endif %}
2024-11-02 15:43:47 +01:00
{% set source=source~"?"~illustration.updatetime|date('ymdHis') %}
2024-10-30 17:58:39 +01:00
<a href="{{ path("app_illustration_view",{"by":"home","idcat":illustration.category.id,"id":illustration.id}) }}">
2024-11-02 20:16:52 +01:00
<div data-loop="{{loop.index}}" id="illustration{{illustration.id}}" class="grid-item grid-item-size {{class}} {{classmini}} cssfilter" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");">
2024-10-29 21:15:16 +01:00
</div>
</a>
{% endfor %}
</div>
{% endif %}
2024-09-17 14:02:17 +02:00
<!-- WEBZINE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 21:15:16 +01:00
{% if not webzines is empty %}
<div>
<div id="webzine" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Webzines</h1></div>
{% set setname="" %}
{% for webzine in webzines %}
{% if not webzine.webzinepages is empty %}
{% if setname!=webzine.set %}
{% if not webzine.set is empty %}
<div id="webzine" class="grid-item grid-item-full"><h2 class="mt-3 pl-3">{{webzine.set}}</h2></div>
{% endif %}
{% set setname=webzine.set %}
2024-10-28 22:37:24 +01:00
{% endif %}
2024-10-29 21:15:16 +01:00
{% set page=webzine.webzinepages[0] %}
{% set source="thumbori_"~page.illustration %}
{% set class=" grid-item-size-2 grid-item-size-page" %}
2024-10-31 11:48:30 +01:00
<a href="{{ path("app_webzine_view",{"by":"home","idcat":webzine.id,"id":page.id}) }}">
2024-11-02 15:43:47 +01:00
<div id="webzine{{webzine.id}}" class="grid-item grid-item-size {{class}} cssfilter" data-width="{{page.width}}" data-background-image="/{{ appAlias }}/uploads/webzine/{{source}}" data-height="{{page.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
2024-10-29 21:15:16 +01:00
</div>
</a>
2024-10-28 22:37:24 +01:00
{% endif %}
2024-10-29 21:15:16 +01:00
{% endfor %}
</div>
{% endif %}
2024-10-29 16:54:40 +01:00
<!-- LINK ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 21:15:16 +01:00
{% if not links is empty %}
<div>
<div id="link" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Liens</h1></div>
2024-10-29 16:54:40 +01:00
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imglink")}});">
</div>
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize linkurl" style="padding:0px 15px;">
{% for link in links|sort((a, b) => a.order <=> b.order) %}
<a href="{{link.url}}" target="_blank">{{ link.name }}</a>
{% endfor %}
</div>
2024-10-29 21:15:16 +01:00
</div>
{% endif %}
2024-09-17 14:02:17 +02:00
2024-10-29 21:15:16 +01:00
<!-- BOTTOM ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-29 16:54:40 +01:00
<div id="bottom" class="grid-item grid-item-full" style="height:300px">
2024-10-28 22:37:24 +01:00
</div>
2024-10-30 22:06:14 +01:00
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
2024-10-31 11:48:30 +01:00
{% if app.user %}
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
<div class="modal-dialog modal-md" role="document">
2024-11-01 10:54:38 +01:00
<div class="modal-content" style="margin-top:120px">
2024-10-31 11:48:30 +01:00
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" style="display:flex; flex-direction: column;">
2024-11-01 10:54:38 +01:00
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer une Illustration">
Ajouter une Illustration
2024-10-31 11:48:30 +01:00
</a>
2024-11-01 10:54:38 +01:00
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer un Webzine">
2024-10-31 11:48:30 +01:00
Ajouter un Webzine
</a>
</div>
2024-10-30 22:06:14 +01:00
</div>
</div>
</div>
2024-10-31 11:48:30 +01:00
{% endif %}
2024-09-17 14:02:17 +02:00
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$('body').imagesLoaded(function() {
height=Math.max(500,$(window).height());
$('.heroheader').height(height);
2024-10-28 22:37:24 +01:00
himg=$('.herologo img').height();
$('.herologo').css({ top: (height-himg-50) +'px' });
2024-09-17 14:02:17 +02:00
$('.heroheader').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 6000,
dots: true,
touchMove: false,
pauseOnDotsHover: true,
fade: true,
cssEase: 'linear',
prevArrow: false,
nextArrow: false,
customPaging: function(slider, i) {
return '<span class="heroheader-dot fa fa-circle fa-fw"></span>';
}
});
$("#main").show();
resizeThumb();
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
if (location.hash) {
console.log(location.hash);
$(document).scrollTop( $(location.hash).offset().top -60);
// = location.hash;
}
});
});
$(window).resize(function() {
$(window).scroll();
height=Math.max(500,$(window).height());
$('.heroheader').height(height);
2024-10-28 22:37:24 +01:00
himg=$('.herologo img').height();
$('.herologo').css({ top: (height-himg-50) +'px' });
2024-09-17 14:02:17 +02:00
resizeThumb();
});
$(window).scroll(function () {
if($(window).width()>=980) {
// set distance user needs to scroll before we start fadeIn
if ($(this).scrollTop() > 300) {
if($('.foliomenu').is(":hidden")) $('.foliomenu').show();
} else {
if($('.foliomenu').is(":visible")) $('.foliomenu').hide();
}
}
else {
if($('.foliomenu').is(":hidden")) $('.foliomenu').show();
}
if ($(this).scrollTop() > 300) {
if($('.foliotop').is(":hidden")) $('.foliotop').show();
} else {
if($('.foliotop').is(":visible")) $('.foliotop').hide();
}
});
function resizeThumb() {
{% if app.session.get("appmaxthumbwidth")!="0" %}
width=$(window).width();
maxwidth={{ app.session.get("appmaxthumbwidth") }};
if(maxwidth+30>width) {
$(".grid").css("max-width","none");
$(".grid").css("margin","30px");
}
else {
$(".grid").css("max-width","{{ app.session.get("appmaxthumbwidth") }}px");
$(".grid").css("margin","30px auto");
}
{% endif %}
$(".grid-item-size").each(function() {
if(!$(this).hasClass("grid-item-size-noresize")) {
if($(this).hasClass("grid-item-size-square")) {
$(this).height($(this).width());
}
else if($(this).hasClass("grid-item-size-proportion")) {
var width=$(this).width();
var oriwidth=$(this).data("width")
if(oriwidth>0) {
pourcentage=width*100/oriwidth;
height=$(this).data("height")*pourcentage/100;
$(this).height(height);
}
else {
$(this).height($(this).width());
}
}
else {
$(this).height($(this).width()*30/21);
}
}
});
}
{% endblock %}