it ugly but it is getting there

This commit is contained in:
Siina Mashek 2024-11-18 17:10:08 +02:00
parent b9022c673b
commit efe2dafd1d
16 changed files with 233 additions and 102 deletions

View File

@ -7,6 +7,5 @@ clean:
rm -fr _build/ _site/
publish:
ssh criminallycute.fi "rm -r /var/www/criminallycute.fi/public"
scp -Cr _site criminallycute.fi:/var/www/criminallycute.fi/public
rsync -avz _site/* criminallycute.fi:/var/www/criminallycute.fi/public

View File

@ -1,5 +1,30 @@
- active:
- name: test
link: https://some.site
- name: criminallycute.fi
link: https://code.criminallycute.fi/CriminallyCute/website
description: |
Fleet bilge rat hang the jib Sail ho dead men tell no tales gibbet yardarm galleon. Bowsprit long boat cackle fruit draft chandler scurvy crimp black spot lugger Sea Legs.
This current website. It is written in Elixir.
- name: Escia
link:
description: |
My long-time tabletop roleplaying world and ruleset. Currently
digitising all of it and doing some formatting updates before
it is ready to show off fully. It is Creative Commons licensed.
- name: Unpleasant Hammer Princess
link:
description: |
A 2d platformer that is mostly learning how to use godot.
- inactive:
- name: ameliabot
link: https://code.criminallycute.fi/siina/ameliabot
description: |
An owncast bot I had been working on. Wanted to make it work on twitch too
but project priorities have changed and this is now on the backburner.
- archived:
- name: siina.monster
link: https://code.criminallycute.fi/siina/siina.monster
description: |
An old instance of my noter blog. It was a nice idea but I decided to
combine it with criminallycute.fi

View File

@ -0,0 +1,20 @@
---
layout: Website.PostLayout
title: Faster Steam Downloads
date: 2024-02-28
categories: blog
permalink: /blog/faster-steam-downloads
---
To get faster steam downloads in linux:
create `~/.steam/steam/steam_dev.cfg` and add:
```elixir
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0
```
restart steam, start a download, and you should notice a better download rate.
for me it went from capping at 100mbps to now going 500+mbps like it should.

View File

@ -1,9 +0,0 @@
---
layout: Website.PostLayout
title: Test Post
date: 2024-11-08
categories: post
permalink: /blog/test-post
---
TEST POST PLEASE IGNORE

View File

@ -4,6 +4,7 @@ config :tableau, :reloader,
patterns: [
~r"^lib/.*.ex",
~r"^(_posts|_pages)/.*.md",
~r"%(_notes|_notes)/.*.md",
~r"assets/.*.(css|js)",
]
@ -17,7 +18,7 @@ config :tableau, :config,
mdex: [
extension: [table: true, header_ids: "", tasklist: true, strikethrough: true],
render: [unsafe_: true],
features: [syntax_highlight_theme: "kanagawa"]
features: [syntax_highlight_theme: "nord"]
]
]
@ -34,4 +35,3 @@ config :tableau, Tableau.RSSExtension,
config :elixir, :time_zone_database, Tz.TimeZoneDatabase
import_config "#{Mix.env()}.exs"

View File

@ -4,9 +4,9 @@ defmodule Website.PageLayout do
def template(assigns) do
~H"""
<article>
<%= {:safe, render(@inner_content)} %>
</article>
<article>
<%= {:safe, render(@inner_content)} %>
</article>
"""
end
end

View File

@ -4,7 +4,9 @@ defmodule Website.PostLayout do
def template(assigns) do
~H"""
<article>
<%= {:safe, render(@inner_content)} %>
</article>
"""
end
end

View File

@ -0,0 +1,12 @@
defmodule Website.ProjectsLayout do
use Tableau.Layout, layout: Website.RootLayout
use Phoenix.Component
def template(assigns) do
~H"""
<article>
<%= {:safe, render(@inner_content)} %>
</article>
"""
end
end

View File

@ -17,22 +17,21 @@ defmodule Website.RootLayout do
</title>
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="stylesheet" href="/css/site.css" />
<!-- optional javascript: only used for highlighting active page in nav -->
<script type="text/javascript" src="/js/site.js" />
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/projects">Projects</a></li>
</ul>
<a class="nav-link" href="/">Home</a>
<a class="nav-link" href="/about">About</a>
<a class="nav-link" href="/blog">Blog</a>
<a class="nav-link" href="/projects">Projects</a>
<sitename>
<h1><a href="#"><%= @page[:title] %></a></h1>
</sitename>
</nav>
<div>
<h1><%= @page[:title] %></h1>
<h2>This is a test site, please pardon the clutter.</h2>
</div>
</header>
<main>
@ -40,14 +39,13 @@ defmodule Website.RootLayout do
</main>
<footer>
<ul>
<li>some link</li>
<li>some link 2</li>
</ul>
<div>
<p>&copy; <%= Date.utc_today().year %> Criminally Cute</p>
<p><a class="underline" href="/feed.xml">RSS</a></p>
</div>
<nav>
<a href="https://code.criminallycute.fi/CriminallyCute/website">source</a>
<a class="underline" href="/feed.xml">RSS</a>
<copyright>
&copy; <%= Date.utc_today().year %> Criminally Cute
</copyright>
</nav>
</footer>
</body>
</html>

View File

@ -8,9 +8,7 @@ defmodule Website.AboutPage do
def template(assigns) do
~H"""
<p>Lateen sail pillage reef splice the main brace loot capstan carouser boatswain Corsair run a rig. Capstan tackle careen booty brig stern parrel topsail rope's end run a shot across the bow. Boatswain gun plunder jack no prey, no pay sutler carouser driver bring a spring upon her cable quarter.</p>
<p>Sink me bring a spring upon her cable scourge of the seven seas piracy shrouds reef sails long boat killick Shiver me timbers belay. Schooner keelhaul parrel gangway grapple nipper chantey lad cackle fruit rutters. Come about bowsprit jury mast main sheet line sloop skysail yard Sea Legs weigh anchor.</p>
<p>Bilge hornswaggle draught coffer lass boom boatswain hempen halter gun blow the man down. Heave to pink Privateer bounty rum parley mutiny scurvy wherry trysail. Trysail Sea Legs mizzenmast long boat topmast furl aft fathom landlubber or just lubber jolly boat.</p>
<p>There is going to be something here, but for now there is not.</p>
"""
end
end

View File

@ -8,13 +8,13 @@ defmodule Website.BlogPage do
def template(assigns) do
~H"""
<h2>Blog posts</h2>
<section>
<article :for={post <- @posts} class="mt-8">
Blog description goes here
<a href={post.permalink}>
<h3>
<time><%= post.date |> Calendar.strftime("%d.%b.%Y") %></time>
<%= post.title %>
:: <%= post.title %>
</h3>
</a>
</article>

View File

@ -8,8 +8,18 @@ defmodule Website.HomePage do
def template(assigns) do
~H"""
<p>Swing the lead bucko bilge water jib smartly reef crack Jennys tea cup gibbet pillage boatswain.</p>
<p>Ballast maroon fathom Sink me hempen halter Admiral of the Black scuppers jury mast Jolly Roger rutters. Gibbet Plate Fleet snow sloop Barbary Coast tender barque loot loaded to the gunwalls Brethren of the Coast. Sheet loot clap of thunder Nelsons folly Chain Shot case shot warp dance the hempen jig bucko quarter. </p>
<p>Hello! Need to put stuff here...</p>
<section class="recent-posts">
<h2>Recent posts</h2>
<div :for={post <- @posts}>
<a href={post.permalink}>
<h3>
<time><%= post.date |> Calendar.strftime("%d.%b.%Y") %></time>
:: <%= post.title %>
</h3>
</a>
</div>
</section>
"""
end
end

View File

@ -1,6 +1,6 @@
defmodule Website.ProjectsPage do
use Tableau.Page,
layout: Website.PageLayout,
layout: Website.ProjectsLayout,
permalink: "/projects",
title: "Projects"
@ -8,27 +8,20 @@ defmodule Website.ProjectsPage do
def template(assigns) do
~H"""
<div>
<div>
<%= for type <- @data["projects"] do %>
<div :for={{status, projects} <- type}>
<h2><%= status %></h2>
<div>
<div :for={project <- projects}>
<%= if project["link"] do %>
<a href={project["link"]}><%= project["name"] %></a>
<% else %>
<%= project["name"] %>
<% end %>
<p class="mt-0 text-sm">
<%= project["description"] %>
</p>
</div>
</div>
</div>
<% end %>
<%= for type <- @data["projects"] do %>
<div class="projects" :for={{status, projects} <- type}>
<h2><%= status %></h2>
<article class="project" :for={project <- projects}>
<h3><%= if project["link"] do %>
<a href={project["link"]} target="_blank"><%= project["name"] %></a>
<% else %>
<%= project["name"] %>
<% end %></h3>
<%= project["description"] %>
</article>
</div>
</div>
<% end %>
"""
end
end

View File

@ -1,4 +1,114 @@
:root {
color-scheme: dark light;
/* Colours formatted like Xresources */
--fg: #e6cfcd;
--bg: #110705;
--cursor: #e6cfcd;
/* black */
--color0: #1c0d0b;
--color8: #79e5ec;
/* red */
--color1: #291513;
--color9: #88cd9e;
/* green */
--color2: #412420;
--color10: #7fe7a3;
/* yellow */
--color3: #613934;
--color11: #eac3bf;
/* blue */
--color4: #8a544c;
--color12: #93eaaf;
/* magenta */
--color5: #bc746a;
--color13: #e98bd6;
/* cyan */
--color6: #d5a7a2;
--color14: #e9a2da;
/* white */
--color7: #eedfde;
--color15: #edcdca;
color-scheme: dark;
--background: light-dark(var(--fg), var(--bg));
--text: light-dark(var(--bg), var(--fg));
}
html {
background-color: var(--background);
}
body {
padding: 1em;
background-color: var(--color2);
color: var(--text);
main {
padding: 1em;
}
h2 {
margin: 0;
}
article {
padding: 1em;
background-color: var(--color0);
min-height: 50vh;
.recent-posts {
padding-top: 2em;
}
.projects {
padding-left: 1em;
}
}
}
iframe {
display: block;
margin: auto;
overflow: hidden;
border: 0;
width: 854px;
height: 480px;
}
.project {
min-height: 0;
h3 {
margin: 0 0 1em 0;
}
margin-bottom: 0.5em;
background-color: var(--color1);
}
header nav, footer nav {
a {
display: inline;
margin: 0.5em;
padding: 0.5em;
}
a.active {
background-color: var(--color3);
}
sitename, copyright {
float: right;
}
}
nav sitename h1 {
margin: -0.33em 0 0 0;
padding: 0;
}
a, a:visited {
color: var(--color11);
}
pre {
background-color: transparent !important;
padding: 1em;
}

9
static/js/site.js Normal file
View File

@ -0,0 +1,9 @@
window.onload = function() {
var links = document.querySelectorAll('.nav-link');
links.forEach(function(link) {
if (link.href === window.location.href) {
link.classList.add('active');
}
});
};

View File

@ -1,36 +0,0 @@
---
layout: Website.PostLayout
title: Test Post
date: 2024-11-8
categories: post
permalink: "/test-post"
---
Id love to drop anchor in your lagoon. Brwaack! Polly want a cracker? … Oh, wait. Thats for Talk Like a PARROT Day. Thats quite a cutlass ye got thar, what ye need is a good scabbard! Take what you can, give nothing back And that was done without a single drop of rum… The existence of the sea means the existence of pirates.
Lets get together and haul some keel. Aye, I guarantee ye, Ive had a twenty percent decrease in me “lice ratio!” Me Im Dishonest. And A Dishonest Man You Can Always Trust To Be Dishonest. Honestly Its The Honest Ones You Want To Watch Out For Because You Never Know When They Are Going To Do Something Completely Stupid! The rougher the seas, the smoother we sail. Ahoy! Give me freedom or give me the rope. For I shall not take the shackles that subjugate the poor to uphold the rich. Drink up me hearties yoho …a pirates life for me The average man will bristle if you say his father was dishonest, but he will brag a little if he discovers that his great- grandfather was a pirate.
``` bash
#!/bin/sh
if [[ ! $1 ]]; then
user="siinamonster"
else
user="$1"
fi
api_url="https://api.listenbrainz.org/1/user/$user/playing-now"
data=$(curl -s $api_url | jq -r '.payload.listens[0].track_metadata')
artist=$(echo "$data" | jq '.artist_name' | tr -d '"')
track=$(echo "$data" | jq '.track_name' | tr -d '"')
if [[ "$artist" != "null" ]]; then
echo "Currently playing: $artist" - "$track"
else
echo "Not listening to anything right now."
fi
```
Come on up and see me urchins. Prepare to be boarded. Thats the finest pirate booty Ive ever laid eyes on. What are YOU doing here? Lifes pretty good, and why wouldnt it be? Im a pirate, after all. Shiver me timbers.
Pardon me, but would ya mind if I fired me cannon through your porthole? Take what you can, give nothing back There comes a time in most mens lives where they feel the need to raise the Black Flag. you know, thats the 2nd time Iv watched that man sail away with my ship. “Ive got a jar of dirt! Ive got a jar of dirt, and guess whats inside it?” “Why is the rum always gone?” Land was created to provide a place for boats to visit.