diff --git a/package.json b/package.json
index 11bf724..ae36d9d 100644
--- a/package.json
+++ b/package.json
@@ -11,11 +11,12 @@
},
"dependencies": {
"@astrojs/check": "^0.5.10",
+ "@codespacecz/web": "^0.0.1",
"@iconify-json/mdi": "^1.1.66",
"@iconify-json/tabler": "^1.1.110",
"astro": "^4.6.3",
- "astro-icon": "^1.1.0",
"astro-i18n": "^2.2.4",
+ "astro-icon": "^1.1.0",
"typescript": "^5.4.5"
}
}
\ No newline at end of file
diff --git a/src/components/Nav.astro b/src/components/Nav.astro
deleted file mode 100644
index d846bb1..0000000
--- a/src/components/Nav.astro
+++ /dev/null
@@ -1,43 +0,0 @@
----
-import { Icon } from 'astro-icon/components';
-import NavLink from './NavLink.astro';
-import LanguageSwitcher from './LanguageSwitcher.astro';
-import "../styles/nav.css";
-import { t, l } from "astro-i18n";
-
-const nav = [
- {title: "home", link: l("/")},
- {title: "services", link: l("/sluzby")},
- {title: "contact", link: l("/kontakt")}
-];
----
-
-
-
\ No newline at end of file
diff --git a/src/components/NavLink.astro b/src/components/NavLink.astro
deleted file mode 100644
index 514e51b..0000000
--- a/src/components/NavLink.astro
+++ /dev/null
@@ -1,14 +0,0 @@
----
-import type { HTMLAttributes } from 'astro/types';
-
-type Props = HTMLAttributes<'a'>;
-
-const { href, class: className, ...props } = Astro.props;
-
-const { pathname } = Astro.url;
-const isActive = href === pathname;
----
-
-
-
-
\ No newline at end of file
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index f6e7fc1..9b6b2cb 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -1,20 +1,10 @@
---
-import Nav from '../components/Nav.astro';
+import { MetaTags, Nav, NavLink } from '@codespacecz/web/components';
+import { type Meta } from '@codespacecz/web/types';
+import LanguageSwitcher from '../components/LanguageSwitcher.astro';
import Footer from '../components/Footer.astro';
-import { t } from 'astro-i18n';
-
-export interface Meta {
- site_name: string,
- author: string,
- title: string,
- desc: string,
- title_suffix: string,
- use_title_suffix: boolean,
- image: string,
- image_type: "banner" | "icon",
- favicon: string,
- color: string
-}
+import { Icon } from 'astro-icon/components';
+import { l, t } from 'astro-i18n';
type Styles = "white-nav";
@@ -36,16 +26,19 @@ const defaultMeta: Meta = {
color: "#cc1e58"
};
+const nav = [
+ {title: "home", link: l("/")},
+ {title: "services", link: l("/sluzby")},
+ {title: "contact", link: l("/kontakt")}
+];
+
const props = Astro.props;
const meta = { ...defaultMeta, ...props.meta };
let classes: string[] = [];
props.style?.forEach(s => classes.push(`style-${s}`));
-const title = meta.title + (meta.use_title_suffix ? meta.title_suffix : "");
-const card = meta.image_type == "banner" ? "summary_large_image" : "summary";
-
-import '../styles/variables.css';
+import '@codespacecz/web/style.css';
import '../styles/global.css';
import '../styles/fonts.css';
---
@@ -53,28 +46,27 @@ import '../styles/fonts.css';
-
- {title}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
diff --git a/src/styles/global.css b/src/styles/global.css
index be9b585..e370764 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -1,30 +1,11 @@
-html, body {font-family: Cantarell, sans-serif; background-color: var(--bg-color); color: var(--text-color); margin: 0; line-height: 1.5; font-size: 20px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh;}
-
-:is(nav, header, section, footer) > .inner {max-width: var(--site-width); margin: auto; padding: 0 var(--site-padding);}
-
-@media screen and (max-width: 600px) {
- :root {
- --site-padding: 20px;
- }
+:root {
+ --brand-color-1: #db2446;
+ --brand-color-2: #c51b6e;
}
-h1, h2, h3, h4, h5 {color: var(--title-color); font-weight: 900;}
-
-a {color: var(--link-color);}
-a:hover {color: var(--link-hover-color);}
-
-
-/* Sections */
-
-:is(header, section, footer) > .inner {margin: 70px auto; padding: 0 var(--site-padding);}
-
-
/* Header */
-header > .inner {padding: 0 var(--site-padding);}
-header {overflow: hidden;}
-
-header:not(.no-line) + section {border-top: 1px solid var(--border-color);}
+header.centered {text-align: center;}
header.main {background-image: radial-gradient(max(50vh, 60vw) at -30vw 70vh, var(--brand-color-2), transparent), radial-gradient(max(50vh, 60vw) at 110vw -10vh, var(--brand-color-1), transparent); background-color: #000;}
diff --git a/src/styles/nav.css b/src/styles/nav.css
deleted file mode 100644
index 10fc167..0000000
--- a/src/styles/nav.css
+++ /dev/null
@@ -1,49 +0,0 @@
-nav {position: relative; top: 0; left: 0; width: 100%; border-bottom: 1px solid var(--border-color); height: var(--nav-height);}
-
-.style-white-nav nav img {filter: grayscale(1) brightness(10);}
-
-nav .inner {display: flex; gap: 30px; align-items: center;}
-
-nav .title > * {display: none;}
-nav .title img {height: 30px;}
-nav .title .icon {padding: 20px; margin: -20px; cursor: pointer; font-size: 24px; color: var(--title-color);}
-nav .title .logo {display: flex;}
-
-nav :is(a, label) {display: flex; align-items: center;}
-
-nav ul {list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; font-size: 20px; flex: 1;}
-nav ul a {gap: 8px; color: var(--text-color); text-decoration: none; font-weight: 700; padding: 22px 0;}
-
-nav a.active {color: var(--nav-link-color); box-shadow: 0 1px 0 0 var(--nav-link-color);}
-nav a:hover {color: var(--text-hover-color);}
-
-nav ul li.right {margin-left: auto;}
-
-#menu-toggle {display: none;}
-
-@media screen and (max-width: 900px) {
-
- :root {
- --nav-height: 64px !important;
- }
-
- nav {overflow: hidden;}
- #menu-toggle:checked + nav {height: 100%;}
-
- nav .inner {display: block; flex-direction: column-reverse;}
- nav .title {display: grid; gap: 15px; grid-template-columns: 1fr max-content; border-bottom: 1px solid var(--border-color); height: var(--nav-height);}
- nav .title > *, .nav .title {display: flex; align-items: center;}
- nav .title img {height: 24px;}
-
- nav ul {flex-direction: column; margin: 20px 0; gap: 0px;}
- nav ul li {margin: 0 !important;}
-
- nav ul a {padding: 6px 20px; padding-left: 51px; margin: 0 -20px; font-size: 18px; position: relative; text-decoration: none;}
- nav ul a.active {font-weight: 900; box-shadow: none;}
-
- nav ul a::before {content: ""; width: 11px; height: 2px; background-color: var(--inactive-color); position: absolute; left: 23px; top: 50%; border-radius: 5px;}
- nav ul a.active::before {background-color: var(--brand-color-1);}
-
-}
-
-:not(#menu-toggle:checked) + nav + header.under-nav {margin-top: calc(-1px - var(--nav-height)); padding-top: calc(1px + var(--nav-height));}
diff --git a/src/styles/variables.css b/src/styles/variables.css
deleted file mode 100644
index 5747a33..0000000
--- a/src/styles/variables.css
+++ /dev/null
@@ -1,26 +0,0 @@
-:root {
-
- --bg-color: #18181b;
- --alt-bg-color: #232327;
-
- --border-color: rgba(255, 255, 255, 0.1);
-
- --brand-color-1: #db2446;
- --brand-color-2: #c51b6e;
-
- --nav-link-color: #fff;
- --inactive-color: #fff5;
-
- --title-color: #fff;
- --text-color: #fffa;
- --text-hover-color: #fffd;
- --text-active-color: #fff;
-
- --link-color: #dd4379;
- --link-hover-color: #c21f58;
-
- --site-padding: 40px;
- --site-width: 1200px;
- --nav-height: 75px;
-
-}