Remove all unused stuff

This commit is contained in:
Korbs 2024-11-26 00:15:22 -05:00
parent 55a18e0b6d
commit 903d146683
12 changed files with 79 additions and 384 deletions

View file

@ -1,47 +0,0 @@
# Astro Starter Kit: Minimal
```sh
npm create astro@latest -- --template minimal
```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
```text
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
```
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

File diff suppressed because one or more lines are too long

View file

@ -1,39 +0,0 @@
# If the docs were updated, this script can update
# the databases for Meilisearch.
# JSON is used in Astro to create these databases.
# For whatever reason, Astro does not generate a
# valid JSON response, so the commands below `wget`
# will modify the file to remove "'" at the start
# and end, along with "\" at each part.
# So, this scripts helps generates a valid JSON file
# for Meiliseach to use.
# Meilisearch requires each item to have an ID, I don't
# setup my stuff like this. So Astro will just assign
# a random number to each item using the Math.random()
# function. I do not care for assigning the correct number.
# Example
## Script will download:
### "[{\"id\":26,\"title\":\"Introduction\"},{\"id\":88,\"title\":\"Self-Hosting\"}]" <-- This is NOT a valid JSON format
## Script will output:
### [{"id":26,"title":"Introduction"},{"id":88,"title":"Self-Hosting"}] <-- This is a valid JSON format
wget "http://localhost:2014/docs/json/minpluto.json"
mv minpluto.json minpluto-search.json
sed -i '$ s/.$//' minpluto-search.json
sed -i '0,/./s/^.//' minpluto-search.json
sed -i 's|[\]||g' minpluto-search.json
wget "http://localhost:2014/docs/json/zorn.json"
mv zorn.json zorn-search.json
sed -i '$ s/.$//' zorn-search.json
sed -i '0,/./s/^.//' zorn-search.json
sed -i 's|[\]||g' zorn-search.json
# Update Meilisearch
# Using "node" does not work, use "bun"
bun ./search.js

View file

@ -1,13 +0,0 @@
import { MeiliSearch } from 'meilisearch'
import MinPluto from './minpluto-search.json'
import Zorn from './zorn-search.json'
const client = new MeiliSearch({
host: process.env.MeilisearchHost,
apiKey: process.env.MeilisearchApiKey
})
client.index('MinPluto').delete(MinPluto).then((res) => console.log(res))
client.index('MinPluto').addDocuments(MinPluto).then((res) => console.log(res))
client.index('Zorn').delete(Zorn).then((res) => console.log(res))
client.index('Zorn').addDocuments(Zorn).then((res) => console.log(res))

View file

@ -7,9 +7,6 @@ const {
Source, Source,
Link Link
} = Astro.props } = Astro.props
// Icons
import {CheckCircleSolid, XmarkCircleSolid} from '@iconoir/vue'
--- ---
<div class="service"> <div class="service">

View file

@ -1,47 +1,91 @@
--- ---
// Properties import { ghostClient } from "@library/ghost";
const { const posts = await ghostClient.posts
GetPosts, .browse({
PrefixSlug limit: "all",
} = Astro.props })
.catch((err) => {
console.error(err);
});
// Sort the posts in descending order (newest to oldest)
GetPosts.sort((a, b) => Date.parse(b.data.date) - Date.parse(a.data.date))
// Show Author in "Recommended Reading"
if (Astro.url.pathname = '/blog/recommended-reading/') {
var ShowAuthor = true
} else {
var ShowAuthor = false
}
// Use External URL in "Recommended Reading"
if (Astro.url.pathname = '/blog/recommended-reading/') {
var ExternalURL = true
} else {
var ExternalURL = false
}
--- ---
<div class="posts"> <div class="posts">
{ {
GetPosts.map((post) => ( posts.map((post) => (
<a href={PrefixSlug + post.data.url + '/'} class="card-post"> <a href={"/blog/" + post.slug} class="card-post">
<img id="bg" src={post.data.image} /> <img id="bg" src={post.custom_excerpt.image} />
<img src={post.data.image} /> <img src={post.custom_excerpt} />
<div class="card-post-content"> <div class="card-post-content">
<p> <p>
<strong>{post.data.title}</strong> <strong>{post.title}</strong>
</p> </p>
{ShowAuthor ? <p id="date">{new Date(post.published_at).toLocaleDateString()}</p>
<p id="date">{post.data.author}</p>
:
<p id="date">{new Date(post.data.date).toLocaleDateString()}</p>
}
</div> </div>
</a> </a>
)) ))
} }
</div> </div>
<style lang="scss">
.posts {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
grid-gap: 12px;
.card-post {
border-radius: 6px;
border: 1px var(--border-color) solid;
position: relative;
display: flex;
flex-direction: column;
&:hover {
border-color: var(--border-color-hover);
}
img {
width: 100%;
border-radius: 6px 6px 0px 0px;
aspect-ratio: 16/9;
object-fit: cover;
}
#bg {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
opacity: 1;
z-index: -1;
border-radius: 8px;
}
.card-post-content {
padding: 12px 16px 32px 16px;
backdrop-filter: blur(24px) brightness(0.3);
height: 100%;
border-radius: 0px 0px 6px 6px;
p {
margin: 0px;
font-size: 14px;
font-weight: bold;
}
#date {
font-size: 12px;
text-align: right;
color: gray;
font-weight: normal;
position: absolute;
bottom: 0px;
right: 0px;
margin: 6px 24px;
}
}
}
}
</style>
<br />
<style>
body {
background-color: black;
color: white;
font-family: Arial, Helvetica, sans-serif;
}
</style>

View file

@ -1,199 +0,0 @@
---
// Components
import MeiliSearch from "@components/docs/search";
// Is this thing on?
let EnableSearch = true
---
{EnableSearch ?
<backdrop id="search-modal"/>
<div class="search-modal">
<MeiliSearch client:load/>
</div>
:
null
}
<script is:inline>
/*
@licstart The following is the entire license notice for the
JavaScript code in this page.
Copyright (C) 2024 SudoVanilla
The JavaScript code in this page is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
function ToggleSearch() {
var SearchModal = document.querySelector(".search-modal");
if (SearchModal.style.display === "block") {
SearchModal.style.display = "none";
} else {
SearchModal.style.display = "block";
document.querySelector(".ais-SearchBox-input").focus();
}
}
function ToggleSearchBackdrop() {
var SearchModalBackdrop = document.querySelector(
"backdrop#search-modal",
);
if (SearchModalBackdrop.style.display === "block") {
SearchModalBackdrop.style.display = "none";
} else {
SearchModalBackdrop.style.display = "block";
document.querySelector(".ais-SearchBox-input").focus();
}
}
function ToggleSearchKeypress(e) {
if (e.ctrlKey && e.code === "Slash") {
ToggleSearch();
ToggleSearchBackdrop();
}
}
function ToggleSearchOnclick() {
ToggleSearch()
ToggleSearchBackdrop()
}
document.addEventListener("keyup", ToggleSearchKeypress, false);
</script>
<style lang="scss" is:global>
backdrop {
display: none;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 51;
backdrop-filter: blur(6px) contrast(0.9);
}
.search-modal {
position: fixed;
top: 160px;
left: 50%;
transform: translate(-50%);
background: #131212;
max-width: 600px;
width: 100%;
border-radius: 10px;
border: 1px var(--border-color) solid;
z-index: 52;
padding: 12px;
display: none;
.ais-Hits {
margin-top: 32px;
}
.ais-Hits-list {
list-style: none;
padding: 70px 0px 0px 0px;
overflow: scroll;
max-height: 400px;
margin: -44px 0px -12px 0px;
}
.ais-SearchBox-form {
display: flex;
justify-content: space-between;
gap: 6px;
button {
display: none;
color: white;
fill: white;
width: 36px;
height: 36px;
aspect-ratio: 1;
border-radius: 3rem;
border: 1px var(--border-color) solid;
svg {
width: 12px;
height: 12px;
}
}
.ais-SearchBox-input {
border-bottom: 1px var(--border-color) solid !important;
border-radius: 6px 6px 0px 0px !important;
padding: 16px 12px !important;
border: none;
width: 100%;
position: absolute;
z-index: 53;
margin: -12px;
font-size: 24px;
background: transparent;
backdrop-filter: blur(12px) contrast(0.8);
&:focus {
border-bottom: 1px var(--border-color-hover) solid !important;
outline: none;
}
&:hover {
border-bottom: 1px var(--border-color-hover) solid !important;
}
}
}
.search.document-item {
border: 1px var(--border-color) solid;
border-radius: 6px;
padding: 6px 12px;
font-size: 14px;
margin-top: 6px;
text-decoration: none;
display: flex;
flex-direction: column;
h2,
p {
margin: 6px;
}
p {
overflow: scroll;
height: 100%;
width: 100%;
max-width: 100%;
max-height: 60px;
pointer-events: none;
mask-image: linear-gradient(#000 75%, transparent);
}
.item-title {
display: flex;
justify-content: space-between;
align-items: center;
}
.item-project {
overflow: inherit;
height: inherit;
width: inherit;
max-width: inherit;
max-height: inherit;
mask-image: inherit;
background: rgb(69, 63, 63);
padding: 6px 12px;
border-radius: 6px;
font-size: 12px;
}
.item-tags {
font-size: 10px;
opacity: 0.5;
}
&:hover {
background: rgb(69, 63, 63);
border: 1px var(--border-color-hover) solid;
}
}
}
</style>

View file

@ -1,34 +0,0 @@
// ew, React ;-;
import React from 'react'
// Meilisearch Components
import { InstantSearch, SearchBox, Hits, Highlight } from 'react-instantsearch'
import { instantMeiliSearch } from '@meilisearch/instant-meilisearch'
const { searchClient } = instantMeiliSearch(
'http://localhost:7700',
'aSampleMasterKe1'
)
const App = () => (
<InstantSearch
indexName="MinPluto"
searchClient={searchClient}
>
<SearchBox value={"Search"}/>
<Hits hitComponent={Documents} />
</InstantSearch>
)
const Documents = ({hit}) => (
<a className='search document-item' href={hit.link}>
<div className='item-title'>
<h2><Highlight attribute="title" hit={hit}/></h2>
<p className='item-project'>{hit.project}</p>
</div>
<p><Highlight attribute="content" hit={hit}/></p>
</a>
)
export default App

View file

@ -4,8 +4,7 @@ const {
title, title,
developer, developer,
homepage, homepage,
source, source
screenshot
} = Astro.props } = Astro.props
--- ---

View file

@ -1,8 +0,0 @@
---
const {
Alt,
Source
} = Astro.props;
---
<img alt={Alt} src={Source} loading="lazy" decoding="async"/>

View file

@ -7,9 +7,6 @@ const {
// Layout // Layout
import Default from "@layouts/Default.astro"; import Default from "@layouts/Default.astro";
// Components
import Sidebar from "@components/docs/sidebar.astro";
// Icons // Icons
import { import {
WarningTriangleSolid WarningTriangleSolid

View file

@ -1 +0,0 @@
[{"id":75,"title":"Introduction","body":"**Zorn is currently in beta stages. Not everything listed below, as in its feature set, is not not done or hasnt been worked on yet.**nn## IntroductionnnZorn is a customizable HTML5 video player. The player is originally built for a SudoVanilla project called MinPluto, a privacy frontend for YouTube.nn### What is a HTML5 Video Player?nnHTML5 introduced the video player element in the late 2010s, which is embeded as `<video>`. It was intended by the creators of it to be the new standard to show video content on the web, instead of Adobe Flash which reached end-of-life in 2020. So, as of 2020, the HTML5 video is the only widely supported video playerback technology for modern browsers, with the Flash plugin being phased out.nnYou can see this in your browser as the built-in video player by [viewing this video](https://sudovanilla.com/content/videos/webm/Ennie-and-Yoyki.webm) or viewing in its own tab.nn### Why not use the built-in player?nnWhile you can build website or a video platform and having your visitors rely on their web browsers built-in video player, it can be quite limited if you want or your visitors want certain features. Features such as quality selector, subtitles, seek, and more. The built-in player does not, usually, include those. Another reason is why a company or a project may want to use a custom player such as Zorn is to have a curated player for their website that fits the style and needs.n","url":"/docs/zorn/introduction"}]