mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 18:36:21 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6c7602123 | ||
|
|
6da6231c92 | ||
|
|
19f84d2188 |
No files matched your search
@@ -1,14 +1,12 @@
|
||||
# `Nocturne: personal website & CMS`
|
||||
|
||||
> This is the last working version
|
||||
|
||||
This is the code repo of my personal website, and [here](https://github.com/Lumither/blog-posts/) is the link of the
|
||||
content repo.
|
||||
|
||||
Powered by Next.js and Rust, built with passion and love
|
||||
|
||||
<p align="center">
|
||||
<img src="https://avatars.githubusercontent.com/u/46409277?v=4" alt="GitHub Avatar"/>
|
||||
</p>
|
||||
|
||||
*will add more here in the future
|
||||
|
||||
## Nav:
|
||||
|
||||
@@ -17,7 +17,7 @@ const Footer = (props: Props) => {
|
||||
const author = post['meta']['author'] ?? 'Tao';
|
||||
const author_link = post['meta']['author_link'] ?? '/about';
|
||||
const post_date = new Date(post['first_update']);
|
||||
const update_date = new Date(post['last_update']);
|
||||
const update_date: Date | undefined = post['last_update'] ? new Date(post['last_update']) : undefined;
|
||||
const cc = post['meta']['cc'] ?? 'by-nc-sa';
|
||||
|
||||
|
||||
@@ -55,14 +55,16 @@ const Footer = (props: Props) => {
|
||||
year: `numeric`
|
||||
}) }</p>
|
||||
</div>
|
||||
<div>
|
||||
<p className={ 'text-lg font-bold' }>Updated on</p>
|
||||
<p>{ update_date.toLocaleString('default', {
|
||||
month: `long`,
|
||||
day: `numeric`,
|
||||
year: `numeric`
|
||||
}) }</p>
|
||||
</div>
|
||||
{ update_date &&
|
||||
<div>
|
||||
<p className={ 'text-lg font-bold' }>Updated on</p>
|
||||
<p>{ update_date.toLocaleString('default', {
|
||||
month: `long`,
|
||||
day: `numeric`,
|
||||
year: `numeric`
|
||||
}) }</p>
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
<p className={ 'text-lg font-bold' }>Published under</p>
|
||||
<Link href={ `https://creativecommons.org/licenses/${ cc }/4.0/` }>
|
||||
|
||||
@@ -3,7 +3,16 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Button } from '@nextui-org/react';
|
||||
import Image from 'next/image';
|
||||
import { IoHome, IoInformationCircle, IoLink, IoLogoGithub, IoMail, IoPencil, IoSearch } from 'react-icons/io5';
|
||||
import {
|
||||
IoFlask,
|
||||
IoHome,
|
||||
IoInformationCircle,
|
||||
IoLink,
|
||||
IoLogoGithub,
|
||||
IoMail,
|
||||
IoPencil,
|
||||
IoSearch
|
||||
} from 'react-icons/io5';
|
||||
import Link from 'next/link';
|
||||
import ThemeSwitcher from '@/components/ThemeSwitcher';
|
||||
import { usePathname } from 'next/navigation';
|
||||
@@ -34,6 +43,10 @@ const entries: { display_name: string; href: string; icon: React.ReactNode }[] =
|
||||
icon: <IoSearch size={ `20px` }></IoSearch>,
|
||||
display_name: 'Search',
|
||||
href: '/search'
|
||||
}, {
|
||||
icon: <IoFlask size={ '20px' } />,
|
||||
display_name: 'Lab',
|
||||
href: 'https://lab.lmt.moe'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -51,18 +64,6 @@ const connections: { label: string, href: string, icon: React.ReactNode }[] = [
|
||||
];
|
||||
|
||||
function Navbar() {
|
||||
// const [ scrolled, setScrolled ] = useState(false);
|
||||
// useEffect(() => {
|
||||
// const handleScroll = () => {
|
||||
// const isScrolled = window.scrollY > 0;
|
||||
// setScrolled(isScrolled);
|
||||
// };
|
||||
// window.addEventListener('scroll', handleScroll);
|
||||
// return () => {
|
||||
// window.removeEventListener('scroll', handleScroll);
|
||||
// };
|
||||
// }, []);
|
||||
|
||||
|
||||
const path = usePathname();
|
||||
const [ shownPath, setShownPath ] = useState(path);
|
||||
|
||||
Reference in new issue
Block a user