Styling and DOM structure adjustments
parent
7ee8a1e9ed
commit
5d80aee1aa
|
@ -81,7 +81,7 @@
|
||||||
<div id="links">
|
<div id="links">
|
||||||
<a
|
<a
|
||||||
href="settings.html"
|
href="settings.html"
|
||||||
>🡄 Back to Settings</a
|
>⇦ Back to Settings</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
Once you click on one of these "select all" buttons, that settings
|
Once you click on one of these "select all" buttons, that settings
|
||||||
will become the new default for any wikis that are added to the extension in the future.
|
will become the new default for any wikis that are added to the extension in the future.
|
||||||
</p>
|
</p>
|
||||||
<h2>Have questions?</h2>
|
<h2>Have questions or feedback?</h2>
|
||||||
<p>
|
<p>
|
||||||
If you're stuck or have questions, please don't hesitate to get in touch via the
|
If you're stuck or have questions, please don't hesitate to get in touch via the
|
||||||
<a href="https://getindie.wiki/#contact">contact details</a>
|
<a href="https://getindie.wiki/#contact">contact details</a>
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0px 2px;
|
padding: 0 1em;
|
||||||
}
|
}
|
||||||
#toggles > div:hover {
|
#toggles > div:hover {
|
||||||
background-color: #e8f0fe;
|
background-color: #e8f0fe;
|
||||||
|
@ -185,30 +185,38 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
#toggles > div {
|
#toggles > div {
|
||||||
line-height: 1.8em;
|
line-height: 2em;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#toggles .inputsContainer {
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
#toggles img {
|
#toggles img {
|
||||||
width: 16px;
|
width: 1.2em;
|
||||||
height: 16px;
|
height: 1.2em;
|
||||||
max-height: 1.2em;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
#toggles a {
|
#toggles a {
|
||||||
float: right;
|
line-height: 1.2em;
|
||||||
padding-right: 10px;
|
padding-right: .5em;
|
||||||
clear: both;
|
|
||||||
}
|
}
|
||||||
#toggles span {
|
#toggles span {
|
||||||
padding-left: .7em;
|
flex-grow: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
#togglesKey {
|
#togglesKey {
|
||||||
padding-left: 7px;
|
padding-right: 15px;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
#togglesKey > div {
|
#togglesKey > div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 17px;
|
width: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#togglesKey>div:last-child, #toggles>div>label:last-of-type {
|
#togglesKey>div:last-child, #toggles>div>div>label:last-of-type {
|
||||||
margin-left: .5em;
|
margin-left: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +347,7 @@
|
||||||
</button>
|
</button>
|
||||||
<button id="setAllAlert">
|
<button id="setAllAlert">
|
||||||
<img src="images/toggle-alert.png" width="10" alt="" /> Set all to
|
<img src="images/toggle-alert.png" width="10" alt="" /> Set all to
|
||||||
alert of indie wikis
|
notify of indie wikis
|
||||||
</button>
|
</button>
|
||||||
<br />
|
<br />
|
||||||
<button id="setAllSearchFilter">
|
<button id="setAllSearchFilter">
|
||||||
|
|
25
settings.js
25
settings.js
|
@ -267,7 +267,8 @@ async function loadOptions(lang) {
|
||||||
labelFilter.appendChild(inputFilter);
|
labelFilter.appendChild(inputFilter);
|
||||||
labelFilter.appendChild(inputFilterText);
|
labelFilter.appendChild(inputFilterText);
|
||||||
|
|
||||||
// Output icon
|
// Output wiki info:
|
||||||
|
let wikiInfo = document.createElement('span');
|
||||||
let iconLink = document.createElement("a");
|
let iconLink = document.createElement("a");
|
||||||
iconLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
|
iconLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
|
||||||
iconLink.title = 'Visit ' + sites[i].destination;
|
iconLink.title = 'Visit ' + sites[i].destination;
|
||||||
|
@ -276,19 +277,19 @@ async function loadOptions(lang) {
|
||||||
icon.src = 'favicons/' + lang.toLowerCase() + '/' + sites[i].destination_icon;
|
icon.src = 'favicons/' + lang.toLowerCase() + '/' + sites[i].destination_icon;
|
||||||
icon.alt = 'Visit ' + sites[i].destination;
|
icon.alt = 'Visit ' + sites[i].destination;
|
||||||
iconLink.appendChild(icon);
|
iconLink.appendChild(icon);
|
||||||
|
wikiInfo.appendChild(iconLink);
|
||||||
// Output text:
|
wikiInfo.innerHTML += sites[i].origins_label + ' » ' + sites[i].destination;
|
||||||
let text = document.createElement('span');
|
|
||||||
text.textContent = sites[i].origins_label + ' » ' + sites[i].destination;
|
|
||||||
let siteContainer = document.createElement("div");
|
let siteContainer = document.createElement("div");
|
||||||
|
|
||||||
siteContainer.appendChild(labelDisabled);
|
// Output inputs container:
|
||||||
siteContainer.appendChild(labelRedirect);
|
let inputsContainer = document.createElement('div');
|
||||||
siteContainer.appendChild(labelAlert);
|
inputsContainer.appendChild(labelDisabled);
|
||||||
siteContainer.appendChild(labelFilter);
|
inputsContainer.appendChild(labelRedirect);
|
||||||
siteContainer.appendChild(iconLink);
|
inputsContainer.appendChild(labelAlert);
|
||||||
siteContainer.appendChild(text);
|
inputsContainer.appendChild(labelFilter);
|
||||||
|
inputsContainer.classList = 'inputsContainer';
|
||||||
|
siteContainer.appendChild(wikiInfo);
|
||||||
|
siteContainer.appendChild(inputsContainer);
|
||||||
toggleContainer.appendChild(siteContainer);
|
toggleContainer.appendChild(siteContainer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue