Add IPA transcription
This commit is contained in:
parent
90dd20b53f
commit
0de83070c7
|
@ -1,7 +1,7 @@
|
||||||
#![feature(slice_group_by, path_try_exists)]
|
#![feature(slice_group_by, fs_try_exists)]
|
||||||
|
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::fs;
|
use std::path::Path;
|
||||||
|
|
||||||
//mod database;
|
//mod database;
|
||||||
use rocket::routes;
|
use rocket::routes;
|
||||||
|
@ -95,7 +95,7 @@ async fn main() {
|
||||||
views::get_langs,
|
views::get_langs,
|
||||||
views::frontend]);
|
views::frontend]);
|
||||||
|
|
||||||
if let Ok(_) = fs::try_exists(FRONTEND_DIR) {
|
if let Ok(_) = Path::new(FRONTEND_DIR).try_exists() {
|
||||||
app = app.mount("/static", FileServer::from(FRONTEND_DIR));
|
app = app.mount("/static", FileServer::from(FRONTEND_DIR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ $(document).ready(() => {
|
||||||
html += `<h1>Not found: <mark>${decodeURIComponent(word)}</mark></h1>`;
|
html += `<h1>Not found: <mark>${decodeURIComponent(word)}</mark></h1>`;
|
||||||
} else {
|
} else {
|
||||||
data.forEach(entry => {
|
data.forEach(entry => {
|
||||||
html += `<h1>${entry.word} <span class="pos">(${entry.pos})</span></h1>`
|
html += `<h1>${entry.word} <span class="pos">${entry.sounds[0].ipa} (${entry.pos})</span></h1>`
|
||||||
if('senses' in entry) {
|
if('senses' in entry) {
|
||||||
let tags = [];
|
let tags = [];
|
||||||
entry.senses.forEach(sense => {
|
entry.senses.forEach(sense => {
|
||||||
|
|
Loading…
Reference in New Issue