-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
176 lines (165 loc) · 7.61 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
164
165
166
167
168
169
170
171
172
173
174
175
176
---
title: Quinn's Home Page
layout: default
---
<section id="hero-section">
<h6 class="indent-01">Hello, World</h6>
<h1 class="indent-01">I'm Quinn Pollock</h1>
<h6 class="circle">I'm a</h6>
<h3 class="indent-02">
Programmer
<br>Nerd,
<br>Queer & Trans,
<br>Girl of Many Hobbies
<br><a href="/ideas/my-pronouns">she/they</a>
<br>here are my thoughts
</h3>
<picture>
<source id="img-01" type="image/avif" srcset="/assets/images/PhotoQuinn.avif" />
<source id="img-01" type="image/webp" srcset="/assets/images/PhotoQuinn.webp" />
<img id="img-01" src="/assets/images/PhotoQuinn.jpg" alt="Quinn Wearing an orange sweater on green pants
standing on a vancouver street" />
</picture>
<svg id="arrow-down-01" width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd"
clip-rule="evenodd">
<path d="M11 21.883l-6.235-7.527-.765.644 7.521 9 7.479-9-.764-.645-6.236 7.529v-21.884h-1v21.883z" /></svg>
</section>
<section id="posts-section">
<div class="post-section">
<h3>
Recent Projects
</h3>
<ul class="list-posts">
{% for post in site.categories.projects limit:3 %}
<li><a href="{{ post.url }}">{{ post.title }}</a>: {{ post.short }} —
{% assign d = post.date | date: "%-d" %}
{% assign m = post.date | date: "%B" %}
{% case m %}
{% when 'April' or 'May' or 'June' or 'July' %}{{ m }}{% when 'September' %}Sept.{% else %}{{ post.date | date: "%b" }}.{% endcase %}
{% case d %}
{% when '1' or '21' or '31' %}{{ d }}st{% when '2' or '22' %}{{ d }}nd{% when '3' or '23' %}{{ d }}rd{% else %}{{d}}th{% endcase %},
{{ post.date | date: "%Y" }}
</li>
{% endfor %}
<li>
<a href="/projects">See More...</a>
</li>
</ul>
</div>
<div class="post-section">
<h3>
Recent Ideas
</h3>
<ul class="list-posts">
{% for post in site.categories.ideas limit:3 %}
<li><a href="{{ post.url }}">{{ post.title }}</a>: {{ post.short }} —
{% assign d = post.date | date: "%-d" %}
{% assign m = post.date | date: "%B" %}
{% case m %}
{% when 'April' or 'May' or 'June' or 'July' %}{{ m }}{% when 'September' %}Sept.{% else %}{{ post.date | date: "%b" }}.{% endcase %}
{% case d %}
{% when '1' or '21' or '31' %}{{ d }}st{% when '2' or '22' %}{{ d }}nd{% when '3' or '23' %}{{ d }}rd{% else %}{{d}}th{% endcase %},
{{ post.date | date: "%Y" }}
</li>
{% endfor %}
<li>
<a href="/ideas">See More...</a>
</li>
</ul>
</div>
<div class="post-section">
<h3>
Recent Doings
</h3>
<ul class="list-posts">
<li>
<strong>I Just Watched: </strong> <a id="recent-film"><span id="film-name">Loading...</span></a>
</li>
<li>
<strong>What I'm Listening to: </strong> <a id="recent-song">
<div id="is-playing">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500" aria-labelledby="now-playing-img" role="img">
<title id="now-playing-img"> Song Currently Playing </title>
<line style="stroke-linecap: round; stroke: #d00; stroke-width: 50px;" x1="115" y1="125"
x2="115" y2="375">
<animate attributeName="y1" values="125;320;200;250;125" begin="0.5s" dur="1.5s"
repeatCount="indefinite" />
</line>
<line style="stroke-linecap: round; stroke: #d00; stroke-width: 50px;" x1="230" y1="125"
x2="230" y2="375">
<animate attributeName="y1" values="125;310;240;140;315;125" begin="0.3s" dur="1.6s"
repeatCount="indefinite" />
</line>
<line style="stroke-linecap: round; stroke: #d00; stroke-width: 50px;" x1="350" y1="125"
x2="350" y2="375">
<animate attributeName="y1" values="125;360;210;140;230;125" begin="0.7s" dur="1.1s"
repeatCount="indefinite" />
</line>
</svg>
</div>
<div id="song-artist"><span id="song-name">Loading...</span><span id="artist-name"></span></div>
</a>
</li>
<li>
<strong>What I Just Read:</strong> <a href="https://www.littlepuss.net/shop/p/meanwhile-elsewhere"
rel="_nofollow">Meanwhile Elsewhere</a>
</li>
<li>
<strong>What I'm Thinking:</strong> Yoo I'm Trans and a Girl but also not a girl here to vibe
</li>
</ul>
</div>
</section>
<script>
function getSongListeningTo() {
fetch("/.netlify/functions/lastFm").then(response => response.json()).then((lastFMData) => {
const song = document.querySelector("#recent-song")
const name = document.getElementById("song-name")
const artist = document.getElementById('artist-name')
const isPlaying = document.getElementById('is-playing')
const link = lastFMData.url
song.href = link
const image = document.createElement('img')
image.src = lastFMData.albumArt
image.alt = `Album: ${lastFMData.album} - ${lastFMData.name}: ${lastFMData.artist}`
if (song.childNodes.length > 5) {
song.removeChild(song.lastChild)
}
if (lastFMData.isPlaying) {
isPlaying.style.display = 'block'
} else {
isPlaying.style.display = 'none'
}
song.appendChild(image)
image.height = "80"
image.width = "80"
name.innerHTML = `${lastFMData.name}`
artist.innerHTML = `${lastFMData.artist}`
}).catch((reject) => {
const song = document.querySelector("#recent-song")
song.href = "https://www.last.fm/user/holopollock"
song.innerHTML = "My Last FM"
})
}
window.addEventListener('DOMContentLoaded', (event) => {
fetch("/.netlify/functions/currentFilm").then(response => response.json()).then((data) => {
const film = document.getElementById("recent-film")
const filmName = document.getElementById("film-name")
const link = data.link.split('https://letterboxd.com')
const filmImage = document.createElement('img')
filmImage.src = data.image
filmImage.alt = data.title.split(',')[0]
filmImage.height = "100"
filmImage.width = "67"
film.appendChild(filmImage)
film.href = `https://letterboxd.com${link[0]}/holopollock${link[1]}`
filmName.innerHTML = data.title.split(',')[0]
}).catch((reject) => {
const film = document.getElementById("recent-film")
film.href = "https://letterboxd.com/holopollock/films/diary/"
film.innerHTML = "My Letterboxd"
})
getSongListeningTo()
setInterval(getSongListeningTo, 300000)
})
</script>