Sfoglia il codice sorgente

removed merge conflicts

master
mb@mb 1 anno fa
parent
commit
88342ba9e9

BIN
content/images/pluz.jpg Vedi File


+ 11
- 2
pelicanconf.py Vedi File

@@ -30,7 +30,7 @@ DEFAULT_PAGINATION = 25
30 30
 
31 31
 # Uncomment following line if you want document-relative URLs when developing
32 32
 PLUGIN_PATHS = ['./pelican-plugins', './plugins-custom']
33
-PLUGINS = ['dateish', 'extract_toc', 'i18n_subsites', 'summary', 'events-ics','complex_footnotes', 'stream'] 
33
+PLUGINS = ['dateish', 'extract_toc', 'i18n_subsites', 'summary', 'events-ics','complex_footnotes', 'stream', 'thumbnailer'] 
34 34
 MD_EXTENSIONS = ['codehilite','extra','toc']
35 35
 
36 36
 STATIC_PATHS = ['extra/favicon.ico', 'images', 'pdfs', 'stream']
@@ -55,12 +55,21 @@ I18N_SUBSITES = {
55 55
 		'locale':'nl.UTF-8'
56 56
 	}
57 57
 }
58
+
59
+#Options for plugins
60
+
61
+#Our custom events plugin
58 62
 PLUGIN_EVENTS = {
59 63
 	'ics_calendars': ['events.ics', 'curriculum.ics'],
60 64
 	'default_location' : '',
61 65
 	'calendar_per_category': False
62 66
 }
63 67
 
68
+#Dateish plugin settings
64 69
 DATEISH_PROPERTIES = ['event_start', 'event_end']
65 70
 
66
-
71
+#Thumbnailer plugin settings
72
+IMAGE_PATH ="images"
73
+THUMBNAIL_KEEP_NAME = True
74
+THUMBNAIL_DIR ="images"
75
+THUMBNAIL_SIZES = {'thumb':'200x?', 'thumb2x':'400x?'}

+ 17
- 4
themes/varia/templates/article.html Vedi File

@@ -30,9 +30,16 @@
30 30
 		</div>
31 31
 		<div class="article-info">
32 32
 			<div class="featured-image">
33
-				{% if article.featured_image %}
34
-					<img src="{{ article.featured_image }}">
35
-				{% endif %}
33
+                {% if article.featured_image %}
34
+                {% set thumb_size ='/thumb'%}
35
+                    <a href="{{ article.featured_image }}">
36
+                        {% if article.featured_image.endswith('.gif') %}
37
+                            {% set thumb_size =''%}
38
+                        {% endif %}
39
+                        <img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
40
+
41
+                    </a>
42
+                {% endif %}
36 43
 			</div>
37 44
 			<div class="event-details">
38 45
 				{% if article.event_start %}
@@ -50,7 +57,13 @@
50 57
 				{% if article.translations %}
51 58
 					<div class="article-translation">
52 59
 					{% for translation in article.translations %}
53
-						<a href="{{ translation.url }}">{{ translation.lang }}</a>
60
+						{% if translation.lang == 'nl' %}
61
+						<a href="{{ translation.url }}">Lees dit artikel in het Nederlands</a>
62
+						{% endif %}
63
+
64
+						{% if translation.lang == 'en' %}
65
+						<a href="{{ translation.url }}">Read this article in English</a>
66
+						{% endif %}
54 67
 					{% endfor %}
55 68
 					</div>
56 69
 				{% endif %}

+ 52
- 45
themes/varia/templates/index.html Vedi File

@@ -5,75 +5,82 @@
5 5
     {% for p in pages %}
6 6
         {% if p.title == 'header' %}
7 7
             <div id="title">
8
-            	{{ p.content }}
9
-		    </div>		
8
+                {{ p.content }}
9
+            </div>      
10 10
         {% endif %}
11 11
     {% endfor %}
12 12
 </header>
13 13
 {% block content_title %}
14 14
 {% endblock %}
15 15
 {% if articles_page.has_other_pages() %}
16
-	{% include 'pagination.html' %}
16
+    {% include 'pagination.html' %}
17 17
 {% endif %}
18 18
 <div id="post-list">
19 19
 
20 20
 {% for article in articles_page.object_list %}
21
-	{% if article.category %}
21
+    {% if article.category %}
22 22
         {% if article.event_start %}
23 23
             {% set event_status = '' %}
24
+            {% set thumb_size = '/thumb' %}
24 25
             {% if article.event_start < article.date.now() %}
25 26
                 {% set event_status = ' past' %}
26 27
             {% endif %}
27 28
             {% if article.event_start >= article.date.now() %}
28 29
                 {% set event_status = ' current' %}
30
+                {% set thumb_size = '/thumb2x' %}
29 31
             {% endif %}
30 32
         {% endif %}
31 33
 
32
-	<article class="hentry {{article.category}}{{event_status}}">
33
-	{% endif %}
34
-		<div class="article-info">
35
-			<span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
36
-			{% if article.event_start %}
34
+    <article class="hentry {{article.category}}{{event_status}}">
35
+    {% endif %}
36
+        <div class="article-info">
37
+            <span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
38
+            {% if article.event_start %}
37 39
                 <div class="event-details">
38 40
                     {{ article.event_start  | strftime('%d %B %Y') }}
39
-                    {% set past = '' %}
41
+                    <!-- {% set event_status = '' %} -->
40 42
                 </div>
41 43
             {% endif %}
42
-			<div class="featured-image {{event_status}}">
43
-				{% if article.featured_image %}
44
-					<a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
45
-						<img src="{{ article.featured_image }}">
46
-					</a>
47
-				{% endif %}
48
-			</div>
49
-		</div>
50
-		<div class="summary {{ article.category }}">{{ article.summary }}
51
-			<span>
52
-				{% if DEFAULT_LANG == 'en' %}
53
-					<a href="/en/{{ article.url }}">read more</a>
54
-				{% elif DEFAULT_LANG == 'nl' %}
55
-					<a href="/{{ article.url }}">lees meer</a>
56
-				{% endif %}
57
-			</span>
58
-		</div>
59
-		<div class="separator"><hr></div>
60
-		<div class="post-info">
61
-			{% if article.category %}
62
-			<div class="categories">
63
-				<span itemprop="articleSection">
64
-					<a href="/{{ article.category.url }}" rel="category">{{ article.category }}</a>
65
-				</span>
66
-			</div>
67
-			{% endif %} {% if article.tags %}
68
-			<div class="tags">
69
-				Tags: {% for tag in article.tags %}
70
-				<span itemprop="keywords">
71
-					<a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
72
-				</span> {% endfor %}
73
-			</div>
74
-			{% endif %}
75
-		</div>
76
-	</article>
44
+            <div class="featured-image {{event_status}}">
45
+                {% if article.featured_image %}
46
+                    <a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
47
+                        {% if article.featured_image.endswith('.gif') %}
48
+                            {% set thumb_size =''%}
49
+                        {% endif %}
50
+                        <img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
51
+
52
+                    </a>
53
+                {% endif %}
54
+            </div>
55
+        </div>
56
+   
57
+        <div class="summary {{ article.category }}">{{ article.summary }}
58
+            <span>
59
+                {% if DEFAULT_LANG == 'en' %}
60
+                    <a href="/en/{{ article.url }}">read more</a>
61
+                {% elif DEFAULT_LANG == 'nl' %}
62
+                    <a href="/{{ article.url }}">lees meer</a>
63
+                {% endif %}
64
+            </span>
65
+        </div>
66
+        <div class="separator"><hr></div>
67
+        <div class="post-info">
68
+            {% if article.category %}
69
+            <div class="categories">
70
+                <span itemprop="articleSection">
71
+                    <a href="/{{ article.category.url }}" rel="category">{{ article.category }}</a>
72
+                </span>
73
+            </div>
74
+            {% endif %} {% if article.tags %}
75
+            <div class="tags">
76
+                Tags: {% for tag in article.tags %}
77
+                <span itemprop="keywords">
78
+                    <a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
79
+                </span> {% endfor %}
80
+            </div>
81
+            {% endif %}
82
+        </div>
83
+    </article>
77 84
 {% endfor %}
78 85
 </div><!-- /#posts-list -->
79 86
 

+ 5
- 2
themes/varia/templates/syndication.html Vedi File

@@ -15,7 +15,7 @@ serves as the default image for posts whose featured_image is not set. #}
15 15
 {% if article %}
16 16
 <meta property="og:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}"/>
17 17
 <meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
18
-<meta property="og:description" content="{{article.description|striptags|e}}" />
18
+<meta property="og:description" content="{% if article.summary %}{{article.summary|striptags}}{% endif %}" />
19 19
 <meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
20 20
 <meta property="og:article:author" content="{{ article.author }}" />
21 21
 {% if article.date %}
@@ -26,7 +26,10 @@ serves as the default image for posts whose featured_image is not set. #}
26 26
 {% endif %}
27 27
 <meta name="twitter:card" content="summary_large_image">
28 28
 <meta name="twitter:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}">
29
-<meta name="twitter:description" content="{{article.description|striptags|e}}">
29
+<meta name="twitter:description" content="{% if article.summary %}{{article.summary|striptags}}{% endif %}">
30
+
31
+
32
+
30 33
 {% if article.featured_image %}
31 34
     {% if I18N_SUBSITES %}
32 35
     {% for lang, url in I18N_SUBSITES.items() %}

Loading…
Annulla
Salva