From 68d9299f11896e86b8236ee8fcebdc5079d45ad8 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 10 Mar 2024 01:49:24 -0600 Subject: [PATCH] SCSS, simplify header, improve README --- CHANGELOG.md | 12 ++- README.md | 9 +- package.json | 5 +- pnpm-lock.yaml | 34 +++++-- src/components/BaseHead.astro | 4 +- src/components/Header.astro | 164 +++++++++++++++++----------------- src/consts.ts | 1 + src/pages/index.astro | 2 +- src/styles/global.css | 154 ------------------------------- src/styles/global.scss | 56 ++++++++++++ 10 files changed, 189 insertions(+), 252 deletions(-) delete mode 100644 src/styles/global.css create mode 100644 src/styles/global.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index f5aa9f8..76c62ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ +# 0.0.2 + +- Added version/commit hash to the footer +- Added theme toggle to the header +- Culled lots of unnecessary CSS/unused content +- Switched CSS to SCSS + # 0.0.1 - Initialized with Astro Sample -- Added [Vercel Deployment](https://handbook.xevion.dev) -- Built up the README with Content Ideas, Badges, Formatting \ No newline at end of file +- Built up the README with Content Ideas, Badges, Formatting +- Added [CHANGELOG.md](./CHANGELOG.md) +- Added [Vercel Deployment](https://handbook.xevion.dev) \ No newline at end of file diff --git a/README.md b/README.md index 3c96ec6..faecfad 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ A handbook for students at [The University of Texas at San Antonio][utsa], with The UTSA Handbook is intended to be a living document filled with perspectives, opinions and information gathered from numerous students, old and young, incoming and graduated. -- Please consider contributing where +If you have something to add, please consider contributing! The process is easier than you think, and is an easy way to participate in open source and contribute to the UTSA CS community. ## Setup -This setup guide is very simple and does not cover +This setup guide is very simple and does not cover the full process of installation. Expansion will occur in the future. ```bash git clone https://github.com/Xevion/utsa-handbook.git @@ -61,6 +61,11 @@ pnpm dev pnpm build ``` +## Notes + +- All content frontmatter obeys [this](https://github.com/withastro/astro/blob/main/packages/astro-rss/src/schema.ts) schema (for [@astrojs/rss](https://docs.astro.build/en/guides/rss/)). +- Document your changes in [CHANGELOG.md][changelog]. Not required for minor frontmatter changes, but recommended for all other changes. + ### Disclaimer This repository is completely unassociated with UTSA or the UTSA Computer Science department. All opinions and those of any contributors are their own and are not made in UTSA or UTSA CS's place. diff --git a/package.json b/package.json index 04cbf0e..b773400 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "", + "name": "handbook", "type": "module", - "version": "0.0.1", + "version": "0.0.2", "scripts": { "dev": "astro dev", "start": "astro dev", @@ -22,6 +22,7 @@ "astro": "^4.4.15", "react": "^18.2.0", "react-dom": "^18.2.0", + "sass": "^1.71.1", "tailwindcss": "^3.4.1", "typescript": "^5.4.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 310defc..225e209 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,13 +34,16 @@ dependencies: version: 18.2.21 astro: specifier: ^4.4.15 - version: 4.4.15(@types/node@20.11.25)(typescript@5.4.2) + version: 4.4.15(@types/node@20.11.25)(sass@1.71.1)(typescript@5.4.2) react: specifier: ^18.2.0 version: 18.2.0 react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + sass: + specifier: ^1.71.1 + version: 1.71.1 tailwindcss: specifier: ^3.4.1 version: 3.4.1 @@ -150,7 +153,7 @@ packages: '@astrojs/markdown-remark': 4.2.1 '@mdx-js/mdx': 3.0.1 acorn: 8.11.3 - astro: 4.4.15(@types/node@20.11.25)(typescript@5.4.2) + astro: 4.4.15(@types/node@20.11.25)(sass@1.71.1)(typescript@5.4.2) es-module-lexer: 1.4.1 estree-util-visit: 2.0.0 github-slugger: 2.0.0 @@ -214,7 +217,7 @@ packages: astro: ^3.0.0 || ^4.0.0 tailwindcss: ^3.0.24 dependencies: - astro: 4.4.15(@types/node@20.11.25)(typescript@5.4.2) + astro: 4.4.15(@types/node@20.11.25)(sass@1.71.1)(typescript@5.4.2) autoprefixer: 10.4.18(postcss@8.4.35) postcss: 8.4.35 postcss-load-config: 4.0.2(postcss@8.4.35) @@ -1054,7 +1057,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.24.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 5.1.5(@types/node@20.11.25) + vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) transitivePeerDependencies: - supports-color dev: false @@ -1231,7 +1234,7 @@ packages: hasBin: true dev: false - /astro@4.4.15(@types/node@20.11.25)(typescript@5.4.2): + /astro@4.4.15(@types/node@20.11.25)(sass@1.71.1)(typescript@5.4.2): resolution: {integrity: sha512-RTiAnlO8hDp6GqMVvaeJxyuCJhHNEho09lHshMNQBqgRabYPOJGW0HZZrbLRGNOqN9I14ivhZIunYGgAaGQpWw==} engines: {node: '>=18.14.1', npm: '>=6.14.0'} hasBin: true @@ -1295,7 +1298,7 @@ packages: tsconfck: 3.0.3(typescript@5.4.2) unist-util-visit: 5.0.0 vfile: 6.0.1 - vite: 5.1.5(@types/node@20.11.25) + vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vitefu: 0.2.5(vite@5.1.5) which-pm: 2.1.1 yargs-parser: 21.1.1 @@ -2257,6 +2260,10 @@ packages: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: false + /immutable@4.3.5: + resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + dev: false + /import-meta-resolve@4.0.0: resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} dev: false @@ -3825,6 +3832,16 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: false + /sass@1.71.1: + resolution: {integrity: sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + chokidar: 3.6.0 + immutable: 4.3.5 + source-map-js: 1.0.2 + dev: false + /sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} dev: false @@ -4436,7 +4453,7 @@ packages: vfile-message: 4.0.2 dev: false - /vite@5.1.5(@types/node@20.11.25): + /vite@5.1.5(@types/node@20.11.25)(sass@1.71.1): resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -4468,6 +4485,7 @@ packages: esbuild: 0.19.12 postcss: 8.4.35 rollup: 4.12.1 + sass: 1.71.1 optionalDependencies: fsevents: 2.3.3 dev: false @@ -4480,7 +4498,7 @@ packages: vite: optional: true dependencies: - vite: 5.1.5(@types/node@20.11.25) + vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) dev: false /volar-service-css@0.0.30(@volar/language-service@2.0.4): diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index feaa93d..5e4dc77 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -1,7 +1,5 @@ --- -// Import the global.css file here so that it is included on -// all pages through the use of the component. -import '@/styles/global.css'; +import '@/styles/global.scss'; interface Props { title: string; diff --git a/src/components/Header.astro b/src/components/Header.astro index ec39967..8376150 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,87 +1,91 @@ --- -import HeaderLink from '@components/HeaderLink.astro'; -import { SITE_TITLE } from '@/consts'; -import ThemeToggle from '@components/ThemeToggle'; +import HeaderLink from "@components/HeaderLink.astro"; +import { SITE_TITLE } from "@/consts"; +import ThemeToggle from "@components/ThemeToggle"; --- -
- +
+
diff --git a/src/consts.ts b/src/consts.ts index 65a1742..e5ee32d 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -1,2 +1,3 @@ export const SITE_TITLE = 'UTSA CS Handbook'; export const SITE_DESCRIPTION = 'An unofficial guide to the Computer Science program at UTSA'; +export const GITHUB_URL = 'https://github.com/Xevion/utsa-handbook' diff --git a/src/pages/index.astro b/src/pages/index.astro index 776a571..23fc7db 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -10,7 +10,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; - +