From 423054ca00776c3386c01fb44615160ad9f1c879 Mon Sep 17 00:00:00 2001 From: nemanjam Date: Tue, 21 May 2024 11:08:27 +0200 Subject: [PATCH] put all in my-prose in Centered and FullWidth, export proseClasses from Prose component --- docs/aw-old-code/config.ts | 220 ------------------ .../markdown-elements-demo-post.mdx | 189 --------------- docs/pa-old-code/Prose 2.astro | 50 ++++ docs/todo2.md | 3 + docs/todo3.md | 4 + src/components/Pagination.astro | 2 +- src/components/PostItem.astro | 6 +- src/components/Prose.astro | 57 ++--- src/components/Tag.astro | 2 +- src/config.ts | 2 +- src/layouts/Centered.astro | 2 +- src/layouts/FullWidth.astro | 2 +- src/layouts/List.astro | 2 +- src/layouts/Page.astro | 2 +- src/layouts/Post.astro | 4 +- src/pages/projects/[...page].astro | 48 ++-- src/styles/my-prose.css | 3 +- src/styles/tw-base.css | 10 +- 18 files changed, 116 insertions(+), 492 deletions(-) delete mode 100644 docs/aw-old-code/config.ts delete mode 100644 docs/aw-old-code/markdown-elements-demo-post.mdx create mode 100644 docs/pa-old-code/Prose 2.astro diff --git a/docs/aw-old-code/config.ts b/docs/aw-old-code/config.ts deleted file mode 100644 index 65a14f5..0000000 --- a/docs/aw-old-code/config.ts +++ /dev/null @@ -1,220 +0,0 @@ -import fs from 'fs'; - -import dotenv from 'dotenv'; -import ejs from 'ejs'; -import yaml from 'js-yaml'; -import merge from 'lodash.merge'; - -import type { MetaData } from '~/types/post'; - -// write zod validation for env vars -const envFileName = `.env.${process.env.NODE_ENV}`; -dotenv.config({ path: envFileName }); - -export interface SiteConfig { - name: string; - site?: string; - base?: string; - trailingSlash?: boolean; - googleSiteVerificationId?: string; -} -export interface MetaDataConfig extends Omit { - title?: { - default: string; - template: string; - }; -} -export interface I18NConfig { - language: string; - textDirection: string; - dateFormatter?: Intl.DateTimeFormat; -} -export interface AppBlogConfig { - isEnabled: boolean; - postsPerPage: number; - post: { - isEnabled: boolean; - permalink: string; - robots: { - index: boolean; - follow: boolean; - }; - }; - list: { - isEnabled: boolean; - pathname: string; - robots: { - index: boolean; - follow: boolean; - }; - }; - category: { - isEnabled: boolean; - pathname: string; - robots: { - index: boolean; - follow: boolean; - }; - }; - tag: { - isEnabled: boolean; - pathname: string; - robots: { - index: boolean; - follow: boolean; - }; - }; -} -export interface AnalyticsConfig { - vendors: { - googleAnalytics: { - id?: string; - partytown?: boolean; - }; - }; -} -// todo: put in function and write zod validation for env vars -// merge .env vars and yaml -const envContext = { site: { site: process.env.PUBLIC_SITE_HOSTNAME } }; -const configTemplate = fs.readFileSync('src/config.yaml', 'utf8'); -const configString = ejs.render(configTemplate, envContext); - -export interface Config { - site?: SiteConfig; - metadata?: MetaDataConfig; - i18n?: I18NConfig; - apps?: { - blog?: AppBlogConfig; - }; - ui?: unknown; - analytics?: unknown; -} - -const config = yaml.load(configString) as Config; - -// console.log('config', JSON.stringify(config, null, 2)); - -const DEFAULT_SITE_NAME = 'Website'; - -const getSite = () => { - const _default = { - name: DEFAULT_SITE_NAME, - site: undefined, - base: '/', - trailingSlash: false, - - googleSiteVerificationId: '', - }; - - return merge({}, _default, config?.site ?? {}) as SiteConfig; -}; - -const getMetadata = () => { - const siteConfig = getSite(); - - const _default = { - title: { - default: siteConfig?.name || DEFAULT_SITE_NAME, - template: '%s', - }, - description: '', - robots: { - index: false, - follow: false, - }, - openGraph: { - type: 'website', - }, - }; - - return merge({}, _default, config?.metadata ?? {}) as MetaDataConfig; -}; - -const getI18N = () => { - const _default = { - language: 'en', - textDirection: 'ltr', - }; - - const value = merge({}, _default, config?.i18n ?? {}); - - return Object.assign(value, { - dateFormatter: new Intl.DateTimeFormat(value.language, { - year: 'numeric', - month: 'short', - day: 'numeric', - timeZone: 'UTC', - }), - }) as I18NConfig; -}; - -const getAppBlog = () => { - const _default = { - isEnabled: false, - postsPerPage: 6, - post: { - isEnabled: true, - permalink: '/blog/%slug%', - robots: { - index: true, - follow: true, - }, - }, - list: { - isEnabled: true, - pathname: 'blog', - robots: { - index: true, - follow: true, - }, - }, - category: { - isEnabled: true, - pathname: 'category', - robots: { - index: true, - follow: true, - }, - }, - tag: { - isEnabled: true, - pathname: 'tag', - robots: { - index: false, - follow: true, - }, - }, - }; - - return merge({}, _default, config?.apps?.blog ?? {}) as AppBlogConfig; -}; - -const getUI = () => { - const _default = { - theme: 'system', - classes: {}, - tokens: {}, - }; - - return merge({}, _default, config?.ui ?? {}); -}; - -const getAnalytics = () => { - const _default = { - vendors: { - googleAnalytics: { - id: undefined, - partytown: true, - }, - }, - }; - - return merge({}, _default, config?.analytics ?? {}) as AnalyticsConfig; -}; - -export const SITE = getSite(); -export const I18N = getI18N(); -export const METADATA = getMetadata(); -export const APP_BLOG = getAppBlog(); -export const UI = getUI(); -export const ANALYTICS = getAnalytics(); diff --git a/docs/aw-old-code/markdown-elements-demo-post.mdx b/docs/aw-old-code/markdown-elements-demo-post.mdx deleted file mode 100644 index 4f0448c..0000000 --- a/docs/aw-old-code/markdown-elements-demo-post.mdx +++ /dev/null @@ -1,189 +0,0 @@ ---- -publishDate: 2023-01-02T00:00:00Z -title: Markdown elements demo post -excerpt: Sint sit cillum pariatur eiusmod nulla pariatur ipsum. Sit laborum anim qui mollit tempor pariatur nisi minim dolor. -tags: - - markdown - - blog - - Astro ---- - -import Logo from '~/components/Logo.astro'; - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -## Headings - -Sint sit cillum pariatur eiusmod nulla pariatur ipsum. Sit laborum anim qui mollit tempor pariatur nisi minim dolor. Aliquip et adipisicing sit sit fugiat commodo id sunt. Nostrud enim ad commodo incididunt cupidatat in ullamco ullamco Lorem cupidatat velit enim et Lorem. Ut laborum cillum laboris fugiat culpa sint irure do reprehenderit culpa occaecat. Exercitation esse mollit tempor magna aliqua in occaecat aliquip veniam reprehenderit nisi dolor in laboris dolore velit. - -## Heading two - -Aute officia nulla deserunt do deserunt cillum velit magna. Officia veniam culpa anim minim dolore labore pariatur voluptate id ad est duis quis velit dolor pariatur enim. Incididunt enim excepteur do veniam consequat culpa do voluptate dolor fugiat ad adipisicing sit. Labore officia est adipisicing dolore proident eiusmod exercitation deserunt ullamco anim do occaecat velit. Elit dolor consectetur proident sunt aliquip est do tempor quis aliqua culpa aute. Duis in tempor exercitation pariatur et adipisicing mollit irure tempor ut enim esse commodo laboris proident. Do excepteur laborum anim esse aliquip eu sit id Lorem incididunt elit irure ea nulla dolor et. Nulla amet fugiat qui minim deserunt enim eu cupidatat aute officia do velit ea reprehenderit. - -### Heading three - -Voluptate cupidatat cillum elit quis ipsum eu voluptate fugiat consectetur enim. Quis ut voluptate culpa ex anim aute consectetur dolore proident voluptate exercitation eiusmod. Esse in do anim magna minim culpa sint. Adipisicing ipsum consectetur proident ullamco magna sit amet aliqua aute fugiat laborum exercitation duis et. - -#### Heading four - -Commodo fugiat aliqua minim quis pariatur mollit id tempor. Non occaecat minim esse enim aliqua adipisicing nostrud duis consequat eu adipisicing qui. Minim aliquip sit excepteur ipsum consequat laborum pariatur excepteur. Veniam fugiat et amet ad elit anim laborum duis mollit occaecat et et ipsum et reprehenderit. Occaecat aliquip dolore adipisicing sint labore occaecat officia fugiat. Quis adipisicing exercitation exercitation eu amet est laboris sunt nostrud ipsum reprehenderit ullamco. Enim sint ut consectetur id anim aute voluptate exercitation mollit dolore magna magna est Lorem. Ut adipisicing adipisicing aliqua ullamco voluptate labore nisi tempor esse magna incididunt. - -##### Heading five - -Veniam enim esse amet veniam deserunt laboris amet enim consequat. Minim nostrud deserunt cillum consectetur commodo eu enim nostrud ullamco occaecat excepteur. Aliquip et ut est commodo enim dolor amet sint excepteur. Amet ad laboris laborum deserunt sint sunt aliqua commodo ex duis deserunt enim est ex labore ut. Duis incididunt velit adipisicing non incididunt adipisicing adipisicing. Ad irure duis nisi tempor eu dolor fugiat magna et consequat tempor eu ex dolore. Mollit esse nisi qui culpa ut nisi ex proident culpa cupidatat cillum culpa occaecat anim. Ut officia sit ea nisi ea excepteur nostrud ipsum et nulla. - -###### Heading six - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -[[Top]](#top) - -## Paragraphs - -Incididunt ex adipisicing ea ullamco consectetur in voluptate proident fugiat tempor deserunt reprehenderit ullamco id dolore laborum. Do laboris laboris minim incididunt qui consectetur exercitation adipisicing dolore et magna consequat magna anim sunt. Officia fugiat Lorem sunt pariatur incididunt Lorem reprehenderit proident irure. Dolore ipsum aliqua mollit ad officia fugiat sit eu aliquip cupidatat ipsum duis laborum laborum fugiat esse. Voluptate anim ex dolore deserunt ea ex eiusmod irure. Occaecat excepteur aliqua exercitation aliquip dolor esse eu eu. - -Officia dolore laborum aute incididunt commodo nisi velit est est elit et dolore elit exercitation. Enim aliquip magna id ipsum aliquip consectetur ad nulla quis. Incididunt pariatur dolor consectetur cillum enim velit cupidatat laborum quis ex. - -Officia irure in non voluptate adipisicing sit amet tempor duis dolore deserunt enim ut. Reprehenderit incididunt in ad anim et deserunt deserunt Lorem laborum quis. Enim aute anim labore proident laboris voluptate elit excepteur in. Ex labore nulla velit officia ullamco Lorem Lorem id do. Dolore ullamco ipsum magna dolor pariatur voluptate ipsum id occaecat ipsum. Dolore tempor quis duis commodo quis quis enim. - -[[Top]](#top) - -## Blockquotes - -Ad nisi laborum aute cupidatat magna deserunt eu id laboris id. Aliquip nulla cupidatat sint ex Lorem mollit laborum dolor amet est ut esse aute. Nostrud ex consequat id incididunt proident ipsum minim duis aliqua ut ex et ad quis. Laborum sint esse cillum anim nulla cillum consectetur aliqua sit. Nisi excepteur cillum labore amet excepteur commodo enim occaecat consequat ipsum proident exercitation duis id in. - -> Ipsum et cupidatat mollit exercitation enim duis sunt irure aliqua reprehenderit mollit. Pariatur Lorem pariatur laboris do culpa do elit irure. Eiusmod amet nulla voluptate velit culpa et aliqua ad reprehenderit sit ut. - -Labore ea magna Lorem consequat aliquip consectetur cillum duis dolore. Et veniam dolor qui incididunt minim amet laboris sit. Dolore ad esse commodo et dolore amet est velit ut nisi ea. Excepteur ea nulla commodo dolore anim dolore adipisicing eiusmod labore id enim esse quis mollit deserunt est. Minim ea culpa voluptate nostrud commodo proident in duis aliquip minim. - -> Qui est sit et reprehenderit aute est esse enim aliqua id aliquip ea anim. Pariatur sint reprehenderit mollit velit voluptate enim consectetur sint enim. Quis exercitation proident elit non id qui culpa dolore esse aliquip consequat. - -Ipsum excepteur cupidatat sunt minim ad eiusmod tempor sit. - -> Deserunt excepteur adipisicing culpa pariatur cillum laboris ullamco nisi fugiat cillum officia. In cupidatat nulla aliquip tempor ad Lorem Lorem quis voluptate officia consectetur pariatur ex in est duis. Mollit id esse est elit exercitation voluptate nostrud nisi laborum magna dolore dolore tempor in est consectetur. - -Adipisicing voluptate ipsum culpa voluptate id aute laboris labore esse fugiat veniam ullamco occaecat do ut. Tempor et esse reprehenderit veniam proident ipsum irure sit ullamco et labore ea excepteur nulla labore ut. Ex aute minim quis tempor in eu id id irure ea nostrud dolor esse. - -[[Top]](#top) - -## Lists - -### Ordered List - -1. Longan -2. Lychee -3. Excepteur ad cupidatat do elit laborum amet cillum reprehenderit consequat quis. - Deserunt officia esse aliquip consectetur duis ut labore laborum commodo aliquip aliquip velit pariatur dolore. -4. Marionberry -5. Melon - - Cantaloupe - - Honeydew - - Watermelon -6. Miracle fruit -7. Mulberry - -### Unordered List - -- Olive -- Orange - - Blood orange - - Clementine -- Papaya -- Ut aute ipsum occaecat nisi culpa Lorem id occaecat cupidatat id id magna laboris ad duis. Fugiat cillum dolore veniam nostrud proident sint consectetur eiusmod irure adipisicing. -- Passionfruit - -[[Top]](#top) - -## Horizontal rule - -In dolore velit aliquip labore mollit minim tempor veniam eu veniam ad in sint aliquip mollit mollit. Ex occaecat non deserunt elit laborum sunt tempor sint consequat culpa culpa qui sit. Irure ad commodo eu voluptate mollit cillum cupidatat veniam proident amet minim reprehenderit. - ---- - -In laboris eiusmod reprehenderit aliquip sit proident occaecat. Non sit labore anim elit veniam Lorem minim commodo eiusmod irure do minim nisi. Dolor amet cillum excepteur consequat sint non sint. - -[[Top]](#top) - -## Table - -Duis sunt ut pariatur reprehenderit mollit mollit magna dolore in pariatur nulla commodo sit dolor ad fugiat. Laboris amet ea occaecat duis eu enim exercitation deserunt ea laborum occaecat reprehenderit. Et incididunt dolor commodo consequat mollit nisi proident non pariatur in et incididunt id. Eu ut et Lorem ea ex magna minim ipsum ipsum do. - -| Table Heading 1 | Table Heading 2 | Center align | Right align | Table Heading 5 | -| :-------------- | :-------------- | :----------: | ----------: | :-------------- | -| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | -| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | -| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | -| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | -| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | - -Minim id consequat adipisicing cupidatat laborum culpa veniam non consectetur et duis pariatur reprehenderit eu ex consectetur. Sunt nisi qui eiusmod ut cillum laborum Lorem officia aliquip laboris ullamco nostrud laboris non irure laboris. Cillum dolore labore Lorem deserunt mollit voluptate esse incididunt ex dolor. - -[[Top]](#top) - -## Code - -### Inline code - -Ad amet irure est magna id mollit Lorem in do duis enim. Excepteur velit nisi magna ea pariatur pariatur ullamco fugiat deserunt sint non sint. Duis duis est `code in text` velit velit aute culpa ex quis pariatur pariatur laborum aute pariatur duis tempor sunt ad. Irure magna voluptate dolore consectetur consectetur irure esse. Anim magna `in culpa qui officia` dolor eiusmod esse amet aute cupidatat aliqua do id voluptate cupidatat reprehenderit amet labore deserunt. - -### Highlighted - -Et fugiat ad nisi amet magna labore do cillum fugiat occaecat cillum Lorem proident. In sint dolor ullamco ad do adipisicing amet id excepteur Lorem aliquip sit irure veniam laborum duis cillum. Aliqua occaecat minim cillum deserunt magna sunt laboris do do irure ea nostrud consequat ut voluptate ex. - -```go -package main - -import ( - "fmt" - "net/http" -) - -func handler(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) -} - -func main() { - http.HandleFunc("/", handler) - http.ListenAndServe(":8080", nil) -} -``` - -Ex amet id ex aliquip id do laborum excepteur exercitation elit sint commodo occaecat nostrud est. Nostrud pariatur esse veniam laborum non sint magna sit laboris minim in id. Aliqua pariatur pariatur excepteur adipisicing irure culpa consequat commodo et ex id ad. - -[[Top]](#top) - -## Inline elements - -Sint ea anim ipsum ad commodo cupidatat do **exercitation** incididunt et minim ad labore sunt. Minim deserunt labore laboris velit nulla incididunt ipsum nulla. Ullamco ad laborum ea qui et anim in laboris exercitation tempor sit officia laborum reprehenderit culpa velit quis. **Consequat commodo** reprehenderit duis [irure](#!) esse esse exercitation minim enim Lorem dolore duis irure. Nisi Lorem reprehenderit ea amet excepteur dolor excepteur magna labore proident voluptate ipsum. Reprehenderit ex esse deserunt aliqua ea officia mollit Lorem nulla magna enim. Et ad ipsum labore enim ipsum **cupidatat consequat**. Commodo non ea cupidatat magna deserunt dolore ipsum velit nulla elit veniam nulla eiusmod proident officia. - -![Super wide](https://images.unsplash.com/20/sand.JPG?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2071&q=80) - -_Proident sit veniam in est proident officia adipisicing_ ea tempor cillum non cillum velit deserunt. Voluptate laborum incididunt sit consectetur Lorem irure incididunt voluptate nostrud. Commodo ut eiusmod tempor cupidatat esse enim minim ex anim consequat. Mollit sint culpa qui laboris quis consectetur ad sint esse. Amet anim anim minim ullamco et duis non irure. Sit tempor adipisicing ea laboris `culpa ex duis sint` anim aute reprehenderit id eu ea. Aute [excepteur proident](#!) Lorem minim adipisicing nostrud mollit ad ut voluptate do nulla esse occaecat aliqua sint anim. - -![Not so big](https://placekitten.com/480/400) - -Incididunt in culpa cupidatat mollit cillum qui proident sit. In cillum aliquip incididunt voluptate magna amet cupidatat cillum pariatur sint aliqua est _enim **anim** voluptate_. Magna aliquip proident incididunt id duis pariatur eiusmod incididunt commodo culpa dolore sit. Culpa do nostrud elit ad exercitation anim pariatur non minim nisi **adipisicing sunt _officia_**. Do deserunt magna mollit Lorem commodo ipsum do cupidatat mollit enim ut elit veniam ea voluptate. - -Reprehenderit non eu quis in ad elit esse qui aute id [incididunt](#!) dolore cillum. Esse laboris consequat dolor anim exercitation tempor aliqua deserunt velit magna laboris. Culpa culpa minim duis amet mollit do quis amet commodo nulla irure. - -[[Top]](#top) - -## MDX - -```js ---- -publishDate: 'Aug 02 2022' -title: 'Markdown elements demo post' ---- -import Logo from "~/components/Logo.astro"; - -## MDX - - -``` - -
- -
- -[[Top]](#top) diff --git a/docs/pa-old-code/Prose 2.astro b/docs/pa-old-code/Prose 2.astro new file mode 100644 index 0000000..8f4f951 --- /dev/null +++ b/docs/pa-old-code/Prose 2.astro @@ -0,0 +1,50 @@ +--- +import clsx from 'clsx'; +--- + +
+ +
diff --git a/docs/todo2.md b/docs/todo2.md index cca4ed7..41fb4bb 100644 --- a/docs/todo2.md +++ b/docs/todo2.md @@ -141,6 +141,9 @@ https://salient.tailwindui.com/ // linkedin blog posts, example https://www.linkedin.com/pulse/react-19-beta-now-available-npm-iii-amigoes-qpjke/ +// tailwind guy +https://github.com/simonswiss/simonswiss.com + ----------- za local state mora react ili solid for state between pages nanostore with localStorage diff --git a/docs/todo3.md b/docs/todo3.md index 759f445..a377c6e 100644 --- a/docs/todo3.md +++ b/docs/todo3.md @@ -150,4 +150,8 @@ implement project list html extract pagination into layout remove redundant section and article tags from layouts extract Metadata type_ and fix Base layout props +improve PostItem image and rest +ul li PostList, ProjectList +not-prose not working for my-prose +not-prose fails for font-size, inherited from
, i za cn(proseClasses) ``` diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro index ed2eed2..a857b1b 100644 --- a/src/components/Pagination.astro +++ b/src/components/Pagination.astro @@ -17,7 +17,7 @@ export interface Props { export interface PaginationProps extends Props {} -export const getPaginationPropsFromPage = (page: Page): Props => ({ +export const getPaginationPropsFromPage = (page: Page): PaginationProps => ({ nextUrl: page.url.next, prevUrl: page.url.prev, current: page.currentPage, diff --git a/src/components/PostItem.astro b/src/components/PostItem.astro index 80ffbff..3a9cb42 100644 --- a/src/components/PostItem.astro +++ b/src/components/PostItem.astro @@ -5,7 +5,6 @@ import { getPostSlug } from '@/modules/post'; import Link from '@/components/Link.astro'; import PostMeta from '@/components/PostMeta.astro'; import TagList from '@/components/TagList.astro'; -import Heading from '@/components/ui/Heading.astro'; import { ROUTES } from '@/constants/routes'; import { renderMarkdown } from '@/utils/markdown'; import { getRandomLengthSubstring } from '@/utils/strings'; @@ -76,13 +75,12 @@ const postMetaProps = { {/* title */} - - {/* fix relative path here from tags and categories */} +

{title} {draft && (draft)} - +

{/* description, can have markdown */}
diff --git a/src/components/Prose.astro b/src/components/Prose.astro index 8f4f951..832e111 100644 --- a/src/components/Prose.astro +++ b/src/components/Prose.astro @@ -1,50 +1,21 @@ --- -import clsx from 'clsx'; ---- - -
+
diff --git a/src/components/Tag.astro b/src/components/Tag.astro index 98e3f44..5a7d461 100644 --- a/src/components/Tag.astro +++ b/src/components/Tag.astro @@ -8,7 +8,7 @@ const { class: className, ...props } = Astro.props; -
+
diff --git a/src/layouts/FullWidth.astro b/src/layouts/FullWidth.astro index 842f0f9..b76c439 100644 --- a/src/layouts/FullWidth.astro +++ b/src/layouts/FullWidth.astro @@ -8,7 +8,7 @@ const props = Astro.props; --- -
+
diff --git a/src/layouts/List.astro b/src/layouts/List.astro index a78e76a..1e01424 100644 --- a/src/layouts/List.astro +++ b/src/layouts/List.astro @@ -14,7 +14,7 @@ const { title, description } = metadata; --- -
+

{title}

{description &&

{description}

}
diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro index d6df848..e5e16e3 100644 --- a/src/layouts/Page.astro +++ b/src/layouts/Page.astro @@ -9,7 +9,7 @@ const props = Astro.props; --- -
+
diff --git a/src/layouts/Post.astro b/src/layouts/Post.astro index c289f68..792f942 100644 --- a/src/layouts/Post.astro +++ b/src/layouts/Post.astro @@ -13,11 +13,11 @@ const props = Astro.props;
-
+
-
+
diff --git a/src/pages/projects/[...page].astro b/src/pages/projects/[...page].astro index f5c4e25..8b17f5c 100644 --- a/src/pages/projects/[...page].astro +++ b/src/pages/projects/[...page].astro @@ -40,31 +40,29 @@ const layoutProps = { metadata, paginationProps }; {/* rewrite this html */} -
-
    - { - page.data.map((project) => ( -
  • - -
    -
    -
    - -
    -
    -
    -
    {project.data.title}
    - {project.data.description ? ( -
    - {project.data.description} -
    - ) : null} +
      + { + page.data.map((project) => ( +
    • + +
      +
      +
      +
      - -
    • - )) - } -
    -
    +
    +
    {project.data.title}
    + {project.data.description ? ( +
    + {project.data.description} +
    + ) : null} +
    +
    + +
  • + )) + } +
diff --git a/src/styles/my-prose.css b/src/styles/my-prose.css index 48d8e3c..0bd8f28 100644 --- a/src/styles/my-prose.css +++ b/src/styles/my-prose.css @@ -1,6 +1,6 @@ /* prose override */ @layer base { - .my-prose { + .my-prose:not(:where([class~='not-prose'], [class~='not-prose'] *)) { @apply prose prose-slate max-w-none dark:prose-invert; /* responsive styling */ @@ -10,5 +10,6 @@ @apply prose-h1:text-3xl md:prose-h1:text-4xl lg:prose-h1:text-5xl; /* h1 */ + /* @apply outline outline-pink-500; */ } } diff --git a/src/styles/tw-base.css b/src/styles/tw-base.css index 15299e3..f15e8b1 100644 --- a/src/styles/tw-base.css +++ b/src/styles/tw-base.css @@ -19,10 +19,18 @@ @apply font-extrabold; } - .prose { + .my-prose { /* @apply outline outline-blue-500; */ } + .not-prose { + /* @apply outline outline-red-500; */ + } + + .my-prose :not(:where([class~='not-prose'], [class~='not-prose'] *)) { + /* @apply outline outline-yellow-500; */ + } + /* h2 { @apply bg-green-200;