Skip to content

Commit

Permalink
add keyboard layout preview image
Browse files Browse the repository at this point in the history
  • Loading branch information
junhg0211 committed Feb 25, 2024
1 parent 16ba5a4 commit 6c53bdd
Show file tree
Hide file tree
Showing 6 changed files with 3,036 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
unicode-range: U+E000-E23F;
}


textarea {
font-family: 'SapotaWebfont', 'Pretendard', sans-serif !important;
width: 100%;
height: 10rem;
font-size: 1.4rem;
}

.image-paragraph {
text-align: center;
}
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ <h1><strong>Sapota</strong> Converter</h1>
<p>
<textarea name="textarea" id="textarea" class="form-control" autofocus></textarea>
</p>
<p class="image-paragraph">
<img src="#" id="keyboard-layout">
</p>
</div>
</body>
</html>
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@ let languageSelect;
let textarea;
let boldCheck;
let italicCheck;
let keyboardLayout;

function updateLayout(to) {
keyboardLayout.src = `./res/layouts/${to}.png`;
}

function load() {
languageSelect = document.querySelector("#language");
textarea = document.querySelector("#textarea");
boldCheck = document.querySelector("#bold");
italicCheck = document.querySelector("#italic");
keyboardLayout = document.querySelector("#keyboard-layout");

updateLayout(languageSelect.value);
languageSelect.addEventListener('change', e => {
updateLayout(e.target.value);
});

boldCheck.addEventListener('click', e => {
if (e.target.checked) {
Expand Down
Binary file added res/layouts/Lusimez.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/layouts/Zemin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6c53bdd

Please sign in to comment.