Code cleanup, migrate to bootstrap

This commit is contained in:
oitsjustjose 2020-07-06 10:10:08 -05:00
commit 81e24ec50d
77 changed files with 35538 additions and 5593 deletions

View file

@ -5,51 +5,65 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/JuiceUI/Resources/img/Mala.png" /> <link rel="icon" type="image/png" href="/assets/img/Mala.png" />
<link href="/JuiceUI/Libraries/fontawesome/css/all.min.css" rel="stylesheet"> <link rel="stylesheet" href="/Libraries/fontawesome/css/all.min.css">
<link href="/JuiceUI/Libraries/sass/themekit/main-dark.css" rel="stylesheet" id="themekit-css"> <link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
<script src="/JuiceUI/Libraries/js/themekit/menu.js"></script> <script src="/Libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/JuiceUI/Libraries/js/themekit/modal.js"></script> <script src="/assets/js/home.js"></script>
<script src="/JuiceUI/Libraries/js/app.js"></script>
<style>
.content-container {
display: flex;
flex-direction: column;
align-content: center;
justify-content: center;
margin: auto;
height: 90vh;
max-height: 90vh;
width: 98vw;
max-width: 768px;
}
</style>
<title>oitsjustjo.se - Shorten URLs</title> <title>oitsjustjo.se - Shorten URLs</title>
</head> </head>
<body style="visibility: hidden;" onload="document.body.style.visibility = 'visible'"> <body>
<div class="top translucent titlebar "> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="mobile-menu"> <div class="container-fluid">
<div class="close-mobile-menu" onclick='toggleMenu()'> <a class="navbar-brand" href="#">
<i class="fas fa-times"></i> <img width="24" src="/assets/img/Mala.png">
</div> oitsjustjo.se - URL Shortener
<div class="compact item" onclick="toggleDisplayMode()"> </a>
<span class="display-mode-icon"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
</span> aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle Navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="https://github.com/oitsjustjose/oitsjustjo.se" target="_blank">
<span>Source&nbsp;<i class="fab fa-github"></i></span>
</a>
</li>
</ul>
</div> </div>
</div> </div>
</nav>
<!-- Mobile friendly menu --> <div class="content-container">
<div class="dropdown item compact" onclick='toggleMenu()'> <form>
<span> <div class="mb-3">
<i class="fa fa-bars"></i>&nbsp;Menu <label for="url" class="form-label">Your URL to Shorten</label>
</span> <input type="url" class="form-control" id="url">
</div> </div>
<div class="item" onclick="toggleDisplayMode()">
<span class="display-mode-icon"></span>
</div>
<a href="https://github.com/oitsjustjose/oitsjustjo.se" target="_blank" class="item">
<span>Source&nbsp;<i class="fab fa-github"></i></span>
</a>
</div>
<div class="url-form-container"> <button type="submit" class="btn btn-primary d-block m-auto mb-3">Shorten!</button>
<form action="/add" style="width: 100%">
<label for="url">Paste your URL to Shorten!</label>
<input type="text" name="url" id="url" style="width: 100%; margin-bottom: 2rem;">
<input type="submit" value="Shorten!">
</form> </form>
</div> </div>
</body> </body>
</html> </html>

View file

@ -1 +0,0 @@
**/.DS_Store

View file

@ -1,78 +0,0 @@
let currentDisplayMode = 'dark';
const updateDisplayModeIcons = () => {
document.querySelectorAll('.display-mode-icon').forEach((el) => {
if (currentDisplayMode == 'dark') {
el.innerHTML = `<i class='fas fa-moon'></i>`;
} else if (currentDisplayMode == 'moonlight') {
el.innerHTML = `<i class='fas fa-sun'></i>`;
} else {
el.innerHTML = `<i class='fas fa-adjust'></i>`;
}
});
};
const toggleDisplayMode = () => {
if (currentDisplayMode == 'dark') {
window.localStorage.setItem('displayMode', 'moonlight');
currentDisplayMode = 'moonlight';
document.getElementById('themekit-css').href = '/JuiceUI/Libraries/sass/themekit/main-moonlight.css';
} else if (currentDisplayMode == 'moonlight') {
window.localStorage.setItem('displayMode', 'light');
currentDisplayMode = 'light';
document.getElementById('themekit-css').href = '/JuiceUI/Libraries/sass/themekit/main-light.css';
} else {
window.localStorage.setItem('displayMode', 'dark');
currentDisplayMode = 'dark';
document.getElementById('themekit-css').href = '/JuiceUI/Libraries/sass/themekit/main-dark.css';
}
updateDisplayModeIcons();
};
const initForm = () => {
const form = document.forms[0];
const urlIn = document.getElementById('url');
form.addEventListener('submit', async (evt) => {
evt.preventDefault();
try {
const resp = await fetch(`/add?url=${urlIn.value}`, {
method: 'POST',
})
const json = await resp.json();
urlIn.value =`${location.origin}/${json.shortid}`
} catch (ex) {
alert(`There was an error processing your request: ${ex}`)
console.error(ex);
}
});
}
window.addEventListener('DOMContentLoaded', (evt) => {
if (window.localStorage.getItem('displayMode') == null) {
// Match with system dark mode
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
window.localStorage.setItem('displayMode', 'dark');
}
// Match with system light mode
else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
window.localStorage.setItem('displayMode', 'light');
}
// Literally choose the middle option
else {
window.localStorage.setItem('displayMode', 'moonlight');
}
}
currentDisplayMode = window.localStorage.getItem('displayMode');
if (currentDisplayMode == 'dark') {
document.getElementById('themekit-css').href = '/JuiceUI/Libraries/sass/themekit/main-dark.css';
} else if (currentDisplayMode == 'moonlight') {
document.getElementById('themekit-css').href = '/JuiceUI/Libraries/sass/themekit/main-moonlight.css';
} else {
document.getElementById('themekit-css').href = '/JuiceUI/Libraries/sass/themekit/main-light.css';
}
updateDisplayModeIcons();
initForm();
});

View file

@ -1,63 +0,0 @@
/**
* Uses ZERO Jquery!!
*/
let menuOpen = false;
const toggleSubMenu = (el) => {
let icon = el.querySelector("i.fa");
let isOpen = icon.hasAttribute("submenuOpen") ? parseInt(icon.getAttribute("submenuOpen")) : 0;
document.querySelectorAll(`[for=${el.getAttribute("from")}]`).forEach((elSearched) => {
if (isOpen == 1) {
elSearched.classList.remove("visible");
} else {
elSearched.classList.add("visible");
}
});
if (isOpen == 1) {
icon.style.transition = "transform ease-in-out 250ms";
icon.style.transform = "rotate(0deg)";
icon.setAttribute("submenuOpen", 0);
} else { // Not open..
icon.style.transition = "transform ease-in-out 250ms";
icon.style.transform = "rotate(90deg)";
icon.setAttribute("submenuOpen", 1);
}
};
const toggleMenu = () => {
let menu = document.querySelector(".mobile-menu");
menuOpen = !menuOpen;
if (menuOpen) {
menu.classList.add("visible");
document.body.classList.add("no-scroll");
} else {
menu.classList.remove("visible");
document.body.classList.remove("no-scroll");
}
};
window.addEventListener("DOMContentLoaded", (evt) => {
document.querySelectorAll(".compact.submenu.item").forEach((el) => {
let id = `subMenu_${new Date().getMilliseconds()}`;
el.setAttribute("from", id);
let subMenuItems = [];
el.querySelectorAll(".compact.sub.item").forEach((child) => {
subMenuItems.push(child);
});
subMenuItems.reverse();
subMenuItems.forEach((child) => {
child.setAttribute("for", id);
el.parentElement.insertBefore(child, el.nextSibling);
});
});
});

View file

@ -1,43 +0,0 @@
window.addEventListener("DOMContentLoaded", (evt) => {
window.onclick = (event) => {
if (event.target.classList.contains("modal")) {
let modal = event.target;
modal.classList.remove("visible");
modal.removeAttribute("active");
document.body.classList.remove("modal-no-scroll");
}
};
document.querySelectorAll(".modal .close").forEach((closeBtn) => {
closeBtn.addEventListener('click', (evt) => {
let modal = closeBtn.parentElement.parentElement;
modal.classList.remove("visible");
modal.removeAttribute("active");
document.body.classList.remove("modal-no-scroll");
});
});
document.querySelectorAll("[for-modal]").forEach((modalTrigerEl) => {
modalTrigerEl.addEventListener('click', (evt) => {
let modal = document.getElementById(modalTrigerEl.getAttribute("for-modal"));
modal.classList.add("visible");
modal.setAttribute("active", "");
document.body.classList.add("modal-no-scroll");
});
});
// document.querySelectorAll("[for-modal]").forEach((modalTrigerEl) => {
// let modal = document.getElementById(modalTrigerEl.getAttribute("for-modal"));
// modal.classList.remove("visible");
// modal.removeAttribute("active");
// });
document.body.addEventListener('keydown', (evt) => {
if (evt.key == "Escape") {
let modal = document.querySelector(".modal[active]");
modal.classList.remove("visible");
modal.removeAttribute("active");
document.body.classList.remove("modal-no-scroll");
}
});
});

View file

@ -1,23 +0,0 @@
.display-mode-icon {
font-size: 1.4rem;
text-align: center;
}
.url-form-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: auto;
width: 98vw;
max-width: 768px;
height: 75vh;
.form {
width: 100%;
.input[type='text'] {
width: 100%;
}
}
}

View file

@ -1,49 +0,0 @@
body {
background-color: $background;
color: $foreground;
margin-left: 0px;
margin-right: 0px;
}
// Easing of animations for color shifting with the color scheme
body,
.item,
.titlebar,
.titlebar a span,
.masthead {
transition: all ease-in-out 200ms;
}
.blurred {
filter: blur(5px);
&.unblurable {
transition: filter ease-in-out 250ms;
&:hover {
filter: none;
transition: filter ease-in-out 250ms;
}
}
}
.bounce {
-moz-animation: bounce 2s 10;
-webkit-animation: bounce 2s 10;
animation: bounce 2s 10;
}
@keyframes bounce {
0%,
20%,
50%,
80%,
100% {
transform: translateY(0);
}
40% {
transform: translateY(-30px);
}
60% {
transform: translateY(-15px);
}
}

View file

@ -1,162 +0,0 @@
button,
input[type="button"],
input[type="submit"] {
padding: 0.75rem 1rem;
border: none;
outline: none;
background-color: map-get($components, "button");
color: $foreground;
user-select: none;
cursor: pointer;
width: fit-content;
border-radius: 0.3em;
box-shadow: 0px 0px 10px 0px rgba(darken($background, 10%), 0.5);
transition: all 150ms ease-in-out;
font-size: 14px;
&:hover {
background-color: lighten($background, 10%);
}
&:active {
background-color: lighten($background, 5%);
}
&.small {
font-size: 12px;
padding: 0.5rem 0.75rem;
}
&.outlined {
background-color: transparent;
border: 2px solid map-get($components, "button");
&:hover {
background-color: transparent;
border: 2px solid lighten($background, 10%);
transition: all 150ms ease-in-out;
}
&:active {
background-color: transparent;
border: 2px solid lighten($background, 5%);
}
}
&.inverted {
background-color: invert($background);
color: invert($foreground);
box-shadow: 0px 0px 10px 0px rgba(invert($background), 0.5);
&:hover {
background-color: lighten(invert($background), 10%);
}
&:active {
background-color: lighten(invert($background), 5%);
}
&.outlined {
background-color: transparent;
color: invert($background);
border: 2px solid invert($background);
&:hover {
color: lighten(invert($background), 10%);
border: 2px solid lighten(invert($background), 10%);
}
&:active {
color: lighten($foreground, 5%);
border: 2px solid lighten(invert($background), 5%);
}
}
}
&.red,
input[type="reset"] {
background-color: $red;
&:hover {
background-color: lighten($red, 10%);
}
&:active {
background-color: lighten($red, 5%);
}
&.outlined {
background-color: transparent;
color: $red;
border: 2px solid $red;
&:hover {
color: lighten($red, 10%);
border: 2px solid lighten($red, 10%);
}
&:active {
color: lighten($red, 5%);
border: 2px solid lighten($red, 5%);
}
}
}
&.green {
background-color: $green;
&:hover {
background-color: lighten($green, 10%);
}
&:active {
background-color: lighten($green, 5%);
}
&.outlined {
background-color: transparent;
color: $green;
border: 2px solid $green;
&:hover {
color: lighten($green, 10%);
border: 2px solid;
}
&:active {
color: lighten($green, 5%);
border: 2px solid;
}
}
}
&.cyan {
background-color: $cyan;
color: $background;
&:hover {
background-color: lighten($cyan, 10%);
}
&:active {
background-color: lighten($cyan, 5%);
}
&.outlined {
background-color: transparent;
color: $cyan;
border: 2px solid $cyan;
&:hover {
color: lighten($cyan, 10%);
border: 2px solid lighten($cyan, 10%);
}
&:active {
color: lighten($cyan, 5%);
border: 2px solid lighten($cyan, 5%);
}
}
}
}

View file

@ -1,22 +0,0 @@
/******************************************************
* FIXED COLORS (Change these to propagate chages) *
******************************************************/
$background: #252525;
$foreground: #eeeeee;
$components: (
"item": #3a3a3a,
"button": #3a3a3a
);
$red: #ff4340;
$cyan: #00bee0;
$green: #7cb342;
$mastColor: #7cb342;
/******************************************************
* DYNAMIC COLORS (Probably Don't Touch!) *
******************************************************/
$cardColor: lighten($background, 2%);
$item: lighten($background, 10%);

View file

@ -1,21 +0,0 @@
/******************************************************
* FIXED COLORS (Change these to propagate chages) *
******************************************************/
$background: #eeeeee;
$foreground: #252525;
$components: (
"item": #d0d0d0,
"button": #d0d0d0
);
$red: #ff4340;
$cyan: #00bee0;
$green: #7cb342;
$mastColor: #7cb342;
/******************************************************
* DYNAMIC COLORS (Probably Don't Touch!) *
******************************************************/
$cardColor: lighten($background, 2%);
$item: lighten($background, 10%);

View file

@ -1,22 +0,0 @@
/******************************************************
* FIXED COLORS (Change these to propagate chages) *
******************************************************/
$background: #222436;
$foreground: #ccdbf1;
$components: (
"item": #525572,
"button": #525572
);
$red: #ff4340;
$cyan: #00bee0;
$green: #7cb342;
$mastColor: #7cb342;
/******************************************************
* DYNAMIC COLORS (Probably Don't Touch!) *
******************************************************/
$cardColor: lighten($background, 2%);
$item: lighten($background, 10%);

View file

@ -1,23 +0,0 @@
.container {
padding: 2rem 5vw;
&.centered {
display: block;
margin: auto;
text-align: center;
padding: 0;
}
}
.divider {
width: 70vw;
height: 10px;
border-bottom: 1px solid map-get($components, "item");
margin: 1rem auto;
&.wide {
width: 100%;
}
&.narrow {
width: 30vw;
}
}

View file

@ -1,14 +0,0 @@
.embed {
position: relative;
overflow: hidden;
padding-top: 56.25%;
& iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
}

View file

@ -1,330 +0,0 @@
textarea {
background-color: lighten($background, 25%);
color: $foreground;
font-family: "Spartan";
border-radius: 0.3em;
box-shadow: 0px 0px 10px 0px rgba(darken($background, 10%), 0.5);
transition: all 150ms ease-in-out;
font-size: 14px;
padding: 0.75rem 1rem;
border: none;
outline: none;
resize: none;
width: -webkit-fill-available;
height: auto;
margin: 16px;
&:focus {
box-shadow: 0px 0px 10px 0px $cyan;
}
}
form {
max-width: 100vw;
.flex-form {
display: grid;
align-items: center;
grid-template-columns: repeat(auto-fit, minmax(256px, 1fr));
grid-gap: 1rem 3rem;
grid-auto-flow: dense;
margin: auto;
padding: 1rem;
&.labelled {
@media (max-width: 767px) {
grid-template-columns: repeat(auto-fit, minmax(256px, 1fr));
}
grid-template-columns: 1fr 5fr;
}
}
.input-with-icon {
i {
position: absolute;
margin-top: 10px;
margin-left: 10px;
}
& input {
padding-left: 32px !important;
}
}
input {
background-color: lighten($background, 25%);
color: $foreground;
display: block;
width: 100%;
width: 16em;
&.small {
}
&[type="password"],
&[type="text"],
&[type="date"],
&[type="email"],
&[type="file"],
&[type="month"],
&[type="number"],
&[type="tel"],
&[type="search"],
&[type="url"],
&[type="week"] {
font-family: "Spartan";
border-radius: 0.3em;
box-shadow: 0px 0px 10px 0px rgba(darken($background, 10%), 0.5);
transition: all 150ms ease-in-out;
font-size: 14px;
padding: 0.75rem 1rem;
border: none;
outline: none;
&:focus {
box-shadow: 0px 0px 10px 0px $cyan;
}
}
&[type="color"] {
border-radius: 0.3em;
}
&[type="search"] {
width: 100%;
}
&::placeholder {
color: rgba($foreground, 0.5);
}
&[type="checkbox"],
&[type="color"],
&[type="radio"] {
margin: auto;
&:focus {
outline: none;
box-shadow: 0px 0px 10px 0px $cyan;
}
}
&[type="checkbox"],
&[type="radio"] {
--active-inner: #fff;
--background: #fff;
--disabled: #f6f8ff;
--disabled-inner: #e1e6f9;
-webkit-appearance: none;
-moz-appearance: none;
height: 21px;
outline: none;
display: inline-block;
vertical-align: top;
position: relative;
cursor: pointer;
background: var(--b, lighten($background, 25%));
transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
&:after {
content: "";
display: block;
left: 1px;
top: 1px;
position: absolute;
transition: transform var(--d-t, 0.3s) var(--d-t-e, ease), opacity var(--d-o, 0.2s);
}
&:checked {
background: var(--b, $cyan);
--d-o: 0.3s;
--d-t: 0.6s;
--d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
}
&:disabled {
--b: var(--disabled);
cursor: not-allowed;
opacity: 0.9;
&:checked {
--b: var(--disabled-inner);
--bc: var(--border);
}
& + label {
cursor: not-allowed;
}
}
&:hover {
&:not(:checked) {
&:not(:disabled) {
--bc: $cyan;
}
}
}
&:focus {
box-shadow: 0 0 10px 0 rgba($cyan, 0.9);
}
&:not(.switch) {
width: 21px;
&:after {
opacity: var(--o, 0);
}
&:checked {
--o: 1;
}
}
& + label {
font-size: 14px;
line-height: 21px;
display: inline-block;
vertical-align: top;
cursor: pointer;
margin-left: 4px;
}
}
&[type="checkbox"] {
&:not(.switch) {
border-radius: 7px;
&:after {
width: 5px;
height: 9px;
border: 2px solid lighten($background, 25%);
border-top: 0;
border-left: 0;
left: 7px;
top: 4px;
transform: rotate(var(--r, 20deg));
}
&:checked {
--r: 43deg;
}
}
&.switch {
width: 38px;
border-radius: 11px;
&:after {
left: 3px;
top: 3px;
border-radius: 50%;
width: 15px;
height: 15px;
background: var(--ab, $cyan);
transform: translateX(var(--x, 0));
}
&:checked {
--ab: var(--active-inner);
--x: 17px;
&:after {
background: lighten($background, 25%);
}
}
&:disabled {
&:not(:checked) {
&:after {
opacity: 0.6;
}
}
}
}
}
&[type="radio"] {
border-radius: 50%;
&:after {
width: 19px;
height: 19px;
border-radius: 50%;
background: lighten($background, 25%);
opacity: 0;
transform: scale(var(--s, 0.7));
}
}
&[type="range"] {
height: 26px;
-webkit-appearance: none;
margin: 10px 0;
width: 100%;
background-color: transparent;
&:focus {
outline: none;
}
&::-webkit-slider-runnable-track {
width: 100%;
height: 14px;
cursor: pointer;
animation: 0.2s;
box-shadow: 0px 0px 10px 0px rgba(darken($background, 10%), 0.5);
background: lighten($background, 10%);
border-radius: 14px;
}
&::-webkit-slider-thumb {
box-shadow: 0px 0px 10px 0px rgba(darken($background, 10%), 0.5);
height: 20px;
width: 40px;
border-radius: 12px;
background: $cyan;
cursor: pointer;
-webkit-appearance: none;
margin-top: -3px;
}
}
}
input[type="reset"] {
padding: 0.75rem 1rem;
border: none;
outline: none;
color: $foreground;
user-select: none;
cursor: pointer;
width: fit-content;
border-radius: 0.3em;
box-shadow: 0px 0px 10px 0px rgba(darken($background, 10%), 0.5);
transition: all 150ms ease-in-out;
font-size: 14px;
background-color: $red;
&:hover {
background-color: lighten($red, 10%);
}
&:active {
background-color: lighten($red, 5%);
}
&.small {
font-size: 12px;
padding: 0.5rem 0.75rem;
}
&.outlined {
background-color: transparent;
border: 2px solid map-get($components, "button");
&:hover {
background-color: transparent;
border: 2px solid lighten($background, 10%);
transition: all 150ms ease-in-out;
}
&:active {
background-color: transparent;
border: 2px solid lighten($background, 5%);
}
}
}
input[type="button"],
input[type="reset"],
input[type="submit"] {
display: block;
width: fit-content;
margin: auto;
font-family: "Spartan";
margin-bottom: 1rem;
}
}

View file

@ -1,48 +0,0 @@
.grid {
display: grid;
align-items: center;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
grid-gap: 2rem;
grid-auto-flow: dense;
}
.cards {
display: grid;
flex-direction: row;
justify-content: center;
grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
grid-auto-rows: 1fr;
grid-gap: 2rem;
grid-auto-flow: dense;
@media (max-width: 767px) {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
background-color: $cardColor;
color: $foreground;
box-shadow: 0 0 10px 0 rgba(darken($cardColor, 10%), 0.95);
padding: 1rem;
border-radius: 8px;
border: 2px solid lighten($cardColor, 10%);
cursor: pointer;
transition: all ease-in-out 150ms;
&:hover {
transform: translateY(-10px);
}
.header {
text-align: center;
margin-block-start: 0;
padding-bottom: 1rem;
border-bottom: 1px solid lighten($cardColor, 10%);
}
.content {
overflow: hidden;
}
}
}

View file

@ -1,23 +0,0 @@
img.centered {
display: block;
}
img {
max-width: 100%;
height: auto;
&.rounded {
border-radius: 8px;
}
&.thumbnail {
width: 24px;
}
&.small {
width: 128px;
}
&.medium {
width: 256px;
}
&.large {
width: 512px;
}
}

View file

@ -1,77 +0,0 @@
.masthead {
height: 100vh;
width: 100%;
background-color: $mastColor;
color: $background;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&.rainbow {
-webkit-animation: Rainbow 30s ease infinite;
-moz-animation: Rainbow 30s ease infinite;
animation: Rainbow 30s ease infinite;
@-webkit-keyframes Rainbow {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
@-moz-keyframes Rainbow {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
@keyframes Rainbow {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
}
&.gradient {
background: url("/Resources/img/cover.png"), $mastColor;
background: url("/Resources/img/cover.png"), -webkit-linear-gradient(to bottom left, $cyan, $green);
background: url("/Resources/img/cover.png"), linear-gradient(to bottom left, $cyan, $green);
}
p.content {
font-size: 64px;
font-weight: 900;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
.subheader {
font-size: 32px;
text-align: center;
}
.subsubheader {
font-size: 20px;
text-align: center;
}
}
.down {
position: absolute;
bottom: 0;
i {
font-size: 64px;
}
}
}

View file

@ -1,183 +0,0 @@
.titlebar.top {
background-color: $background;
color: $foreground;
position: fixed;
z-index: 1;
top: 0;
left: 0;
width: 100vw;
height: 3rem;
display: flex;
flex-direction: row;
align-items: center;
box-shadow: 0px 2px 0px 0px rgba(darken($background, 10%), 0.5);
@at-root .masthead {
height: calc(100vh - 3rem);
}
@at-root body {
margin-top: 3rem;
}
a {
color: $foreground;
text-decoration: none;
}
&.translucent {
background-color: rgba($background, 0.95);
}
.item {
display: inline-flex;
flex-direction: column;
justify-content: center;
background-color: map-get($components, "item");
padding: 0px 1rem;
height: 100%;
cursor: pointer;
span {
display: inline-flex;
}
&:hover {
background-color: darken($background, 5%);
transition: all ease-in 150ms;
}
}
}
// Desktop Titlebar Logic
@media (min-width: 767px) {
.dropdown.item.compact > *,
.dropdown.item.compact {
display: none;
}
}
// Mobile Titlebar Logic
@media (max-width: 767px) {
.titlebar.top .item:not(.compact) {
display: none;
}
}
.mobile-menu {
visibility: hidden;
opacity: 0;
position: fixed;
z-index: 1024;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba($background, 0.95);
color: $foreground;
transition-duration: 200ms, 200ms;
transition-property: visibility, opacity;
&.visible {
visibility: visible;
opacity: 1;
transition-duration: 200ms, 0;
transition-property: opacity, visibility;
transition-delay: 0, 200ms;
}
.close-mobile-menu {
display: flex;
flex-direction: row-reverse;
justify-items: flex-end;
width: 100vw;
max-width: 100vw;
font-size: 4rem;
background-color: rgba(darken($red, 10%), 0.5);
cursor: pointer;
&:hover {
color: #ffffff;
}
}
.item {
width: 100vw;
height: 10px;
max-height: 4rem;
}
.sub.item {
display: none;
padding-left: 3rem;
background-color: lighten($background, 15%);
&.visible {
display: inline-flex;
}
}
}
.no-scroll {
overflow: hidden;
}
.dropdown.item {
position: relative;
display: inline-block;
&:hover .dropdown-content {
max-height: 100vh;
display: block;
}
& .dropdown-content {
max-height: 0px;
overflow-y: hidden;
top: 100%;
left: 0;
-webkit-transition: max-height 0.5s ease-in-out;
-moz-transition: max-height 0.5s ease-in-out;
-o-transition: max-height 0.5s ease-in-out;
transition: max-height 0.5s ease-in-out;
position: absolute;
background-color: map-get($components, "item");
& .item {
color: $foreground;
padding: 12px 16px;
text-decoration: none;
display: block;
&:hover {
background-color: darken($background, 5%);
transition: all ease-in 150ms;
}
}
& .dropdown.item {
display: inline-block;
overflow: visible;
&:hover .dropdown-content {
position: unset;
max-height: 100vh;
}
& .dropdown-content {
max-height: 0px;
& .item {
display: inline-flex;
}
}
}
}
& & .dropdown-content {
top: 0;
left: 100%;
}
}

View file

@ -1,89 +0,0 @@
.modal {
visibility: hidden;
opacity: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: fixed;
z-index: 2048;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
overflow: auto;
background-color: $background;
background-color: rgba(0, 0, 0, 0.75);
transition-duration: 400ms, 400ms;
transition-property: visibility, opacity;
&.visible {
visibility: visible;
opacity: 1;
transition-duration: 400ms, 0;
transition-property: opacity, visibility;
transition-delay: 0, 400ms;
}
}
/* Modal Content */
.modal-content {
background-color: $background;
padding: 20px;
border: 1px solid lighten($background, 10%);
width: 80%;
max-width: 80%;
max-height: 80%;
border-radius: 8px;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.5);
overflow: auto;
max-width: 1024;
img {
display: block;
margin: auto;
width: 80%;
height: auto;
}
.container {
width: 80%;
height: 80%;
display: block;
margin: auto;
}
.header {
text-align: center;
margin-block-start: 0;
padding-bottom: 1rem;
border-bottom: 1px solid lighten($background, 10%);
}
.content {
overflow: auto;
}
/* The Close Button */
.close {
color: $foreground;
float: right;
font-size: 28px;
font-weight: bold;
&:hover,
&:focus {
color: invert($foreground, 20%);
text-decoration: none;
cursor: pointer;
}
}
}
.modal-no-scroll {
overflow: hidden;
}

View file

@ -1,73 +0,0 @@
@import url("https://fonts.googleapis.com/css?family=Fira+Code&display=swap");
@import url("https://fonts.googleapis.com/css?family=Spartan&display=swap");
a,
p,
h1,
h2,
h3,
h4,
b,
i,
body,
button {
font-family: "Spartan";
}
p {
line-height: 2;
}
a {
color: $red;
&:hover {
color: darken($red, 10%);
}
}
.code {
font-family: "Fira Code";
font-variant-ligatures: common-ligatures;
background-color: lighten($background, 10%);
border: 2px solid darken($background, 5%);
padding: 0.1rem;
border-radius: 4px;
}
p.code,
pre {
display: inline-block;
overflow: auto;
}
pre {
font-family: "Fira Code";
font-variant-ligatures: common-ligatures;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word;
}
.centered {
text-align: center;
margin: auto;
}
.in-center {
display: flex;
justify-content: center;
flex-direction: row;
}
ul {
padding-inline-start: 0;
padding-inline-end: 40px;
}
li {
margin-top: 0.75rem;
margin-bottom: 0.75rem;
line-height: 1.75;
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,15 +0,0 @@
@import "colors-dark";
@import "_custom";
@import "base";
@import "modal";
@import "button";
@import "container";
@import "embed";
@import "form";
@import "grid";
@import "image";
@import "masthead";
@import "menu";
@import "text";

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,15 +0,0 @@
@import "colors-light";
@import "_custom";
@import "base";
@import "modal";
@import "button";
@import "container";
@import "embed";
@import "form";
@import "grid";
@import "image";
@import "masthead";
@import "menu";
@import "text";

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,15 +0,0 @@
@import "colors-moonlight";
@import "_custom";
@import "base";
@import "modal";
@import "button";
@import "container";
@import "embed";
@import "form";
@import "grid";
@import "image";
@import "masthead";
@import "menu";
@import "text";

View file

@ -1,7 +0,0 @@
{
"typeAcquisition": {
"include": [
"jquery"
]
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,426 @@
/*!
* Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
background-color: #fff;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #024dbc;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
-ms-overflow-style: scrollbar;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
white-space: normal;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
/*!
* Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#024dbc}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em;-ms-overflow-style:scrollbar}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit;white-space:normal}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

Before

Width:  |  Height:  |  Size: 699 KiB

After

Width:  |  Height:  |  Size: 699 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 876 KiB

After

Width:  |  Height:  |  Size: 876 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 633 B

Before After
Before After

View file

@ -0,0 +1,21 @@
window.addEventListener('load', () => {
const form = document.forms[0];
const urlIn = form.querySelector('input');
form.addEventListener('submit', async (evt) => {
evt.preventDefault();
try {
const resp = await fetch(`/add?url=${urlIn.value}`, {
method: 'POST',
body: JSON.stringify({
url: url
})
});
const json = await resp.json();
urlIn.value = `${location.origin}/${json.shortid}`;
} catch (ex) {
alert(`There was an error processing your request: ${ex}`);
console.error(ex);
}
});
})