added gallery and portal informations
This commit is contained in:
@@ -12,7 +12,7 @@ from mailchimp3 import MailChimp
|
||||
from project.forms import NewsletterSubscriptionForm
|
||||
from project.models import Section, Quote, SliderItem, SectionText, Video, DownloadSection, DownloadSectionFolder, \
|
||||
TextSliderItem, HighlightListItem, ReferenceListItem, SocialMediaList, SocialMediaListItem, Timetable, \
|
||||
TimetableItem, Partner, HighlightList, Image, TitleListItem, TitleList, IntroImage
|
||||
TimetableItem, Partner, HighlightList, Image, TitleListItem, TitleList, IntroImage, Gallery
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
@@ -26,7 +26,7 @@ class SectionPlugin(CMSPluginBase):
|
||||
'SectionTextPlugin', 'VideoPlugin', 'DownloadSectionPlugin', 'TextSliderPlugin',
|
||||
'HighlightListPlugin', 'ReferenceListPlugin', 'FormPlugin', 'PicturePlugin', 'SubPageListPlugin',
|
||||
'PartnerPlugin', 'NewsletterSubscriptionPlugin', 'NewsletterArchivePlugin',
|
||||
'SocialMediaListPlugin']
|
||||
'SocialMediaListPlugin', 'GalleryPlugin']
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
@@ -311,3 +311,11 @@ class TitleListPlugin(CMSPluginBase):
|
||||
name = 'Title List'
|
||||
render_template = 'project/plugins/content/title_list.html'
|
||||
inlines = [TitleListItemInlineAdmin]
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
class GalleryPlugin(CMSPluginBase):
|
||||
model = Gallery
|
||||
module = 'Content'
|
||||
name = 'Gallery'
|
||||
render_template = 'project/plugins/content/gallery.html'
|
||||
|
||||
@@ -330,3 +330,14 @@ class TitleListItem(models.Model):
|
||||
|
||||
class Meta:
|
||||
ordering = ['ordering']
|
||||
|
||||
|
||||
class Gallery(CMSPlugin):
|
||||
folder = FilerFolderField(verbose_name='Ordner')
|
||||
|
||||
class Meta(CMSPlugin.Meta):
|
||||
verbose_name = 'Gallerie'
|
||||
verbose_name_plural = 'Gallerien'
|
||||
|
||||
def __str__(self):
|
||||
return self.folder.name
|
||||
@@ -137,6 +137,46 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="pswp__bg"></div>
|
||||
<div class="pswp__scroll-wrap">
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
<div class="pswp__top-bar">
|
||||
<div class="pswp__counter"></div>
|
||||
<button class="pswp__button pswp__button--close" title="{% trans 'Schliessen (Esc)' %}"></button>
|
||||
<button class="pswp__button pswp__button--share" title="{% trans 'Bild herunterladen' %}"></button>
|
||||
<button class="pswp__button pswp__button--fs" title="{% trans 'Vollbildmodus ein/aus' %}"></button>
|
||||
<button class="pswp__button pswp__button--zoom" title="{% trans 'rein/raus zoomen' %}"></button>
|
||||
<div class="pswp__preloader">
|
||||
<div class="pswp__preloader__icn">
|
||||
<div class="pswp__preloader__cut">
|
||||
<div class="pswp__preloader__donut"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
<button class="pswp__button pswp__button--arrow--left"
|
||||
title="{% trans 'Vorheriges Foto (linke Pfeiltaste)' %}">
|
||||
</button>
|
||||
<button class="pswp__button pswp__button--arrow--right"
|
||||
title="{% trans 'Nächstes Foto (rechte Pfeiltaste)' %}">
|
||||
</button>
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="{% static 'js/lib.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/main.js' %}"></script>
|
||||
|
||||
|
||||
26
src/project/templates/project/plugins/content/gallery.html
Normal file
26
src/project/templates/project/plugins/content/gallery.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% load cms_tags i18n thumbnail %}
|
||||
|
||||
<div class="gallery" itemscope itemtype="http://schema.org/ImageGallery">
|
||||
{% for file in instance.folder.files %}
|
||||
<div class="gallery__item">
|
||||
{% thumbnail file 2000x2000 as full %}
|
||||
{% thumbnail file 500x500 as thumb %}
|
||||
<div class="gallery__item__main reveal_self reveal reveal_animation"
|
||||
style="background-image: url({{ thumb.url }})">
|
||||
<figure itemprop="associatedMedia" itemscope
|
||||
itemtype="http://schema.org/ImageObject">
|
||||
<a href="{{ full.url }}" class="event"
|
||||
itemprop="contentUrl"
|
||||
data-size="{{ full.width }}x{{ full.height }}">
|
||||
<img src="{{ thumb.url }}"
|
||||
itemprop="thumbnail"
|
||||
alt="{{ file.name }}"/>
|
||||
</a>
|
||||
{% if file.description %}
|
||||
<figcaption itemprop="caption description">{{ file.description }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user