Skip to content

Commit 15f5f21

Browse files
committed
Constructing Pages
1 parent 187570a commit 15f5f21

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

src/components/Content/index.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Construction, Pickaxe } from "lucide-react";
12
import "./style.css";
23

34
export function Content({ content, loading }) {
@@ -37,6 +38,14 @@ export function Content({ content, loading }) {
3738
return (<>
3839
<div className="content">
3940
{!loading && decodeContent(content)}
41+
{!loading && <div className="no-content">
42+
<span className="no-content-icon">
43+
<Pickaxe />
44+
</span>
45+
<span className="no-content-text">
46+
This topic is currently being worked on.
47+
</span>
48+
</div>}
4049
</div>
4150
</>);
4251
}

src/components/Content/style.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,47 @@
102102
);
103103
}
104104

105+
.content .root:empty {
106+
display: none;
107+
}
108+
109+
.content .no-content {
110+
height: 100%;
111+
display: none;
112+
flex-direction: column;
113+
align-items: center;
114+
justify-content: center;
115+
gap: 1rem;
116+
}
117+
118+
.content:has(.root:empty) .no-content {
119+
display: flex;
120+
}
121+
122+
.no-content-icon {
123+
height: 4rem;
124+
aspect-ratio: 1;
125+
border-radius: 0.5rem;
126+
padding: 0.5rem;
127+
background: linear-gradient(
128+
to bottom right,
129+
var(--color-primary),
130+
var(--color-secondary),
131+
var(--color-tertiary)
132+
);
133+
}
134+
135+
.no-content-icon > * {
136+
width: 100%;
137+
height: 100%;
138+
display: flex;
139+
align-items: center;
140+
justify-content: center;
141+
}
142+
143+
.no-content-text {
144+
font-size: 1.25rem;
145+
font-weight: 500;
146+
color: var(--color-text-secondary);
147+
}
148+

0 commit comments

Comments
 (0)