mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-04-30 15:23:11 +02:00
Create settings modal structure
This commit is contained in:
parent
aecac1668e
commit
a6727bd0e4
4 changed files with 49 additions and 4 deletions
38
index.html
38
index.html
|
@ -10,6 +10,7 @@
|
||||||
<body>
|
<body>
|
||||||
<header id="top">
|
<header id="top">
|
||||||
<h1 id="title">Lexiconga</h1>
|
<h1 id="title">Lexiconga</h1>
|
||||||
|
|
||||||
<input id="openSearchModal" placeholder="🔍︎ Search"> <span id="searchResults"></span>
|
<input id="openSearchModal" placeholder="🔍︎ Search"> <span id="searchResults"></span>
|
||||||
<section id="searchModal" class="modal" style="display:none;">
|
<section id="searchModal" class="modal" style="display:none;">
|
||||||
<div class="modal-background" onclick="this.parentElement.style.display='none';"></div>
|
<div class="modal-background" onclick="this.parentElement.style.display='none';"></div>
|
||||||
|
@ -64,6 +65,8 @@
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<a id="settingsButton" class="button">Settings</a>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
@ -109,8 +112,6 @@
|
||||||
<article class="entry">
|
<article class="entry">
|
||||||
<header>
|
<header>
|
||||||
<h4 class="word">Loading Words</h4>
|
<h4 class="word">Loading Words</h4>
|
||||||
<span class="pronunciation"></span>
|
|
||||||
<span class="part-of-speech"></span>
|
|
||||||
</header>
|
</header>
|
||||||
<dl>
|
<dl>
|
||||||
<dt class="definition">Please Wait...</dt>
|
<dt class="definition">Please Wait...</dt>
|
||||||
|
@ -133,6 +134,39 @@
|
||||||
<a class="button" id="privacyInfoButton">Privacy</a>
|
<a class="button" id="privacyInfoButton">Privacy</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<section id="settingsModal" class="modal" style="display:none;">
|
||||||
|
<div class="modal-background" onclick="this.parentElement.style.display='none';"></div>
|
||||||
|
<div class="modal-content">
|
||||||
|
<a class="close-button" onclick="this.parentElement.parentElement.style.display='none';">×︎</a>
|
||||||
|
<section>
|
||||||
|
<form>
|
||||||
|
<label>Use IPA Auto-Fill
|
||||||
|
<input type="checkbox" checked><br />
|
||||||
|
<small>Check this to use character combinations to input International Phonetic Alphabet characters into
|
||||||
|
Pronunciation fields.</small>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>Theme
|
||||||
|
<select disabled>
|
||||||
|
<option selected value="default">Default</option>
|
||||||
|
<option selected value="dark">Dark</option>
|
||||||
|
<option selected value="light">Light</option>
|
||||||
|
<option selected value="blue">Blue</option>
|
||||||
|
<option selected value="green">Green</option>
|
||||||
|
<option selected value="royal">Royal</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
<footer>
|
||||||
|
<a class="button" id="settingsSave">Save</a>
|
||||||
|
<a class="button" id="settingsSaveAndClose">Save & Close</a>
|
||||||
|
<a class="red button" onclick="this.parentElement.parentElement.parentElement.style.display='none';">Close Without
|
||||||
|
Saving</a>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="editModal" class="modal" style="display:none;">
|
<section id="editModal" class="modal" style="display:none;">
|
||||||
<div class="modal-background" onclick="this.parentElement.style.display='none';"></div>
|
<div class="modal-background" onclick="this.parentElement.style.display='none';"></div>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
|
@ -9,10 +9,10 @@ import { generateRandomWords } from './js/utilities';
|
||||||
function initialize() {
|
function initialize() {
|
||||||
console.log('initializing');
|
console.log('initializing');
|
||||||
window.currentDictionary = cloneObject(DEFAULT_DICTIONARY);
|
window.currentDictionary = cloneObject(DEFAULT_DICTIONARY);
|
||||||
generateRandomWords(100);
|
// generateRandomWords(100);
|
||||||
setupListeners();
|
setupListeners();
|
||||||
renderAll();
|
renderAll();
|
||||||
console.log('Rendered!');
|
// console.log('Rendered!');
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = (function (oldLoad) {
|
window.onload = (function (oldLoad) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { goToNextPage, goToPreviousPage, goToPage } from './pagination';
|
||||||
export default function setupListeners() {
|
export default function setupListeners() {
|
||||||
setupDetailsTabs();
|
setupDetailsTabs();
|
||||||
setupSearchBar();
|
setupSearchBar();
|
||||||
|
setupSettingsModal();
|
||||||
setupWordForm();
|
setupWordForm();
|
||||||
setupMobileWordFormButton();
|
setupMobileWordFormButton();
|
||||||
setupInfoButtons();
|
setupInfoButtons();
|
||||||
|
@ -194,6 +195,12 @@ export function setupWordOptionSelections() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function setupSettingsModal() {
|
||||||
|
document.getElementById('settingsButton').addEventListener('click', () => {
|
||||||
|
document.getElementById('settingsModal').style.display = '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function setupWordEditFormButtons() {
|
export function setupWordEditFormButtons() {
|
||||||
const saveChangesButtons = document.getElementsByClassName('edit-save-changes');
|
const saveChangesButtons = document.getElementsByClassName('edit-save-changes');
|
||||||
const cancelChangesButtons = document.getElementsByClassName('edit-cancel');
|
const cancelChangesButtons = document.getElementsByClassName('edit-cancel');
|
||||||
|
|
|
@ -76,6 +76,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#settingsButton {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#mobileWordFormShow {
|
#mobileWordFormShow {
|
||||||
|
|
Loading…
Add table
Reference in a new issue