helfy-create 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/template/package-lock.json +1326 -1345
- package/template/package.json +5 -9
- package/template/{webpack.config.js → rspack.config.js} +6 -11
- package/template/src/App.tsx +2 -0
- package/template/src/context/ThemeContext.tsx +14 -16
- package/template/src/pages/AboutPage.tsx +6 -1
- package/template/src/pages/CounterPage.tsx +3 -3
- package/template/src/pages/HomePage.tsx +8 -1
- package/template/src/pages/layouts/MainLayout.tsx +12 -14
- package/template/src/styles.css +316 -20
- package/template/src/widgets/Header/Header.tsx +21 -5
- package/template/src/widgets/Navbar/Navbar.tsx +5 -18
- package/template/src/widgets/NotFound/NotFound.tsx +9 -15
|
@@ -7,34 +7,21 @@ export class NavBar {
|
|
|
7
7
|
|
|
8
8
|
render() {
|
|
9
9
|
return (
|
|
10
|
-
<nav class="
|
|
10
|
+
<nav class="sidebar-nav">
|
|
11
11
|
<Link
|
|
12
12
|
to="/"
|
|
13
13
|
label="Home"
|
|
14
|
-
class={
|
|
15
|
-
this.pathname === "/"
|
|
16
|
-
? "px-2 py-1.5 rounded-md bg-indigo-50 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-200 font-semibold"
|
|
17
|
-
: "px-2 py-1.5 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
18
|
-
}
|
|
14
|
+
class={this.pathname === "/" ? "nav-link nav-link--active" : "nav-link"}
|
|
19
15
|
/>
|
|
20
16
|
<Link
|
|
21
17
|
to="/counter"
|
|
22
18
|
label="Counter"
|
|
23
|
-
class={
|
|
24
|
-
|
|
25
|
-
? "px-2 py-1.5 rounded-md bg-indigo-50 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-200 font-semibold"
|
|
26
|
-
: "px-2 py-1.5 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
27
|
-
}
|
|
28
|
-
>
|
|
29
|
-
</Link>
|
|
19
|
+
class={this.pathname === "/counter" ? "nav-link nav-link--active" : "nav-link"}
|
|
20
|
+
/>
|
|
30
21
|
<Link
|
|
31
22
|
to="/about"
|
|
32
23
|
label="About"
|
|
33
|
-
class={
|
|
34
|
-
this.pathname === "/about"
|
|
35
|
-
? "px-2 py-1.5 rounded-md bg-indigo-50 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-200 font-semibold"
|
|
36
|
-
: "px-2 py-1.5 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
37
|
-
}
|
|
24
|
+
class={this.pathname === "/about" ? "nav-link nav-link--active" : "nav-link"}
|
|
38
25
|
/>
|
|
39
26
|
</nav>
|
|
40
27
|
);
|
|
@@ -5,31 +5,25 @@ export interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@View
|
|
8
|
-
/**
|
|
8
|
+
/** Custom 404 page — overrides the fallback RouterView. */
|
|
9
9
|
export class NotFound {
|
|
10
10
|
constructor(private readonly props: Props = {}) {}
|
|
11
11
|
|
|
12
12
|
render() {
|
|
13
13
|
return (
|
|
14
|
-
<section class="
|
|
15
|
-
<div class="
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Упс! Страница не найдена
|
|
20
|
-
</h1>
|
|
21
|
-
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400 max-w-md">
|
|
22
|
-
Запрошенный адрес не существует или был перемещён.
|
|
14
|
+
<section class="not-found">
|
|
15
|
+
<div class="not-found__code">404</div>
|
|
16
|
+
<h1 class="not-found__title">Oops! Page not found</h1>
|
|
17
|
+
<p class="not-found__text">
|
|
18
|
+
The requested address does not exist or has been moved.
|
|
23
19
|
</p>
|
|
24
20
|
{(this.props.pathname ?? "") && (
|
|
25
|
-
<p class="
|
|
26
|
-
{this.props.pathname}
|
|
27
|
-
</p>
|
|
21
|
+
<p class="not-found__path">{this.props.pathname}</p>
|
|
28
22
|
)}
|
|
29
23
|
<Link
|
|
30
24
|
to="/"
|
|
31
|
-
label="
|
|
32
|
-
class="
|
|
25
|
+
label="Back to home"
|
|
26
|
+
class="btn btn--primary"
|
|
33
27
|
/>
|
|
34
28
|
</section>
|
|
35
29
|
);
|