Skip to content

Commit

Permalink
feat: add main.css
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Jan 20, 2023
1 parent 9d339b1 commit 420789e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2023-01-20T06:42:48.970Z"
"x-generation-date": "2023-01-20T10:52:47.291Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down
4 changes: 2 additions & 2 deletions frontend/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
useHead({
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' },
{ rel: 'canonical', href: 'https://bytedream.top/' },
{ rel: 'canonical', href: 'https://bytedream.top' },
],
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
Expand Down Expand Up @@ -44,7 +44,7 @@ useHead({
<template>
<NuxtLayout>
<SeoKit />
<OgImage component="Banner" my-custom-title="ByteDream-JueJin" alt="JueJin | ByteDream" />
<OgImageScreenshot />
<NuxtPage />
</NuxtLayout>
</template>
Expand Down
16 changes: 16 additions & 0 deletions frontend/assets/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:root {
--primary-color: #316c72;
--dark-bg: #18181c;
}


.page-enter-active,
.page-leave-active {
transition: all 0.3s ease-in-out;
}

.page-enter-from,
.page-leave-to {
opacity: 0;
transform: scale(0.99);
}
37 changes: 0 additions & 37 deletions frontend/components/Banner.island.vue

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/components/Nav/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const { data: NavList } = await useFetch('/api/navs')
<template>
<div class="view-nav">
{{ NavList }}
<div class="nav-list">
<div class="nav-list text-primary">
<li v-for="item in NavList" :key="item.url">
<NuxtLink :to="item.url">
<NuxtLink :to="item.url" target="_blank">
{{ item.name }}
</NuxtLink>
</li>
Expand Down
12 changes: 9 additions & 3 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ export default defineNuxtConfig({
experimental: {
reactivityTransform: true,
inlineSSRStyles: false,
componentIslands: true,
},
css: [
'@unocss/reset/tailwind.css',
'@/assets/css/main.css',
],
colorMode: {
classSuffix: '',
preference: 'system', // default value of $colorMode.preference
fallback: 'light', // fallback value if not system preference found
hid: 'nuxt-color-mode-script',
globalName: '__NUXT_COLOR_MODE__',
classPrefix: '',
classSuffix: '-mode',
storageKey: 'nuxt-color-mode',
},
extends: [
'nuxt-seo-kit',
Expand All @@ -28,7 +34,7 @@ export default defineNuxtConfig({
siteDescription: 'Yet Another Blog In JueJin Style By ByteDream',
language: 'zh-CN',
titleSeparator: '·',
trailingSlash: true,
trailingSlash: false,
mode: process.env.NODE_ENV,
strapi_base_url: process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:8886' : 'https://cms.marlene.top',
graphql_url: process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:8886/graphql' : 'https://cms.marlene.top/graphql',
Expand Down
9 changes: 8 additions & 1 deletion frontend/unocss.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
transformerDirectives,
transformerVariantGroup,
} from 'unocss'

export default defineConfig({
shortcuts: [
['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
['f-c-c', 'flex justify-center items-center'],
],
presets: [
presetUno(),
Expand All @@ -28,9 +28,16 @@ export default defineConfig({
mono: 'DM Mono',
},
}),

],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
theme: {
colors: {
primary: 'var(--primary-color)',
dark_bg: 'var(--dark-bg)',
},
},
})
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"postinstall": "nuxi prepare",
"build": "npx turbo build --no-cache --force",
"lint:fix": "npx turbo lint:fix",
"typecheck": "npx turbo typecheck"
"typecheck": "npx turbo typecheck",
"start": "npx turbo start"
},
"packageManager": "yarn@1.22.19",
"workspaces": [
Expand Down

0 comments on commit 420789e

Please sign in to comment.