forked from surjithctly/astroship
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c755263
commit ee30a40
Showing
11 changed files
with
313 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"bracketSameLine": true | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 @@ | ||
--- | ||
const { class: className } = Astro.props; | ||
--- | ||
|
||
<div class:list={["max-w-screen-xl mx-auto px-5", className]}> | ||
<slot /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
const { title, children } = Astro.props; | ||
--- | ||
|
||
<div @click.away="open = false" class="relative" x-data="{ open: false }"> | ||
<button @click="open = !open" class="flex"> | ||
<span>{title}</span> | ||
<svg | ||
fill="currentColor" | ||
viewBox="0 0 20 20" | ||
:class="{'rotate-180': open, 'rotate-0': !open}" | ||
class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1" | ||
><path | ||
fill-rule="evenodd" | ||
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" | ||
clip-rule="evenodd"></path> | ||
</svg> | ||
</button> | ||
<div | ||
x-show="open" | ||
x-transition:enter="transition ease-out duration-100" | ||
x-transition:enter-start="transform lg:opacity-0 lg:scale-95" | ||
x-transition:enter-end="transform lg:opacity-100 lg:scale-100" | ||
x-transition:leave="transition ease-in duration-75" | ||
x-transition:leave-start="transform lg:opacity-100 lg:scale-100" | ||
x-transition:leave-end="transform lg:opacity-0 lg:scale-95" | ||
class="lg:absolute lg:right-0 w-full mt-2 origin-top-right lg:w-48"> | ||
<div class="px-2 py-2 lg:bg-white lg:rounded-md lg:shadow"> | ||
{children.map((item) => <div>{item.title}</div>)} | ||
</div> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
import Container from "@components/container.astro"; | ||
import Dropdown from "./dropdown.astro"; | ||
const menuitems = [ | ||
{ | ||
title: "Features", | ||
path: "#", | ||
children: [ | ||
{ title: "Action", path: "#" }, | ||
{ title: "Another action", path: "#" }, | ||
{ title: "Dropdown Submenu", path: "#" }, | ||
], | ||
}, | ||
{ | ||
title: "Pricing", | ||
path: "/pricing", | ||
}, | ||
{ | ||
title: "About", | ||
path: "/about", | ||
}, | ||
{ | ||
title: "Blog", | ||
path: "/blog", | ||
}, | ||
{ | ||
title: "Resources", | ||
path: "#", | ||
children: [ | ||
{ title: "Action", path: "#" }, | ||
{ title: "Another action", path: "#" }, | ||
{ title: "Dropdown Submenu", path: "#" }, | ||
], | ||
}, | ||
]; | ||
--- | ||
|
||
<Container> | ||
<header | ||
class="flex justify-between my-5" | ||
x-data="{ open: false }" | ||
x-init="$watch('open', value => console.log(value))"> | ||
<div>Astroship</div> | ||
<nav | ||
class="lg:block" | ||
:class="{ 'block': open, 'hidden': !open }" | ||
x-show.transition="true"> | ||
<ul class="flex flex-col lg:flex-row gap-3"> | ||
{ | ||
menuitems.map((item) => ( | ||
<li> | ||
{item.children && ( | ||
<Dropdown title={item.title} children={item.children} /> | ||
)} | ||
{!item.children && <a href={item.path}>{item.title}</a>} | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
</nav> | ||
<div> | ||
<div class="block lg:hidden"> | ||
<button @click="open = !open" class="text-gray-800"> | ||
<svg | ||
fill="currentColor" | ||
class="w-4 h-4" | ||
viewBox="0 0 20 20" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
<title>Menu</title> | ||
<path | ||
x-show="open" | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M18.278 16.864a1 1 0 01-1.414 1.414l-4.829-4.828-4.828 4.828a1 1 0 01-1.414-1.414l4.828-4.829-4.828-4.828a1 1 0 011.414-1.414l4.829 4.828 4.828-4.828a1 1 0 111.414 1.414l-4.828 4.829 4.828 4.828z" | ||
></path> | ||
<path | ||
x-show="!open" | ||
fill-rule="evenodd" | ||
d="M4 5h16a1 1 0 010 2H4a1 1 0 110-2zm0 6h16a1 1 0 010 2H4a1 1 0 010-2zm0 6h16a1 1 0 010 2H4a1 1 0 010-2z" | ||
></path> | ||
</svg> | ||
</button> | ||
</div> login | ||
</div> | ||
</header> | ||
</Container> |
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 |
---|---|---|
@@ -1,35 +1,31 @@ | ||
--- | ||
import Navbar from "@components/navbar/navbar.astro"; | ||
export interface Props { | ||
title: string; | ||
title: string; | ||
} | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<title>{title}</title> | ||
</head> | ||
<body> | ||
<slot /> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<title>{title} {title && "|"} Astro Ship</title> | ||
</head> | ||
<body> | ||
<Navbar /> | ||
<slot /> | ||
<style is:global> | ||
// Improve Page speed | ||
// https://css-tricks.com/almanac/properties/c/content-visibility/ | ||
img { | ||
content-visibility: auto; | ||
} | ||
</style> | ||
</body> | ||
</html> | ||
<style is:global> | ||
:root { | ||
--accent: 124, 58, 237; | ||
--accent-gradient: linear-gradient(45deg, rgb(var(--accent)), #da62c4 30%, white 60%); | ||
} | ||
html { | ||
font-family: system-ui, sans-serif; | ||
background-color: #F6F6F6; | ||
} | ||
code { | ||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, | ||
Bitstream Vera Sans Mono, Courier New, monospace; | ||
} | ||
</style> |
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 |
---|---|---|
@@ -1 +1,13 @@ | ||
about | ||
<div>about</div> | ||
|
||
<div | ||
class="max-w-lg p-5 mt-10 text-sm text-left text-gray-600 border max-h-14" | ||
> | ||
<p> | ||
Thank you for being an early customer. We are still working on our | ||
collection of components & templates. It will take some time. | ||
By buying early, you will get 50% discount on the original price + | ||
all future updates for lifetime free! Sweet isn't it? It's a gift | ||
for you. | ||
</p> | ||
</div> |
Oops, something went wrong.