diff options
Diffstat (limited to 'static')
| -rw-r--r-- | static/css/fonts.css | 28 | ||||
| -rw-r--r-- | static/css/styles.css | 4 | ||||
| -rw-r--r-- | static/fonts/COCOLGR.otf | bin | 0 -> 95668 bytes | |||
| -rw-r--r-- | static/fonts/pdos.ttf | bin | 81192 -> 0 bytes | |||
| -rw-r--r-- | static/js/tl.js | 13 |
5 files changed, 37 insertions, 8 deletions
diff --git a/static/css/fonts.css b/static/css/fonts.css index c035afaf..e25f479a 100644 --- a/static/css/fonts.css +++ b/static/css/fonts.css @@ -1,6 +1,28 @@ +@import url('https://fonts.googleapis.com/css2?family=Mali:ital,wght@0,400;0,700;1,400;1,700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap'); + @font-face { - font-family: 'TopNavbar'; - src: url('../fonts/pdos.ttf') format('truetype'); + font-family: 'Comic Code Regular'; + src: url('../fonts/COCOLGR.otf') format('opentype'); font-weight: normal; font-style: normal; -}
\ No newline at end of file +} + +@font-face { + font-family: 'Hatsukoi Friends Mini'; + src: url('../fonts/HAKOIMI.otf') format('opentype'); + font-weight: normal; + font-style: normal; +} + +code { + font-family: 'Comic Code Regular', sans-serif; +} + +.en { + font-family: 'Mali', sans-serif; +} + +body.ja, .ja { + font-family: 'Noto Sans JP', sans-serif; +} diff --git a/static/css/styles.css b/static/css/styles.css index 8639081b..6ae81a7e 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1,6 +1,6 @@ @import url(search.css); @import url(sidebar.css); -@import url('https://fonts.googleapis.com/css2?family=Mali:ital,wght@0,400;0,700;1,400;1,700&display=swap'); +@import url('fonts.css'); body { position: unset !important; @@ -516,4 +516,4 @@ blockquote { max-height: 300px; max-width: 300px; } -}
\ No newline at end of file +} diff --git a/static/fonts/COCOLGR.otf b/static/fonts/COCOLGR.otf Binary files differnew file mode 100644 index 00000000..350e70ec --- /dev/null +++ b/static/fonts/COCOLGR.otf diff --git a/static/fonts/pdos.ttf b/static/fonts/pdos.ttf Binary files differdeleted file mode 100644 index f5cbfc06..00000000 --- a/static/fonts/pdos.ttf +++ /dev/null diff --git a/static/js/tl.js b/static/js/tl.js index 599f64bd..44c8b044 100644 --- a/static/js/tl.js +++ b/static/js/tl.js @@ -13,13 +13,15 @@ function restoreLang() { localStorage.setItem("lang", "en"); $('#tl_ja').hide(); $('#tl_en').show(); + $('body').addClass('en'); + $('body').removeClass('ja'); var translateContainers = $('iframe'); if (translateContainers.length === 0) { // nothing } else { translateContainers.each(function (index, element) { - if (element.contentWindow.document.getElementById(":1.restore")) { - element.contentWindow.document.getElementById(":1.restore").click(); + if (element.contentWindow.document.getElementById(":1.close")) { + element.contentWindow.document.getElementById(":1.close").click(); } }); } @@ -29,8 +31,9 @@ function translateJapanese() { localStorage.setItem("lang", "ja"); $('#tl_en').hide(); $('#tl_ja').show(); + $('body').addClass('ja'); + $('body').removeClass('en'); var selectEl = document.querySelector("select.goog-te-combo"); - console.log(selectEl); if (!selectEl) { setTimeout(function () { translateJapanese(); @@ -54,8 +57,12 @@ if (!currentLang) { if (currentLang === "ja") { $('#tl_en').hide(); $('#tl_ja').show(); + $('body').addClass('ja'); + $('body').removeClass('en'); } else { $('#tl_ja').hide(); $('#tl_en').show(); + $('body').addClass('en'); + $('body').removeClass('ja'); restoreLang(); } |
