Skip to content

Commit 1528787

Browse files
committed
Fix saving initial theme
1 parent 707dead commit 1528787

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

js/banner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const {
1212
} = getMainElements();
1313

1414
function updateBanner(theme) {
15-
console.table(theme);
1615
console.log('•ᴗ• Updating Banner ...');
1716
applyTheme(theme);
1817
if (!theme.ignoreSave) saveTheme(theme);
@@ -251,8 +250,9 @@ function updateUIOptions({
251250
}
252251

253252
function getSavedThemeProp(prop) {
254-
if (!prop) return '';
253+
if (!prop) return null;
255254
const theme = JSON.parse(localStorage.getItem('theme'));
255+
if(!theme) return null;
256256
return theme[prop];
257257
}
258258

js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
3030
if (theme)
3131
setPreset(JSON.parse(theme), true);
3232
else
33-
setPreset(initialTheme, true);
33+
setPreset(initialTheme);
3434
});
3535

3636
// Demo reset after ended

partials/footer.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<footer class="footer">
22
<div class="links">
3-
<a href="https://github.com/leviarista/github-profile-header-generator/discussions" target="_blank"
3+
<a href="https://github.com/leviarista/github-profile-header-generator/issues" target="_blank"
44
rel="noopener noreferrer">
5-
<b><u>Feedback</u></b>
5+
<b><u>Contributing</u></b>
66
</a>
77
<a href="https://github.com/leviarista/github-profile-header-generator/issues" target="_blank"
88
rel="noopener noreferrer">
99
<b><u>Issues</u></b>
1010
</a>
11+
<a href="https://github.com/leviarista/github-profile-header-generator/discussions" target="_blank"
12+
rel="noopener noreferrer">
13+
<b><u>Feedback</u></b>
14+
</a>
1115
</div>
1216
<div class="icons">
1317
<a href="https://github.com/leviarista/github-profile-header-generator" target="_blank"
@@ -18,9 +22,10 @@
1822
<img src="./images/icons/product-hunt.svg" width="20" height="20" alt="Product Hunt logo" />
1923
</a> -->
2024
<a href="https://ko-fi.com/L3L1BO773" target="_blank" rel="noopener noreferrer">
21-
<img src="https://storage.ko-fi.com/cdn/cup-border.png" alt="Buy Me a Coffee at ko-fi.com" style="width: 37px;" />
25+
<img src="https://storage.ko-fi.com/cdn/cup-border.png" alt="Buy Me a Coffee at ko-fi.com"
26+
style="width: 35px;" />
2227
</a>
23-
<a href="#special-message-modal" >
28+
<a href="#special-message-modal">
2429
<img src="./images/icons/heart-circle.svg" alt="info icon"
2530
style="background-color: #FFF; border-radius: 50%;" />
2631
</a>

styles/main.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,19 @@ body {
2626
.toogle-dark-mode {
2727
position: absolute;
2828
float: right;
29-
height: 30px;
29+
height: 35px;
3030
padding: 0px;
3131
display: flex;
3232
align-items: center;
3333
justify-content: center;
3434
background-color: #949494;
35-
border-radius: 15px;
35+
border-radius: 17px;
36+
user-select: none;
3637

3738
>div {
38-
width: 30px;
39-
height: 30px;
39+
width: 35px;
40+
height: 35px;
41+
padding: 7px;
4042
display: flex;
4143
align-items: center;
4244
justify-content: center;
@@ -53,7 +55,7 @@ body {
5355
}
5456

5557
img {
56-
width: 15px;
58+
width: 100%;
5759
filter: brightness(0)
5860
}
5961

@@ -296,7 +298,7 @@ button {
296298
align-items: center;
297299

298300
img {
299-
width: 30px;
301+
width: 27px;
300302
transition: all ease 500ms;
301303

302304
&:hover {

0 commit comments

Comments
 (0)