mirror of
https://github.com/mat-1/matdoesdev.git
synced 2025-08-02 06:36:04 +00:00
qotd
This commit is contained in:
parent
bcb1938339
commit
09f43a61b0
3 changed files with 42 additions and 4 deletions
|
@ -390,20 +390,22 @@
|
|||
<div class="right-sidebar">
|
||||
<h2>BLOG POSTS</h2>
|
||||
{#each posts as post}
|
||||
<div><a href={post.slug}>{post.title}</a></div>
|
||||
<div class="sidebar-list-entry-container"><a href={post.slug}>{post.title}</a></div>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="right-sidebar">
|
||||
<h2>PROJECTS</h2>
|
||||
{#each projects as project}
|
||||
<div><a href={project.href}>{project.name}</a></div>
|
||||
<div class="sidebar-list-entry-container">
|
||||
<a href={project.href}>{project.name}</a>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td> </td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -413,7 +415,18 @@
|
|||
<img src="//counter.matdoes.dev" alt="visitor counter" id="counter" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><p class="last-updated">Page last updated: September 15, 2024</p></td></tr>
|
||||
<tr><td><p class="last-updated">Page last updated: December 9, 2014</p></td></tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="qotd-container">
|
||||
<h3>QUOTE OF THE DAY</h3>
|
||||
<p>
|
||||
> {data.qotd}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -431,9 +444,13 @@
|
|||
height: 400px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.sidebar-list-entry-container {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
#main-table {
|
||||
width: 100%;
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
|
||||
#welcome {
|
||||
|
@ -606,4 +623,15 @@
|
|||
padding: 1px;
|
||||
color: #d2a6ff;
|
||||
}
|
||||
|
||||
.qotd-container {
|
||||
font-family: serif;
|
||||
border: 1px solid #fffa;
|
||||
padding: 1rem;
|
||||
background: url(/retro/purple4.gif);
|
||||
}
|
||||
.qotd-container h3 {
|
||||
margin: 0;
|
||||
color: #7fd962;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -4,8 +4,18 @@ export const load: Load = async ({ fetch }) => {
|
|||
const posts = await fetch('/blog-preview.json').then((r: Response) => r.json())
|
||||
const status = await fetch('/status.json').then((r: Response) => r.json())
|
||||
|
||||
let qotd = 'Error: Failed to fetch quote of the day'
|
||||
try {
|
||||
qotd = await fetch('https://matdoes.dev/qotd').then((r: Response) => r.text())
|
||||
// remove first line since it's just "Quote of the day:"
|
||||
qotd = qotd.split('\n').slice(1).join('\n')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
|
||||
return {
|
||||
posts,
|
||||
status,
|
||||
qotd,
|
||||
}
|
||||
}
|
||||
|
|
BIN
static/retro/purple4.gif
Normal file
BIN
static/retro/purple4.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
Loading…
Add table
Reference in a new issue