Add IPA transcription

This commit is contained in:
Augusto Gunsch 2023-03-14 09:41:07 +01:00
parent 90dd20b53f
commit 0de83070c7
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#![feature(slice_group_by, path_try_exists)]
#![feature(slice_group_by, fs_try_exists)]
use std::process::exit;
use std::fs;
use std::path::Path;
//mod database;
use rocket::routes;
@ -95,7 +95,7 @@ async fn main() {
views::get_langs,
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));
}

View File

@ -184,7 +184,7 @@ $(document).ready(() => {
html += `<h1>Not found: <mark>${decodeURIComponent(word)}</mark></h1>`;
} else {
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) {
let tags = [];
entry.senses.forEach(sense => {