css on settings container
This commit is contained in:
+74
-58
@@ -69,6 +69,7 @@
|
|||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
|
|
||||||
height: 25rem;
|
height: 25rem;
|
||||||
|
width: 40rem;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,12 +100,17 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabContent {
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-left: 1rem;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
a.visited {
|
a.visited {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
#ioTab {
|
|
||||||
flex-shrink: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#containers {
|
#containers {
|
||||||
padding-left: .25rem;
|
padding-left: .25rem;
|
||||||
@@ -112,17 +118,8 @@
|
|||||||
/*
|
/*
|
||||||
* SETTINGS PAGES
|
* SETTINGS PAGES
|
||||||
*/
|
*/
|
||||||
form,
|
|
||||||
#instructionsForm {
|
|
||||||
display: none;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.formTitle {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
text-decoration: underline;
|
|
||||||
font-style: italic;
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
label {
|
label {
|
||||||
align-self: start;
|
align-self: start;
|
||||||
}
|
}
|
||||||
@@ -143,7 +140,6 @@
|
|||||||
margin: 0 0 0 0;
|
margin: 0 0 0 0;
|
||||||
padding: .5rem 0rem .5rem .5rem;
|
padding: .5rem 0rem .5rem .5rem;
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
.expandableMenuToggle.active, .expandableMenuToggle:hover {
|
.expandableMenuToggle.active, .expandableMenuToggle:hover {
|
||||||
background-color: rgba(213, 205, 205, 1);
|
background-color: rgba(213, 205, 205, 1);
|
||||||
@@ -170,14 +166,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.containerListing {
|
.containerListing {
|
||||||
|
border: 1px solid black;
|
||||||
|
margin-bottom: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manageButtons {
|
.manageButtons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: reow;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
margin: 1rem 0rem;
|
align-items: center;
|
||||||
|
padding: 1rem 0rem;
|
||||||
}
|
}
|
||||||
.bookmarkListingContainer {
|
.bookmarkListingContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -214,6 +213,11 @@
|
|||||||
input[type="color"] {
|
input[type="color"] {
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
}
|
}
|
||||||
|
button {
|
||||||
|
border: none;
|
||||||
|
border-radius: 50px;
|
||||||
|
padding: .25rem .5rem .25rem .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.bookmarkListingButtons {
|
.bookmarkListingButtons {
|
||||||
}
|
}
|
||||||
@@ -227,10 +231,9 @@
|
|||||||
|
|
||||||
.bookmarkDeleteButton {
|
.bookmarkDeleteButton {
|
||||||
}
|
}
|
||||||
.bookmarkDeleteButton:hover {
|
.deleteButton:hover {
|
||||||
background-color: rgba(173, 165, 165, 0.8);
|
background-color: rgba(173, 165, 165, 0.8);
|
||||||
color: red;
|
color: red;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
@@ -268,14 +271,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding: 0 .5rem;">
|
<div>
|
||||||
<!-- note to self:
|
<div id="instructionsPage" class="tabContent">
|
||||||
- i should rename these so they don't end in "Form",
|
|
||||||
- rather something like "Page". to do that though i need
|
|
||||||
- to change the logic for switching tabs that has the string
|
|
||||||
- modification hardcoded
|
|
||||||
-->
|
|
||||||
<div id="instructionsForm">
|
|
||||||
<p>
|
<p>
|
||||||
you are now editing the page!<br /><br />
|
you are now editing the page!<br /><br />
|
||||||
|
|
||||||
@@ -365,7 +362,11 @@
|
|||||||
there are some keyboard shortcuts for your convenience:<br />
|
there are some keyboard shortcuts for your convenience:<br />
|
||||||
"e" = enables editing mode<br />
|
"e" = enables editing mode<br />
|
||||||
esc = disables editing mode (and saves page)<br />
|
esc = disables editing mode (and saves page)<br />
|
||||||
"1"-"4" = jump between settings box tabs<br />
|
"1"-"4" = jump between settings box tabs<br /><br />
|
||||||
|
|
||||||
|
if you've accidentally pressed down on a "delete" button and want to
|
||||||
|
cancel, you can hit escape before releasing the mouse button to save
|
||||||
|
your progress and prevent your thing from being deleted.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
floating text:<br />
|
floating text:<br />
|
||||||
@@ -377,7 +378,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="containerForm" onsubmit="return false">
|
<div id="containerPage" class="tabContent">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="menuHeader">add bookmark layer</h2>
|
<h2 class="menuHeader">add bookmark layer</h2>
|
||||||
<input
|
<input
|
||||||
@@ -390,6 +391,7 @@
|
|||||||
create new layer
|
create new layer
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2 class="menuHeader">add image to page</h2>
|
<h2 class="menuHeader">add image to page</h2>
|
||||||
<input
|
<input
|
||||||
@@ -409,25 +411,29 @@
|
|||||||
</button>
|
</button>
|
||||||
<a href="https://imgur.com/upload" target="_blank" style="color: black">imgur upload for convenience</a>
|
<a href="https://imgur.com/upload" target="_blank" style="color: black">imgur upload for convenience</a>
|
||||||
<h2 class="menuHeader">layers</h2>
|
<h2 class="menuHeader">layers</h2>
|
||||||
|
<div style="display: flex; flex-direction: row; justify-content: space-around; margin-bottom: 1rem;">
|
||||||
|
<button onclick="collapseLayerListings()">collapse all listings</button>
|
||||||
|
<button onclick="expandLayerListings()">expand all listings</button>
|
||||||
|
</div>
|
||||||
<div id="containers"></div>
|
<div id="containers"></div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
|
||||||
<form id="ioForm" onsubmit="return false">
|
<div id="ioPage" class="tabContent">
|
||||||
<label>use the button below to copy your current configuration to your clipboard<br />(you should save this somewhere)</label>
|
<p>export current setup to clipboard (see help tab for more information):</p>
|
||||||
<button onclick="exportData()">export data</button><br />
|
<div>
|
||||||
|
<button style="height: 3rem; width: 100%; margin-bottom: 2.5rem;" onclick="exportData()">export data</button>
|
||||||
<input id="importDataInput" />
|
</div>
|
||||||
<button
|
<hr />
|
||||||
onclick="importData()"
|
<div style="display: flex; flex-direction: column; margin-top: 2.5rem; gap: 1rem;">
|
||||||
placeholder="paste exported data here to load"
|
<input id="importDataInput" style="width: 90%; align-self: center" placeholder="paste data to import here"/>
|
||||||
>
|
<button style="width: 100%; height: 3rem;" onclick="importData()" >
|
||||||
import data
|
import data
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form id="globalSettingsForm" onsubmit="return false">
|
<div id="globalSettingsPage" class="tabContent">
|
||||||
<div>
|
|
||||||
<p class="menuHeader">image manipulation</p>
|
<p class="menuHeader">image manipulation</p>
|
||||||
<div class="containerOptionListing">
|
<div class="containerOptionListing">
|
||||||
<label for="imageRatioToggle">image free transform mode</label>
|
<label for="imageRatioToggle">image free transform mode</label>
|
||||||
@@ -500,13 +506,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
(note: this will require white-listing this site in your browser.
|
(note: this will require either white-listing this site in your browser
|
||||||
you can whitelist local HTML files! the URL would be something like
|
or generally enabling "allow auto-play audio" in your browser's settings.
|
||||||
"file:///C:/path/to/saved/file")
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
todo: make tab shortcuts.
|
||||||
|
also change section buttons to actual buttons, and collapse / expand all logic
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -651,7 +658,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.initializeImageContainer();
|
this.initializeImageContainer();
|
||||||
// this.createImageContainerMenuListing();
|
|
||||||
}
|
}
|
||||||
// if constructing text container
|
// if constructing text container
|
||||||
else {
|
else {
|
||||||
@@ -867,12 +873,17 @@
|
|||||||
createTextContainerMenuListing() {
|
createTextContainerMenuListing() {
|
||||||
let zindex = parseInt(this.containerSettings.zIndex);
|
let zindex = parseInt(this.containerSettings.zIndex);
|
||||||
let upButtons = `
|
let upButtons = `
|
||||||
<button id="` + this.id + `--move-top-button"} onclick="reorderContainer(this, 'top')">summon to top</button>
|
<div>
|
||||||
<button id="` + this.id + `--move-up-button"} onclick="reorderContainer(this, 'up')">move up</button>
|
<button id="` + this.id + `--move-up-button"} onclick="reorderContainer(this, 'up')">move up</button>
|
||||||
|
<button id="` + this.id + `--move-top-button"} onclick="reorderContainer(this, 'top')">summon to top</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
let downButtons = `
|
let downButtons = `
|
||||||
|
<div ${zindex == 1 ? `` : `style="margin-top: .25rem;"`}>
|
||||||
<button id="` + this.id + `--move-down-button"} onclick="reorderContainer(this, 'down')">move down</button>
|
<button id="` + this.id + `--move-down-button"} onclick="reorderContainer(this, 'down')">move down</button>
|
||||||
<button id="` + this.id + `--move-bottom-button"} onclick="reorderContainer(this, 'bottom')">banish to bottom</button>
|
<button id="` + this.id + `--move-bottom-button"} onclick="reorderContainer(this, 'bottom')">banish to bottom</button>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
document.getElementById("containers").insertAdjacentHTML(
|
document.getElementById("containers").insertAdjacentHTML(
|
||||||
@@ -884,7 +895,7 @@
|
|||||||
<p id=${this.id + "--listing-header"}>[${this.containerSettings.zIndex}]: ${this.name}</p>
|
<p id=${this.id + "--listing-header"}>[${this.containerSettings.zIndex}]: ${this.name}</p>
|
||||||
<p class="expandedMenuIndicator">-</p>
|
<p class="expandedMenuIndicator">-</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="expandableMenu" id=${this.id + "-settings-menu"} style="display: block;">
|
<div class="expandableMenu" id=${this.id + "-settings-menu"} style="display: block; margin: 0;">
|
||||||
|
|
||||||
<div class="expandableMenuToggle" onclick="toggleExpandableMenu(this)">
|
<div class="expandableMenuToggle" onclick="toggleExpandableMenu(this)">
|
||||||
<p>${this.name}: bookmarks</p>
|
<p>${this.name}: bookmarks</p>
|
||||||
@@ -1034,9 +1045,7 @@
|
|||||||
<div class="containerOptionListing">
|
<div class="containerOptionListing">
|
||||||
<div>
|
<div>
|
||||||
<p style="margin: 0;">
|
<p style="margin: 0;">
|
||||||
change font (see instructions for more info):<br />
|
change font:<br />(see help tab for more info)<br />
|
||||||
<b>current font:</b>
|
|
||||||
<span id=${this.id + "-settings-font-name"}></span>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1044,6 +1053,9 @@
|
|||||||
<input id=${this.id + "-settings-font-input"} />
|
<input id=${this.id + "-settings-font-input"} />
|
||||||
<br />
|
<br />
|
||||||
<button id=${this.id + "-settings-set-font-button"}>set font</button>
|
<button id=${this.id + "-settings-set-font-button"}>set font</button>
|
||||||
|
<br />
|
||||||
|
<b>current font:</b>
|
||||||
|
<span id=${this.id + "-settings-font-name"}></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
@@ -1139,7 +1151,7 @@
|
|||||||
${zindex == 1 ? `` : downButtons}
|
${zindex == 1 ? `` : downButtons}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button id=${this.id + "--delete-button"} onclick="deleteContainer(this)">delete layer</button>
|
<button id=${this.id + "--delete-button"} class="deleteButton" onclick="deleteContainer(this)">delete layer</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1240,12 +1252,16 @@
|
|||||||
createImageContainerMenuListing() {
|
createImageContainerMenuListing() {
|
||||||
let zindex = this.containerSettings.zIndex;
|
let zindex = this.containerSettings.zIndex;
|
||||||
let upButtons = `
|
let upButtons = `
|
||||||
<button id="` + this.id + `--move-top-button"} onclick="reorderContainer(this, 'top')">summon to top</button>
|
<div>
|
||||||
<button id="` + this.id + `--move-up-button"} onclick="reorderContainer(this, 'up')">move up</button>
|
<button id="` + this.id + `--move-up-button"} onclick="reorderContainer(this, 'up')">move up</button>
|
||||||
|
<button id="` + this.id + `--move-top-button"} onclick="reorderContainer(this, 'top')">summon to top</button>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
let downButtons = `
|
let downButtons = `
|
||||||
|
<div ${zindex == 1 ? `` : `style="margin-top: .25rem;"`}>
|
||||||
<button id="` + this.id + `--move-down-button"} onclick="reorderContainer(this, 'down')">move down</button>
|
<button id="` + this.id + `--move-down-button"} onclick="reorderContainer(this, 'down')">move down</button>
|
||||||
<button id="` + this.id + `--move-bottom-button"} onclick="reorderContainer(this, 'bottom')">banish to bottom</button>
|
<button id="` + this.id + `--move-bottom-button"} onclick="reorderContainer(this, 'bottom')">banish to bottom</button>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
document.getElementById("containers").insertAdjacentHTML(
|
document.getElementById("containers").insertAdjacentHTML(
|
||||||
@@ -1257,7 +1273,7 @@
|
|||||||
<p id=${this.id + "--listing-header"}>[${this.containerSettings.zIndex}]: ${this.name}</p>
|
<p id=${this.id + "--listing-header"}>[${this.containerSettings.zIndex}]: ${this.name}</p>
|
||||||
<p class="expandedMenuIndicator">-</p>
|
<p class="expandedMenuIndicator">-</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="expandableMenu" id=${this.id + "-settings-menu"} style="display: block;">
|
<div class="expandableMenu" style="display: block; margin: 0;" id=${this.id + "-settings-menu"}>
|
||||||
|
|
||||||
<div class="expandableMenuToggle" onclick="toggleExpandableMenu(this)">
|
<div class="expandableMenuToggle" onclick="toggleExpandableMenu(this)">
|
||||||
<p>border + shape options</p>
|
<p>border + shape options</p>
|
||||||
@@ -1794,7 +1810,7 @@
|
|||||||
activeTabId =
|
activeTabId =
|
||||||
JSON.parse(localStorage.getItem("activeTabId")) || "instructionsTab";
|
JSON.parse(localStorage.getItem("activeTabId")) || "instructionsTab";
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
activeTabId.replace("Tab", "Form")
|
activeTabId.replace("Tab", "Page")
|
||||||
).style.display = "flex";
|
).style.display = "flex";
|
||||||
document.getElementById(activeTabId).classList.add("active");
|
document.getElementById(activeTabId).classList.add("active");
|
||||||
// add tab-switching listeners
|
// add tab-switching listeners
|
||||||
@@ -2054,13 +2070,13 @@
|
|||||||
document.getElementById(activeTabId).classList.remove("active");
|
document.getElementById(activeTabId).classList.remove("active");
|
||||||
|
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
activeTabId.replace("Tab", "Form")
|
activeTabId.replace("Tab", "Page")
|
||||||
).style.display = "none";
|
).style.display = "none";
|
||||||
|
|
||||||
// set new tab
|
// set new tab
|
||||||
activeTabId = event.target.id;
|
activeTabId = event.target.id;
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
activeTabId.replace("Tab", "Form")
|
activeTabId.replace("Tab", "Page")
|
||||||
).style.display = "flex";
|
).style.display = "flex";
|
||||||
|
|
||||||
document.getElementById(activeTabId).classList.add("active");
|
document.getElementById(activeTabId).classList.add("active");
|
||||||
|
|||||||
Reference in New Issue
Block a user