Fix small CSS inconsistencies

This commit is contained in:
wearrrrr 2024-03-29 12:08:19 -05:00
parent 22c5324532
commit 1d9bcd1dba
3 changed files with 10 additions and 4 deletions

View file

@ -57,6 +57,7 @@ const { buttonNameDefault, dropdownList, id, localStorageKey } = Astro.props;
background-color: var(--dropdown-background-color); background-color: var(--dropdown-background-color);
position: absolute; position: absolute;
width: 100%; width: 100%;
z-index: 5;
} }
.dropdown-item { .dropdown-item {
border-bottom: 1px solid var(--text-color-accent); border-bottom: 1px solid var(--text-color-accent);

View file

@ -113,11 +113,13 @@
iframe.style.opacity = 1; iframe.style.opacity = 1;
topbar.style.opacity = 1; topbar.style.opacity = 1;
topbar.style.pointerEvents = "auto"; topbar.style.pointerEvents = "auto";
document.body.style.overflow = "hidden";
closeButton.onclick = () => { closeButton.onclick = () => {
iframe.style.opacity = 0; iframe.style.opacity = 0;
topbar.style.opacity = 0; topbar.style.opacity = 0;
iframe.style.pointerEvents = "none"; iframe.style.pointerEvents = "none";
topbar.style.pointerEvents = "none"; topbar.style.pointerEvents = "none";
document.body.style.overflow = "auto";
iframe.removeEventListener("load", boundIFrameLoad); iframe.removeEventListener("load", boundIFrameLoad);
setTimeout(() => { setTimeout(() => {
@ -205,7 +207,7 @@
if (favicon) { if (favicon) {
proxiedFavicon.src = favicon.href; proxiedFavicon.src = favicon.href;
} else { } else {
if (proxiedFavicon.src != "/favicon.ico") { if (proxiedFavicon.src != window.location.origin + "/favicon.ico") {
proxiedFavicon.src = "/favicon.ico"; proxiedFavicon.src = "/favicon.ico";
} }
} }

View file

@ -334,7 +334,7 @@ const t = useTranslations(lang);
applyDropdownEventListeners( applyDropdownEventListeners(
searchEngineDropdown, searchEngineDropdown,
"dropdown__search-engine", "dropdown__search-engine",
"alu__searchEngine", "alu__search_engine",
checkSearxng checkSearxng
); );
checkSearxng(); checkSearxng();
@ -347,8 +347,9 @@ const t = useTranslations(lang);
function checkSearxng() { function checkSearxng() {
// This function checks if the "searxng" option was clicked, display an additional option if so. // This function checks if the "searxng" option was clicked, display an additional option if so.
if (localStorage.getItem("alu__searchEngine")) { let search_engine = JSON.parse(localStorage.getItem("alu__search_engine"));
if (JSON.parse(localStorage.getItem("alu__searchEngine")).value.toLowerCase() == "searx") { if (search_engine) {
if (search_engine.value.toLowerCase() == "searx") {
document.getElementsByClassName("setting__searxng-url")[0].style.opacity = "1"; document.getElementsByClassName("setting__searxng-url")[0].style.opacity = "1";
} else { } else {
document.getElementsByClassName("setting__searxng-url")[0].style.opacity = "0"; document.getElementsByClassName("setting__searxng-url")[0].style.opacity = "0";
@ -394,6 +395,7 @@ const t = useTranslations(lang);
position: relative; position: relative;
z-index: 2; z-index: 2;
flex-wrap: wrap; flex-wrap: wrap;
row-gap: 5px;
} }
.content-setting-header { .content-setting-header {
color: var(--text-color); color: var(--text-color);
@ -416,6 +418,7 @@ const t = useTranslations(lang);
user-select: none; user-select: none;
width: 100%; width: 100%;
cursor: auto; cursor: auto;
margin-bottom: 5px;
} }
.setting__searxng-url { .setting__searxng-url {