Skip to content

Commit 0a2a6a5

Browse files
authored
Merge pull request #3 from ak0r/revert-2-feature/tailwind-themes
Revert "Refactor styles and components for improved theming and layout"
2 parents 7fac360 + bc48f82 commit 0a2a6a5

File tree

10 files changed

+274
-446
lines changed

10 files changed

+274
-446
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
const { className } = Astro.props
33
---
4-
<section class:list={["markdown-content mb-6", className]}>
4+
<section class:list={["prose sm:prose-lg break-words mb-6 prose-cyan", className]}>
55
<slot />
66
</section>

src/components/blog/SinglePost.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const pubDate = frontmatter.publishedDate.toISOString()
2323
const isDraft = frontmatter.isDraft
2424
---
2525
<PageLayout>
26-
<Container outerClass="max-w-3xl" innerClass="max-w-2xl">
26+
<Container outerClass="px-6">
2727
<RenderMarkdown>
2828
<Content />
2929
</RenderMarkdown>
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
2-
const { outerClass, innerClass } = Astro.props
2+
const { outerClass } = Astro.props
33
---
4-
<div class:list={["outer-container", outerClass]}>
5-
<div class:list={["inner-container", innerClass]}>
6-
<slot />
7-
</div>
4+
<div class:list={["mx-auto", outerClass]}>
5+
<slot />
86
</div>

src/components/layout/Header.astro

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,39 @@ import ThemeSwitch from "@/components/widgets/ThemeSwitch.astro";
44
import Container from './Container.astro';
55
---
66

7-
<header class="fixed top-0 w-full h-[76px] border-b border-primary-txt/10 z-50 backdrop-blur-lg">
7+
<header class="fixed top-0 w-full h-[76px] border-b border-ink/10 z-50 backdrop-blur-lg">
88

99
<!-- Mobile menu -->
10-
<div id="navMenu" class="fixed bg-primary-bg shadow-sm h-full w-full text-xl sm:w-1/2 sm:text-2xl transform transition-transform duration-300 -translate-x-full z-50">
11-
<div class="flex flex-col min-h-screen w-full bg-primary-bg">
12-
<div class="">
13-
<!-- Logo -->
14-
<div class="flex items-center justify-between font-medium px-6 py-2 h-[76px] border-b border-primary-txt/10">
15-
<a class="flex items-center gap-2" href="/">
16-
<div class="text-lg font-bold">Umami</div>
17-
</a>
18-
<div id="closeBtn" class="">
19-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor" class="size-6">
20-
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
21-
</svg>
22-
</div>
23-
</div>
24-
<!-- Links -->
25-
<div class="flex flex-col text-center gap-3 px-2 py-8">
26-
<a href="/articles" class="px-4 py-2 text-muted-txt hover:text-primary-txt" aria-current={Astro.url.pathname === '/articles' ? 'page' : undefined}>
27-
<h2>Articles</h2>
28-
</a>
29-
<a href="/about" class="px-4 py-2 text-umami-tx-2 hover:text-umami-tx" aria-current={Astro.url.pathname === '/about' ? 'page' : undefined}>About</a>
30-
</div>
31-
<!-- Subscribe button -->
32-
<div class="px-4 py-2">
33-
<button class="text-lg font-medium border border-primary-ui rounded-3xl py-2 px-3 hover:border-umami-ui-2">
34-
Subscribe
35-
</button>
10+
<div id="navMenu" class="fixed bg-umami-bg shadow-sm h-full w-full text-xl sm:w-1/2 sm:text-2xl transform transition-transform duration-300 -translate-x-full z-50">
11+
<div class="flex flex-col px-4 min-h-screen w-full bg-umami-bg">
12+
<!-- Logo -->
13+
<div class="flex items-center justify-between font-medium px-4 py-2 h-[76px] border-b border-ink/10">
14+
<a class="flex items-center gap-2" href="/">
15+
<div class="text-lg font-bold">Umami</div>
16+
</a>
17+
<div id="closeBtn" class="">
18+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor" class="size-6">
19+
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
20+
</svg>
3621
</div>
3722
</div>
23+
<!-- Links -->
24+
<div class="flex flex-col gap-3 py-8">
25+
<a href="/articles" class="px-4 py-2 text-umami-tx-2 hover:text-umami-tx" aria-current={Astro.url.pathname === '/articles' ? 'page' : undefined}>Articles</a>
26+
<a href="/about" class="px-4 py-2 text-umami-tx-2 hover:text-umami-tx" aria-current={Astro.url.pathname === '/about' ? 'page' : undefined}>About</a>
27+
</div>
28+
<!-- Subscribe button -->
29+
<div class="px-4 py-2">
30+
<button class="text-lg font-medium border border-umami-ui rounded-3xl py-2 px-3 hover:border-umami-ui-2">
31+
Subscribe
32+
</button>
33+
</div>
3834
</div>
3935
</div>
4036

4137
<!-- Main Navigation -->
42-
<Container outerClass="flex flex-col max-w-4xl h-full">
43-
<nav class="flex h-full w-full">
38+
<Container outerClass="flex flex-col max-w-4xl px-2 py-2 mx-auto h-full">
39+
<nav class="flex h-full w-full px-4 ">
4440
<!-- Logo -->
4541
<a class="flex items-center gap-2" href="/">
4642
<div class="text-lg font-bold">Umami</div>

src/components/widgets/ThemeSwitch.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
---
33

4-
<button id="theme-toggle" aria-label="Toggle theme" class="p-2 rounded-full hover:cursor-pointer">
5-
<svg id="sun-icon" class="size-6" fill="none" stroke="var(--color-muted-txt)" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
4+
<button id="theme-toggle" aria-label="Toggle theme" class="p-2 rounded-full text-umami-tx2 hover:cursor-pointer hover:text-umami-tx">
5+
<svg id="sun-icon" class="size-6" fill="none" stroke="var(--flexoki-tx-2)" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
66
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
77
</svg>
8-
<svg id="moon-icon" class="size-6 hidden" fill="none" stroke="var(--color-muted-txt)" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
8+
<svg id="moon-icon" class="size-6 hidden" fill="none" stroke="var(--flexoki-tx-2)" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
99
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
1010
</svg>
1111
</button>

src/layouts/PageLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Footer from "@/components/layout/Footer.astro"
1313
<meta name="generator" content={Astro.generator} />
1414
<title>Astro</title>
1515
</head>
16-
<body class="relative ">
16+
<body class="relative bg-umami-bg text-umami-tx">
1717
<div class="min-h-screen flex-auto">
1818
<Header />
1919
<main class="flex py-24">

src/styles/fonts.css

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)