lots of small fixes

This commit is contained in:
ch0ccyra1n 2022-08-08 18:03:25 -07:00
parent 391c60dca5
commit bc63d8e015
9 changed files with 123 additions and 3 deletions

View file

@ -1,6 +1,7 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2014 Spencer Lyon Copyright (c) 2014 Spencer Lyon
Copyright (c) 2022 ch0ccyra1n
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -20,4 +20,3 @@ Hi, I'm ch0ccyra1n and this is my website! Thanks for stopping by!
- {{< rawhtml >}}<a rel="me" href="https://kolektiva.social/@ch0ccyra1n"><img style="width: 20px;" src="https://kolektiva.social/favicon.ico" alt="Mastodon icon">My Mastodon</a><sup>[<a href="https://joinmastodon.org/">?</a>]</sup>{{< /rawhtml >}}, where I post semi-frequently. - {{< rawhtml >}}<a rel="me" href="https://kolektiva.social/@ch0ccyra1n"><img style="width: 20px;" src="https://kolektiva.social/favicon.ico" alt="Mastodon icon">My Mastodon</a><sup>[<a href="https://joinmastodon.org/">?</a>]</sup>{{< /rawhtml >}}, where I post semi-frequently.
- {{< rawhtml >}}<a href="/posts/index.xml"><img style="width: 20px;" src="https://www.rssboard.org/images/rss-icon.png" alt="RSS icon">Subscribe via RSS</a><sup>[<a href="#">?</a>]</sup>{{< /rawhtml >}} - {{< rawhtml >}}<a href="/posts/index.xml"><img style="width: 20px;" src="https://www.rssboard.org/images/rss-icon.png" alt="RSS icon">Subscribe via RSS</a><sup>[<a href="#">?</a>]</sup>{{< /rawhtml >}}
--- ---

View file

@ -1,3 +1,60 @@
--- ---
title: "Posts" title: "Posts"
--- ---
My thoughts and opinions on whatever.
{{< rawhtml >}}
<noscript>
<div class="announcement">
JavaScript is required for search. You can still read articles without it.
</div>
</noscript>
<div class="search js-only">
<input type="text" id="search" placeholder="Search ALL Posts...">
<button id="clear-search">
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>Backspace</title><path d="M135.19 390.14a28.79 28.79 0 0021.68 9.86h246.26A29 29 0 00432 371.13V140.87A29 29 0 00403.13 112H156.87a28.84 28.84 0 00-21.67 9.84v0L46.33 256l88.86 134.11z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M336.67 192.33L206.66 322.34M336.67 322.34L206.66 192.33M336.67 192.33L206.66 322.34M336.67 322.34L206.66 192.33"></path></svg>
</button>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
for (e of document.getElementsByClassName("js-only")) {
e.classList.remove("js-only");
}
const articles = document.querySelectorAll("#artlist li");
const search = document.getElementById("search");
const clearSearch = document.getElementById("clear-search");
const artlist = document.getElementById("artlist");
search.addEventListener("input", () => {
// grab search input value
const searchText = search.value.toLowerCase().trim().normalize('NFD').replace(/\p{Diacritic}/gu, "");
const searchTerms = searchText.split(" ");
const hasFilter = searchText.length > 0;
artlist.classList.toggle("list-searched", hasFilter);
// for each article hide all but matched
articles.forEach(article => {
const searchString = `${article.textContent} ${article.dataset.tags}`.toLowerCase().normalize('NFD').replace(/\p{Diacritic}/gu, "");
const isMatch = searchTerms.every(term => searchString.includes(term));
article.hidden = !isMatch;
article.classList.toggle("matched-article", hasFilter && isMatch);
})
})
clearSearch.addEventListener("click", () => {
search.value = "";
articles.forEach(article => {
article.hidden = false;
article.classList.remove("matched-article");
})
artlist.classList.remove("list-searched");
})
})
</script>
{{< /rawhtml >}}

View file

@ -8,4 +8,6 @@ tags:
Hello there! Hello there!
I made this blog to talk about pretty much whatever I feel like in long form. Okay, bye! I made this blog to talk about pretty much whatever I feel like in long form.
Okay, bye!

View file

@ -0,0 +1,20 @@
---
title: "Why I Don't Like Proprietary Software (as an Anarchist)"
date: 2022-08-08T4:50:00-07:00
draft: true
tags:
- computers
- software freedom
- anarchism
- goolag
---
> Why aren't you using normal software?
*Alright, so this article is mainly meant for the people at uni who glance over at my laptop screen and wonder why I'm not using a "normal" operating system.*
*In short, I believe that proprietary software is an existential threat to our individual autonomy.*
*For the long answer well, you'll have to actually **read** it.*
What do I mean when I say that proprietary software is an existential threat to our individual autonomy? To start with, there are a significant amount of incentives for proprietary software developers to do things which harm your autonomy, such as operating systems which prevent the user from installing apps other than from a single location. Since there is no way to excercise [your freedoms](https://www.gnu.org/philosophy/free-sw.html#four-freedoms), it is impossible to verify that the software isn't doing injustice to you, such as with [period tracking apps providing data to tech giants without user consent](https://www.cnn.com/2022/06/16/opinions/period-trackers-app-roe-abortion-ranney-yao/index.html).

View file

@ -1 +1,2 @@
<hr><hr>
<p>Copyright (c) {{ now.Format "2006"}} ch0ccyra1n</p> <p>Copyright (c) {{ now.Format "2006"}} ch0ccyra1n</p>

View file

@ -0,0 +1,9 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/css/style.css">
<link rel="stylesheet" href="/css/custom.css">
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>
</head>

31
static/css/custom.css Normal file
View file

@ -0,0 +1,31 @@
blockquote {
color: green;
font-style: oblique;
}
/* For search bar */
.search {
color: gray;
width: 400px;
max-width: 85vw;
position: relative;
margin: 0.5rem auto 1.2rem;
display: flex;
}
#search {
padding: 0.7rem 1rem;
border-radius: 5px;
width: 100%;
}
#clear-search {
position: absolute;
right: 4px;
top: 5px;
height: 30px;
width: 30px;
color: #888;
cursor: pointer;
transition: color 180ms ease-in-out;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB