|
10 | 10 | </div><!-- /#header-home --> |
11 | 11 |
|
12 | 12 |
|
| 13 | +{% comment %} |
| 14 | +* |
| 15 | +* First check, if widget is empty or not by checking if there is a title |
| 16 | +* |
| 17 | +{% endcomment %} |
13 | 18 | <div class="row t60"> |
| 19 | + {% if page.widget-1.title %} |
14 | 20 | <div class="medium-4 columns"> |
15 | 21 | <a href="{{ page.widget-1.url }}">{% if page.widget-1.image %}<img src="{{ site.urlimg }}/{{ page.widget-1.image }}" width="302" height="182" alt="">{% endif %}{% if page.widget-1.video %}{{ page.widget-1.video }}{% endif %}</a> |
16 | 22 | <h2 class="font-size-h3 t10">{{ page.widget-1.title }}</h2> |
17 | 23 | <p>{{ page.widget-1.text }}</p> |
18 | 24 | <p><a class="button tiny radius" href="{{ page.widget-1.url }}">{{ site.data.language.more }}</a></p> |
19 | 25 | </div><!-- /.medium-4.columns --> |
| 26 | + {% endif %} |
20 | 27 |
|
21 | 28 |
|
| 29 | + {% if page.widget-2.title %} |
22 | 30 | <div class="medium-4 columns"> |
23 | 31 | <a href="{{ page.widget-2.url }}">{% if page.widget-2.image %}<img src="{{ site.urlimg }}/{{ page.widget-2.image }}" width="302" height="182" alt="">{% endif %}{% if page.widget-2.video %}{{ page.widget-2.video }}{% endif %}</a> |
24 | 32 | <h2 class="font-size-h3 t10">{{ page.widget-2.title }}</h2> |
25 | 33 | <p>{{ page.widget-2.text }}</p> |
26 | 34 | <p><a class="button tiny radius" href="{{ page.widget-2.url }}">{{ site.data.language.more }}</a></p> |
27 | 35 | </div><!-- /.medium-4.columns --> |
| 36 | + {% endif %} |
28 | 37 |
|
29 | 38 |
|
| 39 | + {% if page.widget-3.title %} |
30 | 40 | <div class="medium-4 columns"> |
31 | | - <a href="{{ page.widget-3.url }}">{% if page.widget-3.image %}<img src="{{ site.urlimg }}/{{ page.widget-3.image }}" width="302" height="182" alt="">{% endif %}{% if page.widget-3.video %}{{ page.widget-3.video }}{% endif %}</a> |
| 41 | + <a href="{{ page.widget-3.url }}">{% if page.widget-3.image %}<img src="{{ site.urlimg }}/{{ page.widget-3.image }}" width="302" height="182" alt="">{% endif %}{% if page.widget-3.video %}{{ page.widget-3.video }}{% endif %}</a> |
32 | 42 | <h2 class="font-size-h3 t10">{{ page.widget-3.title }}</h2> |
33 | 43 | <p>{{ page.widget-3.text }}</p> |
34 | 44 | <p><a class="button tiny radius" href="{{ page.widget-3.url }}">Download @ GitHub ›</a></p> |
35 | 45 | </div><!-- /.medium-4.columns --> |
| 46 | + {% endif %} |
36 | 47 | </div><!-- /.row --> |
37 | 48 |
|
38 | 49 |
|
| 50 | +{% comment %} |
| 51 | +* |
| 52 | +* First check, if there are any posts at all |
| 53 | +* |
| 54 | +{% endcomment %} |
39 | 55 |
|
40 | | -<div class="row t30 b20 homepage"> |
41 | | - <div class="small-12 columns"> |
42 | | - {% for post in site.posts limit:1 %} |
43 | | - {% if post.image.homepage %} |
44 | | - <p> |
45 | | - <a href="{{ site.url }}{{ post.url }}" title="{{ post.title escape_once }}"><img width="970" src="{{ site.url }}/images/{{ post.image.homepage }}" alt="{{ page.title escape_once }}"></a> |
46 | | - </p> |
47 | | - |
48 | | - {% if post.image.url && post.image.credit %} |
49 | | - <p class="text-right caption"> |
50 | | - <a href="{{ post.image.url }}">{{ post.image.credit }}</a> |
51 | | - </p> |
52 | | - {% endif %} |
53 | | - {% elsif post.image.homepage == NULL %} |
54 | | - <h2>{{ site.data.language.new_blog_entries }}</h2> |
55 | | - {% endif %} |
56 | | - {% endfor %} |
57 | | - </div><!-- /.small-12.columns --> |
58 | | -</div><!-- /.row --> |
| 56 | +{% unless site.posts == empty %} |
| 57 | + <div class="row t30 b20 homepage"> |
| 58 | + <div class="small-12 columns"> |
| 59 | + {% for post in site.posts limit:1 %} |
| 60 | + {% if post.image.homepage %} |
| 61 | + <p> |
| 62 | + <a href="{{ site.url }}{{ post.url }}" title="{{ post.title escape_once }}"><img width="970" src="{{ site.url }}/images/{{ post.image.homepage }}" alt="{{ page.title escape_once }}"></a> |
| 63 | + </p> |
| 64 | + |
| 65 | + {% if post.image.url && post.image.credit %} |
| 66 | + <p class="text-right caption"> |
| 67 | + <a href="{{ post.image.url }}">{{ post.image.credit }}</a> |
| 68 | + </p> |
| 69 | + {% endif %} |
| 70 | + {% elsif post.image.homepage == NULL %} |
| 71 | + <h2>{{ site.data.language.new_blog_entries }}</h2> |
| 72 | + {% endif %} |
| 73 | + {% endfor %} |
| 74 | + </div><!-- /.small-12.columns --> |
| 75 | + </div><!-- /.row --> |
59 | 76 |
|
60 | 77 |
|
| 78 | + <div class="row"> |
| 79 | + <div class="medium-6 columns"> |
| 80 | + {% for post in site.posts limit:1 %} |
| 81 | + {% if post.subheadline %}<p class="subheadline">{{ post.subheadline }}</p>{% endif %} |
| 82 | + <h2><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></h2> |
| 83 | + <p> |
| 84 | + {% if post.meta_description %}{{ post.meta_description | strip_html | escape }}{% elsif post.teaser %}{{ post.teaser | strip_html | escape }}{% endif %} |
| 85 | + <a href="{{ site.url }}{{ post.url }}" title="Read {{ post.title escape_once }}"><strong>{{ site.data.language.read_more }}</strong></a> |
| 86 | + </p> |
| 87 | + {% endfor %} |
| 88 | + </div><!-- /.medium-5.columns --> |
| 89 | + |
| 90 | + |
| 91 | + <div class="medium-6 columns"> |
| 92 | + <p><strong>{{ site.data.language.more_articles }}</strong></p> |
| 93 | + {% include list-posts.html entries='3' offset='1' %} |
| 94 | + </div><!-- /.medium-7.columns --> |
| 95 | + </div><!-- /.row --> |
| 96 | +{% endunless %} |
61 | 97 |
|
62 | | -<div class="row"> |
63 | | - <div class="medium-6 columns"> |
64 | | - {% for post in site.posts limit:1 %} |
65 | | - <p class="subheadline">{% if post.subheadline %}{{ post.subheadline }}{% endif %}</p> |
66 | | - <h2><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></h2> |
67 | | - <p> |
68 | | - {% if post.meta_description %}{{ post.meta_description | strip_html | escape }}{% elsif post.teaser %}{{ post.teaser | strip_html | escape }}{% endif %} |
69 | | - <a href="{{ site.url }}{{ post.url }}" title="Read {{ post.title escape_once }}"><strong>{{ site.data.language.read_more }}</strong></a> |
70 | | - </p> |
71 | | - {% endfor %} |
72 | | - </div><!-- /.medium-5.columns --> |
73 | | - |
74 | | - |
75 | | - <div class="medium-6 columns"> |
76 | | - <p><strong>{{ site.data.language.more_articles }}</strong></p> |
77 | | - {% include list-posts.html entries='3' offset='1' %} |
78 | | - </div><!-- /.medium-7.columns --> |
79 | | -</div><!-- /.row --> |
80 | 98 |
|
| 99 | +{% comment %} |
| 100 | +* |
| 101 | +* Finally, if there is content, spit it out. |
| 102 | +* |
| 103 | +{% endcomment %} |
81 | 104 |
|
82 | 105 | <div class="row"> |
83 | 106 | {{ content }} |
|
0 commit comments