Skip to content

Commit a3ba7cc

Browse files
Theme Update
This is a fairly large update, The theme system is user editable now. To create a theme, simply edit example.css in the themes directory. Themes must have an entry in themes,json to load. Example { "id": "light", "name": "Light" }, Use the name of the css file for id, and what you want to show in the UI for name
1 parent 046e240 commit a3ba7cc

9 files changed

Lines changed: 1480 additions & 636 deletions

File tree

src/index.html

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<link rel="manifest" href="manifest.json">
77
<title>PeerSuite</title>
8-
<link rel="stylesheet" href="style.css">
8+
<link rel="stylesheet" href="main-styles.css">
9+
<link id="active-theme-stylesheet" rel="stylesheet" href="themes/light.css">
910
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.0.5/dist/purify.min.js"></script>
1011
</head>
1112
<body>
1213
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" style="position:absolute; overflow:hidden" class="hidden">
1314
<defs>
14-
<!-- Glass distortion filter -->
15+
1516
<filter id="glass-distortion" x="0%" y="0%" width="100%" height="100%">
1617
<feTurbulence type="fractalNoise" baseFrequency="0.008 0.008" numOctaves="2" seed="92" result="noise"/>
1718
<feGaussianBlur in="noise" stdDeviation="2" result="blurred"/>
1819
<feDisplacementMap in="SourceGraphic" in2="blurred" scale="3" xChannelSelector="R" yChannelSelector="G"/>
1920
</filter>
20-
21-
<!-- Glass highlight filter -->
2221
<filter id="glass-highlight" x="0%" y="0%" width="100%" height="100%">
2322
<feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"/>
2423
<feSpecularLighting in="blur" result="specOut" lighting-color="#87CEEB" specularConstant="1.5" specularExponent="20">
@@ -28,7 +27,6 @@
2827
<feComposite in="SourceGraphic" in2="specOut2" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/>
2928
</filter>
3029

31-
<!-- Aurora gradient definitions -->
3230
<linearGradient id="aurora-blue-green" x1="0%" y1="0%" x2="100%" y2="100%">
3331
<stop offset="0%" style="stop-color:#00D4FF;stop-opacity:0.8" />
3432
<stop offset="33%" style="stop-color:#5DADE2;stop-opacity:0.6" />
@@ -47,12 +45,10 @@
4745
<div class="app-header">
4846
<div class="app-header-title-group">
4947
<h1>PeerSuite</h1>
50-
<label class="theme-switch">
51-
<span class="light-icon">☀️</span>
52-
<input type="checkbox" id="themeToggle" class="theme-switch-checkbox">
53-
<span class="theme-switch-track"><span class="theme-switch-thumb"></span></span>
54-
<span class="dark-icon">🌙</span>
55-
</label>
48+
<button id="cycleThemeBtn" class="btn btn-outline theme-cycle-button">
49+
<span class="icon">🎨</span>
50+
<span id="currentThemeNameSpan">Light</span>
51+
</button>
5652
</div>
5753
</div>
5854

@@ -314,4 +310,4 @@ <h2>Settings</h2>
314310
<script async src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
315311
<script type="module" src="main.js"></script>
316312
</body>
317-
</html>
313+
</html>

src/main-styles.css

Lines changed: 506 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)