aboutsummaryrefslogtreecommitdiff
path: root/src/app/css
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-06-29 23:29:02 +0200
committerGitHub <noreply@github.com>2022-06-29 23:29:02 +0200
commitcbca61d836ee573a469f6339c22c2891cef9428c (patch)
tree6175a5f57a32a2f3bc90b4d4247444f3dd94ed5f /src/app/css
parent99209092b6ad1079202208833e542201f1197e2d (diff)
parent0c7f6f438ca530a192577907d3af9a7d95949ef3 (diff)
downloadViper-cbca61d836ee573a469f6339c22c2891cef9428c.tar.gz
Viper-cbca61d836ee573a469f6339c22c2891cef9428c.zip
Merge branch 'main' into add-badges
Diffstat (limited to 'src/app/css')
-rw-r--r--src/app/css/dragui.css58
-rw-r--r--src/app/css/launcher.css328
-rw-r--r--src/app/css/popups.css371
-rw-r--r--src/app/css/theming.css62
-rw-r--r--src/app/css/toasts.css52
-rw-r--r--src/app/css/webview.css16
6 files changed, 887 insertions, 0 deletions
diff --git a/src/app/css/dragui.css b/src/app/css/dragui.css
new file mode 100644
index 0000000..fb5b1a7
--- /dev/null
+++ b/src/app/css/dragui.css
@@ -0,0 +1,58 @@
+@import "theming.css";
+
+/*
+ This stylesheet is meant for the DragUI, i.e the UI that pops up when dragging
+ a modfile over the window.
+*/
+
+#dragUI {
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ color: white;
+ opacity: 0.0;
+ position: fixed;
+ z-index: 1000000;
+ pointer-events: none;
+ background: var(--bg);
+ backdrop-filter: blur(15px);
+ transition: 0.1s ease-in-out;
+}
+
+#dragUI.shown {
+ opacity: 1.0;
+ pointer-events: all;
+}
+
+#dragUI #dragitems {
+ --size: 25vw;
+ top: 50%;
+ left: 50%;
+ opacity: 0.6;
+ position: absolute;
+ text-align: center;
+ width: var(--size);
+ height: var(--size);
+ margin-top: calc(var(--size) / 2 * -1);
+ margin-left: calc(var(--size) / 2 * -1);
+}
+
+#dragUI #dragitems #icon {
+ width: 100%;
+ height: 100%;
+ filter: invert(1);
+ transform: scale(0.45);
+ background-size: cover;
+ background-image: url("../icons/download.png");
+ transition: 0.1s ease-in-out;
+}
+
+#dragUI.shown #dragitems #icon {
+ transform: scale(0.5);
+}
+
+#dragUI #dragitems #text {
+ top: -5vw;
+ position: relative;
+}
diff --git a/src/app/css/launcher.css b/src/app/css/launcher.css
new file mode 100644
index 0000000..ce54ddf
--- /dev/null
+++ b/src/app/css/launcher.css
@@ -0,0 +1,328 @@
+@import "theming.css";
+
+/*
+ This stylesheet is meant for various elements around the launcher,
+ notably the navbar, launch buttons, and sidebar.
+*/
+
+.gamesContainer {
+ width: 10%;
+ height: 100%;
+ min-width: 95px;
+ max-width: 120px;
+
+ float: left;
+ display: flex;
+ flex-wrap: wrap;
+ align-content: center;
+}
+
+.mainContainer {
+ height: 100%;
+ flex-grow: 1;
+ display: flex;
+ position: relative;
+}
+
+/* nav bar buttons */
+.gamesContainer button {
+ background-size: 90%;
+ background-position: center;
+ background-repeat: no-repeat;
+
+ border: none;
+ transition: 0.3s ease-in-out;
+ background-color: transparent;
+
+
+ margin: 20px;
+ position: relative;
+ box-sizing: border-box;
+ flex-basis: calc(100% - 10px);
+}
+
+.gamesContainer button.inactive {
+ opacity: 0.5;
+ transform: scale(0.9);
+}
+
+.gamesContainer button::before {
+ content: "";
+ display: block;
+ padding-top: 100%;
+}
+
+.gamesContainer button .content {
+ width: 100%;
+ height: 100%;
+ top: 0; left: 0;
+ position: absolute;
+}
+
+#vpBtn {background-image: url("../icons/viper.png")}
+#nsBtn {background-image: url("../icons/northstar.png")}
+#tfBtn {
+ background-image: url("../icons/titanfall2.png");
+ background-size: 69%; /* nice */
+}
+
+.contentContainer {
+ width: 85%;
+ color: white;
+ flex-grow: 1;
+ opacity: 1.0;
+ margin-left: 5%;
+ position: absolute;
+ transition: 0.15s ease-in-out;
+}
+
+.contentContainer.hidden {
+ opacity: 0.0;
+ pointer-events: none;
+}
+
+.contentMenu {
+ padding: 0;
+ flex-grow: 1;
+ display: flex;
+ font-size: 20px;
+ list-style: none;
+ margin-bottom: 0;
+ align-items: center;
+ justify-content: center;
+ margin-top: var(--padding);
+}
+
+/* some sections do not need space between them and menu */
+#nsMain, #nsRelease, #vpReleaseNotes, .playBtnContainer {
+ margin-top: 0 !important;
+}
+
+.contentMenu li {
+ opacity: 0.6;
+ margin: 0 26px;
+ cursor: pointer;
+ font-weight: 700;
+ text-align: center;
+ height: fit-content;
+ transition: opacity 0.3s ease-in-out;
+}
+
+.contentMenu li:last-child {margin-right: 0px}
+.contentMenu li:first-child {margin-left: 0px}
+
+.contentMenu li:hover {opacity: 0.7}
+
+.contentMenu li[active] {
+ opacity: 1.0;
+ pointer-events: none;
+}
+
+.contentMenu li::after {
+ top: 10px;
+ width: 30px;
+ height: 5px;
+ opacity: 0.0;
+ content: " ";
+ display: block;
+ text-align: center;
+ position: relative;
+ border-radius: 50px;
+ left: calc(50% - 15px);
+ background: rgb(var(--red));
+ transition: 0.2s ease-in-out;
+}
+
+.contentMenu li[active]::after {
+ top: 5px;
+ opacity: 1.0;
+}
+
+.section {
+ opacity: 1.0;
+ position: fixed;
+ right: calc(var(--padding) * 2);
+ left: calc(100px + var(--padding));
+ transition: opacity 0.15s ease-in-out;
+}
+
+.section.hidden {
+ opacity: 0.0;
+ pointer-events: none;
+}
+
+.contentBody img {max-width: 100%}
+.contentBody .img {text-align: center}
+
+.contentBody .section > :first-child:not(.img) {
+ margin-top: 35px;
+}
+
+.contentContainer .playBtnContainer {
+ text-align: center;
+}
+
+.contentContainer .playBtn {
+ width: 27%;
+ height: 11%;
+ border: none;
+ color: white;
+ padding: 20px;
+ font-size: 24px;
+ font-weight: bold;
+ margin-top: 100px;
+ margin-bottom: 10px;
+ border-radius: 10px;
+ background: var(--redbg);
+ transition: 0.2s ease-in-out;
+ filter: drop-shadow(0px 8px 5px rgba(0, 0, 0, 0.1));
+}
+
+.contentContainer .playBtn:hover {
+ transform: scale(1.05);
+ filter: drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.3)) brightness(110%);
+}
+
+.contentContainer .playBtn:active {
+ opacity: 0.7;transform: scale(0.98);
+ filter: drop-shadow(0px 5px 10px rgba(0, 0, 0, 0.4));
+}
+
+.contentContainer #nsMain .playBtn {
+ background: var(--bluebg);
+}
+
+#nsContent .contentMenu {
+ margin-bottom: 0;
+}
+
+.contentBody .img img {
+ transform: scale(0.85);
+}
+
+.contentBody .img {
+ width: 100%;
+ text-align: center;
+}
+
+#nsRelease, #vpReleaseNotes {
+ height: 80vh;
+ overflow-y: scroll;
+ flex-direction: column;
+ margin-top: 10px !important;
+}
+
+.inline * {
+ display: inline-block;
+}
+
+#vpMain {
+ margin-top: 140px;
+ text-align: center;
+}
+
+#vpMain img {
+ width: 20%;
+}
+
+#vpVersion {
+ font-size: 16px;
+}
+
+.simplebar-scrollbar:before {
+ background: rgb(var(--red)) !important;
+}
+
+#installmod {background: rgb(var(--blue))}
+#findmod {background: rgb(var(--blue2))}
+
+#togglemod {background: rgb(var(--orange))}
+#toggleall {background: rgb(var(--orange2))}
+
+#removemod {background: rgb(var(--red))}
+#removeall {background: rgb(var(--red2))}
+button:disabled {
+ opacity: 0.5;
+ pointer-events: none;
+}
+
+button.visual {
+ opacity: 1.0;
+ padding-right: 0px;
+ pointer-events: none;
+ background: transparent !important;
+}
+
+code {
+ font-size: 16px;
+ padding: 2px 5px;
+ border-radius: 3px;
+ background-color: #00000070;
+}
+
+#nsMods .line {
+ display: flex;
+ align-items: center;
+ margin-top: calc(var(--padding) / 2);
+}
+
+#modsdiv {
+ height: 50vh;
+ overflow-y: scroll;
+ border-radius: 5px;
+ background: var(--bg);
+ backdrop-filter: blur(15px);
+ padding: calc(var(--padding) / 4);
+}
+
+#modsdiv .mod {
+ display: flex;
+ border-radius: 5px;
+ transition: 0.1s ease-in-out;
+ margin: calc(var(--padding) / 3);
+ padding: calc(var(--padding) / 3);
+}
+
+#modsdiv .mod.selected {
+ background: var(--selbg);
+}
+
+#modsdiv .mod .disabled, .modbtns {
+ margin-left: auto;
+}
+
+.modbtns button {
+ margin-left: var(--spacing);
+ --spacing: calc(var(--padding) / 3);
+ margin-top: calc(var(--spacing) / 2);
+ margin-bottom: calc(var(--spacing) / 2);
+}
+
+#serverstatus {
+ --spacing: calc(var(--padding) / 5);
+
+ transition-duration: 0.2s;
+ transition-timing-function: ease-in-out;
+ transition-property: background, opacity;
+
+ opacity: 0.0;
+ display: block;
+ margin: 0 auto;
+ font-weight: 700;
+ width: fit-content;
+ color: transparent;
+ border-radius: 50px;
+ flex-basis: max-content;
+ background: transparent;
+ margin-top: calc(var(--spacing) * 2);
+ padding: var(--spacing) calc(var(--spacing) * 3);
+}
+
+#serverstatus.up,
+#serverstatus.down {
+ color: white;
+ opacity: 1.0;
+}
+
+#serverstatus.up {background: rgb(var(--blue));}
+#serverstatus.down {background: rgb(var(--red));}
diff --git a/src/app/css/popups.css b/src/app/css/popups.css
new file mode 100644
index 0000000..826955b
--- /dev/null
+++ b/src/app/css/popups.css
@@ -0,0 +1,371 @@
+@import "theming.css";
+
+/*
+ This stylesheet is meant for the various popups we use, whether it be the
+ previewer, the browser, the settings menu, or anything alike.
+*/
+
+.popup {
+ --spacing: var(--padding);
+
+ z-index: 2;
+ opacity: 0.0;
+ position: fixed;
+ overflow-y: scroll;
+ top: var(--spacing);
+ pointer-events: none;
+ left: var(--spacing);
+ background: var(--bg);
+ right: var(--spacing);
+ bottom: var(--spacing);
+ transform: scale(0.98);
+ backdrop-filter: blur(15px);
+ border-radius: calc(var(--padding) / 3);
+
+ transition-duration: 0.15s;
+ transition-property: opacity, transform;
+ transition-timing-function: ease-in-out;
+}
+
+.popup.shown {
+ opacity: 1.0;
+ pointer-events: all;
+ transform: scale(1.0);
+}
+
+.popup.small {
+ left: 20vw;
+ right: 20vw;
+ top: calc(var(--padding) * 2);
+ bottom: calc(var(--padding) * 2);
+}
+
+#overlay {
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 1;
+ opacity: 0.0;
+ position: fixed;
+ background: var(--bg);
+ pointer-events: none;
+ transition: opacity 0.15s ease-in-out;
+}
+
+#overlay.shown {
+ opacity: 0.8;
+ pointer-events: all;
+}
+
+/* browser/preview popup { */
+@keyframes fadein {
+ 0% {opacity: 0.0}
+ 100% {opacity: 1.0}
+}
+
+#browserEntries {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.popup webview {
+ width: 78%;
+ margin: 0 auto;
+ filter: opacity(1.0);
+ transition: filter 0.15s ease-in-out;
+ margin-top: calc(var(--spacing) / 2);
+ height: calc(100% - calc(var(--spacing) / 2));
+}
+
+.popup webview.loading {
+ filter: opacity(0.0);
+ pointer-events: none;
+}
+
+.popup .el, .popup .misc, .popup .loading {
+ --spacing: calc(var(--padding) / 2);
+ --height: calc(var(--padding) * 3.5);
+ --mischeight: calc(var(--padding) * 1.5);
+
+ animation-duration: 0.15s;
+ animation-iteration-count: 1;
+ animation-name: fadein;
+ animation-fill-mode: forwards;
+ animation-timing-function: ease-in-out;
+
+ opacity: 0.0;
+ transition: 0.15s ease-in-out;
+}
+
+.popup .el, .popup #search,
+.popup #close, .popup .misc button,
+.option .actions select, .option .actions input {
+ color: white;
+ display: flex;
+ align-items: center;
+ height: var(--height);
+ margin: var(--spacing);
+ padding: var(--spacing);
+ background: var(--selbg);
+ border-radius: var(--spacing);
+ width: calc(50% - var(--spacing) * 4);
+}
+
+.popup .misc, .popup #search, .option .actions input {
+ --height: var(--mischeight);
+}
+
+.popup .misc {
+ display: flex;
+}
+
+.popup .misc.vertical {
+ display: block;
+}
+
+.popup .misc.fixed {
+ width: 100%;
+ position: fixed;
+}
+
+.popup #search,
+.option .actions input,
+.option .actions select {
+ border: none;
+ outline: none;
+ transition: filter 0.15s ease-in-out;
+ width: calc(100% - var(--spacing) * 2);
+}
+
+.popup #search:focus,
+.option .actions input:focus,
+.option .actions button:active {
+ filter: brightness(1.5);
+}
+
+.popup .misc button {
+ --height: calc(var(--padding) * 1.5);
+
+ padding: 0px;
+ margin-left: 0px;
+ padding: 0px !important;
+ width: var(--height) !important;
+}
+
+.popup .misc button img {
+ opacity: 0.6;
+ width: var(--height);
+ transform: scale(0.5);
+ height: var(--height) !important;
+}
+
+.popup .misc button:last-child {
+ margin-left: 0px !important;
+}
+
+.popup#preview #close,
+.popup .misc.vertical button {
+ margin: var(--spacing) var(--spacing) 0 auto !important;
+}
+
+.popup .loading {
+ width: 100%;
+ color: white;
+ display: flex;
+ position: absolute;
+ text-align: center;
+ align-items: center;
+ justify-content: center;
+ height: calc(100% - var(--mischeight) - var(--height));
+}
+
+.popup .message {
+ color: white;
+ text-align: center;
+ margin: var(--padding);
+ width: calc(100% - var(--padding));
+}
+
+.popup .el .image, .popup .el .image img {
+ width: var(--height);
+ height: var(--height);
+ margin-right: var(--spacing);
+ border-radius: var(--spacing);
+}
+
+.popup .el .image img.blur {
+ z-index: -1;
+ position: relative;
+ filter: blur(10px);
+ top: calc(var(--height) * -1 + 5px);
+}
+
+.popup .el .text {
+ overflow: hidden;
+}
+
+.popup .el .title, .popup .el .description {
+ height: 1.2em;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.popup .el .title {
+ font-size: 1.2em;
+ font-weight: 700;
+}
+
+.popup .message #loadmore {
+ background: rgb(var(--blue2));
+}
+
+.popup .el .description {font-size: 0.8em}
+.popup .el button {
+ background: rgb(var(--blue));
+ margin-top: var(--spacing);
+}
+
+.popup .el button.info {
+ background: rgb(var(--blue2));
+}
+/* } */
+
+/* settings popup { */
+
+.popup .options {
+ color: white;
+ margin: calc(var(--padding) / 2);
+}
+
+.popup .options .option {
+ width: 100%;
+ display: flex;
+ margin-bottom: var(--padding);
+ justify-content: space-between;
+}
+
+.popup .overlay {
+ z-index: 1;
+ color: white;
+ opacity: 0.0;
+ position: fixed;
+ pointer-events: none;
+ transform: scale(0.9);
+ background: var(--selbg);
+ backdrop-filter: blur(15px);
+ transition: 0.15s ease-in-out;
+ padding: calc(var(--spacing) / 2);
+ border-radius: calc(var(--spacing) / 2);
+}
+
+.popup .overlay.shown {
+ opacity: 1.0;
+ pointer-events: all;
+ transform: scale(1.0);
+}
+
+#options.popup .misc button {
+ margin-left: 0px;
+ width: auto !important;
+ padding-right: calc(var(--padding) / 2) !important;
+}
+
+.check {
+ display:flex;
+ cursor: pointer;
+}
+
+.check::before {
+ width: 1em;
+ height: 1em;
+ content: " ";
+ background-size: 75%;
+ filter: brightness(1.3);
+ background-position: center;
+ background-repeat: no-repeat;
+ transition: 0.15s ease-in-out;
+ background-color: var(--selbg);
+ margin-right: calc(var(--spacing) / 3);
+ border-radius: calc(var(--spacing) / 4);
+}
+
+.check.checked::before {
+ background-color: rgb(var(--red));
+ background-image: url(../icons/check.png);
+}
+
+.option .text {font-weight: 600}
+.option .text .desc {
+ opacity: 0.8;
+ font-weight: 500;
+ font-size: 0.9em;
+ max-width: 400px;
+ margin-top: calc(var(--padding) / 3);
+}
+
+.option .actions input, .option .actions select {
+ width: 100%;
+ margin: 0px;
+ --spacing: calc(var(--padding) / 3);
+}
+
+.option[type=array] .actions input {
+ word-spacing: 15px;
+ margin-right: 15vw;
+}
+
+.option .actions button {
+ background: var(--selbg);
+}
+
+.switch {
+ width: 50px;
+ height: 25px;
+ border-radius: 50px;
+}
+
+.switch.on {
+ background: rgba(var(--red), 0.2) !important;
+}
+
+.switch::after {
+ left: -5px;
+ width: 15px;
+ height: 15px;
+ content: " ";
+ display: block;
+ background: red;
+ position: relative;
+ border-radius: 50px;
+ background: var(--bg);
+ transition: 0.2s ease-in-out;
+}
+
+.switch.on::after {
+ left: 15px;
+ width: 20px;
+ opacity: 0.5;
+ background: rgb(var(--red));
+}
+
+.switch.on:hover::after {
+ transform: scale(1.2);
+}
+
+.title {
+ display: flex;
+}
+
+.title img {
+ width: 30px;
+ height: 30px;
+ margin: auto 0;
+}
+
+.title h2 {
+ margin-left: calc(var(--padding) / 3);
+}
+
+/* } */
diff --git a/src/app/css/theming.css b/src/app/css/theming.css
new file mode 100644
index 0000000..2d45b1d
--- /dev/null
+++ b/src/app/css/theming.css
@@ -0,0 +1,62 @@
+/*
+ the only reason some of these properties have an !important property
+ is for it to overwrite Thunderstore's CSS in the preview <webview>
+*/
+
+:root {
+ --red: 199, 119, 127 !important;
+ --red2: 181 97 105;
+
+ --blue: 129, 161, 193;
+ --blue2: 139, 143, 185;
+
+ --orange: 213, 151, 131;
+ --orange2: 197 129 107;
+
+
+ --padding: 25px;
+
+ --bg: rgba(0, 0, 0, 0.5);
+ --selbg: rgba(80, 80, 80, 0.5);
+ --redbg: linear-gradient(45deg, rgb(var(--red)), #FA4343);
+ --bluebg: linear-gradient(45deg, rgb(var(--blue)), #7380ED);
+}
+
+body, button, input {
+ font-family: "Roboto", sans-serif !important;
+}
+
+body, button, img, a {
+ user-select: none;
+ -webkit-user-drag: none;
+}
+
+a {
+ text-decoration: none !important;
+ color: rgb(var(--red)) !important;
+ transition: filter 0.2s ease-in !important;
+}
+
+a:hover {
+ filter: brightness(80%) !important;
+}
+
+
+::-webkit-scrollbar {
+ width: 8px !important;
+}
+
+::-webkit-scrollbar-track {
+ border-radius: 10px !important;
+ background: transparent !important;
+}
+
+::-webkit-scrollbar-thumb {
+ border-radius: 10px !important;
+ background: rgb(var(--red)) !important;
+}
+
+::selection {
+ color: black !important;
+ background: rgb(var(--red)) !important;
+}
diff --git a/src/app/css/toasts.css b/src/app/css/toasts.css
new file mode 100644
index 0000000..57ba055
--- /dev/null
+++ b/src/app/css/toasts.css
@@ -0,0 +1,52 @@
+@import "theming.css";
+
+#toasts {
+ position: fixed;
+ z-index: 100000;
+ right: calc(var(--padding) * 1.5);
+ bottom: calc(var(--padding) * 1.5);
+}
+
+@keyframes bodyfadeaway {
+ 0% {opacity: 0.0; transform: scale(0.95)}
+ 100% {opacity: 1.0; transform: scale(1.0)}
+}
+
+#toasts .toast {
+ width: 300px;
+ opacity: 0.0;
+ cursor: pointer;
+ overflow: hidden;
+ max-height: 100vh;
+ background: #FFFFFF;
+ transform: scale(0.95);
+ transition: 0.2s ease-in-out;
+ padding: calc(var(--padding) / 2);
+ margin-top: calc(var(--padding) / 2);
+ border-radius: calc(var(--padding) / 2.5);
+ box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
+
+ animation-duration: 0.2s;
+ animation-iteration-count: 1;
+ animation-name: bodyfadeaway;
+ animation-fill-mode: forwards;
+ animation-timing-function: ease-in-out;
+}
+
+#toasts .toast.hidden {
+ margin-top: 0px;
+ max-height: 0px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ filter: opacity(0.0);
+ transform: scale(0.95);
+}
+
+#toasts .toast:not(.hidden):hover {filter: opacity(0.9)}
+#toasts .toast:not(.hidden):active {filter: opacity(0.8)}
+
+.toast .description {
+ opacity: 0.8;
+ font-size: 0.8em;
+ font-weight: 600;
+}
diff --git a/src/app/css/webview.css b/src/app/css/webview.css
new file mode 100644
index 0000000..982ebfc
--- /dev/null
+++ b/src/app/css/webview.css
@@ -0,0 +1,16 @@
+body {
+ overflow-x: hidden;
+ background: transparent !important;
+ background-color: transparent !important;
+}
+
+#ncmp_tool,
+.navbar, .bottom-padding,
+.card-header, .breadcrumb,
+.list-group, .mb-4, .my-2, .mt-2,
+#thunderstore-mod-manager-ad-alert {
+ display: none !important;
+}
+
+.mt-2.mb-2 {display: block !important}
+.card {transform: translateY(-1.0rem)}