diff --git a/libretranslate/static/css/main.css b/libretranslate/static/css/main.css index f9cb39a..75f01dc 100644 --- a/libretranslate/static/css/main.css +++ b/libretranslate/static/css/main.css @@ -74,6 +74,14 @@ a:not(.noline) { min-height: 80vh; } +.component{ + visibility: hidden; +} + +#app.loaded .component{ + visibility: visible; +} + h3.header { margin-bottom: 2.5rem; } diff --git a/libretranslate/templates/app.js.template b/libretranslate/templates/app.js.template index 4faa119..adf234f 100644 --- a/libretranslate/templates/app.js.template +++ b/libretranslate/templates/app.js.template @@ -45,6 +45,7 @@ document.addEventListener('DOMContentLoaded', function(){ }, mounted: function() { const self = this; + self.$el.classList.add("loaded"); const settingsRequest = new XMLHttpRequest(); settingsRequest.open("GET", BaseUrl + "/frontend/settings", true); @@ -68,6 +69,11 @@ document.addEventListener('DOMContentLoaded', function(){ } else { langsRequest.onload = function() { handleLangsResponse(self, this); + + var hostname = window.location.hostname.toLowerCase(); + if (hostname.indexOf("libretranslate.") === 0 && !hostname.endsWith(".com")){ + self.error = "This website might be in violation of our trademark guidelines: https://github.com/LibreTranslate/LibreTranslate/blob/main/TRADEMARK.md"; + } } } } else { diff --git a/libretranslate/templates/index.html b/libretranslate/templates/index.html index 86e3952..9b66f9d 100644 --- a/libretranslate/templates/index.html +++ b/libretranslate/templates/index.html @@ -141,11 +141,11 @@ -
+
-
+
@@ -162,7 +162,7 @@
-
+