css clean

This commit is contained in:
caranicas 2022-09-19 12:04:14 -04:00
parent 1210313e7f
commit 27fd1f39f0
10 changed files with 55 additions and 265 deletions

View File

@ -60,9 +60,10 @@ module.exports = {
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/space-before-function-paren": "off",
// i18n stuff no string literal works
"i18next/no-literal-string": "warn",
// i18n stuff no string literal works but turned off for now
"i18next/no-literal-string": "off",
// still need to figure out how to get this to work
// it should error if we dont haev all the keys in the translation file
"i18n-json/identical-keys": [
"error",
{

View File

@ -10,259 +10,5 @@
<!-- The react app entry point. Currently no ui just poc importing and logging -->
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- ORIGINAL CODE BELOW FOR REFENCE -->
<!-- KEEP FOR NOW -->
<!-- THE STYLES ARE BEING USED IN THE REACT APP -->
<!-- WE NEED TO PORT OVER THE STYLES OVER TO THE REACT COMPONENTS -->
<style>
/* label {
font-size: 10pt;
}
#prompt {
width: 100%;
height: 50pt;
}
@media screen and (max-width: 600px) {
#prompt {
width: 95%;
}
}
.image_preview_container {
display: none;
margin-top: 10pt;
}
.image_clear_btn {
position: absolute;
transform: translateX(-50%) translateY(-35%);
background: black;
color: white;
border: 2pt solid #ccc;
padding: 0;
cursor: pointer;
outline: inherit;
border-radius: 8pt;
width: 16pt;
height: 16pt;
font-family: Verdana;
font-size: 8pt;
}
#editor-settings-entries {
font-size: 9pt;
margin-bottom: 5px;
padding-left: 10px;
list-style-type: none;
}
#editor-settings-entries li {
padding-bottom: 3pt;
}
#guidance_scale {
transform: translateY(30%);
} */
#outputMsg {
font-size: small;
}
#footer {
font-size: small;
padding-left: 10pt;
background: none;
}
#footer-legal {
font-size: 8pt;
}
.imgSeedLabel {
position: absolute;
transform: translateX(-100%);
margin-top: 5pt;
margin-left: -5pt;
font-size: 10pt;
background-color: #333;
opacity: 0.8;
color: #ddd;
border-radius: 3pt;
padding: 1pt 3pt;
}
.imgUseBtn {
position: absolute;
transform: translateX(-100%);
margin-top: 30pt;
margin-left: -5pt;
}
.imgSaveBtn {
position: absolute;
transform: translateX(-100%);
margin-top: 55pt;
margin-left: -5pt;
}
.imgItem {
display: inline;
padding-right: 10px;
}
.imgItemInfo {
opacity: 0.5;
}
#container {
width: 75%;
margin-left: auto;
margin-right: auto;
}
@media screen and (max-width: 1400px) {
#container {
width: 100%;
}
}
#meta small {
font-size: 11pt;
}
#editor {
padding: 5px;
}
#editor label {
font-weight: bold;
}
#preview {
padding: 5px;
}
#editor-inputs {
margin-bottom: 20px;
}
#editor-inputs-prompt {
flex: 1;
}
#editor-inputs .row {
padding-bottom: 10px;
}
#makeImage {
border-radius: 6px;
}
#editor-modifiers h5 {
padding: 5pt 0;
margin: 0;
}
#makeImage {
flex: 0 0 70px;
background: rgb(80, 0, 185);
border: 2px solid rgb(40, 0, 78);
color: rgb(255, 221, 255);
width: 100%;
height: 30pt;
}
#makeImage:hover {
background: rgb(93, 0, 214);
}
.flex-container {
display: flex;
}
.col-50 {
flex: 50%;
}
.col-free {
flex: 1;
}
.collapsible {
cursor: pointer;
}
.collapsible-content {
display: none;
padding-left: 15px;
}
.collapsible-content h5 {
padding: 5pt 0pt;
margin: 0;
font-size: 10pt;
}
.collapsible-handle {
color: white;
padding-right: 5px;
}
.panel-box {
background: rgb(44, 45, 48);
border: 1px solid rgb(47, 49, 53);
border-radius: 7px;
padding: 5px;
margin-bottom: 15px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15),
0 6px 20px 0 rgba(0, 0, 0, 0.15);
}
.panel-box h4 {
margin: 0;
padding: 2px 0;
}
.prompt-modifier-tag {
border: 1px solid rgb(10, 0, 24);
border-radius: 4px;
padding: 0pt 3pt;
margin-right: 2pt;
cursor: pointer;
display: inline;
background: rgb(163, 163, 163);
color: black;
line-height: 25pt;
float: left;
font-size: 9pt;
}
.prompt-modifier-tag:hover {
background: black;
color: white;
}
#editor-modifiers-entries .prompt-modifier-tag {
background: #110f0f;
color: rgb(212, 212, 212);
margin-bottom: 4pt;
font-size: 10pt;
}
#editor-modifiers-entries .prompt-modifier-tag:hover {
background: rgb(163, 163, 163);
color: black;
}
#editor-modifiers .editor-modifiers-leaf {
padding-top: 10pt;
padding-bottom: 10pt;
}
#preview {
margin-left: 20pt;
}
img {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15),
0 6px 20px 0 rgba(0, 0, 0, 0.15);
}
.line-separator {
background: rgb(56, 56, 56);
height: 1pt;
margin: 15pt 0;
}
#editor-inputs-tags-container {
margin-top: 5pt;
display: none;
}
#server-status {
float: right;
}
#server-status-color {
width: 8pt;
height: 8pt;
border-radius: 4pt;
background-color: rgb(128, 87, 0);
/* background-color: rgb(197, 1, 1); */
float: left;
transform: translateY(15%);
}
#server-status-msg {
color: rgb(128, 87, 0);
padding-left: 2pt;
font-size: 10pt;
}
#preview-prompt {
font-size: 16pt;
margin-bottom: 10pt;
}
#coffeeButton {
height: 23px;
transform: translateY(25%);
}
</style>
</body>
</html>

View File

@ -3,6 +3,8 @@ import { style, globalStyle } from "@vanilla-extract/css";
// @ts-ignore
import { vars } from "../../../../styles/theme/index.css.ts";
// import { PanelBox } from "../../../../styles/shared.css.ts";
export const AdvancedSettingsList = style({
fontSize: vars.fonts.sizes.Body,
marginBottom: vars.spacing.small,

View File

@ -1,6 +1,9 @@
import React, { useEffect } from "react";
import { useCreateUI } from "../creationPanelUIStore";
// @ts-expect-error
import { PanelBox } from "../../../../styles/shared.css.ts";
import {
AdvancedSettingsList,
AdvancedSettingItem, // @ts-expect-error
@ -46,7 +49,7 @@ export default function AdvancedSettings() {
);
return (
<div className="panel-box">
<div className={PanelBox}>
<button
type="button"
onClick={toggleAdvancedSettingsIsOpen}

View File

@ -1,7 +1,7 @@
.create-layout {
padding: 10px;
}
.panel-box-toggle-btn {
/* .panel-box-toggle-btn {
display: block;
width: 100%;
text-align: left;
@ -9,7 +9,7 @@
color: #fff;
border: 0 none;
cursor: pointer;
}
} */
.selected-tags {
margin: 10px 0;

View File

@ -3,6 +3,9 @@ import React, { useEffect, useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { loadModifications } from "../../../../api";
// @ts-expect-error
import { PanelBox } from "../../../../styles/shared.css.ts";
import { useImageCreate } from "../../../../stores/imageCreateStore";
import { useCreateUI } from "../creationPanelUIStore";
@ -72,7 +75,7 @@ export default function ImageModifers() {
};
return (
<div className="panel-box">
<div className={PanelBox}>
<button
type="button"
onClick={handleClick}

View File

@ -5,3 +5,8 @@
align-items: center;
justify-content: center;
}
#coffeeButton {
height: 23px;
transform: translateY(25%);
}

View File

@ -0,0 +1,26 @@
import { style, globalStyle } from "@vanilla-extract/css";
// @ts-ignore
import { vars } from "./theme/index.css.ts";
export const PanelBox = style({
background: vars.colors.backgroundAlt,
color: vars.colors.text.normal,
padding: vars.spacing.small,
borderRadius: vars.trim.smallBorderRadius,
marginBottom: vars.spacing.medium,
boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)",
});
globalStyle(`${PanelBox} .panel-box-toggle-btn`, {
display: "block",
width: "100%",
textAlign: "left",
backgroundColor: "transparent",
color: vars.colors.text.normal,
border: "0 none",
cursor: "pointer",
padding: "0",
marginBottom: vars.spacing.small,
});

View File

@ -47,6 +47,7 @@ const colors = createThemeContract({
accentDimmed: null,
},
link: null,
warning: null,
error: null,
success: null,
@ -72,6 +73,7 @@ const app = createGlobalTheme(":root", {
Body: "1em",
Caption: ".75em",
Overline: ".5em",
},
},
colors: colors,
@ -110,6 +112,7 @@ export const darkTheme = createTheme(colors, {
accentDimmed: "#7d6641", // muted orange
},
link: '#0066cc', // blue
warning: "#f0ad4e",
error: "#d9534f",
success: "#5cb85c",
@ -148,6 +151,7 @@ export const lightTheme = createTheme(colors, {
accentDimmed: "#6B7280",
},
link: '#0066cc', // blue
warning: "yellow",
error: "red",
success: "green",

View File

@ -1,9 +1,9 @@
import { defineConfig } from "vite";
import eslint from "vite-plugin-eslint";
import react from "@vitejs/plugin-react";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import { defineConfig } from 'vite';
import eslint from 'vite-plugin-eslint';
import react from '@vitejs/plugin-react';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import path from "path";
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
resolve: {