Skip to content

Commit e7f0529

Browse files
CSS Edited according to new Navbar Wrapper Component
1 parent abecafc commit e7f0529

File tree

6 files changed

+32
-44
lines changed

6 files changed

+32
-44
lines changed

quartz.layout.ts

+14-10
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@ import * as Component from "./quartz/components"
55
export const sharedPageComponents: SharedLayout = {
66
navbar: [
77
Component.PageTitle(),
8-
Component.MobileOnly(Component.Spacer()),
9-
Component.NavigationLinks({
10-
links: {
11-
Blogs: "/blogs",
12-
Github: "https://github.com/PrathameshDhande22/Java-Tutorial",
13-
"About Me": "https://github.com/PrathameshDhande22"
14-
}
15-
}),
16-
Component.Darkmode(),
17-
Component.Search()
8+
Component.NavbarWrapper({
9+
components: [
10+
Component.MobileOnly(Component.Spacer()),
11+
Component.NavigationLinks({
12+
links: {
13+
Blogs: "/blogs",
14+
Github: "https://github.com/PrathameshDhande22/Java-Tutorial",
15+
"About Me": "https://github.com/PrathameshDhande22"
16+
}
17+
}),
18+
Component.Search(),
19+
Component.Darkmode()
20+
]
21+
})
1822
],
1923
head: Component.Head(),
2024
header: [Component.MobileOnly(

quartz/components/styles/navbar.scss

+6-14
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
top: 0px;
77
padding-top: 5px;
88
width: 100%;
9-
display: flex;
109
background-color: var(--light);
1110
z-index: 100;
1211

@@ -21,27 +20,20 @@
2120
min-width: 95%;
2221
justify-content: space-between;
2322
align-items: center;
23+
padding: 0px 10px;
2424

2525
@media all and ($mobile) {
2626
width: 90%;
2727
gap: 10px;
28-
justify-content: flex-end;
2928
}
3029

31-
@media all and ($tablet) {
32-
width: 90%;
30+
@media all and (max-width:443px){
31+
justify-content: center;
32+
margin-bottom: 6px;
3333
}
3434

35-
& .explorer.mobile-only {
36-
position: relative;
37-
top: 15px;
38-
left: -20px;
35+
@media all and ($tablet) {
36+
width: 90%;
3937
}
4038
}
4139
}
42-
43-
.left.sidebar {
44-
& > .search {
45-
padding: 1rem 0 8px;
46-
}
47-
}

quartz/components/styles/navigationlinks.scss

-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
@use "../../styles/variables.scss" as *;
22

33
.nav-links {
4-
position: absolute;
5-
right: 9%;
64
display: flex;
7-
justify-content: center;
85
align-items: center;
96

10-
@media all and ($mobile) {
11-
position: relative;
12-
right: 0;
13-
}
14-
157
& .menu-btn {
168
display: none;
179
padding-top: 5px;

quartz/components/types.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ComponentType, JSX } from "preact"
2-
import { StaticResources } from "../util/resources"
2+
import { StaticResources, StringResource } from "../util/resources"
33
import { QuartzPluginData } from "../plugins/vfile"
44
import { GlobalConfiguration } from "../cfg"
55
import { Node } from "hast"
@@ -15,13 +15,13 @@ export type QuartzComponentProps = {
1515
allFiles: QuartzPluginData[]
1616
displayClass?: "mobile-only" | "desktop-only"
1717
} & JSX.IntrinsicAttributes & {
18-
[key: string]: any
19-
}
18+
[key: string]: any
19+
}
2020

2121
export type QuartzComponent = ComponentType<QuartzComponentProps> & {
22-
css?: string
23-
beforeDOMLoaded?: string
24-
afterDOMLoaded?: string
22+
css?: StringResource
23+
beforeDOMLoaded?: StringResource
24+
afterDOMLoaded?: StringResource
2525
}
2626

2727
export type QuartzComponentConstructor<Options extends object | undefined = undefined> = (

quartz/styles/custom.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ul.overflow > li:last-of-type {
1515
margin: 1rem 0 0;
1616
}
1717

18-
.page-title{
19-
@media all and ($mobile){
20-
font-size: 1.3rem;
21-
}
22-
}
18+
.page-title {
19+
@media all and ($mobile) {
20+
font-size: 1.5rem;
21+
}
22+
}

quartz/styles/variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $desktop: "(min-width: #{map.get($breakpoints, desktop)})";
1818

1919
$pageWidth: #{map.get($breakpoints, mobile)};
2020
$sidePanelWidth: 320px; //380px;
21-
$topSpacing: 5rem;
21+
$topSpacing: 6rem;
2222
$boldWeight: 700;
2323
$semiBoldWeight: 600;
2424
$normalWeight: 400;

0 commit comments

Comments
 (0)