-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.twig
95 lines (93 loc) · 4.2 KB
/
home.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{% extends "_layout.twig" %}
{% from "_utilities.twig" import retina_crop %}
{% block about_content_id %}about{% endblock %}
{% block about_content %}
<div class="container">
<div class="about_logo"></div>
<div class="about_text">
{{ record.templatefields.about_text }}
</div>
</div>
<div class="about-panel-stat-line">
<div class="container">
<span class="h4">STATISTICS</span>
<div>
<span><span class="stat-heading">TOTAL VIEWS:</span> {{ record.templatefields.youtube_views|default('0')|reverse|split('',3)|join(',')|reverse }}</span>
<span><span class="stat-heading">TOTAL SUBSCRIBERS:</span> {{ record.templatefields.youtube_subscribers|default('0')|reverse|split('',3)|join(',')|reverse }}</span>
<span><span class="stat-heading">TOTAL VIDEOS:</span> {{ record.templatefields.youtube_videos|number_format }}</span>
</div>
</div>
</div>
{% endblock %}
{% block content_outside_container %}
<section id="hero">
<div class="container">
<div class="row {% if record.templatefields.promo_image is empty %}no-promo{% endif %}">
<div class="common-links">
{{ menu('common_links', '_menu_common_links.twig') }}
</div>
{% if record.templatefields.promo_image is not empty %}
<div class="promo">
{% if record.templatefields.promo_link is not empty %}<a href="{{ record.templatefields.promo_link }}">{% endif %}
<img {{ retina_crop(record.templatefields.promo_image, 864, 486) }} class="img-fluid" alt="{{ record.templatefields.promo_image_title }}">
{% if record.templatefields.promo_link is not empty %}</a>{% endif %}
</div>
{% endif %}
</div>
</div>
</section>
{% endblock %}
{% block content %}
<h1 class="section-heading">Latest News</h1>
{% setcontent news = 'news/latest/3' %}
{% if news is not empty %}
<section id="latest-news">
{% for item in news %}
<a href="{{ item.link }}" class="news-item news-item-list news-item-latest">
<div class="news-item-thumb">
{%- if item.image is not empty -%}
<img {{ retina_crop(item.image, 384, 216) }} alt="{{ item.values.image.title }}">
{%- else -%}
<div class="no-thumb no-thumb-16x9"></div>
{%- endif -%}
</div>
<div class="news-item-body">
<div class="detail published">{{ item.datepublish|date("F jS, Y")}}</div>
<h2>{{ item.title|length > 120 ? item.title|slice(0,120)|striptags ~ ' ...' : item.title }}</h2>
</div>
</a>
{% endfor %}
</section>
<a class="important-link" href="{{paths.root}}news">More News...</a>
{% else %}
<p class="no-content">There is no news.</p>
{% endif %}
<hr class="bold">
<div class="row">
<section id="upcoming-events">
<h1 class="section-heading">Upcoming Events</h1>
{% setcontent events = 'events' where {'event_time ||| event_end_day': '> 1 days ago ||| > 1 days ago'} limit 5 orderby 'event_time' %}
{% set month = "" %}
{% if events is not empty %}
<dl>
{% for event in events %}
{% if month != event.event_time|date("F Y") %}
{% if loop.first != true %}<hr>{% endif %}
<dt>{{ event.event_time|date("F Y") }}</dt>
{% set month = event.event_time|date("F Y") %}
{% endif %}
<dd><b>{{ event.event_time|date("jS") }}</b> {{ event.title }} <a href="{{ event.link }}">(details)</a></dd>
{% endfor %}
</dl>
<a class="important-link" href="{{paths.root}}calendar">Full Calendar...</a>
{% else %}
<p class="no-content">There are no upcoming events.</p>
{% endif %}
</section>
<section id="twitter-embed"><hr class="bold">
<h1 class="section-heading">Latest Tweet</h1><a class="twitter-timeline" href="https://twitter.com/blendermf" data-widget-id="731267577431740416" data-chrome="noheader nofooter transparent noborders" data-tweet-limit="1">Tweets by @MindcrackLP</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<a class="important-link" href="https://twitter.com/MindcrackLP">View More on Twitter...</a>
</section>
</div>
{% endblock %}