From 05c849f5881dc23aa048a0b8f2cfbc35b7b7bae2 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sat, 13 Jul 2024 00:03:34 -0600 Subject: [PATCH] lots of linting --- README.md | 5 +- TODO.md | 11 +-- astro.config.mjs | 10 +-- public/css/limepot.css | 5 +- public/scripts/lastfm.js | 19 ++-- public/scripts/limepot.js | 41 ++++----- public/scripts/ntfy.js | 24 ++--- src/components/FormattedDate.astro | 16 ++-- src/components/Head.astro | 23 +++-- src/components/Header.astro | 15 ++-- src/components/HeaderLink.astro | 24 ++--- src/content/blog/cool-stuff.md | 7 +- src/content/blog/minecraft-badges.md | 4 +- src/content/blog/new-pc-entered-chat.md | 7 +- src/content/blog/some-neat-webfinds.md | 3 +- src/layouts/BlogPost.astro | 58 ++++++------ src/layouts/Layout-nochrome.astro | 6 +- src/layouts/Layout.astro | 8 +- src/layouts/MDPost.astro | 38 ++++---- src/layouts/err404.astro | 2 +- src/pages/404.astro | 1 - src/pages/blog/[...slug].astro | 18 ++-- src/pages/blog/index.astro | 14 +-- src/pages/buttons.astro | 43 +++++---- src/pages/export/gmod_loading.astro | 1 - src/pages/index.astro | 47 +++++++--- src/pages/nochrome.astro | 57 ++++++------ src/pages/projects.astro | 92 ++++++++++++++----- src/pages/rss.xml.js | 12 +-- src/pages/site-info.astro | 114 ++++++++++++++---------- 30 files changed, 419 insertions(+), 306 deletions(-) diff --git a/README.md b/README.md index 00621a4..0605323 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # limepot.xyz -personal website, can be seen at https://limepot.xyz -[Information](https://limepot.xyz/site-info/) \ No newline at end of file +personal website, can be seen at + +[Information](https://limepot.xyz/site-info/) diff --git a/TODO.md b/TODO.md index 8f97f1e..2f392ce 100644 --- a/TODO.md +++ b/TODO.md @@ -1,14 +1,15 @@ # ToDo + - Add webrings - more buttons - update about - icons on contact info - update projects page? - reduce bottom and top margins on main page title -- https://zvava.org/stats.html -- https://zvava.org/wiki/config.html -- https://zvava.org/wiki/category/music.html -- https://zvava.org/wiki/about-site.html +- +- +- +- - gradient content background? - sophias color thing - my queer flags @@ -19,4 +20,4 @@ - listenbrainz scrobbler (currently implemented at a Last.FM scrobbler) - comissions page - Sound effects (cute, subtle, non-obtrusive) -- add jormungandr to projects page \ No newline at end of file +- add jormungandr to projects page diff --git a/astro.config.mjs b/astro.config.mjs index 61975fb..049e4a0 100755 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,11 +1,11 @@ -import { defineConfig } from 'astro/config'; -import mdx from '@astrojs/mdx'; +import { defineConfig } from "astro/config"; +import mdx from "@astrojs/mdx"; // https://astro.build/config export default defineConfig({ server: { - port: 8001 + port: 8001, }, site: "https://limepot.xyz", - integrations: [mdx()] -}); \ No newline at end of file + integrations: [mdx()], +}); diff --git a/public/css/limepot.css b/public/css/limepot.css index f6c6d2c..a761379 100644 --- a/public/css/limepot.css +++ b/public/css/limepot.css @@ -12,7 +12,7 @@ -moz-background-size: cover; -o-background-size: cover; background-size: repeat; - + padding: 1rem; width: 1000px; max-width: calc(100% - 2rem); @@ -33,7 +33,8 @@ figure { } audio { - width: 100%;; + width: 100%; + ; } h1 { diff --git a/public/scripts/lastfm.js b/public/scripts/lastfm.js index 8df8a4f..f36fd63 100644 --- a/public/scripts/lastfm.js +++ b/public/scripts/lastfm.js @@ -1,9 +1,12 @@ -let user = 'limepotato'; -let url = 'https://lastfm-last-played.biancarosa.com.br/' + user + '/latest-song'; -let song = document.querySelector('#song'); +let user = "limepotato"; +let url = + "https://lastfm-last-played.biancarosa.com.br/" + user + "/latest-song"; +let song = document.querySelector("#song"); fetch(url) - .then(function (response) { - return response.json() - }).then(function (json) { - song.innerHTML = json['track']['name'] + ' - ' + json['track']['artist']['#text']; - }); \ No newline at end of file + .then(function (response) { + return response.json(); + }) + .then(function (json) { + song.innerHTML = + json["track"]["name"] + " - " + json["track"]["artist"]["#text"]; + }); diff --git a/public/scripts/limepot.js b/public/scripts/limepot.js index 41390c4..a2567ea 100644 --- a/public/scripts/limepot.js +++ b/public/scripts/limepot.js @@ -1,37 +1,38 @@ function onload() { - redirect() - sdocument.getElementById("body").style.fontFamily = "system-ui, sans-serif"; + redirect(); + sdocument.getElementById("body").style.fontFamily = "system-ui, sans-serif"; } -function toggleTheme() { - // Obtains an array of all - // elements. - // Select your element using indexing. - if (document.getElementById("body").style.fontFamily !== "standardGalactic") { - document.getElementById("body").style.fontFamily = "standardGalactic"; - } - else{ - document.getElementById("body").style.fontFamily = "system-ui, sans-serif"; - } -} +function toggleTheme() { + // Obtains an array of all + // elements. + // Select your element using indexing. + if (document.getElementById("body").style.fontFamily !== "standardGalactic") { + document.getElementById("body").style.fontFamily = "standardGalactic"; + } else { + document.getElementById("body").style.fontFamily = "system-ui, sans-serif"; + } +} function redirect() { -let chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test( + let chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test( navigator.userAgent ); let disclaimer = `
`; - if (chromium) - window.location.replace("/nochrome"); + if (chromium) window.location.replace("/nochrome"); } // Resizable textarea const tx = document.getElementsByTagName("textarea"); for (let i = 0; i < tx.length; i++) { - tx[i].setAttribute("style", "height:" + (tx[i].scrollHeight) + "px;overflow-y:hidden;"); + tx[i].setAttribute( + "style", + "height:" + tx[i].scrollHeight + "px;overflow-y:hidden;" + ); tx[i].addEventListener("input", OnInput, false); } function OnInput() { - this.style.height = 'auto'; - this.style.height = (this.scrollHeight) + "px"; -} \ No newline at end of file + this.style.height = "auto"; + this.style.height = this.scrollHeight + "px"; +} diff --git a/public/scripts/ntfy.js b/public/scripts/ntfy.js index 4cf4a6f..49aabde 100644 --- a/public/scripts/ntfy.js +++ b/public/scripts/ntfy.js @@ -1,14 +1,14 @@ // both function send(message) { - let r = new XMLHttpRequest() - r.open("POST", "https://ntfy.ouroboros.group/beep", true) - r.setRequestHeader("Content-Type", "text/plain") - r.send(message) - } - // send notification - let ntfyInput = document.getElementById("ntfy-input") - function sendNotification() { - if (ntfyInput.value.length <= 0) return - send(ntfyInput.value) - ntfyInput.value = "" - } \ No newline at end of file + let r = new XMLHttpRequest(); + r.open("POST", "https://ntfy.ouroboros.group/beep", true); + r.setRequestHeader("Content-Type", "text/plain"); + r.send(message); +} +// send notification +let ntfyInput = document.getElementById("ntfy-input"); +function sendNotification() { + if (ntfyInput.value.length <= 0) return; + send(ntfyInput.value); + ntfyInput.value = ""; +} diff --git a/src/components/FormattedDate.astro b/src/components/FormattedDate.astro index 1bcce73..8f59590 100644 --- a/src/components/FormattedDate.astro +++ b/src/components/FormattedDate.astro @@ -1,17 +1,17 @@ --- interface Props { - date: Date; + date: Date; } const { date } = Astro.props; --- diff --git a/src/components/Head.astro b/src/components/Head.astro index 9caeb77..0e3e229 100755 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -2,21 +2,20 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../consts"; interface Props { - title: string; - description: string; + title: string; + description: string; } - const canonicalURL = new URL(Astro.url.pathname, Astro.site); -const page = Astro.url.pathname +const page = Astro.url.pathname; --- @@ -26,7 +25,7 @@ const page = Astro.url.pathname - + @@ -41,7 +40,7 @@ const page = Astro.url.pathname - + @@ -50,5 +49,5 @@ const page = Astro.url.pathname - - + + diff --git a/src/components/Header.astro b/src/components/Header.astro index bf704da..e6f8f4c 100755 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -4,25 +4,24 @@ import { SITE_TITLE } from "../consts"; --- -
+
diff --git a/src/components/HeaderLink.astro b/src/components/HeaderLink.astro index bb600fb..e071f29 100644 --- a/src/components/HeaderLink.astro +++ b/src/components/HeaderLink.astro @@ -1,25 +1,25 @@ --- -import type { HTMLAttributes } from 'astro/types'; +import type { HTMLAttributes } from "astro/types"; -type Props = HTMLAttributes<'a'>; +type Props = HTMLAttributes<"a">; const { href, class: className, ...props } = Astro.props; const { pathname } = Astro.url; const subpath = pathname.match(/[^\/]+/g); -const isActive = href === pathname || href === '/' + subpath?.[0]; +const isActive = href === pathname || href === "/" + subpath?.[0]; --- - + diff --git a/src/content/blog/cool-stuff.md b/src/content/blog/cool-stuff.md index 0f52586..64e4e52 100644 --- a/src/content/blog/cool-stuff.md +++ b/src/content/blog/cool-stuff.md @@ -4,8 +4,9 @@ description: 'Cool/Interesting things I found on the internet.' pubDate: 'July 10 2024' --- -### Be sure to check back for more! -#### I'll keep this updated as I find/rememeber things. +### Be sure to check back for more + +#### I'll keep this updated as I find/rememeber things - [Valence RS](https://github.com/valence-rs/valence/tree/main/examples): A Minecraft server implemented from scratch in Rust. - [Awesome SelfHosted](https://awesome-selfhosted.net/): A great repository of various things you can self-host now. @@ -15,4 +16,4 @@ pubDate: 'July 10 2024' - [Godot Kotlin/JVM](https://godot-kotl.in/en/stable/): Adds Kotlin/JVM scripting support for Godot. - [Awesome](https://github.com/sindresorhus/awesome): Awesome lists about all kinds of interesting topics. - [Sci-Hub](https://github.com/sindresorhus/awesome): Free and Unrestricted access to all scientific knowledge, as it should be. -- [Dotsies](https://dotsies.org/): A font that uses dots instead of letters. \ No newline at end of file +- [Dotsies](https://dotsies.org/): A font that uses dots instead of letters. diff --git a/src/content/blog/minecraft-badges.md b/src/content/blog/minecraft-badges.md index e0cd69e..36c15ab 100644 --- a/src/content/blog/minecraft-badges.md +++ b/src/content/blog/minecraft-badges.md @@ -4,7 +4,7 @@ description: '88x31 badges for your Minecraft projects!' pubDate: 'June 17 2024' --- -## I made (and still am making), a few 88x31 badges for minecraft mods and such, in aseprite heres what i have so far! +## I made (and still am making), a few 88x31 badges for minecraft mods and such, in aseprite heres what i have so far ### (If you dont see one you want, and to download them go ahead and check the [git repo](https://git.nullafati.xyz/limepotato/mc-badges) @@ -16,4 +16,4 @@ pubDate: 'June 17 2024' - \ No newline at end of file + diff --git a/src/content/blog/new-pc-entered-chat.md b/src/content/blog/new-pc-entered-chat.md index d7ec8f3..16043d0 100644 --- a/src/content/blog/new-pc-entered-chat.md +++ b/src/content/blog/new-pc-entered-chat.md @@ -28,10 +28,9 @@ This is a configure-to-order model, so ill need to check the parts ive already r - Intel (????) CPU - [THIS LIST WILL UPDATE] - ### ThinkCentre Notes -I was really interested by this, I love ThinkPads, So I immediately took up the offer. When I got home I worked on pluggin it in and seeing if it worked, took me a bit to find the VGA cable hiding somewhere in storage but i was able to get it. This machine did not come with a drive, and was unable to post whatsoever. +I was really interested by this, I love ThinkPads, So I immediately took up the offer. When I got home I worked on pluggin it in and seeing if it worked, took me a bit to find the VGA cable hiding somewhere in storage but i was able to get it. This machine did not come with a drive, and was unable to post whatsoever. After a bit of testing (and a long search for DDR3 modules), I can confirm that something *other* than the memory is the issue (it tested fine in a known-good machine), so more testing will need to be done there. @@ -75,9 +74,9 @@ When I turned it on the fans were AWFUL ### Media Center Notes -When I first booted this up it automatically logged into Windows 7 Ultimate, and was slow on some things. So I went on an adventure to install linux on it. This turned out to be a struggle, as the BIOS would not let me boot via USB, and my only CD-R's were 700mb. +When I first booted this up it automatically logged into Windows 7 Ultimate, and was slow on some things. So I went on an adventure to install linux on it. This turned out to be a struggle, as the BIOS would not let me boot via USB, and my only CD-R's were 700mb. -I went on a long, chase to shove arch linux on this, only to remember that debian has a smaller image size. so after hours of toiling, I went with that. +I went on a long, chase to shove arch linux on this, only to remember that debian has a smaller image size. so after hours of toiling, I went with that. I think my plan for this thing is: diff --git a/src/content/blog/some-neat-webfinds.md b/src/content/blog/some-neat-webfinds.md index f41d6b7..6637ede 100644 --- a/src/content/blog/some-neat-webfinds.md +++ b/src/content/blog/some-neat-webfinds.md @@ -10,7 +10,6 @@ pubDate: 'June 30 2024' this will be updated as I find more, so be sure to check in, I'm going to try and format this so its easier for you to navigate - ### Blogs/BlogPosts [LackRack Wiki Page](https://wiki.eth0.nl/index.php/LackRack) @@ -21,6 +20,6 @@ this will be updated as I find more, so be sure to check in, I'm going to try an ### Gag Websites -### Neat Programs/Tools/etc. +### Neat Programs/Tools/etc ### Misc Websites diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index 0b242d8..b652780 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -1,40 +1,40 @@ --- -import type { CollectionEntry } from 'astro:content'; -import FormattedDate from '../components/FormattedDate.astro'; +import type { CollectionEntry } from "astro:content"; +import FormattedDate from "../components/FormattedDate.astro"; import Layout from "../layouts/Layout.astro"; -type Props = CollectionEntry<'blog'>['data']; +type Props = CollectionEntry<"blog">["data"]; const { title, description, pubDate, updatedDate } = Astro.props; --- -
-
-
-
-
-
-

{title}

-

{description}

-
- - { - updatedDate && ( -
- Last updated on -
- ) - } -
-
-
-
-
- -
-
-
+
+
+
+
+
+
+

{title}

+

{description}

+
+ + { + updatedDate && ( +
+ Last updated on +
+ ) + } +
+
+
+
+
+ +
+
+
diff --git a/src/layouts/Layout-nochrome.astro b/src/layouts/Layout-nochrome.astro index b22eecd..05d3228 100755 --- a/src/layouts/Layout-nochrome.astro +++ b/src/layouts/Layout-nochrome.astro @@ -9,7 +9,7 @@ interface Props { const { title } = Astro.props; --- - + @@ -23,7 +23,7 @@ const { title } = Astro.props;