Compare commits

..

32 Commits

Author SHA1 Message Date
Robbie Antenesse 65cf421cbe Add setting to set default advanced form display 2020-04-30 01:20:10 -06:00
Robbie Antenesse 98cdd763f8 Improve styling of advanced form toggle 2020-04-30 00:38:45 -06:00
Robbie Antenesse 006f020424 Put etymology in new words_advanced table 2020-04-30 00:28:30 -06:00
Robbie Antenesse 5f15ec6353 Trim and filter etymology entries into array 2020-04-30 00:14:00 -06:00
Robbie Antenesse 4fee98c8fe Update example word data structure in default 2020-04-29 23:51:53 -06:00
Robbie Antenesse 4c4ec4536f Update yarn lock 2020-04-29 23:51:16 -06:00
Robbie Antenesse d4e7df495d Merge branch 'master' into new-features-wave-2 2020-04-29 23:07:45 -06:00
Robbie Antenesse 7bc01c79b7 Upgrade dependencies to latest versions 2020-04-29 22:22:28 -06:00
Robbie Antenesse 3a36817686 Run Yarn Upgrade 2020-04-19 12:54:26 -06:00
Robbie Antenesse 36898ff670
Merge pull request #46 from Alamantus/dependabot/npm_and_yarn/acorn-5.7.4
Bump acorn from 5.7.3 to 5.7.4
2020-03-16 16:57:23 -06:00
dependabot[bot] 46b1b5a01f
Bump acorn from 5.7.3 to 5.7.4
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-14 23:52:28 +00:00
Robbie Antenesse 143bde30f0 Add announcement about fixes since last release 2020-03-04 10:09:54 -07:00
Robbie Antenesse 1d143e1d98 Update marked & papaparse dependencies 2020-03-04 09:54:37 -07:00
Robbie Antenesse 18f460f2e4 Update devDependencies 2020-03-04 09:26:00 -07:00
Robbie Antenesse 689a5d3a59 Merge branch 'master' of https://github.com/Alamantus/Lexiconga 2020-03-04 09:22:43 -07:00
Robbie Antenesse 8d07a26d10 Update .htaccess to fix Chrome security warning 2020-03-04 09:22:39 -07:00
Robbie Antenesse 1ab93d69ae Bump patch version for lastUpdated fix 2020-03-03 21:05:46 -07:00
Robbie Antenesse ed9eba7137 Fix mistake that prevented last_updated from being set 2020-03-03 20:59:20 -07:00
Robbie Antenesse 5fa06b31c2 Upgrade Sharp devDependency to make it install correctly 2020-03-03 15:00:32 -07:00
Robbie Antenesse e118cb8d14 Update README with note about windows-build-tools 2020-03-03 10:03:05 -07:00
Robbie Antenesse a9ae7f938c Update ads and bump patch version 2020-01-24 15:57:31 -07:00
Robbie Antenesse 6fad67da93 Merge branch 'master' of https://github.com/Alamantus/Lexiconga 2019-12-15 13:25:39 -07:00
Robbie Antenesse 7a80be9730 Improve padding in fields 2019-12-15 13:24:25 -07:00
Robbie Antenesse 9965dba80e Add hover text to all ipa-table fields 2019-12-15 13:08:03 -07:00
Robbie Antenesse c25114b9fd Parse word references in all Details notes fields 2019-12-13 10:39:44 -07:00
Robbie Antenesse 1b9a6fcda6 Add tone characters to IPA table chart 2019-12-12 20:59:38 -07:00
Robbie Antenesse abf0bc08a0
Merge pull request #41 from Alamantus/dependabot/npm_and_yarn/serialize-to-js-3.0.1 2019-12-06 17:45:32 -07:00
dependabot[bot] d3559d5465
Bump serialize-to-js from 3.0.0 to 3.0.1
Bumps [serialize-to-js](https://github.com/commenthol/serialize-to-js) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/commenthol/serialize-to-js/releases)
- [Commits](https://github.com/commenthol/serialize-to-js/compare/v3.0.0...v3.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-06 23:57:48 +00:00
Robbie Antenesse 484426d98b Run `yarn upgrade` to update all dependencies 2019-12-02 10:13:21 -07:00
Robbie Antenesse 331d285899 Update ads for GUTS+ PDF 2019-12-02 10:08:42 -07:00
Robbie Antenesse 03974b9d45 Remove box shadow from dark theme 2019-12-01 22:00:13 -07:00
Robbie Antenesse b20c6703ef Make modals stay above footer; Bump version 2019-12-01 21:25:56 -07:00
24 changed files with 2046 additions and 2013 deletions

View File

@ -4,6 +4,9 @@ This is the light-as-possible rewrite of Lexiconga.
## Installation ## Installation
0. Some dev tools require build tools.
- On Windows, install them with `npm install --global windows-build-tools`.
- Alternatively, you can just install the newest Python and Visual Studio (with Desktop C++ devkit).
1. Clone and run `yarn` and `composer install` to install dependencies. 1. Clone and run `yarn` and `composer install` to install dependencies.
1. Import `src/structure.sql` into a database called 'lexiconga' on your MariaDB server to get the database structure. 1. Import `src/structure.sql` into a database called 'lexiconga' on your MariaDB server to get the database structure.
1. Copy `src/php/api/config.php.changeme` to `src/php/api/config.php` and update the values within to enable connections to your lexiconga database. 1. Copy `src/php/api/config.php.changeme` to `src/php/api/config.php` and update the values within to enable connections to your lexiconga database.

View File

@ -23,7 +23,7 @@
"cta": "Learn to Play for Free!", "cta": "Learn to Play for Free!",
"link": "https://guts.plus", "link": "https://guts.plus",
"start": "June 1, 2019", "start": "June 1, 2019",
"end": "March 1, 2020", "end": "December 31, 2099",
"isPriority": false "isPriority": false
}, },
{ {
@ -32,25 +32,34 @@
"cta": "Use RedFlag for Free", "cta": "Use RedFlag for Free",
"link": "https://redflag.ga", "link": "https://redflag.ga",
"start": "June 1, 2019", "start": "June 1, 2019",
"end": "January 1, 2020", "end": "December 31, 2099",
"isPriority": false "isPriority": false
}, },
{ {
"header": "Get Theonite: Planet Adyn free!", "header": "Looking for a New Book to Read?",
"body": "\"This book is the superhero fantasy you didn't know you needed. Magic, Afrofuturism, and heart-pumping suspense - this book has it all!\" - WeReadFantasy.com", "body": "Be among the first to crack open a great new fantasy world with The Legends of the Shattered Lands. Book 1 and 2 available now!",
"cta": "Read Free Now", "cta": "Shop Now",
"link": "https://mailchi.mp/ce525124aec3/theonite-planet-adyn-free-copy", "link": "https://amazon.com/S-S-Grove/e/B074SX2GYW",
"start": "June 1, 2019", "start": "January 24, 2020",
"end": "January 1, 2020", "end": "January 24, 2021",
"isPriority": false "isPriority": false
}, },
{ {
"header": "The Sword of Kaigen: A Theonite War Story", "header": "Like the GUTS+ System?",
"body": "\"Fantasy and martial arts aficionados alike should enjoy this emotionally supercharged novel... which pierces readers' hearts with the precision of a samurai's razor-sharp blade.\" - Blue Ink Review", "body": "Help contribute to the ongoing development of the GUTS+ System by buying the new, nicely-formatted PDF rule book! With imagery and some exclusive content, this is the best way to learn to play!",
"cta": "Buy Now", "cta": "Buy Now",
"link": "https://www.amazon.com/Sword-Kaigen-Theonite-War-Story/dp/172019386X/", "link": "https://alamantus.itch.io/guts-plus",
"start": "June 1, 2019", "start": "December 4, 2019",
"end": "January 1, 2020", "end": "July 1, 2020",
"isPriority": false
},
{
"header": "Like the GUTS+ System?",
"body": "Help contribute to the ongoing development of the GUTS+ System by buying the new, nicely-formatted PDF rule book! With imagery and some exclusive content, this is the best way to learn to play!",
"cta": "Buy Now",
"link": "https://www.drivethrurpg.com/product/273132/The-GUTS-System-Core-Rule-Book-PDF",
"start": "December 4, 2019",
"end": "July 1, 2020",
"isPriority": false "isPriority": false
} }
] ]

View File

@ -1,6 +1,6 @@
{ {
"name": "lexiconga", "name": "lexiconga",
"version": "2.1.3", "version": "2.1.7",
"description": "The quick and easy dictionary builder for constructed languages.", "description": "The quick and easy dictionary builder for constructed languages.",
"main": "template-index.html", "main": "template-index.html",
"repository": "https://github.com/Alamantus/Lexiconga.git", "repository": "https://github.com/Alamantus/Lexiconga.git",
@ -21,19 +21,19 @@
"clear-cache": "rimraf .cache/{*,.*}" "clear-cache": "rimraf .cache/{*,.*}"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^9.6.1", "autoprefixer": "^9.7.4",
"concurrently": "^4.1.1", "concurrently": "^5.2.0",
"cpx": "^1.5.0", "cpx": "^1.5.0",
"parcel-bundler": "^1.12.3", "parcel-bundler": "^1.12.3",
"parcel-plugin-goodie-bag": "^2.0.0", "parcel-plugin-goodie-bag": "^2.0.0",
"rimraf": "^2.6.3", "rimraf": "^3.0.2",
"sass": "^1.22.4", "sass": "^1.26.5",
"sharp": "^0.22.1" "sharp": "^0.25.2"
}, },
"dependencies": { "dependencies": {
"marked": "^0.6.3", "marked": "^1.0.0",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"papaparse": "^4.6.3", "papaparse": "^5.1.1",
"upup": "^1.1.0" "upup": "^1.1.0"
} }
} }

View File

@ -35,6 +35,7 @@ export const DEFAULT_DICTIONARY = {
partOfSpeech: '', partOfSpeech: '',
definition: '', definition: '',
details: '', details: '',
etymology: [],
wordId: 0 wordId: 0
}, */ }, */
], ],
@ -54,6 +55,7 @@ export const DEFAULT_DICTIONARY = {
export const DEFAULT_SETTINGS = { export const DEFAULT_SETTINGS = {
useIPAPronunciationField: true, useIPAPronunciationField: true,
useHotkeys: true, useHotkeys: true,
showAdvanced: false,
defaultTheme: 'default', defaultTheme: 'default',
}; };

View File

@ -1,5 +1,5 @@
<p> <p>
<em>Hover over characters to see their Phondue shortcuts.</em> <em>Hover over characters to see their Phondue shortcuts. Use Field Help to show full Phondue instructions.</em>
</p> </p>
<table className='table is-bordered'> <table className='table is-bordered'>
<thead> <thead>
@ -583,6 +583,9 @@
<th id='cell_9_9' class='td-lbl' colspan="7"> <th id='cell_9_9' class='td-lbl' colspan="7">
Diacritics Diacritics
</th> </th>
<th id='cell_9_10' class='td-lbl' colspan="1">
Tones
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -647,35 +650,42 @@
<td id='cell_10_13' class='td-lbl'> <td id='cell_10_13' class='td-lbl'>
</td> </td>
<td id='cell_10_14' class='td-btn'> <td id='cell_10_14' class='td-btn'>
<button title=''> <button title='O_ o_ _O _o'>
̥ ̥
</button> </button>
</td> </td>
<td id='cell_10_15' class='td-btn'> <td id='cell_10_15' class='td-btn'>
<button title=''> <button title='U_ u_ _U _u'>
̬ ̬
</button> </button>
</td> </td>
<td id='cell_10_16' class='td-btn'> <td id='cell_10_16' class='td-btn'>
<button title=''> <button title=':_ _:'>
̤ ̤
</button> </button>
</td> </td>
<td id='cell_10_17' class='td-btn'> <td id='cell_10_17' class='td-btn'>
<button title=''> <button title='~_ _~'>
̰ ̰
</button> </button>
</td> </td>
<td id='cell_10_18' class='td-btn'> <td id='cell_10_18' class='td-btn'>
<button title=''> <button title='_|'>
̩ ̩
</button> </button>
</td> </td>
<td id='cell_10_19' class='td-btn'> <td id='cell_10_19' class='td-btn'>
<button title=''> <button title='^_ _^'>
̯ ̯
</button> </button>
</td> </td>
<td id='cell_10_20' class='td-lbl'>
</td>
<td id='cell_10_21' class='td-btn'>
<button title='5|'>
˥
</button>
</td>
</tr> </tr>
<tr> <tr>
<th id='cell_11_0' class='td-lbl' colspan="1"> <th id='cell_11_0' class='td-lbl' colspan="1">
@ -729,35 +739,42 @@
<td id='cell_11_13' class='td-lbl'> <td id='cell_11_13' class='td-lbl'>
</td> </td>
<td id='cell_11_14' class='td-btn'> <td id='cell_11_14' class='td-btn'>
<button title=''> <button title='[_ _['>
̪ ̪
</button> </button>
</td> </td>
<td id='cell_11_15' class='td-btn'> <td id='cell_11_15' class='td-btn'>
<button title=''> <button title='{_ _{'>
̼ ̼
</button> </button>
</td> </td>
<td id='cell_11_16' class='td-btn'> <td id='cell_11_16' class='td-btn'>
<button title=''> <button title=']_ _]'>
̺ ̺
</button> </button>
</td> </td>
<td id='cell_11_17' class='td-btn'> <td id='cell_11_17' class='td-btn'>
<button title=''> <button title='#_ _# []'>
̻ ̻
</button> </button>
</td> </td>
<td id='cell_11_18' class='td-btn'> <td id='cell_11_18' class='td-btn'>
<button title=''> <button title='h^ ^h'>
ʰ ʰ
</button> </button>
</td> </td>
<td id='cell_11_19' class='td-btn'> <td id='cell_11_19' class='td-btn'>
<button title=''> <button title='>^ ^>'>
̚ ̚
</button> </button>
</td> </td>
<td id='cell_10_20' class='td-lbl'>
</td>
<td id='cell_10_21' class='td-btn'>
<button title='4|'>
˦
</button>
</td>
</tr> </tr>
<tr> <tr>
<th id='cell_12_0' class='td-lbl' colspan="1"> <th id='cell_12_0' class='td-lbl' colspan="1">
@ -820,35 +837,42 @@
<td id='cell_12_13' class='td-lbl'> <td id='cell_12_13' class='td-lbl'>
</td> </td>
<td id='cell_12_14' class='td-btn'> <td id='cell_12_14' class='td-btn'>
<button title=''> <button title='+_ _+'>
̟ ̟
</button> </button>
</td> </td>
<td id='cell_12_15' class='td-btn'> <td id='cell_12_15' class='td-btn'>
<button title=''> <button title='__'>
̠ ̠
</button> </button>
</td> </td>
<td id='cell_12_16' class='td-btn'> <td id='cell_12_16' class='td-btn'>
<button title=''> <button title=':^ ^:'>
̈ ̈
</button> </button>
</td> </td>
<td id='cell_12_17' class='td-btn'> <td id='cell_12_17' class='td-btn'>
<button title=''> <button title='x^ ^x'>
̽ ̽
</button> </button>
</td> </td>
<td id='cell_12_18' class='td-btn'> <td id='cell_12_18' class='td-btn'>
<button title=''> <button title="'-_ -'_">
̝ ̝
</button> </button>
</td> </td>
<td id='cell_12_19' class='td-btn'> <td id='cell_12_19' class='td-btn'>
<button title=''> <button title=',-_ -,_'>
̞ ̞
</button> </button>
</td> </td>
<td id='cell_10_20' class='td-lbl'>
</td>
<td id='cell_10_21' class='td-btn'>
<button title='3|'>
˧
</button>
</td>
</tr> </tr>
<tr> <tr>
<th id='cell_13_0' class='td-lbl' colspan="1"> <th id='cell_13_0' class='td-lbl' colspan="1">
@ -877,7 +901,7 @@
</button> </button>
</td> </td>
<td id='cell_13_9' class='td-btn'> <td id='cell_13_9' class='td-btn'>
<button title='&quot)'> <button title="')">
ʼ ʼ
</button> </button>
</td> </td>
@ -896,40 +920,45 @@
<td id='cell_13_13' class='td-lbl'> <td id='cell_13_13' class='td-lbl'>
</td> </td>
<td id='cell_13_14' class='td-btn'> <td id='cell_13_14' class='td-btn'>
<button title=''> <button title='w^ ^w'>
ʷ ʷ
</button> </button>
</td> </td>
<td id='cell_13_15' class='td-btn'> <td id='cell_13_15' class='td-btn'>
<button title=''> <button title='j^ ^j'>
ʲ ʲ
</button> </button>
</td> </td>
<td id='cell_13_16' class='td-btn'> <td id='cell_13_16' class='td-btn'>
<button title=''> <button title='h/^'>
</button> </button>
</td> </td>
<td id='cell_13_17' class='td-btn'> <td id='cell_13_17' class='td-btn'>
<button title=''> <button title='vO^ v0^'>
</button> </button>
</td> </td>
<td id='cell_13_18' class='td-btn'> <td id='cell_13_18' class='td-btn'>
<button title=''> <button title='XO^'>
ˠ ˠ
</button> </button>
</td> </td>
<td id='cell_13_19' class='td-btn'> <td id='cell_13_19' class='td-btn'>
<button title=''> <button title='?/^'>
ˤ ˤ
</button> </button>
</td> </td>
<td id='cell_13_20' class='td-btn'> <td id='cell_13_20' class='td-btn'>
<button title=''> <button title='~^ ^~'>
̴ ̴
</button> </button>
</td> </td>
<td id='cell_10_21' class='td-btn'>
<button title='2|'>
˨
</button>
</td>
</tr> </tr>
<tr> <tr>
<th id='cell_14_0' class='td-lbl' colspan="1"> <th id='cell_14_0' class='td-lbl' colspan="1">
@ -992,35 +1021,42 @@
<td id='cell_14_13' class='td-lbl'> <td id='cell_14_13' class='td-lbl'>
</td> </td>
<td id='cell_14_14' class='td-btn'> <td id='cell_14_14' class='td-btn'>
<button title=''> <button title=')_ _)'>
̹ ̹
</button> </button>
</td> </td>
<td id='cell_14_15' class='td-btn'> <td id='cell_14_15' class='td-btn'>
<button title=''> <button title='(_ _('>
̜ ̜
</button> </button>
</td> </td>
<td id='cell_14_16' class='td-btn'> <td id='cell_14_16' class='td-btn'>
<button title=''> <button title='<|_ |<_'>
̘ ̘
</button> </button>
</td> </td>
<td id='cell_14_17' class='td-btn'> <td id='cell_14_17' class='td-btn'>
<button title=''> <button title='>|_ |>_'>
̙ ̙
</button> </button>
</td> </td>
<td id='cell_14_18' class='td-btn'> <td id='cell_14_18' class='td-btn'>
<button title=''> <button title='~^ ^~'>
̃ ̃
</button> </button>
</td> </td>
<td id='cell_14_19' class='td-btn'> <td id='cell_14_19' class='td-btn'>
<button title=''> <button title='>r r>'>
˞ ˞
</button> </button>
</td> </td>
<td id='cell_10_20' class='td-lbl'>
</td>
<td id='cell_10_21' class='td-btn'>
<button title='1|'>
˩
</button>
</td>
</tr> </tr>
<tr> <tr>
<th id='cell_15_0' class='td-lbl' colspan="1"> <th id='cell_15_0' class='td-lbl' colspan="1">
@ -1111,7 +1147,7 @@
Suprasegmental Suprasegmental
</th> </th>
<td id='cell_16_12' class='td-btn'> <td id='cell_16_12' class='td-btn'>
<button title='&quot&quot'> <button title="''">
ˈ ˈ
</button> </button>
</td> </td>
@ -1131,7 +1167,7 @@
</button> </button>
</td> </td>
<td id='cell_16_16' class='td-btn'> <td id='cell_16_16' class='td-btn'>
<button title=''> <button title='u^ ^u'>
̆ ̆
</button> </button>
</td> </td>

View File

@ -174,10 +174,11 @@ export function syncWords(remoteWords, deletedWords) {
} }
remoteWords.forEach(remoteWord => { remoteWords.forEach(remoteWord => {
let localWord = words.find(word => word.wordId === remoteWord.wordId); const localWordIndex = words.findIndex(word => word.wordId === remoteWord.wordId);
const localWord = words[localWordIndex];
if (localWord) { if (localWord) {
if (localWord.lastUpdated < remoteWord.lastUpdated) { if (localWord.lastUpdated < remoteWord.lastUpdated) {
localWord = remoteWord; words[localWordIndex] = remoteWord;
} else if (localWord.lastUpdated > remoteWord.lastUpdated) { } else if (localWord.lastUpdated > remoteWord.lastUpdated) {
// Add more-recently-updated words to upload // Add more-recently-updated words to upload
localWordsToUpload.push(localWord); localWordsToUpload.push(localWord);

View File

@ -237,7 +237,7 @@ export function importWords() {
console.error('Error Importing Word: ', err) console.error('Error Importing Word: ', err)
}); });
} else { } else {
const row = results.data[0]; const row = results.data;
const importedWord = addWord({ const importedWord = addWord({
name: removeTags(row.word).trim(), name: removeTags(row.word).trim(),
pronunciation: removeTags(row.pronunciation).trim(), pronunciation: removeTags(row.pronunciation).trim(),

View File

@ -60,7 +60,7 @@ export function renderDetails() {
const consonantHTML = `<p><strong>Consonants</strong><br>${consonants.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const consonantHTML = `<p><strong>Consonants</strong><br>${consonants.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const vowelHTML = `<p><strong>Vowels</strong><br>${vowels.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const vowelHTML = `<p><strong>Vowels</strong><br>${vowels.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const blendHTML = blends.length > 0 ? `<p><strong>Polyphthongs&nbsp;/&nbsp;Blends</strong><br>${blends.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>` : ''; const blendHTML = blends.length > 0 ? `<p><strong>Polyphthongs&nbsp;/&nbsp;Blends</strong><br>${blends.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>` : '';
const phonologyNotesHTML = phonology.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(removeTags(phonology.notes)) + '</div>' : ''; const phonologyNotesHTML = phonology.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(parseReferences(removeTags(phonology.notes))) + '</div>' : '';
const phonologyHTML = `<h2>Phonology</h2> const phonologyHTML = `<h2>Phonology</h2>
<div class="split two"> <div class="split two">
<div>${consonantHTML}</div> <div>${consonantHTML}</div>
@ -73,7 +73,7 @@ export function renderDetails() {
const onsetHTML = `<p><strong>Onset</strong><br>${onset.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const onsetHTML = `<p><strong>Onset</strong><br>${onset.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const nucleusHTML = `<p><strong>Nucleus</strong><br>${nucleus.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const nucleusHTML = `<p><strong>Nucleus</strong><br>${nucleus.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const codaHTML = `<p><strong>Coda</strong><br>${coda.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const codaHTML = `<p><strong>Coda</strong><br>${coda.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const phonotacticsNotesHTML = phonotactics.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(removeTags(phonotactics.notes)) + '</div>' : ''; const phonotacticsNotesHTML = phonotactics.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(parseReferences(removeTags(phonotactics.notes))) + '</div>' : '';
const phonotacticsHTML = onset.length + nucleus.length + coda.length + phonotacticsNotesHTML.length > 0 const phonotacticsHTML = onset.length + nucleus.length + coda.length + phonotacticsNotesHTML.length > 0
? `<h2>Phonotactics</h2> ? `<h2>Phonotactics</h2>
${onset.length > 0 || nucleus.length > 0 || coda.length > 0 ${onset.length > 0 || nucleus.length > 0 || coda.length > 0
@ -93,14 +93,14 @@ export function renderDetails() {
} }
return false; return false;
}).filter(html => html !== false).join(' ')}</p>` : ''; }).filter(html => html !== false).join(' ')}</p>` : '';
const orthographyNotesHTML = orthography.notes.trim().length > 0 ? '<p><strong>Notes</strong><br>' + md(removeTags(orthography.notes)) + '</div>' : ''; const orthographyNotesHTML = orthography.notes.trim().length > 0 ? '<p><strong>Notes</strong><br>' + md(parseReferences(removeTags(orthography.notes))) + '</div>' : '';
const orthographyHTML = translations.length + orthographyNotesHTML.length > 0 const orthographyHTML = translations.length + orthographyNotesHTML.length > 0
? `<h2>Orthography</h2> ? `<h2>Orthography</h2>
${translationsHTML} ${translationsHTML}
${orthographyNotesHTML}` ${orthographyNotesHTML}`
: ''; : '';
const grammarHTML = grammar.notes.trim().length > 0 ? '<h2>Grammar</h2><div>' const grammarHTML = grammar.notes.trim().length > 0 ? '<h2>Grammar</h2><div>'
+ (grammar.notes.trim().length > 0 ? md(removeTags(grammar.notes)) : '') + (grammar.notes.trim().length > 0 ? md(parseReferences(removeTags(grammar.notes))) : '')
+ '</div>' : ''; + '</div>' : '';
detailsPanel.innerHTML = generalHTML + phonologyHTML + phonotacticsHTML + orthographyHTML + grammarHTML; detailsPanel.innerHTML = generalHTML + phonologyHTML + phonotacticsHTML + orthographyHTML + grammarHTML;

View File

@ -160,8 +160,10 @@ export function renderEditForm(wordId = false) {
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br> <label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
<textarea id="wordDetails_${wordId}" placeholder="Markdown formatting allowed">${word.details}</textarea> <textarea id="wordDetails_${wordId}" placeholder="Markdown formatting allowed">${word.details}</textarea>
</label> </label>
<a id="expandAdvancedForm_${wordId}" class="expand-advanced-form">Show Advanced</a> <label>
<div id="advancedForm_${wordId}" class="advanced-word-form" style="display:none;"> <a id="expandAdvancedForm_${wordId}" class="small button expand-advanced-form">${window.settings.showAdvanced ? 'Hide' : 'Show'} Advanced Fields</a>
</label>
<div id="advancedForm_${wordId}" class="advanced-word-form" style="display:${window.settings.showAdvanced ? 'block' : 'none'};">
<label>Etymology / Root Words<br> <label>Etymology / Root Words<br>
<input id="wordEtymology_${wordId}" maxlength="2500" placeholder="comma,separated,root,words" value="${word.hasOwnProperty('etymology') ? word.etymology : ''}"> <input id="wordEtymology_${wordId}" maxlength="2500" placeholder="comma,separated,root,words" value="${word.hasOwnProperty('etymology') ? word.etymology : ''}">
</label> </label>

View File

@ -9,6 +9,7 @@ export function loadSettings() {
const storedSettings = window.localStorage.getItem(SETTINGS_KEY); const storedSettings = window.localStorage.getItem(SETTINGS_KEY);
window.settings = storedSettings ? JSON.parse(storedSettings) : cloneObject(DEFAULT_SETTINGS); window.settings = storedSettings ? JSON.parse(storedSettings) : cloneObject(DEFAULT_SETTINGS);
toggleIPAPronunciationFields(false); toggleIPAPronunciationFields(false);
toggleShowAdvancedFields();
} }
export function saveSettings() { export function saveSettings() {
@ -17,10 +18,11 @@ export function saveSettings() {
} }
export function openSettingsModal() { export function openSettingsModal() {
const { useIPAPronunciationField, useHotkeys, defaultTheme } = window.settings; const { useIPAPronunciationField, useHotkeys, showAdvanced, defaultTheme } = window.settings;
document.getElementById('settingsUseIPA').checked = useIPAPronunciationField; document.getElementById('settingsUseIPA').checked = useIPAPronunciationField;
document.getElementById('settingsUseHotkeys').checked = useHotkeys; document.getElementById('settingsUseHotkeys').checked = useHotkeys;
document.getElementById('settingsShowAdvanced').checked = showAdvanced;
document.getElementById('settingsDefaultTheme').value = defaultTheme; document.getElementById('settingsDefaultTheme').value = defaultTheme;
document.getElementById('settingsModal').style.display = ''; document.getElementById('settingsModal').style.display = '';
@ -30,6 +32,7 @@ export function saveSettingsModal() {
const updatedSettings = cloneObject(window.settings); const updatedSettings = cloneObject(window.settings);
updatedSettings.useIPAPronunciationField = document.getElementById('settingsUseIPA').checked; updatedSettings.useIPAPronunciationField = document.getElementById('settingsUseIPA').checked;
updatedSettings.useHotkeys = document.getElementById('settingsUseHotkeys').checked; updatedSettings.useHotkeys = document.getElementById('settingsUseHotkeys').checked;
updatedSettings.showAdvanced = document.getElementById('settingsShowAdvanced').checked;
updatedSettings.defaultTheme = document.getElementById('settingsDefaultTheme').value; updatedSettings.defaultTheme = document.getElementById('settingsDefaultTheme').value;
if (hasToken()) { if (hasToken()) {
@ -62,6 +65,7 @@ export function saveSettingsModal() {
saveSettings(); saveSettings();
toggleHotkeysEnabled(); toggleHotkeysEnabled();
toggleIPAPronunciationFields(); toggleIPAPronunciationFields();
toggleShowAdvancedFields();
} else { } else {
addMessage('No changes made to Settings.'); addMessage('No changes made to Settings.');
} }
@ -101,3 +105,30 @@ export function toggleIPAPronunciationFields(render = true) {
renderWords(); renderWords();
} }
} }
export function toggleShowAdvancedFields() {
const buttons = document.getElementsByClassName('expand-advanced-form'),
forms = document.getElementsByClassName('advanced-word-form');
const formsWithFilledFields = [];
Array.from(forms).forEach(form => {
const fields = form.querySelectorAll('input, textarea');
const formHasFieldFilled = Array.from(fields).some(field => field.value.trim() !== '');
if (window.settings.showAdvanced || formHasFieldFilled) {
form.style.display = 'block';
} else {
form.style.display = 'none';
}
if (formHasFieldFilled) {
formsWithFilledFields.push(form.id.replace('advancedForm', ''));
}
});
Array.from(buttons).forEach(button => {
const formHasFilledField = formsWithFilledFields.includes(button.id.replace('expandAdvancedForm', ''));
if (window.settings.showAdvanced || formHasFilledField) {
button.innerText = 'Hide Advanced Fields';
} else {
button.innerText = 'Show Advanced Fields';
}
});
}

View File

@ -66,7 +66,7 @@ export function renderDetails() {
const consonantHTML = `<p><strong>Consonants</strong><br>${consonants.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const consonantHTML = `<p><strong>Consonants</strong><br>${consonants.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const vowelHTML = `<p><strong>Vowels</strong><br>${vowels.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const vowelHTML = `<p><strong>Vowels</strong><br>${vowels.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const blendHTML = blends.length > 0 ? `<p><strong>Polyphthongs&nbsp;/&nbsp;Blends</strong><br>${blends.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>` : ''; const blendHTML = blends.length > 0 ? `<p><strong>Polyphthongs&nbsp;/&nbsp;Blends</strong><br>${blends.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>` : '';
const phonologyNotesHTML = phonology.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(removeTags(phonology.notes)) + '</div>' : ''; const phonologyNotesHTML = phonology.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(phonology.notes) + '</div>' : '';
const phonologyHTML = `<h3>Phonology</h3> const phonologyHTML = `<h3>Phonology</h3>
<div class="split two"> <div class="split two">
<div>${consonantHTML}</div> <div>${consonantHTML}</div>
@ -79,11 +79,11 @@ export function renderDetails() {
const onsetHTML = `<p><strong>Onset</strong><br>${onset.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const onsetHTML = `<p><strong>Onset</strong><br>${onset.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const nucleusHTML = `<p><strong>Nucleus</strong><br>${nucleus.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const nucleusHTML = `<p><strong>Nucleus</strong><br>${nucleus.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const codaHTML = `<p><strong>Coda</strong><br>${coda.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`; const codaHTML = `<p><strong>Coda</strong><br>${coda.map(letter => `<span class="tag">${letter}</span>`).join(' ')}</p>`;
const phonotacticsNotesHTML = phonotactics.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(removeTags(phonotactics.notes)) + '</div>' : ''; const phonotacticsNotesHTML = phonotactics.notes.trim().length > 0 ? '<p><strong>Notes</strong></p><div>' + md(phonotactics.notes) + '</div>' : '';
const phonotacticsHTML = onset.length + nucleus.length + coda.length + phonotacticsNotesHTML.length > 0 const phonotacticsHTML = onset.length + nucleus.length + coda.length + phonotacticsNotesHTML.length > 0
? `<h3>Phonotactics</h3> ? `<h3>Phonotactics</h3>
${onset.length > 0 || nucleus.length > 0 || coda.length > 0 ${onset.length > 0 || nucleus.length > 0 || coda.length > 0
? `<div class="split three"> ? `<div class="split three">
<div>${onsetHTML}</div> <div>${onsetHTML}</div>
<div>${nucleusHTML}</div> <div>${nucleusHTML}</div>
<div>${codaHTML}</div> <div>${codaHTML}</div>
@ -99,15 +99,17 @@ export function renderDetails() {
} }
return false; return false;
}).filter(html => html !== false).join(' ')}</p>` : ''; }).filter(html => html !== false).join(' ')}</p>` : '';
const orthographyNotesHTML = orthography.notes.trim().length > 0 ? '<p><strong>Notes</strong><br>' + md(removeTags(orthography.notes)) + '</div>' : ''; const orthographyNotesHTML = orthography.notes.trim().length > 0 ? '<p><strong>Notes</strong><br>' + md(orthography.notes) + '</div>' : '';
const orthographyHTML = translations.length + orthographyNotesHTML.length > 0 const orthographyHTML = translations.length + orthographyNotesHTML.length > 0
? `<h3>Orthography</h3> ? `<h3>Orthography</h3>
${translationsHTML} ${translationsHTML}
${orthographyNotesHTML}` ${orthographyNotesHTML}`
: ''; : '';
const grammarHTML = grammar.notes.trim().length > 0 ? '<h3>Grammar</h3><div>' const grammarHTML = grammar.notes.trim().length > 0
+ (grammar.notes.trim().length > 0 ? md(removeTags(grammar.notes)) : '') ? '<h3>Grammar</h3><div>'
+ '</div>' : ''; + (grammar.notes.trim().length > 0 ? md(grammar.notes) : '')
+ '</div>'
: '';
detailsPanel.innerHTML = generalHTML + phonologyHTML + phonotacticsHTML + orthographyHTML + grammarHTML; detailsPanel.innerHTML = generalHTML + phonologyHTML + phonotacticsHTML + orthographyHTML + grammarHTML;
} }

View File

@ -160,10 +160,10 @@ export function expandAdvancedForm(id = false) {
const button = typeof id.target !== 'undefined' ? this : document.getElementById('expandAdvancedForm' + (!wordId ? '' : wordId)), const button = typeof id.target !== 'undefined' ? this : document.getElementById('expandAdvancedForm' + (!wordId ? '' : wordId)),
form = document.getElementById('advancedForm' + (!wordId ? '' : wordId)); form = document.getElementById('advancedForm' + (!wordId ? '' : wordId));
if (form.style.display !== 'block') { if (form.style.display !== 'block') {
button.innerText = 'Hide Advanced'; button.innerText = 'Hide Advanced Fields';
form.style.display = 'block'; form.style.display = 'block';
} else { } else {
button.innerText = 'Show Advanced'; button.innerText = 'Show Advanced Fields';
form.style.display = 'none'; form.style.display = 'none';
} }
} }
@ -186,7 +186,7 @@ export function submitWordForm() {
}; };
if (removeTags(etymology).trim() !== '') { if (removeTags(etymology).trim() !== '') {
word.etymology = removeTags(etymology).trim(); word.etymology = removeTags(etymology).split(',').map(w => w.trim()).filter(w => w.length > 0);
} }
if (validateWord(word)) { if (validateWord(word)) {
@ -209,6 +209,7 @@ export function clearWordForm() {
document.getElementById('wordPartOfSpeech').value = ''; document.getElementById('wordPartOfSpeech').value = '';
document.getElementById('wordDefinition').value = ''; document.getElementById('wordDefinition').value = '';
document.getElementById('wordDetails').value = ''; document.getElementById('wordDetails').value = '';
document.getElementById('wordEtymology').value = '';
document.getElementById('wordName').focus(); document.getElementById('wordName').focus();
} }
@ -283,7 +284,7 @@ export function confirmEditWord(id) {
}; };
if (removeTags(etymology).trim() !== '') { if (removeTags(etymology).trim() !== '') {
word.etymology = removeTags(etymology).trim(); word.etymology = removeTags(etymology).split(',').map(w => w.trim()).filter(w => w.length > 0);
} }
if (validateWord(word, wordId)) { if (validateWord(word, wordId)) {

View File

@ -1,3 +1,6 @@
# To resolve the issue with "Your connection to this site is not secure" message
Header set Content-Security-Policy: upgrade-insecure-requests env=HTTPS
RewriteEngine On # Turn on the rewriting engine RewriteEngine On # Turn on the rewriting engine
RewriteRule ^view/([0-9]+)/([0-9]+)/?$ router.php?view=word&dict=$1&word=$2 [NC,L] # Handle word ids. RewriteRule ^view/([0-9]+)/([0-9]+)/?$ router.php?view=word&dict=$1&word=$2 [NC,L] # Handle word ids.

View File

@ -1,14 +1,8 @@
[ [
{ {
"header": "New Features have Arrived!", "header": "Minor Updates + 1 Important Fix",
"body": "<p><em>July 15, 2019</em> &ndash; Custom Alphabetical Order, Orthographic Translations, and Custom Styling are now here!</p><p>Check the <a href=\"https://github.com/Alamantus/Lexiconga/releases\" target=\"_blank\" rel=\"noopener\">Updates page</a> for all the new features and bug fixes!</p>", "body": "<p><em>March 4, 2020</em> &ndash; Lexiconga has been updated to fix a long-standing bug that prevented updated words from syncing between devices!</p><p>Check the <a href=\"https://github.com/Alamantus/Lexiconga/releases\" target=\"_blank\" rel=\"noopener\">Updates page</a> for the other minor updates.</p>",
"expire": "January 1, 2020", "expire": "April 4, 2020",
"dismissId": "wave1" "dismissId": "marchFixes1"
},
{
"header": "Welcome to Lexiconga 2.0!",
"body": "<p><em>July 1, 2019</em> &ndash; Lexiconga has been rewritten from the ground up!</p><p>Check the <a href=\"https://github.com/Alamantus/Lexiconga/releases\" target=\"_blank\" rel=\"noopener\">Updates page</a> for all the new features, or click Help to get a refresher on how to use Lexiconga!</p>",
"expire": "January 1, 2020",
"dismissId": "welcome"
} }
] ]

View File

@ -215,7 +215,10 @@ WHERE dictionary=$dictionary";
} }
public function getWords ($user, $dictionary) { public function getWords ($user, $dictionary) {
$query = "SELECT words.* FROM words JOIN dictionaries ON id = dictionary WHERE dictionary=$dictionary AND user=$user"; $query = "SELECT words.*, words_advanced.etymology FROM words
LEFT JOIN words_advanced ON words_advanced.dictionary = words.dictionary AND words_advanced.word_id = words.word_id
JOIN dictionaries ON dictionaries.id = words.dictionary
WHERE words.dictionary=$dictionary AND dictionaries.user=$user";
$results = $this->db->query($query)->fetchAll(); $results = $this->db->query($query)->fetchAll();
if ($results) { if ($results) {
return array_map(function ($row) { return array_map(function ($row) {
@ -231,7 +234,7 @@ WHERE dictionary=$dictionary";
); );
if (!is_null($row['etymology'])) { if (!is_null($row['etymology'])) {
$word['etymology'] = $row['etymology']; $word['etymology'] = explode(',', $row['etymology']);
} }
return $word; return $word;
@ -259,41 +262,48 @@ WHERE dictionary=$dictionary";
return true; return true;
} }
$query = 'INSERT INTO words (dictionary, word_id, name, pronunciation, part_of_speech, definition, details, etymology, last_updated, created_on) VALUES '; $query1 = 'INSERT INTO words (dictionary, word_id, name, pronunciation, part_of_speech, definition, details, last_updated, created_on) VALUES ';
$params = array(); $query2 = 'INSERT INTO words_advanced (dictionary, word_id, etymology) VALUES ';
$params1 = array();
$params2 = array();
$word_ids = array(); $word_ids = array();
$most_recent_word_update = 0; $most_recent_word_update = 0;
foreach($words as $word) { foreach($words as $word) {
$last_updated = isset($word['lastUpdated']) ? $word['createdOn'] : $word['lastUpdated']; $last_updated = isset($word['lastUpdated']) ? $word['lastUpdated'] : $word['createdOn'];
if ($most_recent_word_update < $last_updated) { if ($most_recent_word_update < $last_updated) {
$most_recent_word_update = $last_updated; $most_recent_word_update = $last_updated;
} }
$word_ids[] = $word['wordId']; $word_ids[] = $word['wordId'];
$query .= "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?), "; $query1 .= "(?, ?, ?, ?, ?, ?, ?, ?, ?), ";
$params[] = $dictionary; $params1[] = $dictionary;
$params[] = $word['wordId']; $params1[] = $word['wordId'];
$params[] = $word['name']; $params1[] = $word['name'];
$params[] = $word['pronunciation']; $params1[] = $word['pronunciation'];
$params[] = $word['partOfSpeech']; $params1[] = $word['partOfSpeech'];
$params[] = $word['definition']; $params1[] = $word['definition'];
$params[] = $word['details']; $params1[] = $word['details'];
$params[] = isset($word['etymology']) ? $word['etymology'] : null; $params1[] = $last_updated;
$params[] = $last_updated; $params1[] = $word['createdOn'];
$params[] = $word['createdOn'];
$query2 .= "(?, ?, ?), ";
$params2[] = $dictionary;
$params2[] = $word['wordId'];
$params2[] = isset($word['etymology']) ? implode(',', $word['etymology']) : null;
} }
$query = trim($query, ', ') . ' ON DUPLICATE KEY UPDATE $query1 = trim($query1, ', ') . ' ON DUPLICATE KEY UPDATE
name=VALUES(name), name=VALUES(name),
pronunciation=VALUES(pronunciation), pronunciation=VALUES(pronunciation),
part_of_speech=VALUES(part_of_speech), part_of_speech=VALUES(part_of_speech),
definition=VALUES(definition), definition=VALUES(definition),
details=VALUES(details), details=VALUES(details),
etymology=VALUES(etymology),
last_updated=VALUES(last_updated), last_updated=VALUES(last_updated),
created_on=VALUES(created_on)'; created_on=VALUES(created_on)';
$query2 = trim($query2, ', ') . ' ON DUPLICATE KEY UPDATE
etymology=VALUES(etymology)';
$results = $this->db->execute($query, $params); $results1 = $this->db->execute($query1, $params1);
// if ($results) { // if ($results1) {
// $database_words = $this->getWords($user, $dictionary); // $database_words = $this->getWords($user, $dictionary);
// $database_ids = array_map(function($database_word) { return $database_word['id']; }, $database_words); // $database_ids = array_map(function($database_word) { return $database_word['id']; }, $database_words);
// $words_to_delete = array_filter($database_ids, function($database_id) use($word_ids) { return !in_array($database_id, $word_ids); }); // $words_to_delete = array_filter($database_ids, function($database_id) use($word_ids) { return !in_array($database_id, $word_ids); });
@ -303,8 +313,11 @@ created_on=VALUES(created_on)';
// } // }
// } // }
if ($results) { if ($results1 === true) {
return $results; $results2 = $this->db->execute($query2, $params2);
if ($results2 === true) {
return $results1 && $results2;
}
} }
return array( return array(
'error' => $this->db->last_error_info, 'error' => $this->db->last_error_info,

View File

@ -44,20 +44,20 @@ class PublicDictionary {
'consonants' => $result['consonants'] !== '' ? explode(' ', $result['consonants']) : array(), 'consonants' => $result['consonants'] !== '' ? explode(' ', $result['consonants']) : array(),
'vowels' => $result['vowels'] !== '' ? explode(' ', $result['vowels']) : array(), 'vowels' => $result['vowels'] !== '' ? explode(' ', $result['vowels']) : array(),
'blends' => $result['blends'] !== '' ? explode(' ', $result['blends']) : array(), 'blends' => $result['blends'] !== '' ? explode(' ', $result['blends']) : array(),
'notes' => $result['phonology_notes'], 'notes' => $this->parseReferences(strip_tags($result['phonology_notes']), $result['id']),
), ),
'phonotactics' => array( 'phonotactics' => array(
'onset' => $result['onset'] !== '' ? explode(',', $result['onset']) : array(), 'onset' => $result['onset'] !== '' ? explode(',', $result['onset']) : array(),
'nucleus' => $result['nucleus'] !== '' ? explode(',', $result['nucleus']) : array(), 'nucleus' => $result['nucleus'] !== '' ? explode(',', $result['nucleus']) : array(),
'coda' => $result['coda'] !== '' ? explode(',', $result['coda']) : array(), 'coda' => $result['coda'] !== '' ? explode(',', $result['coda']) : array(),
'notes' => $result['phonotactics_notes'], 'notes' => $this->parseReferences(strip_tags($result['phonotactics_notes']), $result['id']),
), ),
'orthography' => array( 'orthography' => array(
'translations' => $result['translations'] !== '' ? explode(PHP_EOL, $result['translations']) : array(), 'translations' => $result['translations'] !== '' ? explode(PHP_EOL, $result['translations']) : array(),
'notes' => $result['orthography_notes'], 'notes' => $this->parseReferences(strip_tags($result['orthography_notes']), $result['id']),
), ),
'grammar' => array( 'grammar' => array(
'notes' => $result['grammar_notes'], 'notes' => $this->parseReferences(strip_tags($result['grammar_notes']), $result['id']),
), ),
), ),
'settings' => array( 'settings' => array(

View File

@ -134,7 +134,7 @@ switch ($view) {
oldLoad && oldLoad(); oldLoad && oldLoad();
if (UpUp) { if (UpUp) {
UpUp.start({ UpUp.start({
'cache-version': '2.1.3', 'cache-version': '2.1.7',
'content-url': 'offline.html', 'content-url': 'offline.html',
'assets': [ 'assets': [
\"" . implode('","', $files) . "\" \"" . implode('","', $files) . "\"

View File

@ -16,6 +16,7 @@ input:not([type="checkbox"]),
select, select,
textarea { textarea {
font-size: 12pt; font-size: 12pt;
padding: 2px 3px;
} }
label { label {
@ -30,8 +31,7 @@ label {
} }
input:not([type="checkbox"]):not([type="radio"]) { input:not([type="checkbox"]):not([type="radio"]) {
padding-bottom: 2px; line-height: 1.6;
line-height: 1.3;
} }
input:not([type="checkbox"]):not([type="radio"]), input:not([type="checkbox"]):not([type="radio"]),
@ -153,6 +153,7 @@ span .tag {
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
z-index: 10;
.modal-background { .modal-background {
position: absolute; position: absolute;

View File

@ -347,7 +347,7 @@ $nav-font-height: 16px;
bottom: $general-padding; bottom: $general-padding;
right: $general-padding; right: $general-padding;
max-width: 300px; max-width: 300px;
z-index: 10; z-index: 15;
.message { .message {
position: relative; position: relative;

View File

@ -23,13 +23,9 @@
} }
} }
.modal { .modal .modal-content .close-button {
z-index: 10; top: 5px;
right: 5px;
.modal-content .close-button {
top: 5px;
right: 5px;
}
} }
.split { .split {

View File

@ -129,7 +129,7 @@
#top { #top {
background-color: $header-color; background-color: $header-color;
border-bottom: 1px solid darken($header-color, 2); border-bottom: 1px solid darken($header-color, 2);
box-shadow: 0px 4px 5px 0px $dark; box-shadow: none;
#title { #title {
#lexi { #lexi {
@ -156,13 +156,13 @@
#wordForm { #wordForm {
background-color: $word-form-color; background-color: $word-form-color;
border: 1px solid darken($word-form-color, 2); border: 1px solid darken($word-form-color, 2);
box-shadow: 4px 4px 5px 0px $dark; box-shadow: none;
} }
#mainColumn { #mainColumn {
background-color: $dictionary-color; background-color: $dictionary-color;
border: 1px solid darken($dictionary-color, 2); border: 1px solid darken($dictionary-color, 2);
box-shadow: 4px 4px 5px 0px $dark; box-shadow: none;
} }
#detailsSection { #detailsSection {
@ -184,7 +184,7 @@
.announcement { .announcement {
background-color: saturate(lighten($footer-color, 20%), 20%); background-color: saturate(lighten($footer-color, 20%), 20%);
box-shadow: 4px 4px 5px 0px $dark; box-shadow: none;
} }
.entry { .entry {
@ -238,7 +238,7 @@
#bottom { #bottom {
background-color: $footer-color; background-color: $footer-color;
border-top: 1px solid darken($footer-color, 2); border-top: 1px solid darken($footer-color, 2);
box-shadow: 0px -4px 5px 0px $dark; box-shadow: none;
a { a {
color: $light; color: $light;

View File

@ -86,8 +86,18 @@ CREATE TABLE IF NOT EXISTS `words` (
`part_of_speech` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `part_of_speech` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`definition` text COLLATE utf8_unicode_ci NOT NULL, `definition` text COLLATE utf8_unicode_ci NOT NULL,
`details` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown', `details` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown',
`etymology` text COLLATE utf8_unicode_ci DEFAULT NULL,
`last_updated` int(11) DEFAULT NULL, `last_updated` int(11) DEFAULT NULL,
`created_on` int(11) NOT NULL, `created_on` int(11) NOT NULL,
UNIQUE KEY `unique_index` (`dictionary`,`word_id`) UNIQUE KEY `unique_index` (`dictionary`,`word_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER $$
CREATE TRIGGER IF NOT EXISTS `delete_word_advanced` AFTER DELETE ON `words` FOR EACH ROW DELETE FROM words_advanced WHERE words_advanced.dictionary=old.dictionary AND words_advanced.word_id=old.word_id
$$
DELIMITER ;
CREATE TABLE IF NOT EXISTS `words_advanced` (
`dictionary` int(11) NOT NULL,
`word_id` int(11) NOT NULL,
`etymology` text NOT NULL COMMENT 'Comma-separated',
UNIQUE KEY `dictionary_word_id` (`dictionary`,`word_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@ -139,8 +139,10 @@
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br> <label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
<textarea id="wordDetails" placeholder="Markdown formatting allowed"></textarea> <textarea id="wordDetails" placeholder="Markdown formatting allowed"></textarea>
</label> </label>
<a id="expandAdvancedForm" class="expand-advanced-form">+ Advanced</a> <label>
<div id="advancedForm" style="display:none;"> <a id="expandAdvancedForm" class="small button expand-advanced-form">Show Advanced Fields</a>
</label>
<div id="advancedForm" class="advanced-word-form" style="display:none;">
<label>Etymology / Root Words<br> <label>Etymology / Root Words<br>
<input id="wordEtymology" maxlength="2500" placeholder="comma,separated,root,words"> <input id="wordEtymology" maxlength="2500" placeholder="comma,separated,root,words">
</label> </label>
@ -211,6 +213,11 @@
<input id="settingsUseHotkeys" type="checkbox" checked><br /> <input id="settingsUseHotkeys" type="checkbox" checked><br />
<small>Check this to enable keyboard combinations to perform different helpful actions.</small> <small>Check this to enable keyboard combinations to perform different helpful actions.</small>
</label> </label>
<label>Show Advanced Fields By Default
<input id="settingsShowAdvanced" type="checkbox"><br />
<small>Check this to make the advanced fields show on word forms without needing to click the "Show Advanced Fields" button.</small>
</label>
<label>Default Theme <small>(the theme new dictionaries will use)</small> <label>Default Theme <small>(the theme new dictionaries will use)</small>
<select id="settingsDefaultTheme"> <select id="settingsDefaultTheme">

3684
yarn.lock

File diff suppressed because it is too large Load Diff