summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjamie <git@skilet.ro>2025-10-15 08:52:08 +0100
committerjamie <git@skilet.ro>2025-10-15 08:52:08 +0100
commit6d8a7df95f53ef33691f70759489bd7e961a9973 (patch)
tree89f94f7f6b4b625e5a87244f6e68314bbc0c9be7
parent49b15415e3d48d6e80a21d644fc3762fecfba0f5 (diff)
refactor: some "small" changes
-rw-r--r--assets/css/default.scss (renamed from css/default.scss)53
-rw-r--r--assets/css/fonts.scss (renamed from css/fonts.scss)0
-rw-r--r--assets/css/syntax.scss (renamed from css/syntax.scss)0
-rw-r--r--assets/fonts/AtkinsonHyperlegibleMono-Regular.ttfbin0 -> 34320 bytes
-rw-r--r--assets/fonts/AtkinsonHyperlegibleNext-Regular.ttfbin0 -> 48064 bytes
-rw-r--r--assets/images/favicon.ico (renamed from images/favicon.ico)bin14098 -> 14098 bytes
-rw-r--r--assets/images/noise.png (renamed from images/noise.png)bin26039 -> 26039 bytes
-rw-r--r--assets/images/nonbinary-flag.svg (renamed from images/nonbinary-flag.svg)0
-rw-r--r--posts/2025-06-20-vr-plus-nixos-plus-nvidia.md15
-rw-r--r--site.hs95
-rw-r--r--templates/default.html8
11 files changed, 105 insertions, 66 deletions
diff --git a/css/default.scss b/assets/css/default.scss
index 5fd653f..c3d6044 100644
--- a/css/default.scss
+++ b/assets/css/default.scss
@@ -5,6 +5,12 @@ $secondary-color: oklch(from $primary-color l c 240);
@import "syntax";
+@mixin for-phone-only {
+ @media (max-width: 499px) {
+ @content;
+ }
+}
+
:root {
font-size: 16px; // acts as a sort of scale because everything uses rem.
}
@@ -55,18 +61,16 @@ body {
}
// --- NAVIGATION BAR ---
-// This whole navbar section needs refactoring, because I'm already confused by it
nav {
display: flex;
width: unset;
padding: 1rem;
position: fixed;
- top: 1rem; // TODO: actually have this floating next to the side like the old site
- right: 1rem;
flex-direction: column;
align-items: center;
gap: 1rem;
height: fit-content;
+ transform: translateX(28rem);
svg {
fill: $foreground-color;
@@ -89,6 +93,15 @@ nav {
}
}
+@include for-phone-only {
+ position: inherit;
+ flex-direction: row;
+
+ hr {
+ display: none;
+ }
+}
+
// --- STANDARD ELEMENTS ---
a {
color: mediumpurple;
@@ -150,7 +163,20 @@ ul {
img {
user-select: none;
- pointer-events: none;
+
+ &:hover {
+ animation: spin 0.5s ease-in-out;
+ }
+}
+
+@keyframes spin {
+ from {
+ transform: rotate(0deg);
+ }
+
+ to {
+ transform: rotate(360deg);
+ }
}
hr {
@@ -169,8 +195,16 @@ hr {
}
// FONTS!!!!!!!!!!!!!!!!! TODO: split up
-@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&display=swap");
-@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:ital,wght@0,200..800;1,200..800&display=swap");
+@font-face {
+ font-family: "Atkinson Hyperlegible Next";
+ src: url("/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf")
+}
+
+
+@font-face {
+ font-family: "Atkinson Hyperlegible Mono";
+ src: url("/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf")
+}
* {
font-family: "Atkinson Hyperlegible Next", sans-serif;
@@ -186,9 +220,7 @@ span {
font-size: 1.25rem;
}
-code {
- font-family: "Atkinson Hyperlegible Mono", monospace;
-}
+code {}
h1,
h2,
@@ -227,9 +259,10 @@ div.sourceCode {
radial-gradient(circle at top right, #952EA4 0%, transparent),
radial-gradient(circle at center right, #6949A5 0%, transparent),
radial-gradient(circle at top center, #336BA0 0%, transparent);
- background-attachment: fixed;
+ background-attachment: scroll;
padding: 0.2rem;
overflow: hidden;
+ font-family: "Atkinson Hyperlegible Mono", monospace;
&>* {
background-color: $background-color;
diff --git a/css/fonts.scss b/assets/css/fonts.scss
index e69de29..e69de29 100644
--- a/css/fonts.scss
+++ b/assets/css/fonts.scss
diff --git a/css/syntax.scss b/assets/css/syntax.scss
index 42be310..42be310 100644
--- a/css/syntax.scss
+++ b/assets/css/syntax.scss
diff --git a/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf b/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf
new file mode 100644
index 0000000..157d62e
--- /dev/null
+++ b/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf
Binary files differ
diff --git a/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf b/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf
new file mode 100644
index 0000000..3fa771f
--- /dev/null
+++ b/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf
Binary files differ
diff --git a/images/favicon.ico b/assets/images/favicon.ico
index 5000bb7..5000bb7 100644
--- a/images/favicon.ico
+++ b/assets/images/favicon.ico
Binary files differ
diff --git a/images/noise.png b/assets/images/noise.png
index 93c1ad7..93c1ad7 100644
--- a/images/noise.png
+++ b/assets/images/noise.png
Binary files differ
diff --git a/images/nonbinary-flag.svg b/assets/images/nonbinary-flag.svg
index 5252870..5252870 100644
--- a/images/nonbinary-flag.svg
+++ b/assets/images/nonbinary-flag.svg
diff --git a/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md b/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md
index 3c6b90e..88fd45c 100644
--- a/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md
+++ b/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md
@@ -2,6 +2,15 @@
title: VR + NixOS + Nvidia
---
+## ⚠️ Note
+
+This post is quite outdated now.
+The 'prerequisites' section is still quite accurate, as you still need the proprietary drivers, however setting WiVRn
+up is significantly easier. I recommend looking at the [Linux VR Adventures Wiki](https://lvra.gitlab.io/docs/distros/nixos/)
+for a much better guide.
+
+## Introduction
+
For the longest time, getting VR working nicely with Linux (and especially NixOS) was a monumental task.
Nowadays however, it is easier than ever: only requiring a handful of lines of Nix!
@@ -91,7 +100,11 @@ We are using `osConfig` in this case, as to use the same package we use when ena
Going back to our main configuration, we now need to tell the game to actually use these settings.
-We can do this by setting our game launch options to `PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/wivrn/comp_ipc %command%`, however that isn't very "Nix", is it?
+We can do this by setting our game launch options to...
+```sh
+PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/wivrn/comp_ipc %command%
+```
+...however, that isn't very "Nix", is it?
To do this for _every_ game, we can override our steam package to include this environment variable.
```nix
diff --git a/site.hs b/site.hs
index 832409e..7c9980b 100644
--- a/site.hs
+++ b/site.hs
@@ -1,37 +1,36 @@
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
-import Control.Exception (SomeException, catch)
-import Data.List (isInfixOf, sortBy)
-import Data.Monoid (mappend)
-import Hakyll
-import Hakyll.Web.Sass (sassCompiler)
-import System.Environment
-import System.FilePath.Posix (splitFileName, takeBaseName,
- takeDirectory, (</>))
-import System.Process
+import Control.Exception
+import Data.List
+import Data.Monoid
+import Hakyll
+import Hakyll.Web.Sass
+import System.Environment
+import System.FilePath.Posix
+import System.Process
--------------------------------------------------------------------------------
main :: IO ()
main = hakyll $ do
- match "images/*" $ do
- route idRoute
- compile copyFileCompiler
+ match "templates/*" $ compile templateBodyCompiler
- match "css/*.css" $ do
+ match ("assets/images/*" .||. "assets/fonts/*") $ do
route idRoute
- compile compressCssCompiler
+ compile copyFileCompiler
- match "css/*.scss" $ do
+ match "assets/css/*" $ do
route $ setExtension "css"
let compressCssItem = fmap compressCss
compile (compressCssItem <$> sassCompiler)
- match "404.html" $ do
- route idRoute
+ match "posts/*" $ do
+ route prettyRoute
compile $
pandocCompiler
- >>= loadAndApplyTemplate "templates/default.html" defaultCtx
+ >>= loadAndApplyTemplate "templates/post.html" postCtx
+ >>= saveSnapshot "content"
+ >>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls
>>= removeIndexHtml
@@ -43,13 +42,11 @@ main = hakyll $ do
>>= relativizeUrls
>>= removeIndexHtml
- match "posts/*" $ do
- route prettyRoute
+ match "404.html" $ do
+ route idRoute
compile $
pandocCompiler
- >>= loadAndApplyTemplate "templates/post.html" postCtx
- >>= saveSnapshot "content"
- >>= loadAndApplyTemplate "templates/default.html" postCtx
+ >>= loadAndApplyTemplate "templates/default.html" defaultCtx
>>= relativizeUrls
>>= removeIndexHtml
@@ -59,8 +56,8 @@ main = hakyll $ do
posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx =
listField "posts" postCtx (return posts)
- `mappend` constField "title" "Archives"
- `mappend` defaultCtx
+ <> constField "title" "Archives"
+ <> defaultCtx
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
@@ -68,10 +65,24 @@ main = hakyll $ do
>>= relativizeUrls
>>= removeIndexHtml
+ match "index.html" $ do
+ route idRoute
+ compile $ do
+ posts <- recentFirst =<< loadAll "posts/*"
+ let indexCtx =
+ listField "posts" postCtx (return posts)
+ <> defaultCtx
+
+ getResourceBody
+ >>= applyAsTemplate indexCtx
+ >>= loadAndApplyTemplate "templates/default.html" indexCtx
+ >>= relativizeUrls
+ >>= removeIndexHtml
+
create ["atom.xml"] $ do
route idRoute
compile $ do
- let feedCtx = postCtx `mappend` bodyField "description"
+ let feedCtx = postCtx <> bodyField "description"
posts <-
fmap (take 10) . recentFirst
=<< loadAllSnapshots "posts/*" "content"
@@ -80,28 +91,12 @@ main = hakyll $ do
create ["rss.xml"] $ do
route idRoute
compile $ do
- let feedCtx = postCtx `mappend` bodyField "description"
+ let feedCtx = postCtx <> bodyField "description"
posts <-
fmap (take 10) . recentFirst
=<< loadAllSnapshots "posts/*" "content"
renderRss feedConfiguration feedCtx posts
- match "index.html" $ do
- route idRoute
- compile $ do
- posts <- recentFirst =<< loadAll "posts/*"
- let indexCtx =
- listField "posts" postCtx (return posts)
- `mappend` defaultCtx
-
- getResourceBody
- >>= applyAsTemplate indexCtx
- >>= loadAndApplyTemplate "templates/default.html" indexCtx
- >>= relativizeUrls
- >>= removeIndexHtml
-
- match "templates/*" $ compile templateBodyCompiler
-
--------------------------------------------------------------------------------
feedConfiguration :: FeedConfiguration
feedConfiguration =
@@ -129,9 +124,9 @@ removeIndexHtml item = return $ fmap (withUrls removeIndexStr) item
removeIndexStr :: String -> String
removeIndexStr url = case splitFileName url of
(dir, "index.html") | isLocal dir -> dir
- _ -> url
+ _ -> url
where
- isLocal uri = not (isInfixOf "://" uri)
+ isLocal uri = not ("://" `isInfixOf` uri)
--------------------------------------------------------------------------------
@@ -150,17 +145,11 @@ cDateCtx = dateField "cdate" "%Y-%m-%d"
gitRevisionField :: String -> Context String
gitRevisionField = flip field (const gitRevision)
--- Compiler which attempts to find the current git revision. This is done by
--- first checking the "REVISION" environment variable and, if this fails,
--- running the command "git rev-parse HEAD".
gitRevision :: Compiler String
-gitRevision = do
- rev <- unsafeCompiler (getEnv "REVISION" `catch` (\e -> return (e :: SomeException) >> return ""))
- if rev == ""
- then unixFilter "git" ["rev-parse", "--short=7", "HEAD"] ""
- else return rev
+gitRevision = unixFilter "git" ["rev-parse", "--short=7", "HEAD"] ""
gitRevisionCtx :: Context String
gitRevisionCtx = gitRevisionField "revision"
--------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
diff --git a/templates/default.html b/templates/default.html
index bd94760..f50fae5 100644
--- a/templates/default.html
+++ b/templates/default.html
@@ -5,7 +5,7 @@
<title>$title$ ~ Skiletro</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="description" content="" />
- <link rel="stylesheet" type="text/css" href="/css/default.css" />
+ <link rel="stylesheet" type="text/css" href="/assets/css/default.css" />
<link rel="icon" href="/images/favicon.ico" />
<meta name="theme-color" content="#9141ac" />
<meta property="og:title" content="" />
@@ -75,7 +75,11 @@
<a href="/archive">Archive</a>
<a href="/pages/playlists">Playlists</a>
<hr />
- <img src="/images/nonbinary-flag.svg" width="20rem" height="20rem" />
+ <img
+ src="/assets/images/nonbinary-flag.svg"
+ width="20rem"
+ height="20rem"
+ />
</nav>
<main>$body$</main>
<footer>