-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
163 lines (146 loc) · 6.27 KB
/
index.html
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
---
layout: default
class: home-page
title: Welcome
---
<div class='hero background-image'>
<div class='hero-text'>
<div class='subhead'>YALE UNIVERSITY LIBRARY</div>
<h1>Digital Humanities Lab</h1>
<a href='{{ site.baseurl }}/methods.html' class='white-button'>What is Digital Humanities?</a>
</div>
{% include heroes/hero_video.html %}
</div>
<!-- temporary warning -->
<!-- {% include warning_banner.html text='All Yale Library websites and resources will be offline from 9 pm EDT July 17 to approx. 10:30 am EDT on July 18. Updates 7/18 on <a href="https://twitter.com/YaleLibrary">@YaleLibrary</a> Twitter.' %} -->
<div class='home-center-column'>
<!-- HOME EVENTS DESKTOP -->
<section aria-label='events calendar' id='events-calendar'>
<div class='home-section-title'>
<a href='{{ site.baseurl }}/events.html'>EVENTS CALENDAR</a>
</div>
<div class='home-events-container hide-tablet'>
<!-- get future events -->
{% include get_future_or_past_records.liquid records=site.events type='future' %}
{% assign future_events = records %}
<!-- get the site events (for padding) sorted -->
{% include get_sorted_records.liquid records=site.events %}
{% assign sorted_events = records %}
<!-- get the site news (for padding) sorted -->
{% include get_sorted_records.liquid records=site.news %}
{% assign sorted_news = records %}
<!-- combine and sort the events and news -->
{% assign sorted_items = sorted_events | concat: sorted_news %}
{% assign sorted_items = sorted_items | sort: 'date' | reverse %}
<!-- get the urls of items in the future_events -->
{% assign future_event_urls = '' | split: '' %}
{% for i in future_events %}
{% assign future_event_urls = future_event_urls | push: i.url %}
{% endfor %}
<!-- add items to future_events until there are 3 items -->
{% assign padding = '' | split: '' %}
{% for item in sorted_items %}
{% assign count = future_events.size | plus: padding.size %}
{% if count < 3 %}
{% if future_event_urls contains item.url %}
<!-- pass -->
{% else %}
{% assign padding = padding | push: item %}
{% assign future_event_urls = future_event_urls | push: item.url %}
{% endif %}
{% endif %}
{% endfor %}
{% assign padding = padding | reverse %}
{% assign render_list = future_events | concat: padding %}
<!-- sort the render_list by date -->
{% assign render_list = render_list | sort: 'date' %}
{% for item in render_list %}
<div class='home-event-wrapper'>
<a href='{{ item.url | prepend: site.baseurl }}' class='hide-tablet'>
{% assign image_url = item.thumbnail | prepend: site.baseurl %}
<div class='home-event-image background-image event-date-container blur-container'
style='background-image: url({{ image_url }})' alt='{{ item.alt }}'>
{% include events/event_date.html event=item %}
{% assign label=item.categories | first %}
{% if item.short_title %}
{% include cards/card_title_box.html
label=label
title=item.short_title %}
{% else %}
{% include cards/card_title_box.html
label=label
title=item.title %}
{% endif %}
</div>
</a>
</div>
{% endfor %}
</div>
<div class='mobile'>
{% for item in render_list %}
{% include cards/horizontal_card.html item=item %}
{% endfor %}
</div>
</section>
<!-- HOME NEWS -->
<section aria-label='recent news'>
<div class='home-section-title'>
<a href='{{ site.baseurl }}/news.html'>WHAT'S NEW</a>
</div>
<div class='large-card'>
{% include news/get_news_spotlight_top.html %}
<a href='{{ item.url | prepend: site.baseurl }}'>
{% assign image_url = item.image | prepend: site.baseurl %}
<div class='full-width-card-image background-image blur-container'
style='background-image: url({{ image_url }})' alt='{{ item.alt }}'>
{% assign label = item.categories | first %}
{% include cards/card_title_box.html
label=label
title=item.title %}
</div>
</a>
<div class='large-card-text'>
<div class='button-prompt'>
<b>Schedule a consultation</b> for guidance on your digital humanities projects.
</div>
<a href='{{ site.baseurl }}/resources/consultations.html' class='color-button'>
<b>Consultations</b>
</a>
</div>
</div>
</section>
<!-- MOBILE CONSULTATIONS -->
<div class='mobile newsletter background-image'>
<div class='small-uppercase center-text'>CONSULTATIONS</div>
<div class='newsletter-text'>
<div><p><b>Schedule a consultation</b> for guidance on your digital humanities projects.</p></div>
<a href='{{ site.baseurl }}/resources/consultations.html' target='_blank' class='color-button'><b>Consultations</b></a>
</div>
</div>
<!-- HOME SPOTLIGHT-BOTTOM -->
<section aria-label='spotlight-bottom'>
<div class='home-section-title'>SPOTLIGHT</div>
{% include news/get_news_spotlight_bottom.html %}
{% capture square_html %}
<div class='news-card-square color-background'>
<div><h2 aria-labelledby='Newsletter Signup'>Sign up for the <br/>DHLab e-newsletter!</h2></div>
<p>Join our mailing list to learn about the latest news, events, and opportunities at the Yale Digital Humanities Lab.</p>
<p>We support projects in all stages of development—from conceptualization through implementation.</p>
<a href='{{ site.newsletter }}' target='_blank'><b><span class='white-text'>Subscribe »</span></b></a>
</div>
{% endcapture %}
{% capture button_prompt %}
<div class='button-prompt'>
<b>Find our tips and templates</b> for planning, designing, and managing digital projects.
</div>
<a href='{{ site.baseurl }}/guides.html' class='color-button'>
<b>Start Here</b>
</a>
{% endcapture %}
{% include cards/news_card.html
item=item
square_html=square_html
button_prompt=button_prompt
%}
</section>
</div>