Compare commits
23 Commits
24e8d9ef23
...
backup-mai
| Author | SHA1 | Date | |
|---|---|---|---|
| 6119e000a5 | |||
| bbe1a2d322 | |||
| cf38e6b07c | |||
| 5335afd88c | |||
| 3e1aec3867 | |||
| 37c4f8d2aa | |||
| d99dc901ac | |||
| bdcc5d0dc8 | |||
| 0ea57cf4c3 | |||
| a01bc4eb2b | |||
| a006bd418c | |||
| 622e62d4b4 | |||
| a7e67503e5 | |||
| 92d3899de7 | |||
| 2ac913a9b9 | |||
| c57f8d82ca | |||
|
|
1d7144640e | ||
|
|
eb0e0125bc | ||
|
|
b68bd4cea6 | ||
|
|
9624ba2ee3 | ||
|
|
a984a1f5c0 | ||
|
|
860a8af7c4 | ||
|
|
9168c5f807 |
0
.gitignore
vendored
Normal file → Executable file
0
LICENSE.txt
Normal file → Executable file
0
colorpallete.png
Normal file → Executable file
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
0
critterfolio/critterfolio.apk
Normal file → Executable file
0
critterfolio/icon.ico
Normal file → Executable file
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 182 KiB |
0
critterfolio/icon.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
0
critterfolio/index.html
Normal file → Executable file
157
css/main.css
Normal file → Executable file
@@ -1,6 +1,11 @@
|
|||||||
:root {
|
:root {
|
||||||
--color-background: #010101;
|
--color-background: #010101;
|
||||||
--color-foreground: #aa0000;
|
--color-foreground: #4d6e8d;
|
||||||
|
|
||||||
|
--frame-spacing: 15px;
|
||||||
|
--frame-border-radius: 10px;
|
||||||
|
|
||||||
|
--main-view-width: 80vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@@ -14,26 +19,158 @@ html {
|
|||||||
color: var(--color-foreground);
|
color: var(--color-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-box {
|
#page-heading {
|
||||||
width: 100%;
|
font-size: 30pt;
|
||||||
|
text-align: center;
|
||||||
|
font-style: italic;
|
||||||
|
letter-spacing: 0.10em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
#main {
|
||||||
|
width: 90vw !important;
|
||||||
|
}
|
||||||
|
#page-heading {
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 100px;
|
||||||
|
width: var(--main-view-width);
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: stretch;
|
||||||
|
padding: 20px;
|
||||||
|
gap: var(--frame-spacing);
|
||||||
|
margin-inline: auto;
|
||||||
|
}
|
||||||
|
#main > * {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tui-status-bar {
|
||||||
|
width: 100vw;
|
||||||
|
border-top: 2px solid var(--color-foreground);
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: var(--color-background);
|
||||||
|
color: var(--color-foreground);
|
||||||
|
padding: 20px;
|
||||||
|
max-height: 30px;
|
||||||
|
display: flex;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
#tui-status-bar p {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
#tui-status-bar p::before {
|
||||||
|
content: ':';
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TUI FRAME */
|
||||||
|
|
||||||
|
.tui-frame {
|
||||||
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border: 2px solid var(--color-foreground);
|
border: 2px solid var(--color-foreground);
|
||||||
border-radius: 10px;
|
border-radius: var(--frame-border-radius);
|
||||||
margin: 20px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-header {
|
.tui-frame-header {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 25px;
|
left: 20px;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.15em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-content p{
|
.tui-frame-content * {
|
||||||
font-size: 12pt;
|
font-size: 14pt;
|
||||||
margin: 15px 0 15px 0;
|
/* display: block; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-content p {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-content h2 {
|
||||||
|
font-size: 19pt;
|
||||||
|
font-style: italic;
|
||||||
|
letter-spacing: 0.15em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-content h2::before {
|
||||||
|
content: '//';
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-content li {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 5px;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-content li::before {
|
||||||
|
content: "*";
|
||||||
|
display: inline;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-single-image {
|
||||||
|
display: block;
|
||||||
|
margin: auto;
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tui-frame-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.tui-frame-section * {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* CONTROLS */
|
||||||
|
button {
|
||||||
|
color: var(--color-foreground);
|
||||||
|
background-color: transparent;
|
||||||
|
border: 2px solid var(--color-foreground);
|
||||||
|
padding: 5px;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
transform: scale(1.05, 1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: var(--color-foreground);
|
||||||
|
font-style: italic;
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
color: var(--color-foreground);
|
||||||
|
background-color: transparent;
|
||||||
|
border: 2px solid var(--color-foreground);
|
||||||
|
padding: 5px;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
0
dev/.htaccess-backup
Normal file → Executable file
0
dev/blight/coi-serviceworker.js
Normal file → Executable file
0
dev/blight/index.apple-touch-icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
0
dev/blight/index.audio.worklet.js
Normal file → Executable file
0
dev/blight/index.html
Normal file → Executable file
0
dev/blight/index.icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
0
dev/blight/index.js
Normal file → Executable file
0
dev/blight/index.pck
Normal file → Executable file
0
dev/blight/index.png
Normal file → Executable file
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
dev/blight/index.wasm
Normal file → Executable file
0
dev/blight/index.worker.js
Normal file → Executable file
0
dev/interactive-angular-map/.htaccess
Normal file → Executable file
0
dev/interactive-angular-map/assets/mapimage.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
0
dev/interactive-angular-map/favicon.ico
Normal file → Executable file
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
0
dev/interactive-angular-map/index.html
Normal file → Executable file
0
dev/interactive-angular-map/main-4Z6S77FU.js
Normal file → Executable file
0
dev/interactive-angular-map/polyfills-FFHMD2TL.js
Normal file → Executable file
0
dev/interactive-angular-map/styles-U3BIK65T.css
Normal file → Executable file
0
dev/stars/index.html
Normal file → Executable file
0
hex-logo-animate.html
Normal file → Executable file
143
index.html
Normal file → Executable file
@@ -6,22 +6,151 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="css/main.css">
|
<link rel="stylesheet" href="css/main.css">
|
||||||
<title>// Hex Studios //</title>
|
<script type="module" src="scripts/main.js"></script>
|
||||||
|
<title>// HEX STUDIOS //</title>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div style="width: 50vh; margin-left: 30px; margin-top: 50px;">
|
|
||||||
|
|
||||||
<div class="tui-box">
|
|
||||||
<h2 class="tui-header">// HEX STUDIOS //</h2>
|
<div id="main">
|
||||||
<div class="tui-content">
|
|
||||||
<p>Hello! My name is Chris, aka Spudnut2000. Welcome to my personal portfolio site!</p>
|
<h1 id="page-heading">// HEX STUDIOS //</h1>
|
||||||
|
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">WELCOME</h2>
|
||||||
|
<div class="tui-frame-content">
|
||||||
|
<p>Hello! My name is Chris. Welcome to my personal portfolio site!</p>
|
||||||
<h2>About Me</h2>
|
<h2>About Me</h2>
|
||||||
<p>I am a husband, programmer, musician, and all around nerd. I like to develop both software and games.</p>
|
<p>I am a husband, programmer, musician, and all around nerd! I like to make games and software, as well as tinker with robots and motorcycles. I am a huge advocate for FOSS (Free and Open Source Software), a Linux user for well over 12 years, and a novice homelabber.</p>
|
||||||
<p>I am primarily a Software Engineer by trade with a Bachelor's in Sotware Engineering and ~5 years of professional experience, where the majority of my knowledge is in C#/.NET, XAML, and HTML/CSS. I am also proficient in many other languages like Odin, C/C++, Java, QML, and JavaScript.</p>
|
<p>I am primarily a Software Engineer by trade with a Bachelor's in Sotware Engineering and ~5 years of professional experience, where the majority of my knowledge is in C#/.NET, XAML, and HTML/CSS. I am also proficient in many other languages like Odin, C/C++, Java, QML, and JavaScript.</p>
|
||||||
|
<p>I am also the CEO and Co-Founder of <a href="https://bellsworne.com">Bellsworne LLC.</a> with my wife Alex.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">IMAGE</h2>
|
||||||
|
<div class="tui-frame-content">
|
||||||
|
<img class="tui-frame-single-image" src="res/chris2.jpg" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">credentials</h2>
|
||||||
|
<div class="tui-frame-content">
|
||||||
|
<h2>Education</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Bachelors, Software Engineering - 2026</li>
|
||||||
|
<li>Associates, Computer Science - 2022</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Experience</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Software Engineer (C#, .NET, Unity) - 4 years</li>
|
||||||
|
<li>Computer Technician (Repair, IT) - 2 years</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Certs</h2>
|
||||||
|
<ul>
|
||||||
|
<li>CompTIA Project+</li>
|
||||||
|
<li>AWS Certified Cloud Practitioner</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">LINKS</h2>
|
||||||
|
<div class="tui-frame-content">
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://git.bellsworne.tech">Git repos</a></li>
|
||||||
|
<li><a href="https://bellsworne.com">Bellsworne</a></li>
|
||||||
|
<li><a href="https://youtube.com/@hexstudios">Youtube</a></li>
|
||||||
|
<li><a href="https://www.linkedin.com/in/christopher-i-bell/">LinkedIn</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">SITE SETTINGS</h2>
|
||||||
|
<div class="tui-frame-content">
|
||||||
|
<p>Change site colors, spacing, and borders</p>
|
||||||
|
<div class="tui-frame-section" id="settings-form">
|
||||||
|
<label for="foreground-setting">Foreground Color</label>
|
||||||
|
<input type="text" name="foreground-setting" id="foreground-setting">
|
||||||
|
|
||||||
|
<label for="background-setting">Background Color</label>
|
||||||
|
<input type="text" name="background-setting" id="background-setting">
|
||||||
|
|
||||||
|
<label for="frame-spacing-setting">Frame Spacing</label>
|
||||||
|
<input type="number" name="frame-spacing-setting" id="frame-spacing-setting" min="5" max="50" value="10">
|
||||||
|
|
||||||
|
<label for="frame-border-radius-setting">Frame Rounding</label>
|
||||||
|
<input type="number" name="frame-border-radius-setting" id="frame-border-radius-setting" min="0" max="50" value="10">
|
||||||
|
|
||||||
|
<button type="button" id="save-settings-button">SAVE</button>
|
||||||
|
<button type="button" id="reset-settings-button">RESET</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">projects</h2>
|
||||||
|
<div class="tui-frame-content">
|
||||||
|
<h2>SessionZero</h2>
|
||||||
|
<p>SessionZero is a data-driven TTRPG companion application for managing characters, sessions, and game data.</p>
|
||||||
|
<p>This is my passion project, and is currently a work in progress. Its core is developed using C# with .NET 8.</p>
|
||||||
|
<p>Visit <a href="https://sessionzero.app">sessionzero.app</a> to learn more, or <a href="https://git.bellsworne.tech/Bellsworne/sessionzero-cs">view the source code.</a></p>
|
||||||
|
|
||||||
|
<h2>Critterfolio</h2>
|
||||||
|
<p>A simple cross-platform full-stack application for managing your critters, for farms or pet owners. Made in C# with Avalonia UI.</p>
|
||||||
|
<p>This project was developed as my Software Engineering Capstone project, but the idea came from my wife who breeds goats and needed an easy way to track linage and other notes about her goats. It still needs some work, but you can download it for Windows, Linux, or Android <a href="critterfolio/index.html">HERE</a>.</p>
|
||||||
|
|
||||||
|
<h2>Let there be blight</h2>
|
||||||
|
<p>A game made in 72 hours for the MiniJam #150 game jam, made in Godot. <a href="/dev/blight">-- Click here to play in your browser! --</a></p>
|
||||||
|
|
||||||
|
<h2>Cogwheel</h2>
|
||||||
|
<p>A C# .NET 9 library that provides a robust and extendible Command and Developer Console system for Games and Software applications. <a href="https://git.bellsworne.tech/Bellsworne/Cogwheel">-- Click here to view on Gitea --</a></p>
|
||||||
|
|
||||||
|
<h2>Interactive Map</h2>
|
||||||
|
<p>An interactive world map that uses the <a href="https://worldbank.org">World Bank</a> REST API to display country information. Made as a school project in AngularJS. <a href="dev/interactive-angular-map">-- Click here to access-- </a></p>
|
||||||
|
|
||||||
|
<h2>Stars</h2>
|
||||||
|
<p>A really simple plain JS webpage that randomly generates a lot of stars. <a href="dev/stars/index.html">-- Click here to view --</a></p>
|
||||||
|
|
||||||
|
<h2>More</h2>
|
||||||
|
<p>To see more of my personal or professional projects, see my <a href="https://git.bellsworne.tech">Git repos</a> page.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="tui-frame"> -->
|
||||||
|
<!-- <h2 class="tui-frame-header">notice</h2> -->
|
||||||
|
<!-- <div class="tui-frame-content" style="width: 100%; display: flex; justify-content: center; text-align: center;"> -->
|
||||||
|
<!-- <p style="font-size: 20pt; color: darkred;">SAY NO TO GENERATIVE AI</p> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">motto</h2>
|
||||||
|
<p>Say No To AI</p>
|
||||||
|
</div>
|
||||||
|
<div class="tui-frame">
|
||||||
|
<h2 class="tui-frame-header">motto</h2>
|
||||||
|
<p>Say No To AI</p>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="tui-status-bar">
|
||||||
|
<p>COPYRIGHT 2026 <a href="https://bellsworne.com">BELLSWORNE LLC</a></p>
|
||||||
|
<p><a href="https://git.bellsworne.tech/chrisbell/hexstudios-co">Source Code</a></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Keep android open banner -->
|
||||||
|
<script src="https://keepandroidopen.org/banner.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
0
old/css/hex-logo.animate.css
Normal file → Executable file
33
old/css/master.css
Normal file → Executable file
@@ -154,30 +154,25 @@ body {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.projects-box {
|
.project-card {
|
||||||
display: flex;
|
margin-bottom: 40px;
|
||||||
flex-wrap: wrap;
|
}
|
||||||
margin: auto;
|
|
||||||
max-width: 70%;
|
|
||||||
|
|
||||||
} .projects-box .card {
|
.project-card img {
|
||||||
margin: auto;
|
width: 10%;
|
||||||
padding-bottom: 30px;
|
height: auto;
|
||||||
} .projects-box img {
|
margin-top: 20px;
|
||||||
width: 100%;
|
border: 2px solid var(--color-pallete-red);
|
||||||
height: 100%;
|
}
|
||||||
border-top-right-radius: 10%;
|
|
||||||
border-top-left-radius: 1%;
|
.project-card .hexlink {
|
||||||
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1000px)
|
@media (max-width: 1000px)
|
||||||
{
|
{
|
||||||
.projects-box {
|
.project-card img {
|
||||||
display: block;
|
width: 40%;
|
||||||
margin: 0 30px 0 30px;
|
|
||||||
} .projects-box .card {
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px 0 20px 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
0
projectvii.html
Normal file → Executable file
0
res/blight.png
Normal file → Executable file
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
0
res/chris.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
0
res/chris2.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
BIN
res/cogwheel.png
Executable file
|
After Width: | Height: | Size: 866 KiB |
0
res/hex-logo.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
0
res/map.png
Normal file → Executable file
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
0
res/project7-1080p.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
0
res/project7-card.png
Normal file → Executable file
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
0
res/project7-splash.png
Normal file → Executable file
|
Before Width: | Height: | Size: 879 KiB After Width: | Height: | Size: 879 KiB |
BIN
res/seshzero.png
Executable file
|
After Width: | Height: | Size: 32 KiB |
BIN
res/shots.png
Executable file
|
After Width: | Height: | Size: 222 KiB |
0
res/stars.png
Normal file → Executable file
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
96
scripts/main.js
Executable file
@@ -0,0 +1,96 @@
|
|||||||
|
const r = document.querySelector(':root');
|
||||||
|
|
||||||
|
const fgInput = document.getElementById('foreground-setting');
|
||||||
|
const bgInput = document.getElementById('background-setting');
|
||||||
|
const spacingInput = document.getElementById('frame-spacing-setting');
|
||||||
|
const radiusInput = document.getElementById('frame-border-radius-setting');
|
||||||
|
const saveBtn = document.getElementById('save-settings-button');
|
||||||
|
const resetBtn = document.getElementById('reset-settings-button');
|
||||||
|
|
||||||
|
let lightMode = false;
|
||||||
|
|
||||||
|
const defaultSettings = {
|
||||||
|
foreground: "#4d6e8d",
|
||||||
|
background: "#010101",
|
||||||
|
spacing: "15px",
|
||||||
|
radius: "10px"
|
||||||
|
};
|
||||||
|
|
||||||
|
saveBtn.addEventListener('click', () => {
|
||||||
|
const currentSettings = {
|
||||||
|
foreground: fgInput.value,
|
||||||
|
background: bgInput.value,
|
||||||
|
spacing: spacingInput.value + 'px',
|
||||||
|
radius: radiusInput.value + 'px'
|
||||||
|
};
|
||||||
|
|
||||||
|
setForegroundColor(currentSettings.foreground);
|
||||||
|
setBackgroundColor(currentSettings.background);
|
||||||
|
setFrameSpacing(currentSettings.spacing);
|
||||||
|
setFrameBorderRadius(currentSettings.radius);
|
||||||
|
|
||||||
|
localStorage.setItem('user-settings', JSON.stringify(currentSettings));
|
||||||
|
});
|
||||||
|
|
||||||
|
resetBtn.addEventListener('click', () => {
|
||||||
|
localStorage.setItem('user-settings', JSON.stringify(defaultSettings));
|
||||||
|
loadStoredSettings();
|
||||||
|
syncSettings();
|
||||||
|
});
|
||||||
|
|
||||||
|
function setForegroundColor(color) {
|
||||||
|
r.style.setProperty('--color-foreground', color);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setBackgroundColor(color) {
|
||||||
|
r.style.setProperty('--color-background', color);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setFrameSpacing(amount) {
|
||||||
|
r.style.setProperty('--frame-spacing', amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setFrameBorderRadius(amount) {
|
||||||
|
r.style.setProperty('--frame-border-radius', amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
function syncSettings() {
|
||||||
|
const rootStyles = getComputedStyle(document.documentElement);
|
||||||
|
|
||||||
|
const varMap = {
|
||||||
|
'foreground-setting': '--color-foreground',
|
||||||
|
'background-setting': '--color-background',
|
||||||
|
'frame-spacing-setting': '--frame-spacing',
|
||||||
|
'frame-border-radius-setting': '--frame-border-radius'
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const [id, variable] of Object.entries(varMap)) {
|
||||||
|
const element = document.getElementById(id);
|
||||||
|
|
||||||
|
if (element) {
|
||||||
|
let cssValue = rootStyles.getPropertyValue(variable).trim();
|
||||||
|
|
||||||
|
if (element.type === 'number') {
|
||||||
|
element.value = parseFloat(cssValue) || 0;
|
||||||
|
} else {
|
||||||
|
element.value = cssValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadStoredSettings() {
|
||||||
|
const saved = localStorage.getItem('user-settings');
|
||||||
|
|
||||||
|
if (saved) {
|
||||||
|
const settings = JSON.parse(saved);
|
||||||
|
|
||||||
|
setForegroundColor(settings.foreground);
|
||||||
|
setBackgroundColor(settings.background);
|
||||||
|
setFrameSpacing(settings.spacing);
|
||||||
|
setFrameBorderRadius(settings.radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadStoredSettings();
|
||||||
|
syncSettings();
|
||||||