mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Move a tonne of reused functions to helpers.js
This commit is contained in:
@@ -0,0 +1,370 @@
|
||||
* {
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
--accent-color: #2196f3;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
background-color: #181818;
|
||||
margin: 0px 0px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
/* Prevent overall page scroll */
|
||||
}
|
||||
|
||||
#header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
padding: 0px 20px;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 1);
|
||||
/* Add the shadow */
|
||||
z-index: 1;
|
||||
/* Ensure the shadow isn't hidden by content */
|
||||
}
|
||||
|
||||
#contentArea {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-grow: 1;
|
||||
overflow: hidden;
|
||||
/* Prevent overall page scroll */
|
||||
}
|
||||
|
||||
#header>button {
|
||||
width: auto;
|
||||
/* Allow buttons to size based on content */
|
||||
flex-shrink: 0;
|
||||
/* Prevent buttons from shrinking */
|
||||
}
|
||||
|
||||
#membershipsButton {
|
||||
background: var(--accent-color);
|
||||
}
|
||||
|
||||
#settingsPanel {
|
||||
width: 600px;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
padding: 0px 20px;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
#settingsPanel::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
/* Width of the entire scrollbar */
|
||||
}
|
||||
|
||||
#settingsPanel::-webkit-scrollbar-track {
|
||||
background: #2c2c2c;
|
||||
/* Color of the tracking area */
|
||||
}
|
||||
|
||||
#settingsPanel::-webkit-scrollbar-thumb {
|
||||
background-color: #9f9f9f;
|
||||
/* Color of the scroll thumb */
|
||||
border-radius: 4px;
|
||||
/* Roundness of the scroll thumb */
|
||||
border: none;
|
||||
}
|
||||
|
||||
#settingsPanel::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #d1d1d1;
|
||||
/* Color of the scroll thumb on hover */
|
||||
}
|
||||
|
||||
#widget-preview-wrapper {
|
||||
flex-grow: 1;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#widgetPreview {
|
||||
border: transparent;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#unmute-label {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
pointer-events: none;
|
||||
font-size: 3em;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255);
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
padding: 0.25em 0.5em;
|
||||
border-radius: 0.25em;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#widgetUrlInputWrapper {
|
||||
position: relative;
|
||||
/* Make the wrapper a positioning context */
|
||||
display: inline-block;
|
||||
/* Or block, depending on your layout */
|
||||
width: 100%;
|
||||
/* Match the input width */
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
#widgetUrlInputWrapper:hover #urlLabel {
|
||||
opacity: 0;
|
||||
/* Fade out the label on hover of the wrapper */
|
||||
}
|
||||
|
||||
#widgetUrlInput {
|
||||
font-size: 1em;
|
||||
width: 100%;
|
||||
padding: 10px 10px;
|
||||
filter: blur(4px) brightness(0.4);
|
||||
/* Apply a blur effect */
|
||||
transition: filter 0.1s ease-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#urlLabel {
|
||||
border-radius: 0.5em;
|
||||
padding: 5px 20px;
|
||||
z-index: 1;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#urlLabel,
|
||||
#copiedToClipboard {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: white;
|
||||
pointer-events: none;
|
||||
opacity: 1;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
#widgetUrlInput:hover {
|
||||
filter: none;
|
||||
/* Remove blur when the input is focused */
|
||||
outline: none;
|
||||
/* Remove default focus outline */
|
||||
}
|
||||
|
||||
.setting-group {
|
||||
margin-bottom: 20px;
|
||||
/* border: 1px solid #ddd; */
|
||||
padding-bottom: 15px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.setting-group:last-child {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 0.9em;
|
||||
font-weight: 500;
|
||||
color: #93cdfd;
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
/* border-bottom: 1px solid #eee; */
|
||||
}
|
||||
|
||||
.setting-item:last-child {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.setting-item label {
|
||||
font-weight: 500;
|
||||
margin-bottom: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.setting-item p,
|
||||
.setting-item a {
|
||||
font-size: 0.9em;
|
||||
font-weight: 300;
|
||||
/* color: #666; */
|
||||
opacity: 0.6;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
.setting-item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
select,
|
||||
input[type="number"] {
|
||||
width: 250px;
|
||||
padding: 5px;
|
||||
|
||||
margin: 10px 0px;
|
||||
padding: 10px 10px;
|
||||
background-color: #ffffff05;
|
||||
border-width: 0px;
|
||||
color: white;
|
||||
border-radius: 0.5em;
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.setting-item-content option {
|
||||
color: black;
|
||||
}
|
||||
|
||||
textarea:focus,
|
||||
input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.setting-item-content input[type="color"] {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-left: 10px;
|
||||
/* padding: 2px; */
|
||||
/* border: 1px solid #ccc; */
|
||||
/* border-radius: 4px; */
|
||||
|
||||
appearance: none;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Switch styling */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
input:checked+.slider {
|
||||
background-color: var(--accent-color);
|
||||
}
|
||||
|
||||
input:focus+.slider {
|
||||
box-shadow: 0 0 1px var(--accent-color);
|
||||
}
|
||||
|
||||
input:checked+.slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
button {
|
||||
font-weight: 500;
|
||||
background-color: #2e2e2e;
|
||||
color: white;
|
||||
opacity: 0.8;
|
||||
margin: 5px 0px;
|
||||
border-width: 0;
|
||||
border-radius: 0.5em;
|
||||
padding: 10px 20px;
|
||||
width: 100%;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
opacity: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#loadSettingsWrapper,
|
||||
#loadDefaultsWrapper {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #181818af;
|
||||
backdrop-filter: blur(20px) grayscale(50%) brightness(200%);
|
||||
/* Adjust blur radius as needed */
|
||||
z-index: 9999;
|
||||
/* Ensure it's on top */
|
||||
/* Add any other styles for the overlay content */
|
||||
transition: all 0.2s ease-in-out;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#loadSettingsContainer,
|
||||
#loadDefaultsContainer {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
max-width: 1000px;
|
||||
width: calc(100% - 75px);
|
||||
border-radius: 1em;
|
||||
border: 1px rgba(255, 255, 255, 0.24) solid;
|
||||
padding: 1em;
|
||||
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
|
||||
background: #181818af;
|
||||
/* background: rgba(255, 0, 0, 0.637); */
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
Reference in New Issue
Block a user