commit 119a5f3e0d28e01dfd05136c03c75bcd9093ef3c Author: Filip Znachor Date: Wed Apr 24 16:07:10 2024 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e8c165 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +dist/ +.astro/ +node_modules/ \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..22a1505 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode"], + "unwantedRecommendations": [] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d642209 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..605e701 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,8 @@ +import { defineConfig } from 'astro/config'; + +import icon from "astro-icon"; + +// https://astro.build/config +export default defineConfig({ + integrations: [icon()] +}); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..857d890 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "web", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/check": "^0.5.10", + "@iconify-json/mdi": "^1.1.66", + "@iconify-json/tabler": "^1.1.110", + "astro": "^4.6.3", + "astro-icon": "^1.1.0", + "localtunnel": "^2.0.2", + "typescript": "^5.4.5" + } +} \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..daa815d --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,7 @@ +RewriteEngine on + +RewriteCond %{HTTP_HOST} !^www.codespace.cz$ +RewriteRule (.*)$ http://www.codespace.cz/$1 [R=301,L] + +RewriteCond %{HTTPS} !=on +RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] diff --git a/public/assets/logo.webp b/public/assets/logo.webp new file mode 100644 index 0000000..aa416d0 Binary files /dev/null and b/public/assets/logo.webp differ diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..f157bd1 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,9 @@ + + + + diff --git a/public/logo.svg b/public/logo.svg new file mode 100644 index 0000000..3861c3d --- /dev/null +++ b/public/logo.svg @@ -0,0 +1 @@ +{$ \ No newline at end of file diff --git a/src/components/Card.astro b/src/components/Card.astro new file mode 100644 index 0000000..bd6d597 --- /dev/null +++ b/src/components/Card.astro @@ -0,0 +1,61 @@ +--- +interface Props { + title: string; + body: string; + href: string; +} + +const { href, title, body } = Astro.props; +--- + + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..829a8da --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/components/Nav.astro b/src/components/Nav.astro new file mode 100644 index 0000000..f774d23 --- /dev/null +++ b/src/components/Nav.astro @@ -0,0 +1,38 @@ +--- +import { Icon } from 'astro-icon/components'; +import NavLink from './NavLink.astro'; + +const nav = [ + {title: "Úvod", link: "/"}, + {title: "Služby", link: "/sluzby"}, + // {title: "O nás", link: "/o-nas"}, + {title: "Kontakt", link: "/kontakt"} +]; +--- + + + \ No newline at end of file diff --git a/src/components/NavLink.astro b/src/components/NavLink.astro new file mode 100644 index 0000000..ee43b36 --- /dev/null +++ b/src/components/NavLink.astro @@ -0,0 +1,15 @@ +--- +import type { HTMLAttributes } from 'astro/types'; + +type Props = HTMLAttributes<'a'>; + +const { href, class: className, ...props } = Astro.props; + +const { pathname } = Astro.url; +const subpath = pathname.match(/[^\/]+/g); +const isActive = href === pathname || href === '/' + subpath?.[0]; +--- + + + + \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..acef35f --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/fonts/Cantarell-Bold.woff b/src/fonts/Cantarell-Bold.woff new file mode 100644 index 0000000..8fe2bc2 Binary files /dev/null and b/src/fonts/Cantarell-Bold.woff differ diff --git a/src/fonts/Cantarell-Bold.woff2 b/src/fonts/Cantarell-Bold.woff2 new file mode 100644 index 0000000..1ebcd2e Binary files /dev/null and b/src/fonts/Cantarell-Bold.woff2 differ diff --git a/src/fonts/Cantarell-ExtraBold.woff b/src/fonts/Cantarell-ExtraBold.woff new file mode 100644 index 0000000..35d025c Binary files /dev/null and b/src/fonts/Cantarell-ExtraBold.woff differ diff --git a/src/fonts/Cantarell-ExtraBold.woff2 b/src/fonts/Cantarell-ExtraBold.woff2 new file mode 100644 index 0000000..e766b6d Binary files /dev/null and b/src/fonts/Cantarell-ExtraBold.woff2 differ diff --git a/src/fonts/Cantarell-Regular.woff b/src/fonts/Cantarell-Regular.woff new file mode 100644 index 0000000..dba4d5e Binary files /dev/null and b/src/fonts/Cantarell-Regular.woff differ diff --git a/src/fonts/Cantarell-Regular.woff2 b/src/fonts/Cantarell-Regular.woff2 new file mode 100644 index 0000000..57c36a0 Binary files /dev/null and b/src/fonts/Cantarell-Regular.woff2 differ diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..2e5f4d4 --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,35 @@ +--- +import Nav from '../components/Nav.astro'; +import Footer from '../components/Footer.astro'; + +interface Meta { + title?: string; + desc: string; +} + +interface Props { + meta: Meta +} + +const { meta } = Astro.props; + +import '../styles/global.css'; +import '../styles/fonts.css'; +--- + + + + + + {meta.title} + + + + + + +