added css and js files
parent
f249454c71
commit
5b894ebdb5
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586 7.707 9.293 6.293 10.707 12 16.414 17.707 10.707z"/></svg>
|
After Width: | Height: | Size: 174 B |
|
@ -0,0 +1,131 @@
|
|||
:root {
|
||||
--accent-color: #e3e3e39a;
|
||||
--link-color: #9e1bd6;
|
||||
--bg-color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color, #9e1bd6);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 1rem;
|
||||
font-size: 16px;
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
background-color: var(--bg-color, white);
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: -0.5rem;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-ms-flex-line-pack: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
button {
|
||||
font: inherit;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
padding: 10px;
|
||||
height: -webkit-min-content;
|
||||
height: -moz-min-content;
|
||||
height: min-content;
|
||||
background-color: var(--accent-color, #e3e3e39a);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
form {
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
}
|
||||
|
||||
form select {
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
font-size: inherit;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
padding: 10px;
|
||||
padding-right: 30px;
|
||||
background-color: var(--accent-color, #e3e3e39a);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
line-height: 1;
|
||||
background: url("../assets/bx-chevron-down.svg") no-repeat right var(--accent-color, #e3e3e39a);
|
||||
-webkit-appearance: none;
|
||||
background-position: 97%;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
form input {
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
padding: 10px;
|
||||
background-color: var(--accent-color, #e3e3e39a);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
form input:not(:last-child) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
form input[type="button"] {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
form input[type="text"] {
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
min-width: 160px;
|
||||
border: var(--accent-color, #e3e3e39a) solid 2px;
|
||||
background: transparent;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
form input[type="text"]:active, form input[type="text"]:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
img {
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.invert {
|
||||
-webkit-filter: invert(100%) contrast(120%);
|
||||
filter: invert(100%) contrast(120%);
|
||||
}
|
||||
|
||||
select,
|
||||
input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: 500;
|
||||
margin-left: 1rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.hover:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.muted-color {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.white {
|
||||
color: white;
|
||||
}
|
||||
/*# sourceMappingURL=main.css.map */
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,AAAA,KAAK,CAAC;EACJ,cAAc,CAAA,UAAC;EACf,YAAY,CAAA,QAAC;EACb,UAAU,CAAA,MAAC;CACZ;;AAED,AAAA,CAAC,CAAC;EACA,KAAK,EAAE,0BAA0B;C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@
|
|||
const darkBG = "#141414";
|
||||
const darkLink = "#ff1c5c";
|
||||
const darkText = "Dark Mode";
|
||||
const darkColor = "black";
|
||||
|
||||
const lightBG = "white";
|
||||
const lightLink = "#9e1bd6";
|
||||
const lightText = "Light Mode";
|
||||
const lightColor = "white";
|
||||
|
||||
darkMode = false;
|
||||
|
||||
function lightDark(s) {
|
||||
let root = document.documentElement;
|
||||
document.querySelector("img").classList.toggle("invert");
|
||||
document.querySelector("button").classList.toggle("hover");
|
||||
document.querySelector("form select").classList.toggle("hover");
|
||||
document
|
||||
.querySelectorAll("form input")
|
||||
.forEach((e) => e.classList.toggle("hover"));
|
||||
document.querySelector("form input[type='text']").classList.toggle("white");
|
||||
document.querySelector("form span").classList.toggle("muted-color");
|
||||
if (!darkMode) {
|
||||
darkMode = true;
|
||||
s.innerText = lightText;
|
||||
root.style.setProperty("--link-color", darkLink);
|
||||
root.style.setProperty("--bg-color", darkBG);
|
||||
} else {
|
||||
darkMode = false;
|
||||
s.innerText = darkText;
|
||||
root.style.setProperty("--link-color", lightLink);
|
||||
root.style.setProperty("--bg-color", lightBG);
|
||||
}
|
||||
|
||||
console.log(darkMode);
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
const COMANCHE055 = "Comanche055";
|
||||
const LUMINARY099 = "Luminary099";
|
||||
const COMANCHE055_PAGES = 1751;
|
||||
const LUMINARY099_PAGES = 1743;
|
||||
|
||||
function changeDir() {
|
||||
showPage();
|
||||
}
|
||||
|
||||
function showFirst() {
|
||||
changePage(1);
|
||||
}
|
||||
|
||||
function showLast() {
|
||||
const directory = document.form.directory.value;
|
||||
if (directory === COMANCHE055) changePage(COMANCHE055_PAGES);
|
||||
else if (directory === LUMINARY099) changePage(LUMINARY099_PAGES);
|
||||
}
|
||||
|
||||
function showPrevious() {
|
||||
const newpage = parseInt(document.form.pagenum.value) - 1;
|
||||
if (newpage >= 1) {
|
||||
changePage(newpage);
|
||||
}
|
||||
}
|
||||
|
||||
function showNext() {
|
||||
const newpage = parseInt(document.form.pagenum.value) + 1;
|
||||
const directory = document.form.directory.value;
|
||||
if (
|
||||
(directory === COMANCHE055 && newpage <= COMANCHE055_PAGES) ||
|
||||
(directory === LUMINARY099 && newpage <= LUMINARY099_PAGES)
|
||||
) {
|
||||
changePage(newpage);
|
||||
}
|
||||
}
|
||||
|
||||
function changePage(page) {
|
||||
document.form.pagenum.value = parseInt(page);
|
||||
showPage();
|
||||
}
|
||||
|
||||
function showPage() {
|
||||
let page = parseInt(document.form.pagenum.value);
|
||||
const directory = document.form.directory.value;
|
||||
|
||||
if (page < 1) {
|
||||
document.form.pagenum.value = 1;
|
||||
page = 1;
|
||||
} else if (directory === COMANCHE055 && page > COMANCHE055_PAGES) {
|
||||
document.form.pagenum.value = COMANCHE055_PAGES;
|
||||
page = COMANCHE055_PAGES;
|
||||
} else if (directory === LUMINARY099 && page > LUMINARY099_PAGES) {
|
||||
document.form.pagenum.value = LUMINARY099_PAGES;
|
||||
page = LUMINARY099_PAGES;
|
||||
}
|
||||
|
||||
const formattedPage = page.toString().padStart(4, "0");
|
||||
const imageURL = `https://www.ibiblio.org/apollo/ScansForConversion/${directory}/${formattedPage}.jpg`;
|
||||
document.image.src = imageURL;
|
||||
document.body.style.cursor = "progress";
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
:root {
|
||||
--accent-color: #e3e3e39a;
|
||||
--link-color: #9e1bd6;
|
||||
--bg-color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color, #9e1bd6);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 1rem;
|
||||
font-size: 16px;
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
background-color: var(--bg-color, white);
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: -0.5rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
button {
|
||||
font: inherit;
|
||||
appearance: none;
|
||||
padding: 10px;
|
||||
height: min-content;
|
||||
background-color: var(--accent-color, #e3e3e39a);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
form {
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
|
||||
& select {
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
font-size: inherit;
|
||||
appearance: none;
|
||||
padding: 10px;
|
||||
padding-right: 30px;
|
||||
background-color: var(--accent-color, #e3e3e39a);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
line-height: 1;
|
||||
background: url("../assets/bx-chevron-down.svg") no-repeat right
|
||||
var(--accent-color, #e3e3e39a);
|
||||
-webkit-appearance: none;
|
||||
background-position: 97%;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
& input {
|
||||
font-family: "IBM Plex Mono", monospace;
|
||||
padding: 10px;
|
||||
background-color: var(--accent-color, #e3e3e39a);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
&[type="button"] {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
&[type="text"] {
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
min-width: 160px;
|
||||
border: var(--accent-color, #e3e3e39a) solid 2px;
|
||||
background: transparent;
|
||||
cursor: text;
|
||||
&:active,
|
||||
&:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.invert {
|
||||
filter: invert(100%) contrast(120%);
|
||||
}
|
||||
|
||||
select,
|
||||
input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: 500;
|
||||
margin-left: 1rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.hover {
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.muted-color {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.white {
|
||||
color: white;
|
||||
}
|
Loading…
Reference in New Issue