Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
a2058f08d4
|
|||
2d879a93ed
|
|||
d37f880894
|
|||
3eadb3df36
|
|||
2ef189b7f9
|
|||
0041aa4e22
|
|||
1c37c310e7
|
|||
a544504b42
|
|||
130637dbc3
|
|||
94a2e51784
|
|||
701dc6683e
|
|||
caa296e11a
|
|||
36ec03be09
|
|||
0f3f26f4f3
|
|||
2475b9aee2
|
|||
4f4c85c85a
|
|||
40bf1f6169
|
|||
1ebb927c66
|
|||
52662a6e4e
|
|||
5d9bd0f369
|
|||
12a51f18d2
|
|||
ea0cc34ba8
|
|||
7fe92c971b
|
|||
6df7d0565b
|
|||
7958230d34
|
|||
35ef8877ab
|
|||
f81fa98851
|
|||
d23558cbfd
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "colormatic-website",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.4",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
BIN
release.tar.gz
BIN
release.tar.gz
Binary file not shown.
@ -7,15 +7,22 @@
|
||||
|
||||
let { darkTheme = $bindable() } = $props();
|
||||
let timeScale = 1;
|
||||
let animated = false;
|
||||
|
||||
$effect(() => {
|
||||
darkTheme;
|
||||
|
||||
for (let i = 0; i < gradients.length; i++) {
|
||||
// This re-renders each gradient so their new color will be correct
|
||||
let gradient = gradients[i];
|
||||
gradient.color = getRandomColor();
|
||||
gradient.prepareBuffer();
|
||||
}
|
||||
|
||||
if (!animated && ctx) {
|
||||
// Don't try to render if ctx hasn't initialized yet
|
||||
render(false);
|
||||
}
|
||||
});
|
||||
|
||||
let particleImages: { [key: string]: HTMLImageElement } = {};
|
||||
@ -58,8 +65,13 @@
|
||||
return {};
|
||||
});
|
||||
|
||||
Promise.all(Object.values(imagePromises)).then(() => {
|
||||
render(false);
|
||||
});
|
||||
|
||||
resize();
|
||||
init();
|
||||
render(false);
|
||||
animate();
|
||||
|
||||
window.addEventListener("resize", resize);
|
||||
@ -70,6 +82,10 @@
|
||||
canvas.height = window.innerHeight;
|
||||
|
||||
canvasDpiScaler(canvas, ctx);
|
||||
|
||||
if (!animated) {
|
||||
render(false);
|
||||
}
|
||||
}
|
||||
|
||||
const clamp = (val: number, min: number, max: number) =>
|
||||
@ -190,7 +206,7 @@
|
||||
ctx.save();
|
||||
// The source images are black, so we are inverting them
|
||||
// different amounts to get different shades of gray
|
||||
ctx.filter = darkTheme ? "invert(0.15)" : "invert(0.8)";
|
||||
ctx.filter = darkTheme ? "invert(0.1)" : "invert(0.9)";
|
||||
|
||||
// Draw center of rotation
|
||||
// ctx.beginPath();
|
||||
@ -286,14 +302,13 @@
|
||||
}
|
||||
|
||||
function init() {
|
||||
/*/
|
||||
* Calculate the proper amount of particles
|
||||
* 25920 is our constant, equal to x in (1080*1920)/x = 80
|
||||
* Because the subjectively correct amount of particles for a 1080p
|
||||
* display is 80, so to calculate the proper amount for any window size,
|
||||
* just do (width * height) / 25920
|
||||
/*/
|
||||
let particleCount = (window.innerWidth * window.innerHeight) / 25920;
|
||||
let isMobile = /Mobile|Android|iPhone/i.test(navigator.userAgent);
|
||||
let particleCount: number;
|
||||
if (isMobile) {
|
||||
particleCount = 25;
|
||||
} else {
|
||||
particleCount = 40;
|
||||
}
|
||||
|
||||
particles = [];
|
||||
for (let i = 0; i < particleCount; i++) {
|
||||
@ -305,20 +320,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
function animate() {
|
||||
function render(update: boolean) {
|
||||
ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);
|
||||
|
||||
for (let i_gradient = 0; i_gradient < gradients.length; i_gradient++) {
|
||||
let gradient = gradients[i_gradient];
|
||||
gradient.update();
|
||||
if (update) gradient.update();
|
||||
gradient.draw();
|
||||
}
|
||||
|
||||
for (let i_particle = 0; i_particle < particles.length; i_particle++) {
|
||||
let particle = particles[i_particle];
|
||||
particle.update();
|
||||
if (update) particle.update();
|
||||
particle.draw();
|
||||
}
|
||||
}
|
||||
|
||||
function animate() {
|
||||
if (animated) {
|
||||
render(true);
|
||||
}
|
||||
|
||||
requestAnimationFrame(animate);
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
<p>© 2025 Colormatic Studios, All Rights Reserved.</p>
|
||||
<p>
|
||||
<a href="mailto:support@colormatic.org">support@colormatic.org</a>
|
||||
|
|
||||
<a href="mailto:support@colormatic.org">contact@colormatic.org</a>
|
||||
<span class="responsive-hidden">|</span>
|
||||
<a href="mailto:contact@colormatic.org">contact@colormatic.org</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
@ -28,10 +28,15 @@
|
||||
footer {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
footer p {
|
||||
text-align: center;
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.responsive-hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -152,6 +152,12 @@ Svelte modal example, https://svelte.dev/playground/modal
|
||||
nav button.menu-button {
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
nav button.menu-button:hover {
|
||||
color: #21afff;
|
||||
}
|
||||
|
||||
nav .menu-button i {
|
||||
@ -240,6 +246,12 @@ Svelte modal example, https://svelte.dev/playground/modal
|
||||
|
||||
font-size: 200%;
|
||||
color: global.$text-color;
|
||||
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
span.modalbg div button.close:hover {
|
||||
color: #21afff;
|
||||
}
|
||||
|
||||
span.modalbg div ul {
|
||||
@ -259,6 +271,10 @@ Svelte modal example, https://svelte.dev/playground/modal
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
span.modalbg div ul li a:hover {
|
||||
color: #21afff;
|
||||
}
|
||||
|
||||
@media screen and (max-width: global.$mobile-width) {
|
||||
span.modalbg div {
|
||||
width: 30ch;
|
||||
|
@ -3,6 +3,8 @@
|
||||
import { themes } from "../script/theme.ts";
|
||||
import { setCookie, getCookie } from "../script/cookie.ts";
|
||||
|
||||
let panelRef = $state() as HTMLElement;
|
||||
|
||||
let lightButtonIcon = $state() as HTMLElement;
|
||||
let darkButtonIcon = $state() as HTMLElement;
|
||||
let autoButtonIcon = $state() as HTMLElement;
|
||||
@ -13,32 +15,28 @@
|
||||
|
||||
let { themeOption = $bindable() } = $props();
|
||||
|
||||
let expanded = $state(false);
|
||||
let currentIcon = $state("bi-circle-half");
|
||||
|
||||
let darkTheme: CallableFunction = getContext("darkTheme");
|
||||
|
||||
function setThemeOption(newThemeOption: string) {
|
||||
expanded = false;
|
||||
setCookie("theme", newThemeOption);
|
||||
themeOption = newThemeOption;
|
||||
|
||||
switch (newThemeOption) {
|
||||
case themes.LIGHT:
|
||||
themeOption = themes.LIGHT;
|
||||
|
||||
lightButtonIcon.classList.replace("bi-sun", "bi-sun-fill");
|
||||
darkButtonIcon.classList.replace("bi-moon-fill", "bi-moon");
|
||||
autoButtonIcon.classList.replace("bi-display-fill", "bi-display");
|
||||
currentIcon = "bi-sun-fill";
|
||||
break;
|
||||
case themes.DARK:
|
||||
themeOption = themes.DARK;
|
||||
|
||||
lightButtonIcon.classList.replace("bi-sun-fill", "bi-sun");
|
||||
darkButtonIcon.classList.replace("bi-moon", "bi-moon-fill");
|
||||
autoButtonIcon.classList.replace("bi-display-fill", "bi-display");
|
||||
currentIcon = "bi-moon-fill";
|
||||
break;
|
||||
case themes.AUTO:
|
||||
themeOption = themes.AUTO;
|
||||
|
||||
lightButtonIcon.classList.replace("bi-sun-fill", "bi-sun");
|
||||
darkButtonIcon.classList.replace("bi-moon-fill", "bi-moon");
|
||||
autoButtonIcon.classList.replace("bi-display", "bi-display-fill");
|
||||
currentIcon = "bi-circle-half";
|
||||
break;
|
||||
default:
|
||||
console.error("setThemeOption was passed a value that is not a theme");
|
||||
console.error("Invalid theme option");
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,59 +45,128 @@
|
||||
if (Object.values(themes).includes(themeCookie)) {
|
||||
setThemeOption(themeCookie);
|
||||
}
|
||||
|
||||
function handleClickOutside(event: MouseEvent) {
|
||||
if (panelRef && !panelRef.contains(event.target as HTMLElement)) {
|
||||
expanded = false;
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("mousedown", handleClickOutside);
|
||||
|
||||
return () => {
|
||||
document.removeEventListener("mousedown", handleClickOutside);
|
||||
};
|
||||
});
|
||||
|
||||
let darkTheme: CallableFunction = getContext("darkTheme");
|
||||
function togglePanel() {
|
||||
expanded = !expanded;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="panel settings {darkTheme() ? 'dark-theme' : ''}">
|
||||
<div
|
||||
bind:this={panelRef}
|
||||
class="theme-toggle panel {darkTheme() ? 'dark-theme' : ''}"
|
||||
>
|
||||
<button
|
||||
aria-label="Dark Theme"
|
||||
bind:this={darkButton}
|
||||
onclick={() => {
|
||||
setThemeOption(themes.DARK);
|
||||
}}
|
||||
class="toggle-button"
|
||||
onclick={togglePanel}
|
||||
aria-label="Toggle Theme Selector"
|
||||
>
|
||||
<i bind:this={darkButtonIcon} class="bi bi-moon"></i>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Light Theme"
|
||||
bind:this={lightButton}
|
||||
onclick={() => {
|
||||
setThemeOption(themes.LIGHT);
|
||||
}}
|
||||
>
|
||||
<i bind:this={lightButtonIcon} class="bi bi-sun"></i>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Auto Theme"
|
||||
bind:this={autoButton}
|
||||
onclick={() => {
|
||||
setThemeOption(themes.AUTO);
|
||||
}}
|
||||
>
|
||||
<i bind:this={autoButtonIcon} class="bi bi-display-fill"></i>
|
||||
<i class={`bi ${currentIcon}`}></i>
|
||||
</button>
|
||||
|
||||
<!-- Unfortunately, we have to hard-code the pixel count because CSS won't animate `auto` or `min-content` -->
|
||||
<div class="button-group" style:height={expanded ? "68px" : "0px"}>
|
||||
<!-- Don't show the button if it is currently selected (it will be shown as the dropdown icon) -->
|
||||
{#if themeOption !== themes.DARK}
|
||||
<button
|
||||
aria-label="Dark Theme"
|
||||
bind:this={darkButton}
|
||||
onclick={() => setThemeOption(themes.DARK)}
|
||||
>
|
||||
<i bind:this={darkButtonIcon} class="bi bi-moon"></i>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if themeOption !== themes.LIGHT}
|
||||
<button
|
||||
aria-label="Light Theme"
|
||||
bind:this={lightButton}
|
||||
onclick={() => setThemeOption(themes.LIGHT)}
|
||||
>
|
||||
<i bind:this={lightButtonIcon} class="bi bi-sun"></i>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if themeOption !== themes.AUTO}
|
||||
<button
|
||||
aria-label="Auto Theme"
|
||||
bind:this={autoButton}
|
||||
onclick={() => setThemeOption(themes.AUTO)}
|
||||
>
|
||||
<i bind:this={autoButtonIcon} class="bi bi-circle-half"></i>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../style/global.scss";
|
||||
|
||||
div.panel.settings {
|
||||
padding: 6px 8px;
|
||||
div.theme-toggle {
|
||||
padding: 4px;
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
div.panel.settings button {
|
||||
color: global.$text-color;
|
||||
font-size: 110%;
|
||||
cursor: pointer;
|
||||
|
||||
// Reset buton style
|
||||
button.toggle-button {
|
||||
font-size: 1.3rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
background-color: #00000000;
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
color: global.$text-color;
|
||||
aspect-ratio: 1 / 1;
|
||||
}
|
||||
|
||||
div.button-group {
|
||||
overflow: hidden;
|
||||
transition: height 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
div.button-group button {
|
||||
margin: 2px 0;
|
||||
font-size: 1.3rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: global.$text-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media screen and (max-width: global.$mobile-width) {
|
||||
div.button-group button {
|
||||
margin: 4px 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Click target color animation
|
||||
|
||||
button {
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
color: #21afff !important;
|
||||
/*/
|
||||
* Cascading styles was a mistake
|
||||
* I hate this code
|
||||
* But it works
|
||||
/*/
|
||||
}
|
||||
</style>
|
||||
|
@ -17,7 +17,7 @@
|
||||
let darkTheme = $state(false);
|
||||
|
||||
/*/
|
||||
* This is necesarry for pages to read the theme,
|
||||
* This is necessary for pages to read the theme,
|
||||
* sucks that we have to use an anonymous function
|
||||
* just to grab a variable
|
||||
/*/
|
||||
|
@ -1,2 +1,5 @@
|
||||
export const prerender = true;
|
||||
export const csr = true;
|
||||
|
||||
export const trailingSlash = "always";
|
||||
// This will output directories containing index.html
|
||||
|
@ -1,25 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onMount } from "svelte";
|
||||
|
||||
let arrow = $state() as HTMLDivElement;
|
||||
let atTop = $state(true);
|
||||
|
||||
function checkArrow(e: Event) {
|
||||
if (window.scrollY != 0) {
|
||||
if (!arrow.classList.contains("scroll-arrow-hide")) {
|
||||
arrow.classList.add("scroll-arrow-hide");
|
||||
}
|
||||
function checkScrollPos() {
|
||||
if (window.scrollY === 0) {
|
||||
atTop = true;
|
||||
} else {
|
||||
if (arrow.classList.contains("scroll-arrow-hide")) {
|
||||
arrow.classList.remove("scroll-arrow-hide");
|
||||
}
|
||||
atTop = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener("scroll", checkArrow);
|
||||
window.addEventListener("scroll", checkScrollPos);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("scroll", checkArrow);
|
||||
window.removeEventListener("scroll", checkScrollPos);
|
||||
};
|
||||
});
|
||||
|
||||
@ -53,7 +49,7 @@
|
||||
<h1>Colormatic: A non-profit project for creation.</h1>
|
||||
</div>
|
||||
|
||||
<div bind:this={arrow} class="scroll-arrow">
|
||||
<div class="scroll-arrow {atTop ? '' : 'hide'}">
|
||||
<i class="bi bi-arrow-down-circle-fill"></i>
|
||||
</div>
|
||||
|
||||
@ -101,7 +97,6 @@
|
||||
>
|
||||
ColormaticStudios/Colormatic-Website
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
@ -137,4 +132,23 @@
|
||||
font-size: 200%;
|
||||
}
|
||||
}
|
||||
|
||||
main div.scroll-arrow {
|
||||
text-align: center;
|
||||
font-size: 200%;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 64px;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transition: opacity 0.25s ease-in;
|
||||
}
|
||||
|
||||
main div.scroll-arrow.hide {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition:
|
||||
visibility 0s 0.25s,
|
||||
opacity 0.25s ease-out;
|
||||
}
|
||||
</style>
|
||||
|
@ -103,6 +103,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hero panel">
|
||||
<h1>About Us</h1>
|
||||
<p class="justify">
|
||||
Colormatic Studios is a creative studio dedicated to giving life to
|
||||
Colormatic's ambitious future.
|
||||
</p>
|
||||
<p class="justify">
|
||||
We are currently just a passionate team of volunteers working to build
|
||||
inspiring, intuitive and innovative creative works. We don't have many
|
||||
projects right now, but we're working hard behind the scenes on ventures
|
||||
we'll be introducing later.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="hero panel">
|
||||
<h1>Links:</h1>
|
||||
<div class="double-linktree">
|
||||
@ -232,6 +246,11 @@
|
||||
color: global.$text-color;
|
||||
}
|
||||
|
||||
// Bad code
|
||||
div.project-grid-container div.project-grid-box h1 a:hover {
|
||||
color: #21afff;
|
||||
}
|
||||
|
||||
div.project-grid-container
|
||||
div.project-grid-box
|
||||
div.project-grid-box-contents {
|
||||
|
@ -1,242 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onMount } from "svelte";
|
||||
|
||||
onMount(() => {
|
||||
let channel = getParam("c");
|
||||
let video = getParam("v");
|
||||
// Don't request an empty string
|
||||
if (channel && video) {
|
||||
getVideo(channel, video);
|
||||
}
|
||||
});
|
||||
|
||||
let darkTheme: CallableFunction = getContext("darkTheme");
|
||||
|
||||
const BASEURL = "https://files.colormatic.org/";
|
||||
|
||||
export function getParam(paramName: string) {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
let t_param = params.get(paramName);
|
||||
return t_param ? t_param : ""; // Return empty string if null
|
||||
}
|
||||
|
||||
async function getJSON(url: string) {
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) throw new Error(response.statusText);
|
||||
|
||||
const data = response.json();
|
||||
return data;
|
||||
}
|
||||
|
||||
export function getVideo(cname: string, vname: string) {
|
||||
var videoplayer = document.getElementById("videoplayer") as HTMLElement;
|
||||
var videotitle = document.getElementById("videotitle") as HTMLElement;
|
||||
var videodescription = document.getElementById(
|
||||
"videodescription",
|
||||
) as HTMLElement;
|
||||
var videodownload = document.getElementById("videodownload") as HTMLElement;
|
||||
var sourcedownload = document.getElementById(
|
||||
"sourcedownload",
|
||||
) as HTMLElement;
|
||||
getJSON(BASEURL + cname + "/videos/data/" + vname + ".json")
|
||||
.then((data) => {
|
||||
let videoURL =
|
||||
BASEURL +
|
||||
cname +
|
||||
"/videos/raw/" +
|
||||
data.video_file +
|
||||
"." +
|
||||
data.video_format;
|
||||
videoplayer.setAttribute(
|
||||
"poster",
|
||||
BASEURL + cname + "/videos/thumbnail/" + data.thumbnail,
|
||||
);
|
||||
var videosource = document.createElement("source");
|
||||
videosource.setAttribute("src", videoURL);
|
||||
videosource.setAttribute("type", "video/" + data.video_format);
|
||||
videoplayer.appendChild(videosource);
|
||||
|
||||
document.title = data.title;
|
||||
videotitle.innerText = data.title;
|
||||
data.description.forEach((iter: number) => {
|
||||
// TODO: Detect if one of these lines contains a link and if so, make it a link
|
||||
videodescription.appendChild(
|
||||
document.createTextNode(iter.toString()),
|
||||
);
|
||||
videodescription.appendChild(document.createElement("br"));
|
||||
});
|
||||
|
||||
videodownload.setAttribute(
|
||||
"href",
|
||||
BASEURL +
|
||||
cname +
|
||||
"/videos/raw/" +
|
||||
data.video_file +
|
||||
"." +
|
||||
data.video_format,
|
||||
);
|
||||
videodownload.setAttribute(
|
||||
"download",
|
||||
data.video_file + "." + data.video_format,
|
||||
);
|
||||
sourcedownload.setAttribute(
|
||||
"href",
|
||||
BASEURL +
|
||||
cname +
|
||||
"/videos/source/" +
|
||||
data.source_file +
|
||||
"." +
|
||||
data.source_format,
|
||||
);
|
||||
sourcedownload.setAttribute(
|
||||
"download",
|
||||
data.source_file + "." + data.source_format,
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
videotitle.innerText = "Failed to load video.";
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Video Player</title>
|
||||
<meta property="og:type" content="video" />
|
||||
</svelte:head>
|
||||
|
||||
<spacer></spacer>
|
||||
|
||||
<main class={darkTheme() ? "dark-theme" : ""}>
|
||||
<div class="video panel">
|
||||
<!-- Video elements are set by a script -->
|
||||
<!-- svelte-ignore a11y_media_has_caption -->
|
||||
<video id="videoplayer" controls></video>
|
||||
<div class="videoobjects">
|
||||
<div class="videodetails">
|
||||
<h1 id="videotitle">Video Player</h1>
|
||||
<p id="videodescription" class="justify"></p>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<div class="download-dropdown">
|
||||
<i class="bi bi-download"></i>
|
||||
<div class="dropdown-content">
|
||||
<ul>
|
||||
<li><a id="videodownload">Download Video</a></li>
|
||||
<li><a id="sourcedownload">Download Source</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<spacer></spacer>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../../style/global.scss";
|
||||
|
||||
div.video {
|
||||
display: flex;
|
||||
color: global.$text-color;
|
||||
width: 90%;
|
||||
margin: 16px auto 16px auto;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
div.video video#videoplayer {
|
||||
flex-grow: 1;
|
||||
border-radius: 12px;
|
||||
height: auto;
|
||||
max-width: 55%;
|
||||
}
|
||||
|
||||
div.video div.videoobjects {
|
||||
display: grid;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
div.video div.videodetails h1#videotitle {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
div.dropdown-container {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background-color: #21afff;
|
||||
box-shadow: 1px 1px 8px #00000033;
|
||||
border-radius: 50px;
|
||||
transition-duration: 0.35s;
|
||||
font-size: 120%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown:hover {
|
||||
box-shadow: 1px 1px 8px #00000088;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown div.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
font-size: 80%;
|
||||
min-width: 160px;
|
||||
background-color: #edeeee;
|
||||
box-shadow: 1px 1px 8px #00000033;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown:hover div.dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown div.dropdown-content ul {
|
||||
list-style-type: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown div.dropdown-content ul li {
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown div.dropdown-content ul li:hover {
|
||||
background-color: #dcdfdf;
|
||||
}
|
||||
|
||||
div.video div.download-dropdown div.dropdown-content ul li a {
|
||||
text-decoration: none;
|
||||
color: global.$text-color;
|
||||
}
|
||||
|
||||
@media screen and (max-width: global.$mobile-width) {
|
||||
div.video {
|
||||
display: block;
|
||||
}
|
||||
div.video video#videoplayer {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
div.video div.download-dropdown {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
main.dark-theme {
|
||||
div.video div.download-dropdown div.dropdown-content {
|
||||
background-color: #444444;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -23,36 +23,54 @@
|
||||
/>
|
||||
<meta
|
||||
property="og:image"
|
||||
content="https://colormatic.org/img/zakarya-icon.svg"
|
||||
content="https://colormatic.org/img/colormatic_logo.svg"
|
||||
/>
|
||||
<meta property="og:url" content="https://colormatic.org/zakarya/" />
|
||||
<meta property="og:type" content="website" />
|
||||
</svelte:head>
|
||||
|
||||
<main class={darkTheme() ? "dark-theme" : ""}>
|
||||
<img class="banner" src="/img/zakarya-banner.png" alt="Zakarya Banner" />
|
||||
<img
|
||||
class="banner"
|
||||
src="/img/zakarya-banner.webp"
|
||||
alt="Zakarya Banner"
|
||||
srcset="/img/zakarya-banner.webp 960w, /img/zakarya-banner@2x.webp 1920w"
|
||||
/>
|
||||
<div class="hero panel profile">
|
||||
<div class="nameplate">
|
||||
<img
|
||||
src="/img/zakarya-icon.png"
|
||||
src="/img/zakarya-icon.webp"
|
||||
class="zakarya-icon"
|
||||
alt="Zakarya Icon"
|
||||
srcset="/img/zakarya-icon.webp 540w, /img/zakarya-icon@2x.webp 1080w"
|
||||
/>
|
||||
<span class="name-title">Zakarya</span>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
I am a software and game developer, I run Colormatic and Colormatic
|
||||
Studios, and I primarily study computer science, psychology, and
|
||||
linguistics.
|
||||
<br />
|
||||
I have an intrinsic urge to create, and that's what Colormatic is all about.
|
||||
My works include world building, music, videos, 3D modeling, video games, websites,
|
||||
programs, and more.
|
||||
</p>
|
||||
<div class="bio">
|
||||
<p>
|
||||
I am a software and game developer, I run Colormatic and Colormatic
|
||||
Studios, and I primarily study computer science, psychology, and
|
||||
linguistics.
|
||||
</p>
|
||||
<p>
|
||||
I have an intrinsic urge to create, and that's what Colormatic is all
|
||||
about. My works include world building, music, videos, 3D modeling,
|
||||
video games, websites, programs, and more.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="linktree-container">
|
||||
<ul class="linktree">
|
||||
<li>
|
||||
<a
|
||||
href="https://git.colormatic.org/zakarya"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Colormatic Git
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://mstdn.party/@zakarya"
|
||||
@ -98,7 +116,11 @@
|
||||
<h1>Featured Videos:</h1>
|
||||
<ul class="videolist">
|
||||
<li>
|
||||
<a href="/video?c=zakarya&v=the-way-forward">
|
||||
<a
|
||||
href="https://www.youtube.com/watch?v=FWGCPIEM_-o"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img
|
||||
src="https://files.colormatic.org/zakarya/videos/thumbnail/wayforward.png"
|
||||
alt="Video Thumbnail"
|
||||
@ -107,7 +129,11 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/video?c=zakarya&v=hello-world">
|
||||
<a
|
||||
href="https://www.youtube.com/watch?v=OPD8NqNu0nE"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img
|
||||
src="https://files.colormatic.org/zakarya/videos/thumbnail/helloworld.png"
|
||||
alt="Video Thumbnail"
|
||||
@ -156,7 +182,7 @@
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
main div.profile p {
|
||||
main div.profile div.bio {
|
||||
font-size: 120%;
|
||||
max-width: 50%;
|
||||
padding: 16px;
|
||||
@ -185,7 +211,7 @@
|
||||
margin: 24px auto;
|
||||
}
|
||||
|
||||
main div.profile p {
|
||||
main div.profile div.bio {
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
@ -212,7 +238,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
main.dark-theme div.profile p {
|
||||
main.dark-theme div.profile div.bio {
|
||||
border-color: #ffffff55;
|
||||
}
|
||||
|
||||
ul.videolist {
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
ul.videolist li {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
ul.videolist li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul.videolist li a img {
|
||||
width: 250px;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
ul.videolist li a span {
|
||||
display: block;
|
||||
color: global.$text-color;
|
||||
font-size: 120%;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,12 @@
|
||||
// The magic cookie system is so stupid
|
||||
|
||||
export function setCookie(cname: string, cvalue: string) {
|
||||
document.cookie = cname + "=" + cvalue + ";";
|
||||
export function setCookie(
|
||||
cname: string,
|
||||
cvalue: string,
|
||||
sameSite: string = "Lax",
|
||||
) {
|
||||
document.cookie =
|
||||
cname + "=" + cvalue + ";" + "SameSite" + "=" + sameSite + ";";
|
||||
}
|
||||
|
||||
// Credit: https://www.w3schools.com/js/js_cookies.asp
|
||||
|
@ -24,6 +24,26 @@ spacer {
|
||||
margin-top: 8%;
|
||||
}
|
||||
|
||||
a {
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #2194ff;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #2178ff;
|
||||
}
|
||||
|
||||
a:link:hover {
|
||||
color: #21afff;
|
||||
}
|
||||
|
||||
a:visited:hover {
|
||||
color: #21afff;
|
||||
}
|
||||
|
||||
a.btn,
|
||||
button.btn {
|
||||
padding: 8px 18px;
|
||||
@ -84,25 +104,6 @@ main div.hero {
|
||||
}
|
||||
}
|
||||
|
||||
main div.scroll-arrow {
|
||||
text-align: center;
|
||||
font-size: 200%;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 64px;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transition: opacity 0.25s ease-in;
|
||||
}
|
||||
|
||||
main div.scroll-arrow.scroll-arrow-hide {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition:
|
||||
visibility 0s 0.25s,
|
||||
opacity 0.25s ease-out;
|
||||
}
|
||||
|
||||
main div.hero h1 a {
|
||||
color: global.$text-color;
|
||||
}
|
||||
@ -181,34 +182,6 @@ div.double-linktree ul.linktree {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul.videolist {
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
ul.videolist li {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
ul.videolist li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul.videolist li a img {
|
||||
width: 250px;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
ul.videolist li a span {
|
||||
display: block;
|
||||
color: global.$text-color;
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
img.pixelart {
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 722 KiB |
BIN
static/img/zakarya-banner.webp
Normal file
BIN
static/img/zakarya-banner.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
BIN
static/img/zakarya-banner@2x.webp
Normal file
BIN
static/img/zakarya-banner@2x.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 542 KiB |
Binary file not shown.
Before Width: | Height: | Size: 303 KiB |
BIN
static/img/zakarya-icon.webp
Normal file
BIN
static/img/zakarya-icon.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
BIN
static/img/zakarya-icon@2x.webp
Normal file
BIN
static/img/zakarya-icon@2x.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 191 KiB |
@ -7,6 +7,9 @@ const config = {
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
},
|
||||
compilerOptions: {
|
||||
runes: true,
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
Reference in New Issue
Block a user