-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
154 lines (144 loc) · 6.96 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
---
title: trumpocalypse
description: our slow slide out of normal
trumpocalypse-path: /pages/trumpocalypse/
image: trump.jpg
---
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Trumpocalypse</title>
<link rel="icon" type="image/png" href="http://{{ site.url }}{{ page.trumpocalypse-path }}favicon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<meta property="og:title" content="{{ page.title | escape }}">
<meta property="og:url" content="http://{{ page.url | prepend: site.baseurl | prepend: site.url }}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:description" content="{{ page.description | escape }}">
<meta property="og:image" content="http://{{ site.url }}{{ page.trumpocalypse-path }}{{ page.image }}">
<meta property="og:type" content="article">
<meta name="twitter:card" content="summary">
<meta name="twitter:description" content="{{ page.description | escape }}">
<meta name="twitter:title" content="{{ page.title | escape }}">
<meta name="twitter:url" content="http://{{ page.url | prepend: site.baseurl | prepend: site.url }}">
<meta name="twitter:site" content="@{{ site.twitter_username }}">
<meta name="twitter:creator" content="@{{ site.twitter_username }}">
<meta name="twitter:domain" content="{{ site.url }}">
<meta property="twitter:image" content="http://{{ site.url }}{{ page.trumpocalypse-path }}{{ page.image }}">
<script src="https://use.fontawesome.com/3543a4d7b1.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond:500,500i,600|Crimson+Text:600" rel="stylesheet">
<script>
$(document).ready(function(){
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
return false;
};
var tagToShow = getUrlParameter("tag");
if (tagToShow) {
$(".event").not(".event-" + tagToShow).hide();
$(".day-header").not(".day-" + tagToShow).hide();
var tagToDisplay = tagToShow.replace(/\-/g, ' ')
$(".main-subtitle").prepend("Stories Tagged '" + tagToDisplay + "' ");
} else {
$(".main-subtitle-row").hide();
}
});
</script>
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
<link rel="stylesheet" href="{{site.baseurl }}{{ page.trumpocalypse-path }}trumpocalypse.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="main-title"><a href="http://{{ site.url }}{{ page.trumpocalypse-path }}">The Trump Administration</a></div>
</div>
</div>
<div class="row subtitle-row">
<div class="col-md-10 col-md-offset-1">
<div class="header-nav">
<a class="header-link" href="http://{{ site.url }}{{ page.trumpocalypse-path }}tags">All Tags</a> — <a href="http://{{ site.url }}{{ page.trumpocalypse-path }}">Home</a> — <a class="header-link" href="http://{{ site.url }}{{ page.trumpocalypse-path }}about">About</a>
</div>
</div>
</div>
<div class="row subtitle-row main-subtitle-row">
<div class="col-md-10 col-md-offset-1">
<div class="main-subtitle">
</div>
</div>
</div>
{% assign years = site.data.trumpocalypse | sort %}
{% assign dayzero_seconds = "2017-01-19" | date: '%s' %}
{% for year in years reversed %}
{% assign months = year[1] | sort %}
{% for month in months reversed %}
{% assign days = month[1] | sort %}
{% for day in days reversed %}
{% assign item_date = year[0] | append: "-" | append: month[0] | append: "-" | append: day[0] %}
{% assign item_seconds = item_date | date: '%s' %}
{% assign seconds_diff = item_seconds | minus: dayzero_seconds %}
{% assign days_in_office = seconds_diff | divided_by: 3600 | divided_by: 24 %}
{% assign events = day[1] | sort %}
<div id="{{ item_date }}" class="day-header {% for event in events %}{% for tag in event[1].tags %}day-{{ tag | replace: " ", "-" | downcase }} {% endfor %}{% endfor %}">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="day" id="{{ item_date }}">Day {{ days_in_office }}</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="date">{{ item_date | date: "%A %e %B %Y" }}</div>
</div>
</div>
</div>
{% for event in events reversed %}
<div class="row top-buffer event {% for tag in event[1].tags %}event-{{ tag | replace: " ", "-" | downcase }} {% endfor %}" id="{{ item_date }}-{{ event[0] }}">
<div class="col-md-6 col-md-offset-3">
<div class="title"><a href="{{ event[1].url }}">{{ event[1].title }}</a></div>
<div class="tag-box">
<ul>
{% for tag in event[1].tags %}
<li>
<a href="{{site.baseurl }}{{ page.trumpocalypse-path }}?tag={{ tag | replace: " ", "-" | downcase }}"><span class="tag {{ tag | replace: " ", "-" | downcase }}" role="button">
{{ tag }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% if event[1].quote %}
<div class="quote">“{{ event[1].quote }}”</div>
{% endif %}
{% if event[1].desc %}
<div class="desc">{{ event[1].desc }}</div>
{% endif %}
</div>
<div class="col-md-2">
</div>
</div>
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
<p>Favicon by Fabian Sanabria</p>
</div>
</body>