generated from kurone-kito/vpm-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): added the default template component
- Loading branch information
1 parent
69ad8b1
commit 0c1252a
Showing
3 changed files
with
36 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { Component, ParentProps } from 'solid-js'; | ||
import { Footer } from '../organisms/Footer.js'; | ||
import { Navbar } from '../organisms/Navbar.js'; | ||
import { vccUrl, vpmUrl } from '../../constants.json'; | ||
|
||
/** The URL to add to VCC. */ | ||
const encodedVccUrl = `${vccUrl}${encodeURIComponent(vpmUrl)}`; | ||
|
||
/** | ||
* The default template. | ||
* @param props The component properties. | ||
* @returns The component. | ||
*/ | ||
export const DefaultTemplate: Component<ParentProps> = (props) => { | ||
const { children } = props; | ||
return ( | ||
<div class="bg-zinc-100 text-surface dark:bg-neutral-600 dark:text-white"> | ||
<Navbar addToVccLink={encodedVccUrl} /> | ||
<main class="min-h-[calc(100vh-40px-98px)]">{children}</main> | ||
<Footer /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters