style: tweak border radiis and mobile
All checks were successful
Deploy Blog / deploy (push) Successful in 2m21s
All checks were successful
Deploy Blog / deploy (push) Successful in 2m21s
This commit is contained in:
parent
1b0f918622
commit
b1f3cde3a6
7 changed files with 341 additions and 342 deletions
|
@ -1,7 +1,7 @@
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { useTheme } from "@/context/ThemeProvider"
|
import { useTheme } from "@/context/ThemeProvider"
|
||||||
import { MoonStar } from "lucide-react"
|
import { MoonStar, MenuIcon } from "lucide-react"
|
||||||
import { Link } from "react-router"
|
import { Link } from "react-router"
|
||||||
import {
|
import {
|
||||||
NavigationMenu,
|
NavigationMenu,
|
||||||
|
@ -21,7 +21,7 @@ const Menu = () => {
|
||||||
<NavigationMenuList>
|
<NavigationMenuList>
|
||||||
{/* Desktop menu - hidden on mobile, visible on md+ */}
|
{/* Desktop menu - hidden on mobile, visible on md+ */}
|
||||||
<div className="hidden md:flex md:space-x-1">
|
<div className="hidden md:flex md:space-x-1">
|
||||||
<NavigationMenuItem>
|
<NavigationMenuItem className="border">
|
||||||
<NavigationMenuLink
|
<NavigationMenuLink
|
||||||
asChild
|
asChild
|
||||||
className={navigationMenuTriggerStyle()}
|
className={navigationMenuTriggerStyle()}
|
||||||
|
@ -29,7 +29,7 @@ const Menu = () => {
|
||||||
<Link to="/posts/page/1">Posts</Link>
|
<Link to="/posts/page/1">Posts</Link>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
<NavigationMenuItem>
|
<NavigationMenuItem className="border">
|
||||||
<NavigationMenuLink
|
<NavigationMenuLink
|
||||||
asChild
|
asChild
|
||||||
className={navigationMenuTriggerStyle()}
|
className={navigationMenuTriggerStyle()}
|
||||||
|
@ -40,17 +40,19 @@ const Menu = () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Mobile dropdown - visible only on small screens */}
|
{/* Mobile dropdown - visible only on small screens */}
|
||||||
<NavigationMenuItem className="md:hidden">
|
<NavigationMenuItem className="md:hidden px-4">
|
||||||
<NavigationMenuTrigger>Menu</NavigationMenuTrigger>
|
<NavigationMenuTrigger className="border rounded-none">
|
||||||
|
<MenuIcon />
|
||||||
|
</NavigationMenuTrigger>
|
||||||
|
|
||||||
<NavigationMenuContent>
|
<NavigationMenuContent>
|
||||||
<NavigationMenuLink asChild>
|
<NavigationMenuLink asChild>
|
||||||
<Link to="/posts/page/1" className="block px-2 py-1.5">
|
<Link to="/posts/page/1" className="block">
|
||||||
Posts
|
Posts
|
||||||
</Link>
|
</Link>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
<NavigationMenuLink asChild>
|
<NavigationMenuLink asChild>
|
||||||
<Link to="/about" className="block px-2 py-1.5">
|
<Link to="/about" className="block">
|
||||||
About
|
About
|
||||||
</Link>
|
</Link>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
|
@ -67,27 +69,26 @@ const Header = () => {
|
||||||
return (
|
return (
|
||||||
<header className="w-full h-12 flex items-center justify-center border-b fixed top-0 z-20 bg-sidebar">
|
<header className="w-full h-12 flex items-center justify-center border-b fixed top-0 z-20 bg-sidebar">
|
||||||
<div className="w-full px-0 md:px-4 flex items-center justify-between">
|
<div className="w-full px-0 md:px-4 flex items-center justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center md:px-0 px-4">
|
||||||
<Button variant="ghost" asChild>
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
asChild
|
||||||
|
className="border md:border-none rounded-none"
|
||||||
|
>
|
||||||
<Link to="/">
|
<Link to="/">
|
||||||
<span className="text-lg tracking-normal font-semibold">
|
<span className="text-lg font-semibold">Systems Obscure</span>
|
||||||
Systems Obscure
|
|
||||||
</span>
|
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between gap-2">
|
<div className="flex itemr justify-between md:gap-4">
|
||||||
<Toggle
|
<Toggle
|
||||||
|
className="border bg-background rounded-none"
|
||||||
pressed={theme === "dark"}
|
pressed={theme === "dark"}
|
||||||
onPressedChange={() =>
|
onPressedChange={() =>
|
||||||
setTheme(theme === "dark" ? "light" : "dark")
|
setTheme(theme === "dark" ? "light" : "dark")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{/*
|
<MoonStar size={10} />
|
||||||
|
|
||||||
<MoonStar />
|
|
||||||
*/}
|
|
||||||
<span className="">Dark theme</span>
|
|
||||||
</Toggle>
|
</Toggle>
|
||||||
<Menu />
|
<Menu />
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,15 @@ function NavigationMenuTrigger({
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}{" "}
|
{children}{" "}
|
||||||
|
{/*
|
||||||
|
|
||||||
<ChevronDownIcon
|
<ChevronDownIcon
|
||||||
className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
|
className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
*/}
|
||||||
</NavigationMenuPrimitive.Trigger>
|
</NavigationMenuPrimitive.Trigger>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,11 @@ const PostListing = ({ posts, title, showAllButton }) => {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{showAllButton && (
|
{showAllButton && (
|
||||||
<Button asChild variant="secondary" className="w-full mt-4">
|
<Button
|
||||||
|
asChild
|
||||||
|
variant="secondary"
|
||||||
|
className="w-full mt-4 rounded-none border-1"
|
||||||
|
>
|
||||||
<Link to="/posts/page/1">View all</Link>
|
<Link to="/posts/page/1">View all</Link>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -43,7 +43,7 @@ const AboutPage = () => {
|
||||||
<a
|
<a
|
||||||
href="https://en.wikipedia.org/wiki/ITV_(TV_network)"
|
href="https://en.wikipedia.org/wiki/ITV_(TV_network)"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="underline decoration-1 hover:text-primary/80 underline-offset-2"
|
className="underline decoration-1 hover:text-primary/80 underline-offset-4"
|
||||||
>
|
>
|
||||||
ITV
|
ITV
|
||||||
</a>{" "}
|
</a>{" "}
|
||||||
|
@ -53,7 +53,7 @@ const AboutPage = () => {
|
||||||
<a
|
<a
|
||||||
href="https://en.wikipedia.org/wiki/BBC"
|
href="https://en.wikipedia.org/wiki/BBC"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="underline decoration-1 hover:text-primary/80 underline-offset-2 font-medium"
|
className="underline decoration-1 hover:text-primary/80 underline-offset-4"
|
||||||
>
|
>
|
||||||
BBC
|
BBC
|
||||||
</a>{" "}
|
</a>{" "}
|
||||||
|
@ -61,7 +61,7 @@ const AboutPage = () => {
|
||||||
<a
|
<a
|
||||||
href="https://www.arria.com/"
|
href="https://www.arria.com/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="underline decoration-1 hover:text-primary/80 underline-offset-2"
|
className="underline decoration-1 hover:text-primary/80 underline-offset-4"
|
||||||
>
|
>
|
||||||
Arria NLG
|
Arria NLG
|
||||||
</a>{" "}
|
</a>{" "}
|
||||||
|
|
|
@ -2,43 +2,32 @@ import MainTemplate from "@/templates/MainTemplate"
|
||||||
import PostListing from "@/containers/PostListing"
|
import PostListing from "@/containers/PostListing"
|
||||||
import { usePosts } from "@/hooks/usePosts"
|
import { usePosts } from "@/hooks/usePosts"
|
||||||
import roundedPortrait from "../images/round-portrait.png"
|
import roundedPortrait from "../images/round-portrait.png"
|
||||||
import { Card, CardHeader, CardContent, CardFooter } from "@/components/ui/card"
|
|
||||||
import { Button } from "@/components/ui/button"
|
|
||||||
import { Link } from "react-router"
|
|
||||||
|
|
||||||
const HomePage = () => {
|
const HomePage = () => {
|
||||||
const { posts } = usePosts()
|
const { posts } = usePosts()
|
||||||
return (
|
return (
|
||||||
<MainTemplate>
|
<MainTemplate>
|
||||||
<div className="mb-7 border border-foreground py-6 px-6 md:py-8 md:px-8 dark:bg-sidebar">
|
<div className="mb-7 border border-foreground py-6 px-6 md:px-8 md:pt-9 dark:bg-sidebar">
|
||||||
<div className="flex flex-col items-center md:flex-row md:items-start gap-4 md:gap-8 md:flex-row-reverse">
|
<div className="flex flex-col items-center md:flex-row md:items-start gap-4 md:gap-8 md:flex-row-reverse">
|
||||||
{/* Image - centers on mobile, left-aligned on desktop */}
|
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
<img
|
<img
|
||||||
src={roundedPortrait}
|
src={roundedPortrait}
|
||||||
alt="Profile picture"
|
alt="Profile picture"
|
||||||
className="rounded-image w-36 h-36 md:w-38 md:h-38 object-contain"
|
className="rounded-image w-36 h-36 md:w-38 md:h-38 object-contain border-2 rounded-full"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Text content */}
|
|
||||||
<div className="text-center md:text-left flex-1">
|
<div className="text-center md:text-left flex-1">
|
||||||
<h1 className="scroll-m-20 text-2xl font-semibold">
|
<h1 className="scroll-m-20 text-2xl font-semibold">
|
||||||
Another software engineer with a blog
|
Another software engineer with a blog
|
||||||
</h1>
|
</h1>
|
||||||
<p className="leading-[1.7] mt-5">
|
<p className="leading-[1.7] mt-5">
|
||||||
I'm a self-taught software engineer currently working at ITV,
|
I'm a self-taught software engineer from London. This blog is a
|
||||||
previously at the BBC. This blog is a technical scrapbook and
|
technical scrapbook and digital garden.
|
||||||
digital garden.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/*
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/}
|
|
||||||
|
|
||||||
<PostListing
|
<PostListing
|
||||||
title="Recent posts"
|
title="Recent posts"
|
||||||
|
|
|
@ -12,7 +12,7 @@ p code {
|
||||||
|
|
||||||
.shiki {
|
.shiki {
|
||||||
padding: 1rem 1.2rem;
|
padding: 1rem 1.2rem;
|
||||||
border-radius: var(--radius);
|
border-radius: 0;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
margin: 1.5rem 0;
|
margin: 1.5rem 0;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
|
|
|
@ -60,7 +60,7 @@ const BlogTemplate = () => {
|
||||||
[&>li]:leading-[1.6]
|
[&>li]:leading-[1.6]
|
||||||
[&_li_code]:relative [&_li_code]:rounded [&_li_code]:bg-muted [&_li_code]:px-[0.3rem] [&_li_code]:py-[0.2rem] [&_li_code]:font-mono [&_li_code]:text-sm [&_li_code]:font-normal
|
[&_li_code]:relative [&_li_code]:rounded [&_li_code]:bg-muted [&_li_code]:px-[0.3rem] [&_li_code]:py-[0.2rem] [&_li_code]:font-mono [&_li_code]:text-sm [&_li_code]:font-normal
|
||||||
[&>p]:mt-6 [&>p]:leading-[1.6]
|
[&>p]:mt-6 [&>p]:leading-[1.6]
|
||||||
[&_a]:underline [&_a]:underline-offset-4 [&_a]:hover:text-muted-foreground [&_a]:font-medium
|
[&_a]:underline [&_a]:underline-offset-4 [&_a]:hover:text-muted-foreground
|
||||||
[&>figure]:w-full [&>figure]:flex [&>figure]:flex-col [&>figure]:items-center [&>figure]:justify-center [&>figure]:mb-6 [&>figure]:mx-auto
|
[&>figure]:w-full [&>figure]:flex [&>figure]:flex-col [&>figure]:items-center [&>figure]:justify-center [&>figure]:mb-6 [&>figure]:mx-auto
|
||||||
[&>figure>img]:w-full
|
[&>figure>img]:w-full
|
||||||
[&>figure>figcaption]:text-sm [&>figure>figcaption]:text-muted-foreground [&>figure>figcaption]:mt-3 [&>figure>figcaption]:text-center
|
[&>figure>figcaption]:text-sm [&>figure>figcaption]:text-muted-foreground [&>figure>figcaption]:mt-3 [&>figure>figcaption]:text-center
|
||||||
|
|
Loading…
Add table
Reference in a new issue