Skip to content

Commit

Permalink
fix tailwind merge and & tos links and lists colors
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Jan 17, 2025
1 parent 76e89bb commit 0e5a91d
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 147 deletions.
35 changes: 29 additions & 6 deletions apps/desktop/packages/mainWindow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@
font-family: var(--font);
}

html,
body {
background: rgb(var(--darkSlate-800));
color: white;
}

img {
-webkit-user-drag: none;
}
Expand Down Expand Up @@ -155,6 +149,35 @@
cursor: text !important;
}

.instance-tile-spinning {
background-image: linear-gradient(to right, transparent, transparent),
conic-gradient(
from var(--instance-tile-angle),
rgb(var(--primary)) 0deg 90deg,
transparent 90deg 180deg,
transparent 180deg 270deg,
transparent 270deg 360deg
);
background-origin: border-box;
background-clip: padding-box, border-box;
}

@keyframes rotate {
to {
--instance-tile-angle: 360deg;
}
}

.instance-tile-spinning {
animation: rotate 4s linear infinite;
}

@property --instance-tile-angle {
syntax: "<angle>";
initial-value: 0deg;
inherits: false;
}

.appFatalCrash {
position: fixed;
top: 0;
Expand Down
40 changes: 20 additions & 20 deletions apps/website/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import cloudflare from "@astrojs/cloudflare";
import solidJs from "@astrojs/solid-js";
import { defineConfig } from "astro/config"
import mdx from "@astrojs/mdx"
import tailwind from "@astrojs/tailwind"
import sitemap from "@astrojs/sitemap"
import cloudflare from "@astrojs/cloudflare"
import solidJs from "@astrojs/solid-js"

import yaml from "js-yaml";
import yaml from "js-yaml"

const response = await Promise.all([
fetch("https://cdn-raw.gdl.gg/launcher/latest.yml"),
fetch("https://cdn-raw.gdl.gg/launcher/latest-mac.yml"),
fetch("https://cdn-raw.gdl.gg/launcher/latest-linux.yml"),
]);
const yamlfiles = await Promise.all(response.map((val) => val.text()));
fetch("https://cdn-raw.gdl.gg/launcher/latest-linux.yml")
])
const yamlfiles = await Promise.all(response.map((val) => val.text()))
const downloadLinks = yamlfiles
.map((val) => yaml.load(val))
.map(
(val) =>
`https://cdn-raw.gdl.gg/launcher/${val.path.includes("zip") ? val.path.replace("zip", "dmg") : val.path}`,
);
`https://cdn-raw.gdl.gg/launcher/${val.path.includes("zip") ? val.path.replace("zip", "dmg") : val.path}`
)

const excludedPages = [
"user-account-confirmed/",
"user-deletion-confirmed/",
"newsletter/confirm/",
];
"newsletter/confirm/"
]

// https://astro.build/config
export default defineConfig({
Expand All @@ -37,14 +37,14 @@ export default defineConfig({
sitemap({
filter: (page) =>
!excludedPages.find(
(excludedPage) => `https://gdlauncher.com/${excludedPage}` === page,
),
(excludedPage) => `https://gdlauncher.com/${excludedPage}` === page
)
}),
solidJs(),
solidJs()
],
redirects: {
"/download/windows": downloadLinks[0],
"/download/mac": downloadLinks[1],
"/download/linux": downloadLinks[2],
},
});
"/download/linux": downloadLinks[2]
}
})
3 changes: 2 additions & 1 deletion apps/website/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ h2,
h3,
h4,
h5,
h6 {
h6,
li {
overflow-wrap: break-word;
margin-bottom: 20px;
color: white;
Expand Down
26 changes: 13 additions & 13 deletions apps/website/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@ module.exports = {
bluegd: {
400: "rgba(62, 134, 208, 1)",
500: "rgba(40, 101, 164, 1)",
600: "rgba(35, 62, 94, 1)",
},
600: "rgba(35, 62, 94, 1)"
}
},
boxShadow: {
mdgd: "0px 0px 12px 0px rgba(40, 101, 164, 1)",
mdgd: "0px 0px 12px 0px rgba(40, 101, 164, 1)"
},
padding: {
mdgd: "24px",
mdgd: "24px"
},
borderRadius: {
xssgd: "8px",
xsgd: "12px",
smgd: "34px",
smgd: "34px"
},
fontSize: {
smgd: "1.25rem",
mdgd: "3.125rem",
mdgd: "3.125rem"
},
keyframes: {
fadeIn: {
"0%": { opacity: "0" },
"100%": { opacity: "1" },
},
"100%": { opacity: "1" }
}
},
animation: {
fadeIn: "fadeIn 0.2s ease-in-out",
},
},
fadeIn: "fadeIn 0.2s ease-in-out"
}
}
},
plugins: [],
};
plugins: []
}
24 changes: 12 additions & 12 deletions packages/config/src/appVersion.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import fs from "fs";
import path from "path";
import { execSync } from "child_process";
import { dirname } from "path";
import { fileURLToPath } from "url";
import fs from "fs"
import path from "path"
import { execSync } from "child_process"
import { dirname } from "path"
import { fileURLToPath } from "url"

const __dirname = dirname(fileURLToPath(import.meta.url));
const __dirname = dirname(fileURLToPath(import.meta.url))

const gitCommitDate = execSync("git log -1 --format=%ct").toString().trim();
const gitCommitDate = execSync("git log -1 --format=%ct").toString().trim()

const VERSION_JSON = JSON.parse(
fs.readFileSync(path.resolve(__dirname, "../", "version.json")).toString(),
);
fs.readFileSync(path.resolve(__dirname, "../", "version.json")).toString()
)
const channel = VERSION_JSON.channel
? "-" + VERSION_JSON.channel + "." + gitCommitDate
: "";
: ""

const version = VERSION_JSON.version;
const version = VERSION_JSON.version

export const COMPLETE_VERSION = `${version}${channel}`;
export const COMPLETE_VERSION = `${version}${channel}`
4 changes: 2 additions & 2 deletions packages/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { unocssConfig } from "./unocss.config.js";
export { COMPLETE_VERSION as appVersion } from "./appVersion.js";
export { unocssConfig } from "./unocss.config.js"
export { COMPLETE_VERSION as appVersion } from "./appVersion.js"
18 changes: 2 additions & 16 deletions packages/config/src/unocss.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import presetIcons from "@unocss/preset-icons"
import presetWind from "@unocss/preset-wind"
import { presetAttributify } from "unocss"
import { theme } from "./unocss.theme.js"
// import { presetScrollbarHide } from "unocss-preset-scrollbar-hide"
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { supportedLanguages } from "@gd/i18n"
// import gdlIcons from "./unocss.icons.js";
import transformerDirectives from "@unocss/transformer-directives"

const safelist = Object.values(supportedLanguages).map(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
(lang) => `i-emojione-v1:flag-for-${lang}`
)

Expand All @@ -23,21 +15,15 @@ const unocssConfig = {
]
}
},
presets: [
presetAttributify(),
presetWind(),
// presetScrollbarHide(),
presetIcons()
],
presets: [presetWind(), presetIcons()],
rules: [],
// rules: [["scrollbar-gutter", { "scrollbar-gutter": "stable" }]],
safelist: [
...safelist,
...Object.keys(theme.colors).map((v) => `bg-${v}-500`),
...Object.keys(theme.colors).map((v) => `hover:bg-${v}-700`)
],
theme,
transformers: [transformerDirectives()]
transformers: []
} as unknown

export { unocssConfig }
2 changes: 1 addition & 1 deletion packages/config/src/unocss.icons.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default {};
export default {}
36 changes: 9 additions & 27 deletions packages/config/src/unocss.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,15 @@ type shade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
type Theme = {
// Colors
accent: string
darkSlate: {
[key in shade]: string
}
lightSlate: {
[key in shade]: string
}
lightGray: {
[key in shade]: string
}
darkGray: {
[key in shade]: string
}
primary: {
[key in shade]: string
}
red: {
[key in shade]: string
}
yellow: {
[key in shade]: string
}
green: {
[key in shade]: string
}
brands: {
[key: string]: string
}
darkSlate: Record<shade, string>
lightSlate: Record<shade, string>
lightGray: Record<shade, string>
darkGray: Record<shade, string>
primary: Record<shade, string>
red: Record<shade, string>
yellow: Record<shade, string>
green: Record<shade, string>
brands: Record<string, string>
}

const theme = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"storybook": "^7.0.22",
"storybook-solidjs": "^1.0.0-beta.2",
"storybook-solidjs-vite": "^1.0.0-beta.2",
"tailwind-merge": "^2.2.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"unocss": "^0.65.1",
"vite": "^6.0.3",
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/src/DropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import { splitProps } from "solid-js"
import * as DropdownMenuPrimitive from "@kobalte/core/dropdown-menu"
import type { PolymorphicProps } from "@kobalte/core/polymorphic"

// import { cn } from "../util"

const cn = (...args: any[]) => args.join(" ")
import { cn } from "../util"

const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
const DropdownMenuPortal = DropdownMenuPrimitive.Portal
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/src/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import { splitProps } from "solid-js"
import * as ContextMenuPrimitive from "@kobalte/core/context-menu"
import type { PolymorphicProps } from "@kobalte/core/polymorphic"

// import { cn } from "../util"

const cn = (...args: any[]) => args.join(" ")
import { cn } from "../util"

const ContextMenuTrigger = ContextMenuPrimitive.Trigger
const ContextMenuPortal = ContextMenuPrimitive.Portal
Expand Down
37 changes: 7 additions & 30 deletions packages/ui/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
background-color: rgb(var(--lightGray-900));
}

html,
body {
background: rgb(var(--darkSlate-800));
color: white;
}

.potato-pc *,
.potato-pc *::before,
.potato-pc *::after {
Expand All @@ -28,7 +34,7 @@
}

a {
color: theme("colors.blue.500");
color: rgb(var(--primary-500));
}

@keyframes spin {
Expand Down Expand Up @@ -57,32 +63,3 @@ a {
opacity: 0;
}
}

.instance-tile-spinning {
background-image: linear-gradient(to right, transparent, transparent),
conic-gradient(
from var(--instance-tile-angle),
rgb(var(--primary)) 0deg 90deg,
transparent 90deg 180deg,
transparent 180deg 270deg,
transparent 270deg 360deg
);
background-origin: border-box;
background-clip: padding-box, border-box;
}

@keyframes rotate {
to {
--instance-tile-angle: 360deg;
}
}

.instance-tile-spinning {
animation: rotate 4s linear infinite;
}

@property --instance-tile-angle {
syntax: "<angle>";
initial-value: 0deg;
inherits: false;
}
Loading

0 comments on commit 0e5a91d

Please sign in to comment.