Skip to content

Commit 9b2af29

Browse files
committed
Redesign UI and add HTML partials
1 parent 792cde4 commit 9b2af29

36 files changed

+3167
-940
lines changed

images/favicon-16x16.png

-123 Bytes
Loading

images/favicon-32x32.png

-662 Bytes
Loading

images/favicon.ico

0 Bytes
Binary file not shown.

images/gphg.png

13 KB
Loading

images/gphg.svg

Lines changed: 1 addition & 0 deletions
Loading

index.html

Lines changed: 16 additions & 583 deletions
Large diffs are not rendered by default.

js/main.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ let selectedTheme = 'github';
1818
document.querySelector('.toolbox .size-inputs input#width-input').value = headerImageContainer.clientWidth;
1919
let titleFontSelect = toolbox.querySelector('.font-selectors-container #title-font-selector');
2020
let subtitleFontSelect = toolbox.querySelector('.font-selectors-container #subtitle-font-selector');
21-
titleFontSelect.value='Red Hat Display';
22-
subtitleFontSelect.value='Kalam';
21+
titleFontSelect.value = 'Red Hat Display';
22+
subtitleFontSelect.value = 'Kalam';
2323

2424
// Demo reset after ended
2525
document.querySelector('.how-to-section video.demo').onended = (e) => e.target.currentTime = 0;
@@ -53,12 +53,20 @@ document.querySelector('.dark-mode-button')
5353
.addEventListener('click', (e) => {
5454
let resultBox = document.querySelector('.result-box');
5555
const toogleDarkModeButton = document.querySelector('.dark-mode-button');
56+
const toogleRandomizeButton = document.querySelector('.randomize-button');
57+
const toogleDownloadButton = document.querySelector('.download-button');
58+
59+
const size = 20;
5660

5761
resultBox.classList.toggle('light-mode');
5862
if (resultBox.className.includes('light')) {
59-
toogleDarkModeButton.innerText = 'Light Mode'
63+
toogleDarkModeButton.innerHTML = `<img src="./images/icons/light-dark-black.svg" width="${size}" />GH Light`
64+
toogleRandomizeButton.innerHTML = `<img src="./images/icons/random-black.svg" width="${size}" />Random`
65+
toogleDownloadButton.innerHTML = `<img src="./images/icons/download.svg" width="${size}" />Download`
6066
} else {
61-
toogleDarkModeButton.innerText = 'Dark Mode'
67+
toogleDarkModeButton.innerHTML = `<img src="./images/icons/light-dark.svg" width="${size}" />GH Dark`
68+
toogleRandomizeButton.innerHTML = `<img src="./images/icons/random.svg" width="${size}" />Random`
69+
toogleDownloadButton.innerHTML = `<img src="./images/icons/download.svg" width="${size}" />Download`
6270
}
6371
});
6472

0 commit comments

Comments
 (0)