mirror of
https://github.com/JonasunderscoreJones/jonasjones.dev.git
synced 2025-10-23 08:59:19 +02:00
code refactor
This commit is contained in:
parent
c10e75ac36
commit
d63ed25e1a
13 changed files with 386 additions and 405 deletions
|
@ -1,4 +1,4 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<p>Website by Jonas_Jones 2021 - 2023</p>
|
<p>Website by Jonas_Jones 2021 - 2023</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
|
@ -19,4 +18,4 @@
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
<p id="lastfm_artist"></p>
|
<p id="lastfm_artist"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="navigation-menu {showMenu ? 'show' : ''}">
|
<div class="navigation-menu {showMenu ? 'show' : ''}">
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<div class="hamburger-menu close-button {showMenu ? 'open' : ''}" on:click={toggleMenu}>
|
<div class="hamburger-menu close-button {showMenu ? 'open' : ''}" on:click={toggleMenu}>
|
||||||
|
@ -49,9 +47,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="unsupported"><TooSmallDimsOverlay /></div>
|
<div class="unsupported">
|
||||||
|
<TooSmallDimsOverlay />
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let showMenu = false;
|
let showMenu = false;
|
||||||
|
@ -60,20 +58,20 @@
|
||||||
showMenu = !showMenu;
|
showMenu = !showMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
import TooSmallDimsOverlay from './TooSmallDimsOverlay.svelte';
|
import TooSmallDimsOverlay from './TooSmallDimsOverlay.svelte';
|
||||||
|
|
||||||
let navLinks = [
|
let navLinks = [
|
||||||
{ name: 'Home', url: '/' },
|
{ name: 'Home', url: '/' },
|
||||||
{ name: 'Projects', url: '/projects'},
|
{ name: 'Projects', url: '/projects'},
|
||||||
{ name: 'For The Based™', url: '/based'},
|
{ name: 'For The Based™', url: '/based'},
|
||||||
{ name: 'Status', url: '/status'},
|
{ name: 'Status', url: '/status'},
|
||||||
{ name: 'About', url: '/about' }
|
{ name: 'About', url: '/about' }
|
||||||
];
|
];
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let miscLinks = [
|
let miscLinks = [
|
||||||
{ name: 'For The Based™', url: '/based'}
|
{ name: 'For The Based™', url: '/based'}
|
||||||
]
|
]
|
||||||
const fetch_url = "https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=Jonas_Jones&api_key=57c0ca64285c7ca676bb8c2acf320f41&format=json&limit=1"
|
const fetch_url = "https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=Jonas_Jones&api_key=57c0ca64285c7ca676bb8c2acf320f41&format=json&limit=1"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -97,37 +95,36 @@
|
||||||
//let song_title = truncateString("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWw");
|
//let song_title = truncateString("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWw");
|
||||||
let artist = truncateString(data.recenttracks.track[0].artist['\#text']);
|
let artist = truncateString(data.recenttracks.track[0].artist['\#text']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
document.getElementById("lastfm_title").innerHTML = song_title;
|
document.getElementById("lastfm_title").innerHTML = song_title;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
document.getElementById("lastfm_artist").innerHTML = artist;
|
document.getElementById("lastfm_artist").innerHTML = artist;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
document.getElementById("lastfm_logo").style.backgroundImage = `url(${album_cover})`;
|
document.getElementById("lastfm_logo").style.backgroundImage = `url(${album_cover})`;
|
||||||
|
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let is_playing = data.recenttracks.track[0]['\@attr'].nowplaying;
|
let is_playing = data.recenttracks.track[0]['\@attr'].nowplaying;
|
||||||
if (is_playing == "true") {
|
if (is_playing == "true") {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
document.getElementById("lastfm_logo_overlay").src="/equalizer.gif";
|
document.getElementById("lastfm_logo_overlay").src="/equalizer.gif";
|
||||||
} else {
|
} else {
|
||||||
|
// @ts-ignore
|
||||||
|
document.getElementById("lastfm_logo_overlay").src="/pause-icon-256.png";
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
try {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
document.getElementById("lastfm_logo_overlay").src="/pause-icon-256.png";
|
document.getElementById("lastfm_logo_overlay").src="/pause-icon-256.png";
|
||||||
}
|
} catch (error) {}
|
||||||
} catch (error) {
|
}
|
||||||
try {
|
|
||||||
// @ts-ignore
|
|
||||||
document.getElementById("lastfm_logo_overlay").src="/pause-icon-256.png";
|
|
||||||
} catch (error) {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fetchLastFmData();
|
fetchLastFmData();
|
||||||
setInterval(fetchLastFmData, 15000);
|
setInterval(fetchLastFmData, 15000);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.hamburger-menu {
|
.hamburger-menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -1,47 +1,47 @@
|
||||||
<script>
|
<script>
|
||||||
let mouseX = 0;
|
let mouseX = 0;
|
||||||
let mouseY = 0;
|
let mouseY = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {{ clientX: number; clientY: number; }} event
|
||||||
|
*/
|
||||||
|
function handleMouseMove(event) {
|
||||||
|
mouseX = event.clientX;
|
||||||
|
mouseY = event.clientY;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
/**
|
<style>
|
||||||
* @param {{ clientX: number; clientY: number; }} event
|
@import '../routes/+page.css';
|
||||||
*/
|
.container {
|
||||||
function handleMouseMove(event) {
|
min-height: 100vh;
|
||||||
mouseX = event.clientX;
|
position: relative;
|
||||||
mouseY = event.clientY;
|
overflow: hidden; /* Ensure the background image does not overflow */
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
.parallax-background {
|
||||||
<style>
|
position: fixed;
|
||||||
@import '../routes/+page.css';
|
top: 0;
|
||||||
.container {
|
left: 0;
|
||||||
min-height: 100vh;
|
width: 100%;
|
||||||
position: relative;
|
height: 100%;
|
||||||
overflow: hidden; /* Ensure the background image does not overflow */
|
background-image: url('/ricky.webp');
|
||||||
}
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
.parallax-background {
|
background-position: center center;
|
||||||
position: fixed;
|
@media only screen and (min-width: 768px) {
|
||||||
top: 0;
|
transform: translateX(calc(-1 * var(--mouse-x) / 50)) translateY(calc(-1 * var(--mouse-y) / 50));
|
||||||
left: 0;
|
}
|
||||||
width: 100%;
|
z-index: -1; /* Place the background behind other content */
|
||||||
height: 100%;
|
}
|
||||||
background-image: url('/ricky.webp');
|
</style>
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
<main class="container" on:mousemove={handleMouseMove}>
|
||||||
background-position: center center;
|
<div class="parallax-background" style="--mouse-x: {mouseX}px; --mouse-y: {mouseY}px;">
|
||||||
@media only screen and (min-width: 768px) {
|
<img src="/ricky.webp" width="102%" height="101%" alt="Parallax Background" class="parallax-image">
|
||||||
transform: translateX(calc(-1 * var(--mouse-x) / 50)) translateY(calc(-1 * var(--mouse-y) / 50));
|
|
||||||
}
|
</div>
|
||||||
z-index: -1; /* Place the background behind other content */
|
<!-- Your main content goes here -->
|
||||||
}
|
<slot></slot>
|
||||||
</style>
|
</main>
|
||||||
|
|
||||||
<main class="container" on:mousemove={handleMouseMove}>
|
|
||||||
<div class="parallax-background" style="--mouse-x: {mouseX}px; --mouse-y: {mouseY}px;">
|
|
||||||
<img src="/ricky.webp" width="102%" height="101%" alt="Parallax Background" class="parallax-image">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Your main content goes here -->
|
|
||||||
<slot></slot>
|
|
||||||
</main>
|
|
||||||
|
|
|
@ -1,33 +1,34 @@
|
||||||
<style>
|
<style>
|
||||||
.overlay {
|
.overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.25);
|
background-color: rgba(0, 0, 0, 0.25);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 299.99px) {
|
@media (min-width: 299.99px) {
|
||||||
.overlay {
|
.overlay {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.notice {
|
|
||||||
background-color: #1f1f1f;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 8px 8px 0 0;
|
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice {
|
||||||
|
background-color: #1f1f1f;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p>Your screen resolution isn't supported by this website. if You're on a computer, try zooming out or resizing the window.</p>
|
<p>Your screen resolution isn't supported by this website. if You're on a computer, try zooming out or resizing the window.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<!-- please god dont send me to hell for doing this -->
|
<!-- please god dont send me to hell for doing this -->
|
||||||
<h1> </h1>
|
<h1> </h1>
|
||||||
<h1> </h1>
|
<h1> </h1>
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
const taeyong = document.querySelector('.taeyong');
|
const taeyong = document.querySelector('.taeyong');
|
||||||
taeyong.style.display = 'none';
|
taeyong.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ParallaxBg>
|
<ParallaxBg>
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<Padding />
|
<Padding />
|
||||||
|
@ -40,10 +40,6 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<style>
|
|
||||||
@import '+page.css';
|
|
||||||
</style>
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</ParallaxBg>
|
</ParallaxBg>
|
||||||
<div class="taeyong">
|
<div class="taeyong">
|
||||||
|
|
|
@ -12,36 +12,30 @@
|
||||||
<img src="/root_logo.webp" alt="My Picture" class="picture">
|
<img src="/root_logo.webp" alt="My Picture" class="picture">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="line">
|
||||||
<div class="line">
|
<hr>
|
||||||
<hr>
|
</div>
|
||||||
</div>
|
<div class="line-content">
|
||||||
<div class="line-content">
|
<p>Idk how this dot got here but im leaving it.</p>
|
||||||
<p>Idk how this dot got here but im leaving it.</p>
|
</div>
|
||||||
</div>
|
<div class="social-media">
|
||||||
<div class="social-media">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="https://github.com/J-onasJones"><i class="fab fa-github"></i></a>
|
<a href="https://github.com/J-onasJones"><i class="fab fa-github"></i></a>
|
||||||
<a href="https://www.youtube.com/channel/UCVIxvKBIMSMgurYS8pK7fSg"><i class="fab fa-youtube"></i></a>
|
<a href="https://www.youtube.com/channel/UCVIxvKBIMSMgurYS8pK7fSg"><i class="fab fa-youtube"></i></a>
|
||||||
<a href="https://discord.gg/V2EsuUVmWh"><i class="fab fa-discord"></i></a>
|
<a href="https://discord.gg/V2EsuUVmWh"><i class="fab fa-discord"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="https://www.reddit.com/u/Jonas_Jones_"><i class="fab fa-reddit"></i></a>
|
<a href="https://www.reddit.com/u/Jonas_Jones_"><i class="fab fa-reddit"></i></a>
|
||||||
<a href="https://twitter.com/Jonas_Jones_"><i class="fab fa-twitter"></i></a>
|
<a href="https://twitter.com/Jonas_Jones_"><i class="fab fa-twitter"></i></a>
|
||||||
<a href="https://www.instagram.com/_jonas_jones_"><i class="fab fa-instagram"></i></a>
|
<a href="https://www.instagram.com/_jonas_jones_"><i class="fab fa-instagram"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ParallaxBg>
|
</ParallaxBg>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|
||||||
<script>
|
|
||||||
import Navbar from '../components/NavBar.svelte';
|
|
||||||
import Footer from '../components/Footer.svelte';
|
|
||||||
import ParallaxBg from '../components/ParallaxBg.svelte';
|
|
||||||
import Padding from '../components/padding.svelte';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<script>
|
||||||
@import '+page.css';
|
import Navbar from '../components/NavBar.svelte';
|
||||||
</style>
|
import Footer from '../components/Footer.svelte';
|
||||||
|
import ParallaxBg from '../components/ParallaxBg.svelte';
|
||||||
|
import Padding from '../components/padding.svelte';
|
||||||
|
</script>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import Footer from "../../components/Footer.svelte";
|
import Footer from "../../components/Footer.svelte";
|
||||||
import NavBar from "../../components/NavBar.svelte";
|
import NavBar from "../../components/NavBar.svelte";
|
||||||
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
||||||
import Padding from "../../components/padding.svelte";
|
import Padding from "../../components/padding.svelte";
|
||||||
</script>
|
</script>
|
||||||
<ParallaxBg>
|
<ParallaxBg>
|
||||||
<title>About</title>
|
<title>About</title>
|
||||||
|
@ -23,7 +23,6 @@ import Padding from "../../components/padding.svelte";
|
||||||
TL;DR: I asked ChatGPT. <br>
|
TL;DR: I asked ChatGPT. <br>
|
||||||
Also, I like K-Pop.
|
Also, I like K-Pop.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1>Greatest Acomplishment</h1>
|
<h1>Greatest Acomplishment</h1>
|
||||||
<p>A severity 7.5/10 rated CVE I received for a humble project of mine as the second ever CVE in Minecraft Modding history!</p>
|
<p>A severity 7.5/10 rated CVE I received for a humble project of mine as the second ever CVE in Minecraft Modding history!</p>
|
||||||
<a href="https://nvd.nist.gov/vuln/detail/CVE-2022-39221">CVE-2022-39221</a>
|
<a href="https://nvd.nist.gov/vuln/detail/CVE-2022-39221">CVE-2022-39221</a>
|
||||||
|
@ -36,4 +35,4 @@ import Padding from "../../components/padding.svelte";
|
||||||
.text {
|
.text {
|
||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -26,4 +26,4 @@ html {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* debug */
|
/* debug */
|
||||||
border: 1px solid red;
|
border: 1px solid red;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
||||||
import Padding from "../../components/padding.svelte";
|
import Padding from "../../components/padding.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ParallaxBg>
|
<ParallaxBg>
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<title>For the Based</title>
|
<title>For the Based</title>
|
||||||
|
@ -19,16 +20,13 @@
|
||||||
<span class="terminal_user__dollar__text">$</span>
|
<span class="terminal_user__dollar__text">$</span>
|
||||||
<input title="terminal-input" type="text" id="terminal-input" autocomplete="off" spellcheck="false" autocapitalize="none" class="sc-ilhmMj iNZnsg" value="">
|
<input title="terminal-input" type="text" id="terminal-input" autocomplete="off" spellcheck="false" autocapitalize="none" class="sc-ilhmMj iNZnsg" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
</ParallaxBg>
|
</ParallaxBg>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@import '+page.css';
|
@import '+page.css';
|
||||||
.terminal_user {
|
.terminal_user {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,228 +1,225 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import FontAwesome from "../../components/FontAwesome.svelte";
|
import FontAwesome from "../../components/FontAwesome.svelte";
|
||||||
import Footer from "../../components/Footer.svelte";
|
import Footer from "../../components/Footer.svelte";
|
||||||
import NavBar from "../../components/NavBar.svelte";
|
import NavBar from "../../components/NavBar.svelte";
|
||||||
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
||||||
import Padding from "../../components/padding.svelte";
|
import Padding from "../../components/padding.svelte";
|
||||||
|
|
||||||
import projects from "./projects.json";
|
import projects from "./projects.json";
|
||||||
|
|
||||||
|
var searchResults = projects;
|
||||||
|
|
||||||
|
var searchtext = '';
|
||||||
|
var searchcategory = '';
|
||||||
|
var searchlanguage = '';
|
||||||
|
var searchstatus = '';
|
||||||
|
|
||||||
|
function handleSearchText(event) {
|
||||||
|
searchtext = event.target.value.toLowerCase();
|
||||||
|
handleSearch()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchCategory(event) {
|
||||||
|
searchcategory = event.target.value.toLowerCase();
|
||||||
|
handleSearch()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchLang(event) {
|
||||||
|
searchlanguage = event.target.value.toLowerCase();
|
||||||
|
handleSearch()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchStatus(event) {
|
||||||
|
searchstatus = event.target.value.toLowerCase();
|
||||||
|
handleSearch()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var searchResults = projects;
|
function handleSearch() {
|
||||||
|
// set searchResults by filtering with searchtext, searchcategory, and searchlanguage
|
||||||
var searchtext = '';
|
searchResults = projects.filter(project => {
|
||||||
var searchcategory = '';
|
var text = project.title.toLowerCase() + project.description.toLowerCase();
|
||||||
var searchlanguage = '';
|
var category = project.categories.join(' ').toLowerCase();
|
||||||
var searchstatus = '';
|
var language = project.languages.join(' ').toLowerCase();
|
||||||
|
var status = project.status.toLowerCase();
|
||||||
function handleSearchText(event) {
|
return text.includes(searchtext) && category.includes(searchcategory) && language.includes(searchlanguage) && status.includes(searchstatus);
|
||||||
searchtext = event.target.value.toLowerCase();
|
});
|
||||||
handleSearch()
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchCategory(event) {
|
|
||||||
searchcategory = event.target.value.toLowerCase();
|
|
||||||
handleSearch()
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchLang(event) {
|
|
||||||
searchlanguage = event.target.value.toLowerCase();
|
|
||||||
handleSearch()
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchStatus(event) {
|
|
||||||
searchstatus = event.target.value.toLowerCase();
|
|
||||||
handleSearch()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function handleSearch() {
|
|
||||||
// set searchResults by filtering with searchtext, searchcategory, and searchlanguage
|
|
||||||
searchResults = projects.filter(project => {
|
|
||||||
var text = project.title.toLowerCase() + project.description.toLowerCase();
|
|
||||||
var category = project.categories.join(' ').toLowerCase();
|
|
||||||
var language = project.languages.join(' ').toLowerCase();
|
|
||||||
var status = project.status.toLowerCase();
|
|
||||||
return text.includes(searchtext) && category.includes(searchcategory) && language.includes(searchlanguage) && status.includes(searchstatus);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* Import Font Awesome for social media icons */
|
/* Import Font Awesome for social media icons */
|
||||||
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
|
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
|
||||||
.container {
|
.container {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-container {
|
.project-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project {
|
.project {
|
||||||
transition: background-color 0.3s;
|
transition: background-color 0.3s;
|
||||||
transition: filter 0.3s;
|
transition: filter 0.3s;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-bg {
|
.project-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-bg img {
|
.project-bg img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.918), rgba(0, 0, 0, 0));
|
mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.918), rgba(0, 0, 0, 0));
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project:hover img {
|
.project:hover img {
|
||||||
-webkit-filter: blur(5px);
|
-webkit-filter: blur(5px);
|
||||||
filter: blur(5px);
|
filter: blur(5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-title {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-status {
|
.project-title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
margin-left: 10px;
|
text-align: left;
|
||||||
margin-right: 10px;
|
}
|
||||||
padding: 2px;
|
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 5px;
|
|
||||||
border: 3px solid #dcdcdc;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-version {
|
.project-status {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: white;
|
margin-bottom: 10px;
|
||||||
margin-bottom: 10px;
|
margin-left: 10px;
|
||||||
margin-left: 10px;
|
margin-right: 10px;
|
||||||
margin-right: 10px;
|
padding: 2px;
|
||||||
margin-top: -4px;
|
padding-left: 5px;
|
||||||
padding: 2px;
|
padding-right: 5px;
|
||||||
border: 3px solid #dcdcdc;
|
border: 3px solid #dcdcdc;
|
||||||
border-radius: 100px;
|
border-radius: 3px;
|
||||||
float: right;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.project-description {
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-right: 12px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-links {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-link {
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 10px;
|
|
||||||
color: #333;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-link:hover {
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.download-button {
|
.project-version {
|
||||||
margin-left: 10px;
|
font-size: 20px;
|
||||||
color: white;
|
font-weight: bold;
|
||||||
transition: color 0.3s;
|
color: white;
|
||||||
background-color: rgb(25, 25, 100);
|
margin-bottom: 10px;
|
||||||
border-radius: 5px;
|
margin-left: 10px;
|
||||||
padding: 5px;
|
margin-right: 10px;
|
||||||
padding-left: 10px;
|
margin-top: -4px;
|
||||||
padding-right: 10px;
|
padding: 2px;
|
||||||
text-decoration: none;
|
border: 3px solid #dcdcdc;
|
||||||
border: 3px solid rgb(0, 0, 100);
|
border-radius: 100px;
|
||||||
position: absolute;
|
float: right;
|
||||||
bottom: 20px;
|
}
|
||||||
right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar {
|
.project-description {
|
||||||
margin-bottom: 20px;
|
margin-top: 20px;
|
||||||
background-color: rgba(0, 0, 0, 0.678);
|
margin-bottom: 10px;
|
||||||
padding: 10px;
|
margin-right: 12px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-links {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-link {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10px;
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-link:hover {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-button {
|
||||||
|
margin-left: 10px;
|
||||||
|
color: white;
|
||||||
|
transition: color 0.3s;
|
||||||
|
background-color: rgb(25, 25, 100);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
padding: 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
text-decoration: none;
|
||||||
|
border: 3px solid rgb(0, 0, 100);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.search-bar input {
|
.search-bar {
|
||||||
background-color: transparent;
|
margin-bottom: 20px;
|
||||||
border: none;
|
background-color: rgba(0, 0, 0, 0.678);
|
||||||
outline: none;
|
padding: 10px;
|
||||||
color: white;
|
border-radius: 5px;
|
||||||
font-size: 20px;
|
}
|
||||||
|
|
||||||
|
.search-bar input {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
color: white;
|
||||||
|
font-size: 20px;
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar select {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
color: white;
|
||||||
|
font-size: 20px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.smaller-screen {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 620px) {
|
||||||
|
.project-container {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
}
|
||||||
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-left: 10px;
|
margin: 0;
|
||||||
padding-right: 10px;
|
padding: 0;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar select {
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
color: white;
|
|
||||||
font-size: 20px;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smaller-screen {
|
.smaller-screen {
|
||||||
display: none;
|
display: block;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@media only screen and (max-width: 620px) {
|
</style>
|
||||||
.project-container {
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.smaller-screen {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<FontAwesome />
|
<FontAwesome />
|
||||||
<ParallaxBg>
|
<ParallaxBg>
|
||||||
|
@ -278,56 +275,55 @@ function handleSearch() {
|
||||||
<a style="float: right;margin-right: 10px;margin-top: 10px;">{searchResults.length} results</a>
|
<a style="float: right;margin-right: 10px;margin-top: 10px;">{searchResults.length} results</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-container">
|
<div class="project-container">
|
||||||
{#each searchResults as project}
|
{#each searchResults as project}
|
||||||
<div class="project">
|
<div class="project">
|
||||||
<!-- svelte-ignore a11y-missing-attribute -->
|
<!-- svelte-ignore a11y-missing-attribute -->
|
||||||
<h2 class="project-title">{project.title}<br class="smaller-screen"><br class="smaller-screen"><a class="project-status" style="color: {project.statuscolor};border-color:{project.statuscolor}">{project.status}</a><a class="project-version">{project.version}</a></h2>
|
<h2 class="project-title">{project.title}<br class="smaller-screen"><br class="smaller-screen"><a class="project-status" style="color: {project.statuscolor};border-color:{project.statuscolor}">{project.status}</a><a class="project-version">{project.version}</a></h2>
|
||||||
<p class="project-description">{project.description}</p>
|
<p class="project-description">{project.description}</p>
|
||||||
<div class="project-bg">
|
<div class="project-bg">
|
||||||
<img src="/project-banners/{project.backgroud}" alt=" " />
|
<img src="/project-banners/{project.backgroud}" alt=" " />
|
||||||
</div>
|
|
||||||
<Padding />
|
|
||||||
<Padding />
|
|
||||||
<div class="project-links">
|
|
||||||
<div>
|
|
||||||
{#each Object.entries(project.links) as [platform, link]}
|
|
||||||
<a
|
|
||||||
class="project-link"
|
|
||||||
href={link}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
{#if platform === "GH"}
|
|
||||||
<i class="fa fa-github" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "WB"}
|
|
||||||
<i class="fa fa-globe" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "YT"}
|
|
||||||
<i class="fa fa-youtube" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "TW"}
|
|
||||||
<i class="fa fa-twitter" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "DC"}
|
|
||||||
<i class="fa fa-discord" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "PT"}
|
|
||||||
<i class="fa fa-patreon" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "SP"}
|
|
||||||
<i class="fa fa-spotify" aria-hidden="true"></i>
|
|
||||||
{:else if platform === "IG"}
|
|
||||||
<i class="fa fa-instagram" aria-hidden="true"></i>
|
|
||||||
{:else}
|
|
||||||
{platform}
|
|
||||||
{/if}
|
|
||||||
</a>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a class="download-button" href="/projects/{project.title}">More Info</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<Padding />
|
||||||
|
<Padding />
|
||||||
|
<div class="project-links">
|
||||||
|
<div>
|
||||||
|
{#each Object.entries(project.links) as [platform, link]}
|
||||||
|
<a
|
||||||
|
class="project-link"
|
||||||
|
href={link}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
{#if platform === "GH"}
|
||||||
|
<i class="fa fa-github" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "WB"}
|
||||||
|
<i class="fa fa-globe" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "YT"}
|
||||||
|
<i class="fa fa-youtube" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "TW"}
|
||||||
|
<i class="fa fa-twitter" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "DC"}
|
||||||
|
<i class="fa fa-discord" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "PT"}
|
||||||
|
<i class="fa fa-patreon" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "SP"}
|
||||||
|
<i class="fa fa-spotify" aria-hidden="true"></i>
|
||||||
|
{:else if platform === "IG"}
|
||||||
|
<i class="fa fa-instagram" aria-hidden="true"></i>
|
||||||
|
{:else}
|
||||||
|
{platform}
|
||||||
|
{/if}
|
||||||
|
</a>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="download-button" href="/projects/{project.title}">More Info</a>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
|
||||||
</div>
|
</div>
|
||||||
|
{/each}
|
||||||
<Padding />
|
</div>
|
||||||
|
<Padding />
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
</ParallaxBg>
|
</ParallaxBg>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script>
|
<script>
|
||||||
import Footer from "../../components/Footer.svelte";
|
import Footer from "../../components/Footer.svelte";
|
||||||
import NavBar from "../../components/NavBar.svelte";
|
import NavBar from "../../components/NavBar.svelte";
|
||||||
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
import ParallaxBg from "../../components/ParallaxBg.svelte";
|
||||||
import Padding from "../../components/padding.svelte";
|
import Padding from "../../components/padding.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ParallaxBg>
|
<ParallaxBg>
|
||||||
<title>Status</title>
|
<title>Status</title>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -12,4 +13,4 @@ import Padding from "../../components/padding.svelte";
|
||||||
<h1>Coming Soonish</h1>
|
<h1>Coming Soonish</h1>
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
</ParallaxBg>
|
</ParallaxBg>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue