Experimental CSS changes

next
neobooru 2023-02-05 23:57:58 +01:00
parent 6febea2ceb
commit cb25101b0b
8 changed files with 31 additions and 15 deletions

View File

@ -112,7 +112,9 @@ let mode = useColorMode({ emitAuto: true });
<div class="fit flex flex-wrap"> <div class="fit flex flex-wrap">
<div class="flex-fit"> <div class="flex-fit">
<label>Szurubooru Instances</label> <label>Szurubooru Instances</label>
<div class="fit flex gapx-1 flex-fit">
<!-- This isn't perfectly responsive for very small devices. -->
<div class="fit flex gap-1 flex-fit">
<select v-model="selectedSiteId"> <select v-model="selectedSiteId">
<option v-for="site in sites" :key="site.id" :value="site.id"> <option v-for="site in sites" :key="site.id" :value="site.id">
{{ site.username }} @ {{ site.domain }} {{ site.username }} @ {{ site.domain }}
@ -195,17 +197,21 @@ let mode = useColorMode({ emitAuto: true });
</div> </div>
</div> </div>
<div class="flex-fit flex justify-end gap-1"> <div class="flex-fit flex flex-wrap justify-between gap-3">
<span class="status self-center" style="margin-right: auto" :class="statusType">{{ statusText }}</span> <span class="status" :class="statusType">{{ statusText }}</span>
<button @click="testConnection">Test connection</button> <div class="flex gap-1">
<button @click="saveSettings" class="primary">Save settings</button> <button @click="testConnection">Test connection</button>
<button @click="saveSettings" class="primary">Save settings</button>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss">
@use "../styles/main.scss";
.content-holder { .content-holder {
padding: 1.5em; padding: 1.5em;
display: flex; display: flex;
@ -260,4 +266,14 @@ label {
input[type="checkbox"] { input[type="checkbox"] {
margin: 0 3px 0 0; margin: 0 3px 0 0;
} }
@media only screen and (max-width: 600px) {
.content-holder {
padding: 0;
}
.status {
flex: 0 0 100%;
}
}
</style> </style>

View File

@ -3,6 +3,7 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<base target="_blank" /> <base target="_blank" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Options</title> <title>Options</title>
</head> </head>
<body> <body>

View File

@ -1,7 +1,6 @@
import { createApp } from "vue"; import { createApp } from "vue";
import App from "./App.vue"; import App from "./App.vue";
import { setupApp } from "~/logic/common-setup"; import { setupApp } from "~/logic/common-setup";
import "../styles";
const app = createApp(App); const app = createApp(App);
setupApp(app); setupApp(app);

View File

@ -633,7 +633,9 @@ useDark();
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss">
@use "../styles/main.scss";
video { video {
width: 100%; width: 100%;
} }
@ -667,7 +669,7 @@ label {
} }
.popup-left { .popup-left {
flex: 1 0 auto; flex: 1 0 300px;
} }
.popup-right { .popup-right {

View File

@ -3,9 +3,10 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<base target="_blank" /> <base target="_blank" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Popup</title> <title>Popup</title>
</head> </head>
<body style="min-width: 100px"> <body>
<div id="app"></div> <div id="app"></div>
<script type="module" src="./main.ts"></script> <script type="module" src="./main.ts"></script>
</body> </body>

View File

@ -3,8 +3,6 @@ import App from "./App.vue";
import { setupApp } from "~/logic/common-setup"; import { setupApp } from "~/logic/common-setup";
import { isChrome } from "~/env"; import { isChrome } from "~/env";
import "../styles";
// Firefox automatically makes the popup as large as can be, Chrome doesn't. // Firefox automatically makes the popup as large as can be, Chrome doesn't.
// However setting the width to 780px gives us horizontal scrollbars on Firefox. // However setting the width to 780px gives us horizontal scrollbars on Firefox.
if (isChrome) { if (isChrome) {

View File

@ -1 +0,0 @@
import "./main.scss";

View File

@ -1,6 +1,6 @@
@use "sass:color"; @use "sass:color";
@import "basscss/css/basscss-cp.css"; @use "basscss/css/basscss-cp.css";
:root { :root {
--space-1: 0.25rem; --space-1: 0.25rem;
@ -61,7 +61,7 @@ body {
$primary-color: #24aadd; $primary-color: #24aadd;
$danger-color: #f44336; $danger-color: #f44336;
$primary-color-dark: color.scale($primary-color, $lightness: -40%); $primary-color-dark: color.scale($primary-color, $lightness: -30%);
$danger-color-dark: color.scale($danger-color, $lightness: -50%); $danger-color-dark: color.scale($danger-color, $lightness: -50%);
// TODO: Darker success color // TODO: Darker success color