Skip to content

Commit

Permalink
✨ logo added to nav bar
Browse files Browse the repository at this point in the history
  • Loading branch information
yuancong-liu committed Nov 18, 2023
1 parent f476213 commit 25e2af6
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 27 deletions.
42 changes: 21 additions & 21 deletions src/app/blog/[slug]/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
@use '~/styles/utils.scss';
@use 'src/styles/mixins' as *;

.tag-group {
display: flex;
flex-wrap: wrap;
gap: 0 10px;
margin: 0 30px;

> .tag {
position: relative;
font-size: 1.4rem;
}

> .tag::before {
margin-right: 3px;
font-weight: 600;
color: utils.$shining-yellow-3;
content: '#';
}
}

.header {
overflow: visible;
position: relative;
Expand Down Expand Up @@ -44,7 +63,7 @@
> .date {
margin: 5px 30px;
font-weight: 600;
font-size: 1.4rem;
font-size: 1.6rem;
}
}

Expand All @@ -53,27 +72,9 @@
margin: 30px auto 80px;
padding: 0 30px;
overflow-x: hidden;
font-size: 1.4rem;
font-size: 1.6rem;
}

.tag-group {
display: flex;
flex-wrap: wrap;
gap: 0 10px;
margin: 0 30px;

> .tag {
position: relative;
font-size: 1.4rem;
}

> .tag::before {
margin-right: 3px;
font-weight: 600;
color: utils.$shining-yellow-3;
content: '#';
}

// > .tag::after {
// position: absolute;
// bottom: 10%;
Expand All @@ -88,7 +89,6 @@
// > .tag:hover::after {
// background-color: utils.$shining-yellow-2;
// }
}

.content-wrapper {
margin: 20px 0;
Expand Down
4 changes: 4 additions & 0 deletions src/app/blog/[slug]/layout.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.page-wrapper {
overflow-x: hidden;
margin-top: 50px;
}
9 changes: 5 additions & 4 deletions src/app/blog/[slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { NavBarCommon } from "~/components/common/navBarCommon";
import { NavBarCommon } from '~/components/common/navBarCommon';
import styles from './layout.module.scss';

type Props = {
children: React.ReactNode;
};

export default function PostLayout({ children }: Props) {
return (
<>
<div className={styles['page-wrapper']}>
<NavBarCommon />
{children}
</>
</div>
);
};
}
5 changes: 5 additions & 0 deletions src/assets/icons/logo-nav.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion src/components/common/navBarCommon/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use 'src/styles/mixins' as *;

.nav-bar {
position: sticky;
position: fixed;
top: 0;
z-index: 100;
width: 100%;
Expand Down Expand Up @@ -49,3 +49,11 @@
max-width: 300px;
}
}

.icons {
height: 30px;

@include sp() {
display: none;
}
}
4 changes: 4 additions & 0 deletions src/components/common/navBarCommon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import Link from 'next/link';
import LogoNav from '~/assets/icons/logo-nav.svg';
import styles from './index.module.scss';

export const NavBarCommon = () => {
return (
<nav className={styles['nav-bar']}>
<ul className={styles['nav-items']}>
<li className={styles['icons']}>
<LogoNav />
</li>
<li>
<Link href="/about-me">ABOUT ME</Link>
</li>
Expand Down
1 change: 0 additions & 1 deletion src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
html,
body {
margin: 0;
overflow-x: hidden;
font-family: Jost, sans-serif;
font-size: 10px;
line-height: 1.5;
Expand Down

1 comment on commit 25e2af6

@vercel
Copy link

@vercel vercel bot commented on 25e2af6 Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.