WIP: Astro migration

This commit is contained in:
Sergejs Kozinecs 2026-07-29 13:25:44 +03:00
parent bfe55eb38c
commit 7724f71ee7
46 changed files with 4786 additions and 2805 deletions

View file

@ -7,7 +7,54 @@
<option name="selectedModelId" value="auto" /> <option name="selectedModelId" value="auto" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="01345e21-67ff-441a-b47b-439ace178327" name="Changes" comment="Add captcha verification to contact form and improve error handling" /> <list default="true" id="01345e21-67ff-441a-b47b-439ace178327" name="Changes" comment="Add captcha verification to contact form and improve error handling">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/astro.config.mjs" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/astro.config.mjs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/pnpm-lock.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/pnpm-lock.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/custom-pc4u.png" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/custom-pc4u.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/mockba-modular.png" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/mockba-modular.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/pryatki.png" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/pryatki.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/sizzapp.png" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/sizzapp.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/trackpro.png" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/assets/images/main/projects/trackpro.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/BaseHead.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/BaseHead.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/ContactForm/ContactForm.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/ContactForm/ContactForm.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/ContactForm/contact-form.style.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/ContactForm/contact-form.style.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Contacts/Contacts.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/Contacts/Contacts.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Contacts/contacts.style.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/Contacts/contacts.style.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Footer/Footer.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/Footer/Footer.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Footer/footer.style.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/Footer/footer.style.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/FormInput/FormInput.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/FormInput/FormInput.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/FormInput/form-input.style.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/FormInput/form-input.style.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/FormattedDate.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/FormattedDate.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Header.astro" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Header/Header.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/Header/Header.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/Header/header.style.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/Header/header.style.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/HeaderLink.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/HeaderLink.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/components/HomePage.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/components/HomePage.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/consts.ts" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/consts.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/content.config.ts" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/content.config.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/content/blog/first-post.md" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/content/blog/first-post.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/content/blog/markdown-style-guide.md" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/content/blog/markdown-style-guide.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/content/blog/second-post.md" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/content/blog/second-post.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/content/blog/third-post.md" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/content/blog/third-post.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/content/blog/using-mdx.mdx" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/content/blog/using-mdx.mdx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/i18n/ui.ts" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/i18n/ui.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/i18n/utils.ts" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/i18n/utils.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/layouts/BlogPost.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/layouts/BlogPost.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/pages/about.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/pages/about.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/pages/blog/[...slug].astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/pages/blog/[...slug].astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/pages/blog/index.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/pages/blog/index.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/pages/lv/index.astro" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/pages/lv/index.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/pages/rss.xml.js" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/pages/rss.xml.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/styles/global.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/styles/global.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/styles/index.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/styles/index.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/styles/reset.css" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/styles/reset.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/translations/en.json" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/translations/en.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/src/translations/lv.json" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/src/translations/lv.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/AstroLanding/tsconfig.json" beforeDir="false" afterPath="$PROJECT_DIR$/AstroLanding/tsconfig.json" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -68,6 +115,7 @@
"RunOnceActivity.typescript.service.memoryLimit.init": "true", "RunOnceActivity.typescript.service.memoryLimit.init": "true",
"codeWithMe.voiceChat.enabledByDefault": "false", "codeWithMe.voiceChat.enabledByDefault": "false",
"copilot.chat.legacySessionMetadata.migrated": "true", "copilot.chat.legacySessionMetadata.migrated": "true",
"git-widget-placeholder": "astro-migration",
"javascript.preferred.runtime.type.id": "node", "javascript.preferred.runtime.type.id": "node",
"js.debugger.nextJs.config.created.client": "true", "js.debugger.nextJs.config.created.client": "true",
"js.debugger.nextJs.config.created.server": "true", "js.debugger.nextJs.config.created.server": "true",
@ -81,7 +129,7 @@
"node.js.selected.package.jshint": "", "node.js.selected.package.jshint": "",
"node.js.selected.package.tslint": "(autodetect)", "node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "yarn", "nodejs_package_manager_path": "yarn",
"settings.editor.selected.configurable": "vcs.Git", "settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
"ts.external.directory.path": "/Users/sergejskozinecs/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external", "ts.external.directory.path": "/Users/sergejskozinecs/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external",
"vue.rearranger.settings.migration": "true" "vue.rearranger.settings.migration": "true"
} }
@ -133,6 +181,8 @@
<workItem from="1750329776913" duration="2946000" /> <workItem from="1750329776913" duration="2946000" />
<workItem from="1784537953715" duration="6202000" /> <workItem from="1784537953715" duration="6202000" />
<workItem from="1784899208755" duration="13951000" /> <workItem from="1784899208755" duration="13951000" />
<workItem from="1785220782898" duration="240000" />
<workItem from="1785317634340" duration="2709000" />
</task> </task>
<task id="LOCAL-00001" summary="Add captcha verification to contact form and improve error handling"> <task id="LOCAL-00001" summary="Add captcha verification to contact form and improve error handling">
<option name="closed" value="true" /> <option name="closed" value="true" />

View file

@ -45,9 +45,9 @@ Any static assets, like images, can be placed in the `public/` directory.
All commands are run from the root of the project, from a terminal: All commands are run from the root of the project, from a terminal:
| Command | Action | | Command | Action |
| :------------------------ | :----------------------------------------------- | | :--------------------- | :----------------------------------------------- |
| `pnpm install` | Installs dependencies | | `pnpm install` | Installs dependencies |
| `pnpm dev` | Starts local dev server at `localhost:4321` | | `pnpm dev` | Starts local dev server at `localhost:4321` |
| `pnpm build` | Build your production site to `./dist/` | | `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview` | Preview your build locally, before deploying | | `pnpm preview` | Preview your build locally, before deploying |

View file

@ -1,35 +1,35 @@
// @ts-check // @ts-check
import mdx from '@astrojs/mdx'; import mdx from "@astrojs/mdx";
import sitemap from '@astrojs/sitemap'; import sitemap from "@astrojs/sitemap";
import {defineConfig, fontProviders} from 'astro/config'; import { defineConfig, fontProviders } from "astro/config";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://example.com', site: "https://example.com",
integrations: [mdx(), sitemap()], integrations: [mdx(), sitemap()],
fonts: [ fonts: [
{ {
provider: fontProviders.local(), provider: fontProviders.local(),
name: 'Atkinson', name: "Atkinson",
cssVariable: '--font-atkinson', cssVariable: "--font-atkinson",
fallbacks: ['sans-serif'], fallbacks: ["sans-serif"],
options: { options: {
variants: [ variants: [
{ {
src: ['./src/assets/fonts/atkinson-regular.woff'], src: ["./src/assets/fonts/atkinson-regular.woff"],
weight: 400, weight: 400,
style: 'normal', style: "normal",
display: 'swap', display: "swap",
}, },
{ {
src: ['./src/assets/fonts/atkinson-bold.woff'], src: ["./src/assets/fonts/atkinson-bold.woff"],
weight: 700, weight: 700,
style: 'normal', style: "normal",
display: 'swap', display: "swap",
}, },
], ],
}, },
}, },
], ],
}); });

View file

@ -9,6 +9,7 @@
"dev": "astro dev", "dev": "astro dev",
"build": "astro build", "build": "astro build",
"preview": "astro preview", "preview": "astro preview",
"format": "prettier --write .",
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
@ -16,8 +17,13 @@
"@astrojs/rss": "^4.0.19", "@astrojs/rss": "^4.0.19",
"@astrojs/sitemap": "^3.7.3", "@astrojs/sitemap": "^3.7.3",
"astro": "^7.1.3", "astro": "^7.1.3",
"motion": "^12.42.2",
"react": "^19.2.8", "react": "^19.2.8",
"react-dom": "^19.2.8", "react-dom": "^19.2.8",
"sharp": "^0.35.0" "sharp": "^0.35.0"
},
"devDependencies": {
"prettier": "^3.9.6",
"prettier-plugin-astro": "^0.14.1"
} }
} }

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 KiB

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

After

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 KiB

After

Width:  |  Height:  |  Size: 431 KiB

View file

@ -1,53 +1,53 @@
--- ---
// Import the global.css file here so that it is included on // Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component. // all pages through the use of the <BaseHead /> component.
import '@/styles/reset.css'; import "@/styles/reset.css";
import '@/styles/global.css'; import "@/styles/global.css";
import type {ImageMetadata} from 'astro'; import type { ImageMetadata } from "astro";
import FallbackImage from '../assets/blog-placeholder-1.jpg'; import FallbackImage from "../assets/blog-placeholder-1.jpg";
import {SITE_TITLE} from '../consts'; import { SITE_TITLE } from "../consts";
import {Font} from 'astro:assets'; import { Font } from "astro:assets";
interface Props { interface Props {
title: string; title: string;
description: string; description: string;
image?: ImageMetadata; image?: ImageMetadata;
} }
const canonicalURL = new URL(Astro.url.pathname, Astro.site); const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const {title, description, image = FallbackImage} = Astro.props; const { title, description, image = FallbackImage } = Astro.props;
--- ---
<!-- Global Metadata --> <!-- Global Metadata -->
<meta charset="utf-8"/> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" href="/favicon.ico"/> <link rel="icon" href="/favicon.ico" />
<link rel="sitemap" href="/sitemap-index.xml"/> <link rel="sitemap" href="/sitemap-index.xml" />
<link <link
rel="alternate" rel="alternate"
type="application/rss+xml" type="application/rss+xml"
title={SITE_TITLE} title={SITE_TITLE}
href={new URL('rss.xml', Astro.site)} href={new URL("rss.xml", Astro.site)}
/> />
<meta name="generator" content={Astro.generator}/> <meta name="generator" content={Astro.generator} />
<Font cssVariable="--font-atkinson" preload/> <Font cssVariable="--font-atkinson" preload />
<!-- Canonical URL --> <!-- Canonical URL -->
<link rel="canonical" href={canonicalURL}/> <link rel="canonical" href={canonicalURL} />
<!-- Primary Meta Tags --> <!-- Primary Meta Tags -->
<title>{title}</title> <title>{title}</title>
<meta name="description" content={description}/> <meta name="description" content={description} />
<!-- Open Graph / Facebook --> <!-- Open Graph / Facebook -->
<meta property="og:type" content="website"/> <meta property="og:type" content="website" />
<meta property="og:url" content={Astro.url}/> <meta property="og:url" content={Astro.url} />
<meta property="og:title" content={title}/> <meta property="og:title" content={title} />
<meta property="og:description" content={description}/> <meta property="og:description" content={description} />
<meta property="og:image" content={new URL(image.src, Astro.url)}/> <meta property="og:image" content={new URL(image.src, Astro.url)} />
<!-- Twitter --> <!-- Twitter -->
<meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:card" content="summary_large_image" />

View file

@ -1,62 +1,103 @@
--- ---
import Image from 'astro/components/Image.astro'; import Image from "astro/components/Image.astro";
import FormInput from '../FormInput/FormInput.astro'; import FormInput from "../FormInput/FormInput.astro";
import Dog from '@images/main/contact-form/Mask.svg'; import Dog from "@images/main/contact-form/Mask.svg";
import BluePlanet from '@images/main/contact-form/Planet Blue.svg'; import BluePlanet from "@images/main/contact-form/Planet Blue.svg";
import YellowPlanet from '@images/main/contact-form/Planet Yellow.svg'; import YellowPlanet from "@images/main/contact-form/Planet Yellow.svg";
import { getLangFromUrl, useTranslations } from '@/i18n/utils'; import { getLangFromUrl, useTranslations } from "@/i18n/utils";
import './contact-form.style.css'; import "./contact-form.style.css";
const lang = getLangFromUrl(Astro.url); const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang); const t = useTranslations(lang);
--- ---
<div class="container contact-form"> <div class="container contact-form">
<h2>{t("contacts.title")}</h2> <h2>{t("contacts.title")}</h2>
<div class="image"> <div class="image">
<Image src={Dog} alt="cute dog in space"/> <Image src={Dog} alt="cute dog in space" />
<Image src={BluePlanet} alt="blue planet" class="planet blue"/> <Image src={BluePlanet} alt="blue planet" class="planet blue" />
<Image src={YellowPlanet} alt="yellow planet" class="planet yellow"/> <Image
src={YellowPlanet}
alt="yellow planet"
class="planet yellow orbit-element"
/>
</div>
<form class="container">
<div id="success-message" class="success" style="display: none;"></div>
<div id="error-message" class="error" style="display: none;"></div>
<FormInput
type="text"
name="name"
label={String(t("contacts.name"))}
required
/>
<FormInput
type="email"
name="email"
label={String(t("contacts.email"))}
required
/>
<FormInput
type="tel"
name="phone"
label={String(t("contacts.phone"))}
required
/>
<cap-widget
data-cap-api-endpoint="https://cap.midcreative.eu/8e5272fb9c08/api/"
></cap-widget>
<div
id="captcha-error"
class="error"
style="display: none; margin-top: 10px;"
>
{t("contacts.captchaError") || "Please complete the captcha"}
</div> </div>
<form class="container"> <button type="submit">{t("contacts.send")}</button>
<div id="success-message" class="success" style="display: none;"></div> </form>
<div id="error-message" class="error" style="display: none;"></div>
<FormInput
type="text"
name="name"
label={String(t("contacts.name"))}
required
/>
<FormInput
type="email"
name="email"
label={String(t("contacts.email"))}
required
/>
<FormInput
type="tel"
name="phone"
label={String(t("contacts.phone"))}
required
/>
<cap-widget data-cap-api-endpoint="https://cap.midcreative.eu/8e5272fb9c08/api/"></cap-widget>
<div id="captcha-error" class="error" style="display: none; margin-top: 10px;">
{t("contacts.captchaError") || "Please complete the captcha"}
</div>
<button type="submit">{t("contacts.send")}</button>
</form>
</div> </div>
<script> <script>
const form = document.querySelector('.contact-form form'); // const { animate, inView } = await import("motion");
form?.addEventListener('submit', (e) => { const form = document.querySelector(".contact-form form");
e.preventDefault(); form?.addEventListener("submit", (e) => {
console.log('Form submitted - add your logic here'); e.preventDefault();
}); console.log("Form submitted - add your logic here");
});
// inView("#contact-us", (el) => {
// const orbitImage = el.querySelector(".planet.yellow");
// animate(
// orbitImage,
// {
// left: ["-124px", "400px", "-200px", "-124px"],
// top: ["150px", "100px", "180px", "150px"],
// },
// {
// type: "tween",
// duration: 6,
// repeat: Infinity,
// easing: "easeIn",
// onUpdate: () => {
// // Read current computed 'left' position
// const currentLeft = parseFloat(
// window.getComputedStyle(orbitImage).left,
// );
// // Bring to front when far right, move behind when coming back
// if (currentLeft > 380) {
// orbitImage.style.zIndex = "3";
// } else if (currentLeft < -180) {
// orbitImage.style.zIndex = "-1";
// }
// },
// },
// );
// });
</script> </script>

View file

@ -1,124 +1,217 @@
/* contact-form.style.css */ /* contact-form.style.css */
section.content .contact-form h2 { section.content .contact-form h2 {
margin-bottom: 0; margin-bottom: 0;
text-align: left; text-align: left;
} }
.contact-form h2 { .contact-form h2 {
grid-column: 1/6; grid-column: 1/6;
grid-row: 1/2; grid-row: 1/2;
} }
.contact-form .success { .contact-form .success {
margin-bottom: 16px; margin-bottom: 16px;
color: rgba(116, 199, 103, 1); color: rgba(116, 199, 103, 1);
} }
.contact-form .error { .contact-form .error {
margin-bottom: 16px; margin-bottom: 16px;
color: rgba(246, 81, 81, 1); color: rgba(246, 81, 81, 1);
} }
.contact-form .error a { .contact-form .error a {
color: rgba(246, 81, 81, 1); color: rgba(246, 81, 81, 1);
} }
.contact-form form { .contact-form form {
grid-column: 1/5; grid-column: 1/5;
grid-row: 2/3; grid-row: 2/3;
width: 100%; width: 100%;
} }
.contact-form form.container { .contact-form form.container {
padding: 0; padding: 0;
} }
.contact-form form .btn { .contact-form form .btn {
grid-column: 1/10; grid-column: 1/10;
} }
.contact-form .image { .contact-form .image {
grid-column: 6/13; grid-column: 6/13;
grid-row: 1/3; grid-row: 1/3;
margin-left: auto; margin-left: auto;
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
} }
.contact-form .image img:first-child { .contact-form .image img:first-child {
background: linear-gradient( background:
0deg, linear-gradient(0deg, rgba(27, 27, 27, 0.2), rgba(27, 27, 27, 0.2)),
rgba(27, 27, 27, 0.2),
rgba(27, 27, 27, 0.2)
),
rgba(255, 255, 255, 0.01); rgba(255, 255, 255, 0.01);
box-shadow: inset 0px 2px 5px rgb(255 255 255 / 15%); box-shadow: inset 0px 2px 5px rgb(255 255 255 / 15%);
backdrop-filter: blur(8px); backdrop-filter: blur(8px);
border-radius: 33px; border-radius: 33px;
} }
.contact-form .image .planet { .contact-form .image .planet {
position: absolute; position: absolute;
z-index: -1; z-index: -1;
} }
.contact-form .image .planet.blue { .contact-form .image .planet.blue {
right: -133px; right: -133px;
} }
.contact-form .image .planet.yellow { .contact-form .image .planet.yellow {
left: -124px;
top: 150px;
}
@keyframes circularOrbitYellow {
0% {
left: -124px; left: -124px;
top: 150px; top: 150px;
z-index: -1;
scale: 0.8;
}
50% {
left: 400px;
top: 80px;
z-index: -1; /* Flips to front at peak right */
scale: 1;
}
51% {
left: 390px;
top: 70px;
z-index: 3; /* Flips to front at peak right */
}
80% {
scale: 1.2;
}
90% {
left: -200px;
top: 100px;
z-index: 3; /* Flips back behind at peak left */
scale: 1;
}
91% {
left: -190px;
top: 101px;
z-index: -1; /* Flips back behind at peak left */
scale: 1;
}
100% {
left: -124px;
top: 150px;
z-index: -1;
scale: 0.8;
}
}
.yellow.orbit-element {
position: absolute;
animation: circularOrbitYellow 8s linear infinite;
}
@keyframes circularOrbitBlue {
0% {
right: -133px;
top: 150px;
z-index: 3;
scale: 1;
}
50% {
right: 400px;
top: 80px;
z-index: 3; /* Flips to front at peak right */
scale: 1.3;
}
51% {
right: 390px;
top: 70px;
z-index: -1; /* Flips to front at peak right */
scale: 1.3;
}
80% {
scale: 1.2;
top: 120px;
scale: 1;
}
90% {
right: -100px;
top: 140px;
z-index: -1; /* Flips back behind at peak left */
scale: 0.9;
}
91% {
right: -110px;
top: 141px;
z-index: 3; /* Flips back behind at peak left */
scale: 0.9;
}
100% {
right: -133px;
top: 150px;
z-index: 3;
scale: 1;
}
}
.blue {
position: absolute;
animation: circularOrbitBlue 8s linear infinite;
} }
/* Tablet breakpoint */ /* Tablet breakpoint */
@media (max-width: 1200px) { @media (max-width: 1200px) {
.contact-form form { .contact-form form {
padding-top: 20px; padding-top: 20px;
} }
.contact-form h2, .contact-form h2,
.contact-form form { .contact-form form {
grid-column: 1/7; grid-column: 1/7;
} }
.contact-form .image { .contact-form .image {
grid-column: 8/13; grid-column: 8/13;
} }
} }
/* Mobile breakpoint */ /* Mobile breakpoint */
@media (max-width: 767px) { @media (max-width: 767px) {
.contact-form h2, .contact-form h2,
.contact-form .image, .contact-form .image,
.contact-form form { .contact-form form {
grid-column: 1/7; grid-column: 1/7;
} }
.contact-form h2, .contact-form h2,
.contact-form .image, .contact-form .image,
.contact-form form .btn { .contact-form form .btn {
grid-column: 2/6; grid-column: 2/6;
} }
.contact-form h2 { .contact-form h2 {
grid-row: 1/2; grid-row: 1/2;
text-align: center !important; text-align: center !important;
} }
.contact-form .image { .contact-form .image {
grid-row: 2/3; grid-row: 2/3;
width: 100%; width: 100%;
margin-bottom: 16px; margin-bottom: 16px;
} min-height: 300px;
}
.contact-form .image img { .contact-form .image img {
margin: 0 auto; margin: 0 auto;
} height: auto;
}
.contact-form form { .contact-form form {
grid-row: 3/4; grid-row: 3/4;
} }
} }

View file

@ -1,39 +1,39 @@
--- ---
import {Image} from 'astro:assets'; import { Image } from "astro:assets";
import Phone from '@images/main/footer/phone.png'; import Phone from "@images/main/footer/phone.png";
import Email from '@images/main/footer/email.png'; import Email from "@images/main/footer/email.png";
import Telegram from '@images/main/footer/telegram.png'; import Telegram from "@images/main/footer/telegram.png";
import Whatsapp from '@images/main/footer/whatsapp.png'; import Whatsapp from "@images/main/footer/whatsapp.png";
import './contacts.style.css'; import "./contacts.style.css";
--- ---
<div class="container contacts"> <div class="container contacts">
<div> <div>
<a href="tel:+37125704038"> <a href="tel:+37125704038">
<Image src={Phone} alt="phone" width={64} height={64}/> <Image src={Phone} alt="phone" width={64} height={64} />
</a> </a>
<a href="tel:+37125704038">+371 25704038</a> <a href="tel:+37125704038">+371 25704038</a>
</div> </div>
<div> <div>
<a href="mailto:info@midcreative.eu"> <a href="mailto:info@midcreative.eu">
<Image src={Email} alt="email" width={64} height={64}/> <Image src={Email} alt="email" width={64} height={64} />
</a> </a>
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a> <a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</div> </div>
<div> <div>
<a href="https://telegram.me/shiseri" target="_blank" rel="noreferrer"> <a href="https://telegram.me/shiseri" target="_blank" rel="noreferrer">
<Image src={Telegram} alt="telegram" width={64} height={64}/> <Image src={Telegram} alt="telegram" width={64} height={64} />
</a> </a>
<a href="https://telegram.me/shiseri" target="_blank" rel="noreferrer"> <a href="https://telegram.me/shiseri" target="_blank" rel="noreferrer">
Telegram Telegram
</a> </a>
</div> </div>
<div> <div>
<a href="https://wa.me/37125704038" target="_blank" rel="noreferrer"> <a href="https://wa.me/37125704038" target="_blank" rel="noreferrer">
<Image src={Whatsapp} alt="whatsapp" width={64} height={64}/> <Image src={Whatsapp} alt="whatsapp" width={64} height={64} />
</a> </a>
<a href="https://wa.me/37125704038" target="_blank" rel="noreferrer"> <a href="https://wa.me/37125704038" target="_blank" rel="noreferrer">
WhatsApp WhatsApp
</a> </a>
</div> </div>
</div> </div>

View file

@ -1,31 +1,31 @@
#contact-us { #contact-us {
scroll-margin-block-start: 120px; scroll-margin-block-start: 120px;
} }
.contacts { .contacts {
display: flex;
flex-direction: row;
justify-content: space-between;
padding-bottom: 100px;
border-bottom: 1px solid #665469;
div {
display: flex; display: flex;
flex-direction: row; flex-direction: column;
justify-content: space-between; align-items: center;
padding-bottom: 100px; width: 150px;
border-bottom: 1px solid #665469;
a {
margin-bottom: 16px;
white-space: nowrap;
}
}
@media (max-width: 767px) {
flex-wrap: wrap;
div { div {
display: flex; width: 45%;
flex-direction: column;
align-items: center;
width: 150px;
a {
margin-bottom: 16px;
white-space: nowrap;
}
}
@media (max-width: 767px) {
flex-wrap: wrap;
div {
width: 45%;
}
} }
}
} }

View file

@ -1,12 +1,16 @@
--- ---
import {Image} from 'astro:assets'; import { Image } from "astro:assets";
// src/components/Footer/Footer.astro // src/components/Footer/Footer.astro
import Contacts from '@components/Contacts/Contacts.astro'; import Contacts from "@components/Contacts/Contacts.astro";
import TopLine from '@images/main/footer/top-line.png'; import TopLine from "@images/main/footer/top-line.png";
import Logo from '@images/main/footer/logo.svg'; import Logo from "@images/main/footer/logo.svg";
import { getLangFromUrl, useTranslatedPath, useTranslations } from '@/i18n/utils'; import {
import './footer.style.css'; getLangFromUrl,
useTranslatedPath,
useTranslations,
} from "@/i18n/utils";
import "./footer.style.css";
const lang = getLangFromUrl(Astro.url); const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang); const t = useTranslations(lang);
@ -14,28 +18,35 @@ const translatePath = useTranslatedPath(lang);
--- ---
<footer> <footer>
<Image class="line" src={TopLine} alt="" /> <Image class="line" src={TopLine} alt="" />
<Contacts/> <Contacts />
<div class="container info"> <div class="container info">
<div> <div>
<h6>{t("footer.company")}</h6> <h6>{t("footer.company")}</h6>
<p class="gray">SIA MID Creative</p> <p class="gray">SIA MID Creative</p>
<h6>{t("footer.registration_nr")}</h6> <h6>{t("footer.registration_nr")}</h6>
<p class="gray">40203288612</p> <p class="gray">40203288612</p>
<h6>{t("footer.address")}</h6> <h6>{t("footer.address")}</h6>
<p class="gray">Rīga, Gaiļezera iela 11 - 5, LV-1079</p> <p class="gray">Rīga, Gaiļezera iela 11 - 5, LV-1079</p>
</div>
<nav>
<h6>{t("footer.navigation")}</h6>
<a href={translatePath('/#top')} class="gray mobile">{t("menu.home")}</a>
<a href={translatePath('/#services')} class="gray">{t("menu.services")}</a>
<a href={translatePath('/#about-us')} class="gray">{t("menu.about_us")}</a>
<a href={translatePath('/#projects')} class="gray">{t("menu.portfolio")}</a>
<a href={translatePath('/#contact-us')} class="gray">{t("menu.contact_us")}</a>
</nav>
<div>
<Image src={Logo} alt=""/>
</div>
</div> </div>
<nav>
<h6>{t("footer.navigation")}</h6>
<a href={translatePath("/#top")} class="gray mobile">{t("menu.home")}</a>
<a href={translatePath("/#services")} class="gray">{t("menu.services")}</a
>
<a href={translatePath("/#about-us")} class="gray">{t("menu.about_us")}</a
>
<a href={translatePath("/#projects")} class="gray"
>{t("menu.portfolio")}</a
>
<a href="/blog" class="gray">{t("menu.blog")}</a>
<a href={translatePath("/#contact-us")} class="gray"
>{t("menu.contact_us")}</a
>
</nav>
<div>
<Image src={Logo} alt="" />
</div>
</div>
</footer> </footer>

View file

@ -1,79 +1,79 @@
footer { footer {
background: radial-gradient( background: radial-gradient(
62.99% 90.27% at 50% 0%, 62.99% 90.27% at 50% 0%,
rgba(225, 104, 154, 0.32) 0%, rgba(225, 104, 154, 0.32) 0%,
rgba(141, 162, 243, 0) 65.06% rgba(141, 162, 243, 0) 65.06%
); );
margin-top: 192px; margin-top: 192px;
.line { .line {
margin: 0 auto; margin: 0 auto;
height: 100px; height: 100px;
transform: translateY(-50px); transform: translateY(-50px);
}
.info {
margin-top: 68px;
padding-bottom: 237px;
div {
grid-row: 1/2;
&:first-child {
grid-column: 5/9;
h6 {
margin-bottom: 4px;
}
p {
margin-bottom: 24px;
}
}
&:last-child {
grid-column: 1/5;
}
} }
.info { nav {
margin-top: 68px; grid-column: 9/13;
padding-bottom: 237px;
div { h6 {
grid-row: 1/2; margin-bottom: 30px;
}
&:first-child { a {
grid-column: 5/9; margin-bottom: 16px;
display: block;
h6 { width: fit-content;
margin-bottom: 4px;
}
p {
margin-bottom: 24px;
}
}
&:last-child {
grid-column: 1/5;
}
}
nav {
grid-column: 9/13;
h6 {
margin-bottom: 30px;
}
a {
margin-bottom: 16px;
display: block;
width: fit-content;
@media (max-width: 767px) {
margin-left: auto;
margin-right: auto;
}
&.mobile {
display: none;
}
}
}
@media (max-width: 767px) { @media (max-width: 767px) {
padding-bottom: 110px; margin-left: auto;
justify-items: center; margin-right: auto;
div:first-child,
div:last-child,
nav {
grid-column: 1/7;
grid-row: unset;
text-align: center;
}
nav a.mobile {
display: block;
}
} }
&.mobile {
display: none;
}
}
} }
@media (max-width: 767px) {
padding-bottom: 110px;
justify-items: center;
div:first-child,
div:last-child,
nav {
grid-column: 1/7;
grid-row: unset;
text-align: center;
}
nav a.mobile {
display: block;
}
}
}
} }

View file

@ -1,15 +1,20 @@
--- ---
import "./form-input.style.css"; import "./form-input.style.css";
import type {HTMLAttributes} from "astro/types"; import type { HTMLAttributes } from "astro/types";
interface Props extends HTMLAttributes<"input"> { interface Props extends HTMLAttributes<"input"> {
label: string; label: string;
} }
const {label, id = `input-${crypto.randomUUID()}`, placeholder = " ", ...otherProps} = Astro.props; const {
label,
id = `input-${crypto.randomUUID()}`,
placeholder = " ",
...otherProps
} = Astro.props;
--- ---
<div class="form-input-group"> <div class="form-input-group">
<input id={id} placeholder={placeholder} {...otherProps}/> <input id={id} placeholder={placeholder} {...otherProps} />
<label for={id} class="form-input-label">{label}</label> <label for={id} class="form-input-label">{label}</label>
</div> </div>

View file

@ -1,55 +1,55 @@
/* form-input.style.css */ /* form-input.style.css */
.form-input-group { .form-input-group {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
input { input {
grid-column: 1/4; grid-column: 1/4;
background: none; background: none;
border: none; border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.3); border-bottom: 1px solid rgba(255, 255, 255, 0.3);
width: 100%; width: 100%;
height: 36px; height: 36px;
margin-bottom: 39px; margin-bottom: 39px;
color: var(--color-text-primary); color: var(--color-text-primary);
font: inherit; font: inherit;
padding: 0; padding: 0;
&:focus-visible { &:focus-visible {
outline: none; outline: none;
}
&:placeholder-shown ~ .form-input-label {
top: 6px;
opacity: 0.5;
font-size: inherit;
}
&:focus ~ .form-input-label,
&:not(:placeholder-shown) ~ .form-input-label {
top: -20px;
opacity: 1;
font-size: 10px;
}
} }
.form-input-label { &:placeholder-shown ~ .form-input-label {
position: absolute; top: 6px;
color: var(--color-text-primary); opacity: 0.5;
text-transform: uppercase; font-size: inherit;
transition: 300ms ease all;
pointer-events: none;
font-size: 12px;
} }
&:focus ~ .form-input-label,
&:not(:placeholder-shown) ~ .form-input-label {
top: -20px;
opacity: 1;
font-size: 10px;
}
}
.form-input-label {
position: absolute;
color: var(--color-text-primary);
text-transform: uppercase;
transition: 300ms ease all;
pointer-events: none;
font-size: 12px;
}
} }
input { input {
&:autofill, &:autofill,
&:-webkit-autofill:hover, &:-webkit-autofill:hover,
&:-webkit-autofill:focus { &:-webkit-autofill:focus {
-webkit-text-fill-color: var(--color-text-primary); -webkit-text-fill-color: var(--color-text-primary);
-webkit-box-shadow: 0 0 0px 1000px #111 inset; -webkit-box-shadow: 0 0 0px 1000px #111 inset;
} }
} }

View file

@ -1,17 +1,17 @@
--- ---
interface Props { interface Props {
date: Date; date: Date;
} }
const { date } = Astro.props; const { date } = Astro.props;
--- ---
<time datetime={date.toISOString()}> <time datetime={date.toISOString()}>
{ {
date.toLocaleDateString('en-us', { date.toLocaleDateString("en-us", {
year: 'numeric', year: "numeric",
month: 'short', month: "short",
day: 'numeric', day: "numeric",
}) })
} }
</time> </time>

View file

@ -1,85 +0,0 @@
---
import { SITE_TITLE } from '../consts';
import HeaderLink from './HeaderLink.astro';
---
<header>
<nav>
<h2><a href="/">{SITE_TITLE}</a></h2>
<div class="internal-links">
<HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink>
<HeaderLink href="/about">About</HeaderLink>
</div>
<div class="social-links">
<a href="https://m.webtoo.ls/@astro" target="_blank">
<span class="sr-only">Follow Astro on Mastodon</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
><path
fill="currentColor"
d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"
></path></svg
>
</a>
<a href="https://twitter.com/astrodotbuild" target="_blank">
<span class="sr-only">Follow Astro on Twitter</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
><path
fill="currentColor"
d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"
></path></svg
>
</a>
<a href="https://github.com/withastro/astro" target="_blank">
<span class="sr-only">Go to Astro's GitHub repo</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
><path
fill="currentColor"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
></path></svg
>
</a>
</div>
</nav>
</header>
<style>
header {
margin: 0;
padding: 0 1em;
background: white;
box-shadow: 0 2px 8px rgba(var(--black), 5%);
}
h2 {
margin: 0;
font-size: 1em;
}
h2 a,
h2 a.active {
text-decoration: none;
}
nav {
display: flex;
align-items: center;
justify-content: space-between;
}
nav a {
padding: 1em 0.5em;
color: var(--black);
border-bottom: 4px solid transparent;
text-decoration: none;
}
nav a.active {
text-decoration: none;
border-bottom-color: var(--accent);
}
.social-links,
.social-links a {
display: flex;
}
@media (max-width: 720px) {
.social-links {
display: none;
}
}
</style>

View file

@ -6,7 +6,11 @@ import Logo2 from "@images/main/footer/logo.svg";
import Phone from "@images/main/footer/phone.png"; import Phone from "@images/main/footer/phone.png";
import Email from "@images/main/footer/email.png"; import Email from "@images/main/footer/email.png";
import { languages, type SupportedLang } from "@/i18n/ui"; import { languages, type SupportedLang } from "@/i18n/ui";
import { getLangFromUrl, useTranslatedPath, useTranslations } from "@/i18n/utils"; import {
getLangFromUrl,
useTranslatedPath,
useTranslations,
} from "@/i18n/utils";
const lang = getLangFromUrl(Astro.url); const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang); const t = useTranslations(lang);
@ -14,97 +18,113 @@ const translatePath = useTranslatedPath(lang);
--- ---
<header> <header>
<div class="cont"> <div class="cont">
<div class="logo"> <div class="logo">
<Image src={Logo} alt="MID"/> <Image src={Logo} alt="MID" />
</div>
<nav class="navigation">
<a href={translatePath("/#services")}>{t("menu.services")}</a>
<a href={translatePath("/#about-us")}>{t("menu.about_us")}</a>
<a href={translatePath("/#projects")}>{t("menu.portfolio")}</a>
<a href={translatePath("/#contact-us")}>{t("menu.contact_us")}</a>
</nav>
<nav class="lang-switcher" aria-label="Language switcher">
{Object.entries(languages).map(([locale, label]) => {
const targetLang = locale as SupportedLang;
return (
<a href={translatePath("/", targetLang)} class={targetLang === lang ? "active" : ""}>
{label}
</a>
);
})}
</nav>
<button class="mobile-menu-btn" aria-label="Toggle menu" aria-expanded="false">
<span id="top-left"></span>
<span id="top-right"></span>
<span id="center-left"></span>
<span id="center-right"></span>
<span id="bottom-left"></span>
<span id="bottom-right"></span>
</button>
<div class="mobile-menu">
<Image src={Logo2} alt="MID Creative Digital Agency"/>
<nav class="navigation">
<a href={translatePath("/#top")}>{t("menu.home")}</a>
<a href={translatePath("/#services")}>{t("menu.services")}</a>
<a href={translatePath("/#about-us")}>{t("menu.about_us")}</a>
<a href={translatePath("/#projects")}>{t("menu.portfolio")}</a>
<a href={translatePath("/#contact-us")}>{t("menu.contact_us")}</a>
</nav>
<nav class="lang-switcher" aria-label="Language switcher mobile">
{Object.entries(languages).map(([locale, label]) => {
const targetLang = locale as SupportedLang;
return (
<a href={translatePath("/", targetLang)} class={targetLang === lang ? "active" : ""}>
{label}
</a>
);
})}
</nav>
<div class="header-contacts">
<a href="tel:+37126620770">
<Image src={Phone} alt="phone"/>
</a>
<a href="tel:+37126620770">+371 2662 0770</a>
</div>
<div class="header-contacts">
<a href="mailto:info@midcreative.eu">
<Image src={Email} alt="email"/>
</a>
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</div>
</div>
</div> </div>
<nav class="navigation">
<a href={translatePath("/#services")}>{t("menu.services")}</a>
<a href={translatePath("/#about-us")}>{t("menu.about_us")}</a>
<a href={translatePath("/#projects")}>{t("menu.portfolio")}</a>
<a href="/blog">{t("menu.blog")}</a>
<a href={translatePath("/#contact-us")}>{t("menu.contact_us")}</a>
</nav>
<nav class="lang-switcher" aria-label="Language switcher">
{
Object.entries(languages).map(([locale, label]) => {
const targetLang = locale as SupportedLang;
return (
<a
href={translatePath("/", targetLang)}
class={targetLang === lang ? "active" : ""}
>
{label}
</a>
);
})
}
</nav>
<button
class="mobile-menu-btn"
aria-label="Toggle menu"
aria-expanded="false"
>
<span id="top-left"></span>
<span id="top-right"></span>
<span id="center-left"></span>
<span id="center-right"></span>
<span id="bottom-left"></span>
<span id="bottom-right"></span>
</button>
<div class="mobile-menu">
<Image src={Logo2} alt="MID Creative Digital Agency" />
<nav class="navigation">
<a href={translatePath("/#top")}>{t("menu.home")}</a>
<a href={translatePath("/#services")}>{t("menu.services")}</a>
<a href={translatePath("/#about-us")}>{t("menu.about_us")}</a>
<a href={translatePath("/#projects")}>{t("menu.portfolio")}</a>
<a href="/blog">{t("menu.blog")}</a>
<a href={translatePath("/#contact-us")}>{t("menu.contact_us")}</a>
</nav>
<nav class="lang-switcher" aria-label="Language switcher mobile">
{
Object.entries(languages).map(([locale, label]) => {
const targetLang = locale as SupportedLang;
return (
<a
href={translatePath("/", targetLang)}
class={targetLang === lang ? "active" : ""}
>
{label}
</a>
);
})
}
</nav>
<div class="header-contacts">
<a href="tel:+37126620770">
<Image src={Phone} alt="phone" />
</a>
<a href="tel:+37126620770">+371 2662 0770</a>
</div>
<div class="header-contacts">
<a href="mailto:info@midcreative.eu">
<Image src={Email} alt="email" />
</a>
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</div>
</div>
</div>
</header> </header>
<script> <script>
const btn = document.querySelector('.mobile-menu-btn') as HTMLElement; const btn = document.querySelector(".mobile-menu-btn") as HTMLElement;
const menu = document.querySelector('.mobile-menu') as HTMLElement; const menu = document.querySelector(".mobile-menu") as HTMLElement;
btn.addEventListener('click', () => { btn.addEventListener("click", () => {
const isOpen = menu.classList.toggle('open'); const isOpen = menu.classList.toggle("open");
btn.classList.toggle('open'); btn.classList.toggle("open");
btn.setAttribute('aria-expanded', String(isOpen)); btn.setAttribute("aria-expanded", String(isOpen));
}); });
document.addEventListener('click', (e) => { document.addEventListener("click", (e) => {
if (!menu.contains(e.target as Node) && !btn.contains(e.target as Node)) { if (!menu.contains(e.target as Node) && !btn.contains(e.target as Node)) {
menu.classList.remove('open'); menu.classList.remove("open");
btn.classList.remove('open'); btn.classList.remove("open");
btn.setAttribute('aria-expanded', 'false'); btn.setAttribute("aria-expanded", "false");
} }
}); });
window.addEventListener('resize', () => { window.addEventListener("resize", () => {
menu.classList.remove('open'); menu.classList.remove("open");
btn.classList.remove('open'); btn.classList.remove("open");
btn.setAttribute('aria-expanded', 'false'); btn.setAttribute("aria-expanded", "false");
}); });
</script> </script>

View file

@ -1,236 +1,246 @@
/* header.style.css */ /* header.style.css */
header { header {
backdrop-filter: blur(5px); backdrop-filter: blur(5px);
z-index: 1000; z-index: 1000;
position: fixed; position: fixed;
width: 100%; width: 100%;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
.cont { .cont {
padding: 44px 20px; padding: 44px 20px;
max-width: 1224px; max-width: 1224px;
display: grid; display: grid;
grid-template-columns: 1fr auto 1fr; grid-template-columns: 1fr auto 1fr;
margin: 0 auto; margin: 0 auto;
justify-content: space-between; justify-content: space-between;
align-items: center;
.navigation {
display: flex;
column-gap: 55px;
a {
text-transform: uppercase;
&:first-child {
margin-left: 0;
}
}
@media (max-width: 767px) {
display: none;
}
}
.logo {
display: flex;
justify-content: flex-start;
align-items: center;
}
.lang-switcher {
display: flex;
column-gap: 10px;
align-items: center;
justify-content: flex-end;
a {
opacity: 0.65;
text-transform: uppercase;
font-size: 14px;
&.active {
opacity: 1;
text-decoration: underline;
}
}
@media (max-width: 767px) {
display: none;
}
}
.mobile-menu-btn {
position: fixed;
right: 20px;
z-index: 3;
width: 23px;
height: 23px;
display: none;
cursor: pointer;
background: none;
border: none;
padding: 0;
span {
background-color: #fff;
height: 5px;
position: absolute;
transition: all ease-in-out 0.4s;
}
#top-left {
width: 5px;
}
#top-right {
width: 15px;
}
#center-left {
width: 5px;
}
#center-right {
width: 9px;
}
#bottom-left {
width: 5px;
}
#bottom-right {
width: 5px;
}
#top-left,
#top-right {
top: 0;
}
#top-left {
right: 18px;
}
#center-left,
#center-right {
top: 9px;
}
#bottom-left,
#bottom-right {
bottom: 0;
}
#top-right,
#center-right,
#bottom-right,
#bottom-left {
right: 0;
}
#center-left {
left: 6px;
}
&.open {
#top-right,
#center-right {
width: 5px;
}
#center-right,
#center-left {
right: 9px;
left: unset;
}
#bottom-left {
right: 18px;
}
#center-left {
left: 9px;
}
}
@media (max-width: 767px) {
display: block;
}
}
.mobile-menu {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 96px 0;
background:
radial-gradient(
59.78% 25.3% at 50% 50%,
rgba(225, 104, 154, 0.15) 0%,
rgba(141, 162, 243, 0.063) 49.1%,
rgba(23, 23, 23, 0) 100%
),
rgba(13, 13, 13, 0.95);
box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.15);
backdrop-filter: blur(15px);
z-index: 2;
position: fixed;
height: 100vh;
width: 295px;
top: 0;
right: 0;
bottom: 0;
transform: translateX(100%);
transition: transform ease 0.4s;
&.open {
transform: translateX(0);
}
.navigation {
display: flex;
flex-direction: column;
align-items: center; align-items: center;
.navigation { a {
display: flex; margin-left: 0;
column-gap: 55px; margin-bottom: 28px;
}
}
a { .header-contacts {
text-transform: uppercase; display: flex;
flex-direction: column;
align-items: center;
&:first-child { img {
margin-left: 0; margin: 0 auto;
}
}
@media (max-width: 767px) {
display: none;
}
} }
.logo { a:first-child {
display: flex; margin-bottom: 6px;
justify-content: flex-start;
align-items: center;
} }
}
.lang-switcher { .lang-switcher {
display: flex; display: flex;
column-gap: 10px; column-gap: 16px;
align-items: center;
justify-content: flex-end;
a { a {
opacity: 0.65; text-transform: uppercase;
text-transform: uppercase; opacity: 0.65;
font-size: 14px;
&.active { &.active {
opacity: 1; opacity: 1;
text-decoration: underline; text-decoration: underline;
} }
}
@media (max-width: 767px) {
display: none;
}
}
.mobile-menu-btn {
position: fixed;
right: 20px;
z-index: 3;
width: 23px;
height: 23px;
display: none;
cursor: pointer;
background: none;
border: none;
padding: 0;
span {
background-color: #fff;
height: 5px;
position: absolute;
transition: all ease-in-out 0.4s;
}
#top-left {
width: 5px;
}
#top-right {
width: 15px;
}
#center-left {
width: 5px;
}
#center-right {
width: 9px;
}
#bottom-left {
width: 5px;
}
#bottom-right {
width: 5px;
}
#top-left, #top-right {
top: 0;
}
#top-left {
right: 18px;
}
#center-left, #center-right {
top: 9px;
}
#bottom-left, #bottom-right {
bottom: 0;
}
#top-right, #center-right, #bottom-right, #bottom-left {
right: 0;
}
#center-left {
left: 6px;
}
&.open {
#top-right, #center-right {
width: 5px;
}
#center-right, #center-left {
right: 9px;
left: unset;
}
#bottom-left {
right: 18px;
}
#center-left {
left: 9px;
}
}
@media (max-width: 767px) {
display: block;
}
}
.mobile-menu {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 96px 0;
background: radial-gradient(
59.78% 25.3% at 50% 50%,
rgba(225, 104, 154, 0.15) 0%,
rgba(141, 162, 243, 0.063) 49.1%,
rgba(23, 23, 23, 0) 100%
), rgba(13, 13, 13, 0.95);
box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.15);
backdrop-filter: blur(15px);
z-index: 2;
position: fixed;
height: 100vh;
width: 295px;
top: 0;
right: 0;
bottom: 0;
transform: translateX(100%);
transition: transform ease 0.4s;
&.open {
transform: translateX(0);
}
.navigation {
display: flex;
flex-direction: column;
align-items: center;
a {
margin-left: 0;
margin-bottom: 28px;
}
}
.header-contacts {
display: flex;
flex-direction: column;
align-items: center;
img {
margin: 0 auto;
}
a:first-child {
margin-bottom: 6px;
}
}
.lang-switcher {
display: flex;
column-gap: 16px;
a {
text-transform: uppercase;
opacity: 0.65;
&.active {
opacity: 1;
text-decoration: underline;
}
}
}
}
@media (max-width: 767px) {
.logo {
width: 100%;
}
nav {
display: none;
}
} }
}
} }
@media (max-width: 767px) {
.logo {
width: 100%;
}
nav {
display: none;
}
}
}
} }

View file

@ -1,24 +1,24 @@
--- ---
import type { HTMLAttributes } from 'astro/types'; import type { HTMLAttributes } from "astro/types";
type Props = HTMLAttributes<'a'>; type Props = HTMLAttributes<"a">;
const { href, class: className, ...props } = Astro.props; const { href, class: className, ...props } = Astro.props;
const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, ''); const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, "");
const subpath = pathname.match(/[^\/]+/g); const subpath = pathname.match(/[^\/]+/g);
const isActive = href === pathname || href === '/' + (subpath?.[0] || ''); const isActive = href === pathname || href === "/" + (subpath?.[0] || "");
--- ---
<a href={href} class:list={[className, { active: isActive }]} {...props}> <a href={href} class:list={[className, { active: isActive }]} {...props}>
<slot /> <slot />
</a> </a>
<style> <style>
a { a {
display: inline-block; display: inline-block;
text-decoration: none; text-decoration: none;
} }
a.active { a.active {
font-weight: bolder; font-weight: bolder;
text-decoration: underline; text-decoration: underline;
} }
</style> </style>

View file

@ -8,7 +8,6 @@ import { Image } from "astro:assets";
import type { ImageMetadata } from "astro"; import type { ImageMetadata } from "astro";
import Circle from "@images/main/services/circle.png"; import Circle from "@images/main/services/circle.png";
import Rocket from "@images/main/about-us/rocket.png"; import Rocket from "@images/main/about-us/rocket.png";
import IntroAstronaut from "@images/main/intro/astronaut.png";
import IntroSpaceship from "@images/main/intro/spaceship.svg"; import IntroSpaceship from "@images/main/intro/spaceship.svg";
import { useTranslations } from "@/i18n/utils"; import { useTranslations } from "@/i18n/utils";
import type { SupportedLang } from "@/i18n/ui"; import type { SupportedLang } from "@/i18n/ui";
@ -16,108 +15,266 @@ import type { SupportedLang } from "@/i18n/ui";
import "../styles/index.css"; import "../styles/index.css";
interface Props { interface Props {
lang: SupportedLang; lang: SupportedLang;
} }
const { lang } = Astro.props; const { lang } = Astro.props;
const t = useTranslations(lang); const t = useTranslations(lang);
const cards = const cards =
(t("services.cards") as Array<{ image: string; title: string; text: string }>) || []; (t("services.cards") as Array<{
image: string;
title: string;
text: string;
}>) || [];
const projects =
(t("projects") as Array<{
title: string;
image: string;
info: string[];
text: string;
}>) || [];
const images = import.meta.glob<{ default: ImageMetadata }>( const images = import.meta.glob<{ default: ImageMetadata }>(
"../assets/images/main/services/*.svg", "../assets/images/main/services/*.svg",
{ eager: true }, { eager: true },
);
const projectImages = import.meta.glob<{ default: ImageMetadata }>(
"../assets/images/main/projects/*.{png,jpg,jpeg,webp,svg}",
{ eager: true },
); );
const getImage = (imageName: string) => { const getImage = (imageName: string) => {
const path = `../assets/images/main/services/${imageName}`; const path = `../assets/images/main/services/${imageName}`;
return images[path]?.default; return images[path]?.default;
};
const getProjectImage = (imageName: string) => {
const path = `../assets/images/main/projects/${imageName}`;
return projectImages[path]?.default;
}; };
--- ---
<!doctype html> <!doctype html>
<html lang={lang}> <html lang={lang}>
<head> <head>
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
</head> </head>
<body> <body>
<div class="main-page" id="top"> <div class="main-page" id="top">
<div class="intro-bg"> <div class="intro-bg">
<Header /> <Header />
<section class="container intro" id="home"> <section class="container intro" id="home">
<div class="intro__title"> <div class="image" id="heroImg"></div>
<h1> <div class="title">
{t("intro.creating")} <span>{t("intro.websites")}</span> <h1>
</h1> {t("intro.creating")}{` `}
<ul class="intro__items" aria-label="Intro services"> <span>{t("intro.websites")}</span>
<li>{t("intro.apps")}</li> </h1>
<li>{t("intro.shops")}</li> <div>
<li>{t("intro.platforms")}</li> <p>{t("intro.apps")}</p>
</ul> <p>{t("intro.shops")}</p>
<p>{t("intro.platforms")}</p>
</div> </div>
</div>
<div class="intro__image"> <div class="rocket">
<Image src={IntroAstronaut} alt="" loading="eager" /> <Image src={IntroSpaceship} alt="" />
</div> <p>{t("intro.explore")}</p>
</div>
<div class="intro__rocket">
<Image src={IntroSpaceship} alt="" />
<p>{t("intro.explore")}</p>
</div>
</section> </section>
</div> </div>
<section class="content container" id="services"> <section class="content container" id="services">
<h2>{t("services.title")}</h2> <h2>{t("services.title")}</h2>
<div class="container services"> <div class="container services">
<Image src={Circle} alt="circle" class="circle" /> <Image src={Circle} alt="circle" class="circle" />
{cards.map((card) => { {
const imgSrc = getImage(card.image); cards.map((card) => {
return ( const imgSrc = getImage(card.image);
imgSrc && ( return (
<div class="card"> imgSrc && (
<Image src={imgSrc} alt="icon" /> <div class="card">
<h3>{card.title}</h3> <Image src={imgSrc} alt="icon" />
<p>{card.text}</p> <h3>{card.title}</h3>
</div> <p>{card.text}</p>
) </div>
); )
})} );
})
}
</div> </div>
</section> </section>
<section class="content container" id="about-us"> <section class="content container" id="about-us">
<div class="about-us container"> <div class="about-us container">
<div> <div>
<Image src={Rocket} alt="rocket" /> <Image class="rocket-img" src={Rocket} alt="rocket" />
</div> </div>
<div> <div>
<h5>{t("about_us.sub_title")}</h5> <h2 class="header5">{t("about_us.sub_title")}</h2>
<p class="text">{t("about_us.text")}</p> <p class="text">{t("about_us.text")}</p>
<div class="stats"> <div class="stats">
<div> <div>
<h4>{t("about_us.amount_completed")}</h4> <h4>{t("about_us.amount_completed")}</h4>
<p>{t("about_us.completed")}</p> <p>{t("about_us.completed")}</p>
</div> </div>
<div> <div>
<h4>{t("about_us.amount_webpages")}</h4> <h4>{t("about_us.amount_webpages")}</h4>
<p>{t("about_us.webpages")}</p> <p>{t("about_us.webpages")}</p>
</div> </div>
<div> <div>
<h4>{t("about_us.amount_experience")}</h4> <h4>{t("about_us.amount_experience")}</h4>
<p>{t("about_us.experience")}</p> <p>{t("about_us.experience")}</p>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>
</section> </section>
<section class="content container" id="contact-us"> <section class="content container" id="projects">
<h2>{t("menu.portfolio")}</h2>
<div class="projects-grid">
{
projects.map((project) => {
const projectImage = getProjectImage(project.image);
if (!projectImage) {
return null;
}
return (
<article class="project-card">
<div class="project-card__media">
<Image
src={projectImage}
alt={project.title}
loading="lazy"
/>
</div>
<div class="project-card__content">
<h3>{project.title}</h3>
<ul
class="project-card__tags"
aria-label={`${project.title} categories`}
>
{project.info.map((item) => (
<li>{item}</li>
))}
</ul>
<p>{project.text}</p>
</div>
</article>
);
})
}
</div>
</section>
<section class="content container" id="contact-us">
<ContactForm /> <ContactForm />
</section> </section>
<Footer /> <Footer />
</div> </div>
</body>
<script>
const { animate, inView, stagger } = await import("motion");
// Selector
inView("section", (element) => {
animate(
element,
{ opacity: [0, 1], y: [30, 0] },
{ duration: 1, easing: "easeIn" },
);
});
inView(".intro", (el) => {
// Select all the targets inside the triggered section
const introItems = el.querySelectorAll(".intro .title > *");
const introImage = el.querySelector(".intro .image");
animate(
introItems,
{ opacity: [0, 1], y: [30, 0] },
{
duration: 0.6,
easing: "easeIn",
delay: stagger(0.4),
},
);
animate(
introImage,
{
opacity: [0, 1],
y: [30, 0],
x: [
`var(--floating-intro-image-start-x)`,
`var(--floating-intro-image-x)`,
],
},
{
duration: 1,
easing: "easeIn",
delay: 0.8,
},
);
animate(
introImage,
{ y: [0, 30] },
{
type: "tween",
repeat: Infinity,
duration: 3,
repeatType: "reverse",
easing: "easeInOut",
},
);
});
inView("#services", (el) => {
// Select all the targets inside the triggered section
const cardElements = el.querySelectorAll(".card > *");
const cardElementsContainer = el.querySelectorAll(".services .card");
animate(
cardElementsContainer,
{ opacity: [0, 1], y: [50, 0] },
{
duration: 0.6,
easing: "easeIn",
// delay: 0.3,
delay: stagger(0.3),
},
);
animate(
cardElements,
{ opacity: [0, 1], y: [30, 0] },
{
duration: 0.5,
easing: "easeIn",
delay: stagger(0.3),
},
);
});
inView("#projects", (el) => {
// Select all the targets inside the triggered section
const projectCards = el.querySelectorAll(".project-card");
animate(
projectCards,
{ opacity: [0, 1], y: [50, 0] },
{
duration: 0.6,
easing: "easeIn",
// delay: 0.3,
delay: stagger(0.3),
},
);
});
</script>
</body>
</html> </html>

View file

@ -1,5 +1,5 @@
// Place any global data in this file. // Place any global data in this file.
// You can import this data from anywhere in your site by using the `import` keyword. // You can import this data from anywhere in your site by using the `import` keyword.
export const SITE_TITLE = 'Astro Blog'; export const SITE_TITLE = "Astro Blog";
export const SITE_DESCRIPTION = 'Welcome to my website!'; export const SITE_DESCRIPTION = "Welcome to my website!";

View file

@ -1,20 +1,20 @@
import { defineCollection } from 'astro:content'; import { defineCollection } from "astro:content";
import { glob } from 'astro/loaders'; import { glob } from "astro/loaders";
import { z } from 'astro/zod'; import { z } from "astro/zod";
const blog = defineCollection({ const blog = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory. // Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/blog', pattern: '**/*.{md,mdx}' }), loader: glob({ base: "./src/content/blog", pattern: "**/*.{md,mdx}" }),
// Type-check frontmatter using a schema // Type-check frontmatter using a schema
schema: ({ image }) => schema: ({ image }) =>
z.object({ z.object({
title: z.string(), title: z.string(),
description: z.string(), description: z.string(),
// Transform string to Date object // Transform string to Date object
pubDate: z.coerce.date(), pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(), updatedDate: z.coerce.date().optional(),
heroImage: z.optional(image()), heroImage: z.optional(image()),
}), }),
}); });
export const collections = { blog }; export const collections = { blog };

View file

@ -1,8 +1,8 @@
--- ---
title: 'First post' title: "First post"
description: 'Lorem ipsum dolor sit amet' description: "Lorem ipsum dolor sit amet"
pubDate: 'Jul 08 2022' pubDate: "Jul 08 2022"
heroImage: '../../assets/blog-placeholder-3.jpg' heroImage: "../../assets/blog-placeholder-3.jpg"
--- ---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.

View file

@ -1,8 +1,8 @@
--- ---
title: 'Markdown Style Guide' title: "Markdown Style Guide"
description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.' description: "Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro."
pubDate: 'Jun 19 2024' pubDate: "Jun 19 2024"
heroImage: '../../assets/blog-placeholder-1.jpg' heroImage: "../../assets/blog-placeholder-1.jpg"
--- ---
Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro. Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.

View file

@ -1,8 +1,8 @@
--- ---
title: 'Second post' title: "Second post"
description: 'Lorem ipsum dolor sit amet' description: "Lorem ipsum dolor sit amet"
pubDate: 'Jul 15 2022' pubDate: "Jul 15 2022"
heroImage: '../../assets/blog-placeholder-4.jpg' heroImage: "../../assets/blog-placeholder-4.jpg"
--- ---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.

View file

@ -1,8 +1,8 @@
--- ---
title: 'Third post' title: "Third post"
description: 'Lorem ipsum dolor sit amet' description: "Lorem ipsum dolor sit amet"
pubDate: 'Jul 22 2022' pubDate: "Jul 22 2022"
heroImage: '../../assets/blog-placeholder-2.jpg' heroImage: "../../assets/blog-placeholder-2.jpg"
--- ---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.

View file

@ -1,8 +1,8 @@
--- ---
title: 'Using MDX' title: "Using MDX"
description: 'Lorem ipsum dolor sit amet' description: "Lorem ipsum dolor sit amet"
pubDate: 'Jun 01 2024' pubDate: "Jun 01 2024"
heroImage: '../../assets/blog-placeholder-5.jpg' heroImage: "../../assets/blog-placeholder-5.jpg"
--- ---
This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file. This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.
@ -18,10 +18,10 @@ If you have existing content authored in MDX, this integration will hopefully ma
Here is how you import and use a UI component inside of MDX. Here is how you import and use a UI component inside of MDX.
When you open this page in the browser, you should see the clickable button below. When you open this page in the browser, you should see the clickable button below.
import HeaderLink from '../../components/HeaderLink.astro'; import HeaderLink from "../../components/HeaderLink.astro";
<HeaderLink href="#" onclick="alert('clicked!')"> <HeaderLink href="#" onclick="alert('clicked!')">
Embedded component in MDX Embedded component in MDX
</HeaderLink> </HeaderLink>
## More Links ## More Links

View file

@ -2,16 +2,16 @@ import en from "../translations/en.json";
import lv from "../translations/lv.json"; import lv from "../translations/lv.json";
export const languages = { export const languages = {
en: "EN", en: "EN",
lv: "LV", lv: "LV",
} as const; } as const;
export const defaultLang = "en"; export const defaultLang = "en";
export const showDefaultLang = true; export const showDefaultLang = true;
export const ui = { export const ui = {
en, en,
lv, lv,
} as const; } as const;
export type SupportedLang = keyof typeof ui; export type SupportedLang = keyof typeof ui;

View file

@ -1,52 +1,52 @@
import { defaultLang, showDefaultLang, ui, type SupportedLang } from "./ui"; import { defaultLang, showDefaultLang, ui, type SupportedLang } from "./ui";
const hasOwn = (obj: object, key: string): boolean => const hasOwn = (obj: object, key: string): boolean =>
Object.prototype.hasOwnProperty.call(obj, key); Object.prototype.hasOwnProperty.call(obj, key);
const getValueByPath = (value: unknown, key: string): unknown => { const getValueByPath = (value: unknown, key: string): unknown => {
return key.split(".").reduce<unknown>((acc, part) => { return key.split(".").reduce<unknown>((acc, part) => {
if (acc && typeof acc === "object" && hasOwn(acc as object, part)) { if (acc && typeof acc === "object" && hasOwn(acc as object, part)) {
return (acc as Record<string, unknown>)[part]; return (acc as Record<string, unknown>)[part];
} }
return undefined; return undefined;
}, value); }, value);
}; };
export function getLangFromUrl(url: URL): SupportedLang { export function getLangFromUrl(url: URL): SupportedLang {
const [, lang] = url.pathname.split("/"); const [, lang] = url.pathname.split("/");
if (lang && hasOwn(ui, lang)) { if (lang && hasOwn(ui, lang)) {
return lang as SupportedLang; return lang as SupportedLang;
} }
return defaultLang; return defaultLang;
} }
export function useTranslations(lang: SupportedLang) { export function useTranslations(lang: SupportedLang) {
const localizedUI = ui[lang] as Record<string, unknown>; const localizedUI = ui[lang] as Record<string, unknown>;
const fallbackUI = ui[defaultLang] as Record<string, unknown>; const fallbackUI = ui[defaultLang] as Record<string, unknown>;
return function t(key: string): unknown { return function t(key: string): unknown {
const localizedValue = getValueByPath(localizedUI, key); const localizedValue = getValueByPath(localizedUI, key);
if (localizedValue !== undefined) { if (localizedValue !== undefined) {
return localizedValue; return localizedValue;
} }
const fallbackValue = getValueByPath(fallbackUI, key); const fallbackValue = getValueByPath(fallbackUI, key);
return fallbackValue ?? key; return fallbackValue ?? key;
}; };
} }
export function useTranslatedPath(lang: SupportedLang) { export function useTranslatedPath(lang: SupportedLang) {
return function translatePath(path: string, l: SupportedLang = lang): string { return function translatePath(path: string, l: SupportedLang = lang): string {
const normalizedPath = path.startsWith("/") ? path : `/${path}`; const normalizedPath = path.startsWith("/") ? path : `/${path}`;
if (!showDefaultLang && l === defaultLang) { if (!showDefaultLang && l === defaultLang) {
return normalizedPath; return normalizedPath;
} }
return `/${l}${normalizedPath}`; return `/${l}${normalizedPath}`;
}; };
} }

View file

@ -1,95 +1,67 @@
--- ---
import {Image} from 'astro:assets'; import type { CollectionEntry } from "astro:content";
import type {CollectionEntry} from 'astro:content'; import BaseHead from "@/components/BaseHead.astro";
import BaseHead from '@/components/BaseHead.astro'; import Footer from "@/components/Footer/Footer.astro";
import Footer from '@/components/Footer/Footer.astro'; import FormattedDate from "@/components/FormattedDate.astro";
import FormattedDate from '@/components/FormattedDate.astro'; import Header from "@/components/Header/Header.astro";
import Header from '@/components/Header.astro'; import ContactForm from "@/components/ContactForm/ContactForm.astro";
import { getLangFromUrl, useTranslations } from "@/i18n/utils";
import { Image } from "astro:assets";
import "@/styles/index.css";
type Props = CollectionEntry<'blog'>['data']; type Props = CollectionEntry<"blog">["data"];
const {title, description, pubDate, updatedDate, heroImage} = Astro.props; const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
--- ---
<html lang="en"> <html lang={lang}>
<head> <head>
<BaseHead title={title} description={description}/> <BaseHead title={title} description={description} />
<style> </head>
main {
width: calc(100% - 2em);
max-width: 100%;
margin: 0;
}
.hero-image { <body class="blog-post-page">
width: 100%; <Header />
} <main>
<article>
.hero-image img {
display: block;
margin: 0 auto;
border-radius: 12px;
box-shadow: var(--box-shadow);
}
.prose {
width: 720px;
max-width: calc(100% - 2em);
margin: auto;
padding: 1em;
color: rgb(var(--gray-dark));
}
.title {
margin-bottom: 1em;
padding: 1em 0;
text-align: center;
line-height: 1;
}
.title h1 {
margin: 0 0 0.5em 0;
}
.date {
margin-bottom: 0.5em;
color: rgb(var(--gray));
}
.last-updated-on {
font-style: italic;
}
</style>
</head>
<body>
<Header/>
<main>
<article>
<div class="hero-image"> <div class="hero-image">
{heroImage && {
<Image width={1020} height={510} src={heroImage} alt=""/>} heroImage && (
<Image src={heroImage} alt={title} class="hero-image__media" />
)
}
</div> </div>
<div class="prose"> <div class="prose">
<div class="title"> <div class="title">
<div class="date"> <div class="date">
<FormattedDate date={pubDate}/> <FormattedDate date={pubDate} />
{ {
updatedDate && ( updatedDate && (
<div class="last-updated-on"> <div class="last-updated-on">
Last updated on Last updated on
<FormattedDate date={updatedDate}/> <FormattedDate date={updatedDate} />
</div> </div>
) )
} }
</div>
<h1>{title}</h1>
<hr/>
</div> </div>
<slot/> <h1>{title}</h1>
<hr />
</div>
<slot />
<div class="blog-nav-wrap">
<a class="blog-nav-link bottom" href="/blog"
>{t("blog.read_more")}</a
>
</div>
</div> </div>
</article> </article>
</main> </main>
<Footer/>
</body> <section class="content container" id="contact-us">
<ContactForm />
</section>
<Footer />
</body>
</html> </html>

View file

@ -1,63 +1,73 @@
--- ---
import AboutHeroImage from '../assets/blog-placeholder-about.jpg'; import AboutHeroImage from "../assets/blog-placeholder-about.jpg";
import Layout from '../layouts/BlogPost.astro'; import Layout from "../layouts/BlogPost.astro";
--- ---
<Layout <Layout
title="About Me" title="About Me"
description="Lorem ipsum dolor sit amet" description="Lorem ipsum dolor sit amet"
pubDate={new Date('August 08 2021')} pubDate={new Date("August 08 2021")}
heroImage={AboutHeroImage} heroImage={AboutHeroImage}
> >
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo
viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis
adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In
et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat.
vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu
sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet. non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim.
</p> Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed
vulputate mi. Dictumst quisque sagittis purus sit amet.
</p>
<p> <p>
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non Morbi tristique senectus et netus. Id semper risus in hendrerit gravida
tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus
blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris
porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus
massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis
Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius
bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras
massa massa ultricies mi. ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est
</p> ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa
ultricies mi.
</p>
<p> <p>
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque.
suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac
nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit
turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed
dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem
semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra.
vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum
facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus
vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla ultricies tristique. Rhoncus dolor purus non enim praesent elementum
urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim. facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed
</p> risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor
vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus
non. Amet dictum sit amet justo donec enim.
</p>
<p> <p>
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac
viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem
scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu
gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac
pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus
blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim
cursus metus aliquam eleifend mi. sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam.
</p> Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
</p>
<p> <p>
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus
nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu
tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum.
ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit
proin gravida. Egestas integer eget aliquet nibh praesent tristique magna. libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed
</p> pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique
magna.
</p>
</Layout> </Layout>

View file

@ -1,20 +1,20 @@
--- ---
import { type CollectionEntry, getCollection, render } from 'astro:content'; import { type CollectionEntry, getCollection, render } from "astro:content";
import BlogPost from '../../layouts/BlogPost.astro'; import BlogPost from "../../layouts/BlogPost.astro";
export async function getStaticPaths() { export async function getStaticPaths() {
const posts = await getCollection('blog'); const posts = await getCollection("blog");
return posts.map((post) => ({ return posts.map((post) => ({
params: { slug: post.id }, params: { slug: post.id },
props: post, props: post,
})); }));
} }
type Props = CollectionEntry<'blog'>; type Props = CollectionEntry<"blog">;
const post = Astro.props; const post = Astro.props;
const { Content } = await render(post); const { Content } = await render(post);
--- ---
<BlogPost {...post.data}> <BlogPost {...post.data}>
<Content /> <Content />
</BlogPost> </BlogPost>

View file

@ -1,114 +1,75 @@
--- ---
import { Image } from 'astro:assets'; import { Image } from "astro:assets";
import { getCollection } from 'astro:content'; import { getCollection } from "astro:content";
import BaseHead from '../../components/BaseHead.astro'; import BaseHead from "@/components/BaseHead.astro";
import Footer from '../../components/Footer/Footer.astro'; import Footer from "@/components/Footer/Footer.astro";
import FormattedDate from '../../components/FormattedDate.astro'; import FormattedDate from "@/components/FormattedDate.astro";
import Header from '../../components/Header.astro'; import Header from "@/components/Header/Header.astro";
import { SITE_DESCRIPTION, SITE_TITLE } from '../../consts'; import { SITE_DESCRIPTION, SITE_TITLE } from "@/consts";
import { getLangFromUrl, useTranslations } from "@/i18n/utils";
const posts = (await getCollection('blog')).sort( import "@/styles/index.css";
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
const posts = (await getCollection("blog")).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
); );
--- ---
<!doctype html> <!doctype html>
<html lang="en"> <html lang={lang}>
<head> <head>
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> <BaseHead
<style> title={`${SITE_TITLE} | ${t("menu.blog")}`}
main { description={SITE_DESCRIPTION}
width: 960px; />
} </head>
ul { <body>
display: flex; <div class="main-page" id="top">
flex-wrap: wrap; <div class="intro-bg">
gap: 2rem; <Header />
list-style-type: none; <section class="container blog-hero">
margin: 0; <h1>{t("menu.blog")}</h1>
padding: 0; <p class="gray">
} Stories, experiments, and practical notes from our team.
ul li { </p>
width: calc(50% - 1rem); </section>
} </div>
ul li * {
text-decoration: none; <section class="content container" id="blog-list">
transition: 0.2s ease; <div class="blog-grid">
} {
ul li:first-child { posts.map((post) => (
width: 100%; <article class="blog-card">
margin-bottom: 1rem; <a href={`/blog/${post.id}/`} class="blog-card__link">
text-align: center; {post.data.heroImage && (
} <div class="blog-card__media">
ul li:first-child img { <Image
width: 100%; src={post.data.heroImage}
} alt={post.data.title}
ul li:first-child .title { loading="lazy"
font-size: 2.369rem; />
} </div>
ul li img { )}
margin-bottom: 0.5rem; <div class="blog-card__content">
border-radius: 12px; <h3>{post.data.title}</h3>
} <p class="blog-card__date">
ul li a { <FormattedDate date={post.data.pubDate} />
display: block; </p>
} {post.data.description && (
.title { <p class="blog-card__excerpt">{post.data.description}</p>
margin: 0; )}
color: rgb(var(--black)); </div>
line-height: 1; </a>
} </article>
.date { ))
margin: 0; }
color: rgb(var(--gray)); </div>
} </section>
ul li a:hover h4,
ul li a:hover .date { <Footer />
color: rgb(var(--accent)); </div>
} </body>
ul a:hover img {
box-shadow: var(--box-shadow);
}
@media (max-width: 720px) {
ul {
gap: 0.5em;
}
ul li {
width: 100%;
text-align: center;
}
ul li:first-child {
margin-bottom: 0;
}
ul li:first-child .title {
font-size: 1.563em;
}
}
</style>
</head>
<body>
<Header />
<main>
<section>
<ul>
{
posts.map((post) => (
<li>
<a href={`/blog/${post.id}/`}>
{post.data.heroImage && (
<Image width={720} height={360} src={post.data.heroImage} alt="" />
)}
<h4 class="title">{post.data.title}</h4>
<p class="date">
<FormattedDate date={post.data.pubDate} />
</p>
</a>
</li>
))
}
</ul>
</section>
</main>
<Footer />
</body>
</html> </html>

View file

@ -1,16 +1,16 @@
import { getCollection } from 'astro:content'; import { getCollection } from "astro:content";
import rss from '@astrojs/rss'; import rss from "@astrojs/rss";
import { SITE_DESCRIPTION, SITE_TITLE } from '../consts'; import { SITE_DESCRIPTION, SITE_TITLE } from "../consts";
export async function GET(context) { export async function GET(context) {
const posts = await getCollection('blog'); const posts = await getCollection("blog");
return rss({ return rss({
title: SITE_TITLE, title: SITE_TITLE,
description: SITE_DESCRIPTION, description: SITE_DESCRIPTION,
site: context.site, site: context.site,
items: posts.map((post) => ({ items: posts.map((post) => ({
...post.data, ...post.data,
link: `/blog/${post.id}/`, link: `/blog/${post.id}/`,
})), })),
}); });
} }

View file

@ -5,36 +5,40 @@
*/ */
:root { :root {
--accent: #2337ff; --accent: #2337ff;
--accent-dark: #000d8a; --accent-dark: #000d8a;
--black: 15, 18, 25; --black: 15, 18, 25;
--gray: 96, 115, 159; --gray: 96, 115, 159;
--gray-light: 229, 233, 240; --gray-light: 229, 233, 240;
--gray-dark: 34, 41, 57; --gray-dark: 34, 41, 57;
--gray-gradient: rgba(var(--gray-light), 50%), #fff; --gray-gradient: rgba(var(--gray-light), 50%), #fff;
--box-shadow: 0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%), --box-shadow:
0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%),
0 16px 32px rgba(var(--gray), 33%); 0 16px 32px rgba(var(--gray), 33%);
/* TODO: Here we start our custom CSS Remove above later */ /* TODO: Here we start our custom CSS Remove above later */
--breakpoint-mobile: 767px; --breakpoint-mobile: 767px;
--breakpoint-tablet: 1200px; --breakpoint-tablet: 1200px;
--color-text-primary: #ffffff; --color-text-primary: #ffffff;
--color-text-secondary: rgba(255, 255, 255, 60%); --color-text-secondary: rgba(255, 255, 255, 60%);
--color-accent-primary: #c16b6b; --color-accent-primary: #c16b6b;
--color-accent-secondary: #b46f8e; --color-accent-secondary: #b46f8e;
--gutter: 24px; --gutter: 24px;
--floating-intro-image-x: 150px;
--floating-intro-image-start-x: 300px;
} }
/* typography.css */ /* typography.css */
* { * {
font-family: "proxima-nova", sans-serif; font-family: "proxima-nova", sans-serif;
} }
a { a {
text-decoration: none; text-decoration: none;
} }
h1, h1,
@ -45,146 +49,160 @@ h5,
a, a,
p, p,
span { span {
color: var(--color-text-primary); color: var(--color-text-primary);
} }
h1 { h1 {
font-weight: 700; font-weight: 700;
font-size: 6.25rem; /* 100px ÷ 16 */ font-size: 5.55rem; /* 100px ÷ 16 */
} }
h2 { h2 {
font-weight: 700; font-weight: 700;
font-size: 3.125rem; /* 50px ÷ 16 */ font-size: 3.125rem; /* 50px ÷ 16 */
} }
h3 { h3 {
font-weight: 600; font-weight: 600;
font-size: 1.5625rem; /* 25px ÷ 16 */ font-size: 1.5625rem; /* 25px ÷ 16 */
} }
h4 { h4 {
font-weight: 900; font-weight: 900;
font-size: 2.1875rem; /* 35px ÷ 16 */ font-size: 2.1875rem; /* 35px ÷ 16 */
} }
h5 { h5 {
font-weight: 700; font-weight: 700;
font-size: 1.875rem; /* 30px ÷ 16 */ font-size: 1.875rem; /* 30px ÷ 16 */
}
.header5 {
font-weight: 700;
font-size: 1.875rem; /* 30px ÷ 16 */
} }
h6 { h6 {
font-size: 1.125rem; /* 18px ÷ 16 */ font-size: 1.125rem; /* 18px ÷ 16 */
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.05rem; letter-spacing: 0.05rem;
font-weight: normal; font-weight: normal;
color: var(--color-text-primary); color: var(--color-text-primary);
} }
p { p {
font-weight: 400; font-weight: 400;
font-size: 1.125rem; /* 18px ÷ 16 */ font-size: 1.125rem; /* 18px ÷ 16 */
} }
.gray { .gray {
color: var(--color-text-secondary); color: var(--color-text-secondary);
}
section {
opacity: 0;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
h1 { :root {
font-weight: 800; --floating-intro-image-x: 0px;
font-size: 2.5rem; /* 40px ÷ 16 */ --floating-intro-image-start-x: 30px;
line-height: normal; }
}
h2 { h1 {
font-weight: 700; font-weight: 800;
font-size: 1.875rem; /* 30px ÷ 16 */ font-size: 2.5rem; /* 40px ÷ 16 */
line-height: normal; line-height: normal;
} }
h3 { h2 {
font-weight: 700; font-weight: 700;
font-size: 1.375rem; /* 22px ÷ 16 */ font-size: 1.875rem; /* 30px ÷ 16 */
line-height: normal; line-height: normal;
} }
p { h3 {
line-height: normal; font-weight: 700;
font-size: 1rem; /* 16px ÷ 16 */ font-size: 1.375rem; /* 22px ÷ 16 */
} line-height: normal;
}
p {
line-height: normal;
font-size: 1rem; /* 16px ÷ 16 */
}
} }
/* TODO: Remove above code later */ /* TODO: Remove h1ve code later */
body { body {
background-color: #111111; background-color: #111111;
} }
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
} }
.container { .container {
display: grid; display: grid;
grid-template-columns: repeat(12, minmax(0, 96px)); grid-template-columns: repeat(12, minmax(0, 96px));
gap: var(--gutter); gap: var(--gutter);
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
max-width: 1224px; max-width: 1224px;
grid-column: 1 / 13; grid-column: 1 / 13;
padding: 0 20px; padding: 0 20px;
} }
.container > * { .container > * {
grid-column: 1 / 13; grid-column: 1 / 13;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.container { .container {
grid-template-columns: repeat(6, 1fr); grid-template-columns: repeat(6, 1fr);
max-width: 100%; max-width: 100%;
width: auto; width: auto;
} }
.container > * { .container > * {
grid-column: 1 / 7; grid-column: 1 / 7;
} }
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.container-mobile { .container-mobile {
padding: 0 20px; padding: 0 20px;
display: grid; display: grid;
grid-template-columns: repeat(6, 1fr); grid-template-columns: repeat(6, 1fr);
max-width: 100%; max-width: 100%;
width: auto; width: auto;
} }
.container-mobile > * { .container-mobile > * {
grid-column: 1 / 7; grid-column: 1 / 7;
} }
} }
section.container { section.container {
padding-right: 20px; padding-right: 20px;
padding-left: 20px; padding-left: 20px;
} }
div.container { div.container {
padding-right: 0; padding-right: 0;
padding-left: 0; padding-left: 0;
} }
.main-page { .main-page {
overflow-x: hidden; overflow-x: hidden;
position: relative; position: relative;
.intro-bg { .intro-bg {
background: radial-gradient( background: radial-gradient(
100% 100% at 0% 0%, 100% 100% at 0% 0%,
rgba(226, 90, 146, 0.15) 0%, rgba(226, 90, 146, 0.15) 0%,
rgba(141, 162, 243, 0.063) 35.82%, rgba(141, 162, 243, 0.063) 35.82%,
rgba(23, 23, 23, 0) 100% rgba(23, 23, 23, 0) 100%
); );
} }
} }

View file

@ -1,283 +1,594 @@
/* intro */ /* intro */
.intro { .intro {
min-height: max(680px, calc(100vh - 24px)); height: calc(100vh - 112px);
grid-template-rows: 1fr auto; grid-template-rows: calc(100vh - 112px - 85px - 30px) min-content;
row-gap: clamp(20px, 3vw, 40px); row-gap: unset;
padding-top: 112px; padding-top: 112px;
.intro__title { .title {
grid-column: 1/8; grid-column: 1/8;
grid-row: 1/2; grid-row: 1/2;
display: flex;
flex-direction: column;
justify-content: center;
h1 {
line-height: 120%;
}
div {
display: flex;
p {
text-transform: uppercase;
color: var(--color-accent-secondary);
&:first-child {
margin-right: 39px;
}
&:last-child {
margin-left: 34px;
}
}
}
}
.image {
grid-column: 5/13;
grid-row: 1/2;
display: flex;
align-items: center;
background-image: url("../assets/images/main/intro/astronaut.png");
background-repeat: no-repeat;
background-size: contain;
background-position: right;
transform: translateX(150px);
z-index: -1;
}
.rocket {
grid-column: 1/13;
grid-row: 2/3;
* {
margin: 0 auto;
width: max-content;
}
p {
color: var(--color-text-secondary);
margin-top: 15px;
}
}
@media (max-width: 1350px) {
.image {
transform: translateX(50px);
}
}
@media (max-width: 767px) {
height: auto;
padding-top: 106px;
grid-template-rows: 400px min-content;
.title,
.rocket,
.image {
grid-column: 1/7;
}
.image {
grid-row: 1/2;
transform: none;
justify-content: center;
background-position: center;
}
.title {
grid-row: 2/3;
h1 {
text-align: center;
span {
display: none;
}
}
div {
width: 100%;
text-align: center;
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
justify-content: center; margin-top: 16px;
}
h1 {
font-size: clamp(2.9rem, 8vw, 6.25rem);
line-height: 1.2;
text-wrap: balance;
span {
color: var(--color-text-primary);
}
}
.intro__items {
list-style: none;
display: flex;
flex-wrap: wrap;
column-gap: clamp(16px, 2.8vw, 40px);
row-gap: 10px;
margin: 22px 0 0;
padding: 0;
li {
text-transform: uppercase;
color: var(--color-accent-secondary);
letter-spacing: 0.03em;
}
}
} }
.intro__image { .rocket {
grid-column: 5/13; display: none;
grid-row: 1/2;
display: flex;
align-items: center;
justify-content: flex-end;
z-index: -1;
img {
width: min(100%, 780px);
height: auto;
transform: translateX(clamp(0px, 7vw, 150px));
}
}
.intro__rocket {
grid-column: 1/13;
grid-row: 2/3;
display: grid;
justify-items: center;
p {
color: var(--color-text-secondary);
margin-top: 14px;
}
}
@media (max-width: 1350px) {
.intro__image img {
transform: translateX(clamp(0px, 3vw, 50px));
}
}
@media (max-width: 767px) {
min-height: auto;
padding-top: 106px;
grid-template-rows: 340px auto;
row-gap: 20px;
.intro__title,
.intro__rocket,
.intro__image {
grid-column: 1/7;
}
.intro__image {
grid-row: 1/2;
justify-content: center;
img {
transform: none;
max-width: 450px;
}
}
.intro__title {
grid-row: 2/3;
h1 {
text-align: center;
span {
display: none;
}
}
.intro__items {
width: 100%;
justify-content: space-between;
text-align: center;
margin-top: 16px;
li {
font-size: 0.75rem;
}
}
}
.intro__rocket {
display: none;
}
} }
}
} }
/* section */ /* section */
section.content { section.content {
margin-top: 192px; margin-top: 192px;
h2 { h2 {
text-align: center; text-align: center;
margin-bottom: 88px; margin-bottom: 88px;
@media all and (max-width: 767px) { @media all and (max-width: 767px) {
margin-bottom: 54px; margin-bottom: 54px;
}
} }
}
} }
/* services */ /* services */
#services { #services {
scroll-margin-block-start: 120px; scroll-margin-block-start: 120px;
} }
.services { .services {
background: radial-gradient( background: radial-gradient(
48.62% 45.5% at 50% 50%, 48.62% 45.5% at 50% 50%,
rgba(225, 104, 154, 0.15) 0%, rgba(225, 104, 154, 0.15) 0%,
rgba(141, 162, 243, 0.063) 49.1%, rgba(141, 162, 243, 0.063) 49.1%,
rgba(23, 23, 23, 0) 100% rgba(23, 23, 23, 0) 100%
); );
position: relative; position: relative;
.circle { .circle {
position: absolute; position: absolute;
top: -140px; top: -140px;
left: -530px; left: -530px;
@media all and (max-width: 767px) { @media all and (max-width: 767px) {
top: 10%; top: 10%;
right: 50%; right: 50%;
left: unset; left: unset;
}
}
.card {
color: red;
} }
}
} }
/* card */ /* card */
.card { .card {
background: rgba(255, 255, 255, 0.01); background: rgba(255, 255, 255, 0.01);
box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.15); box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.15);
backdrop-filter: blur(7px); backdrop-filter: blur(7px);
border-radius: 33px; border-radius: 33px;
padding: 63px 55px; padding: 63px 55px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
img { img {
min-height: 99px; min-height: 99px;
} }
h3 { h3 {
margin-top: 63px; margin-top: 63px;
margin-bottom: 16px; margin-bottom: 16px;
} }
h3, h3,
p { p {
text-align: center; text-align: center;
} }
&:nth-of-type(1) {
grid-column: 1/5;
}
&:nth-of-type(2) {
grid-column: 5/9;
}
&:nth-of-type(3) {
grid-column: 9/13;
}
@media (max-width: 767px) {
padding: 46px 30px;
&:nth-of-type(1) { &:nth-of-type(1) {
grid-column: 1/5; grid-column: 1/7;
} }
&:nth-of-type(2) { &:nth-of-type(2) {
grid-column: 5/9; grid-column: 1/7;
} }
&:nth-of-type(3) { &:nth-of-type(3) {
grid-column: 9/13; grid-column: 1/7;
}
@media (max-width: 767px) {
padding: 46px 30px;
&:nth-of-type(1) {
grid-column: 1/7;
}
&:nth-of-type(2) {
grid-column: 1/7;
}
&:nth-of-type(3) {
grid-column: 1/7;
}
} }
}
} }
/* about */ /* about */
#about-us { #about-us {
scroll-margin-block-start: 120px; scroll-margin-block-start: 120px;
} }
.about-us { .about-us {
margin-top: -80px; margin-top: -80px;
> div { .header5 {
&:first-child { text-align: left;
grid-column: 1/7; margin-bottom: 0;
} }
&:last-child { .rocket-img {
grid-column: 7/13; width: 100%;
display: flex; height: auto;
flex-direction: column; }
justify-content: center;
.text { > div {
margin-top: 16px; &:first-child {
color: var(--color-text-secondary); grid-column: 1/7;
}
.stats {
display: flex;
justify-content: space-between;
margin-top: 64px;
width: 100%;
.swiper-slide {
width: 33%;
}
@media (max-width: 767px) {
text-align: center;
& > div {
padding: 4px;
}
}
}
@media (max-width: 767px) {
grid-column: 1/7;
h5,
.text {
text-align: center;
}
}
}
} }
&:last-child {
grid-column: 7/13;
display: flex;
flex-direction: column;
justify-content: center;
.text {
margin-top: 16px;
color: var(--color-text-secondary);
}
.stats {
display: flex;
justify-content: space-between;
margin-top: 64px;
width: 100%;
.swiper-slide {
width: 33%;
}
@media (max-width: 767px) {
text-align: center;
& > div {
padding: 4px;
}
}
}
@media (max-width: 767px) {
grid-column: 1/7;
h2,
.text {
text-align: center;
}
}
}
}
}
/* projects */
#projects {
scroll-margin-block-start: 120px;
}
.projects-grid {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: 24px;
.project-card {
grid-column: span 6;
background: linear-gradient(
145deg,
rgba(255, 255, 255, 0.08),
rgba(255, 255, 255, 0.03)
);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 24px;
overflow: hidden;
display: grid;
grid-template-rows: auto 1fr;
backdrop-filter: blur(8px);
}
.project-card__media {
aspect-ratio: 16 / 10;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.35s ease;
}
}
.project-card__content {
padding: 22px 22px 24px;
h3 {
margin-bottom: 12px;
}
p {
color: var(--color-text-secondary);
}
}
.project-card__tags {
margin: 0 0 14px;
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 8px;
li {
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 999px;
padding: 6px 10px;
color: var(--color-text-primary);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.04em;
}
}
.project-card:hover .project-card__media img {
transform: scale(1.04);
}
@media (max-width: 1024px) {
.project-card {
grid-column: span 12;
}
}
@media (max-width: 767px) {
gap: 16px;
.project-card {
border-radius: 18px;
}
.project-card__content {
padding: 16px;
}
}
}
/* blog */
.blog-hero {
min-height: 360px;
align-content: center;
padding-top: 112px;
padding-bottom: 32px;
h1 {
text-align: center;
margin-bottom: 14px;
}
p {
text-align: center;
max-width: 680px;
margin: 0 auto;
}
@media (max-width: 767px) {
min-height: 300px;
padding-top: 106px;
}
}
#blog-list {
margin-top: 88px;
padding-bottom: 80px;
@media (max-width: 767px) {
margin-top: 56px;
padding-bottom: 56px;
}
}
.blog-grid {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: 24px;
}
.blog-card {
grid-column: span 6;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 22px;
overflow: hidden;
background: linear-gradient(
160deg,
rgba(255, 255, 255, 0.08),
rgba(255, 255, 255, 0.02)
);
backdrop-filter: blur(7px);
.blog-card__link {
display: grid;
grid-template-rows: auto 1fr;
height: 100%;
}
.blog-card__media {
aspect-ratio: 16 / 9;
overflow: hidden;
}
.blog-card__media img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.35s ease;
}
.blog-card__content {
padding: 18px 20px 22px;
}
h3 {
margin: 0 0 8px;
line-height: 1.2;
}
.blog-card__date {
color: var(--color-accent-secondary);
margin: 0 0 12px;
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.blog-card__excerpt {
color: var(--color-text-secondary);
margin: 0;
}
&:hover .blog-card__media img {
transform: scale(1.04);
}
}
@media (max-width: 1024px) {
.blog-card {
grid-column: span 12;
}
}
/* blog post */
.blog-post-page main {
width: auto;
max-width: 100%;
margin: 0 2rem;
padding-top: 176px;
}
@media (max-width: 767px) {
.blog-post-page main {
width: auto;
margin: 0 1rem;
padding-top: 124px;
}
}
.blog-post-page .hero-image {
width: 100%;
}
.blog-post-page .hero-image__media {
width: 100%;
max-width: 1020px;
height: auto;
display: block;
margin: 0 auto;
border-radius: 12px;
box-shadow: var(--box-shadow);
}
.blog-post-page .prose {
width: 720px;
max-width: calc(100% - 2em);
margin: auto;
padding: 1em;
color: rgb(var(--gray-dark));
}
.blog-post-page .prose picture {
display: block;
width: 100%;
max-width: 1020px;
margin: 1.25rem auto;
}
.blog-post-page .prose img {
width: 100%;
max-width: 1020px;
height: auto;
display: block;
margin: 1.25rem auto;
border-radius: 12px;
box-shadow: var(--box-shadow);
}
.blog-post-page .title {
margin-bottom: 1em;
padding: 1em 0;
text-align: center;
line-height: 1;
}
.blog-post-page .title h1 {
margin: 0 0 0.5em 0;
}
.blog-post-page .date {
margin-bottom: 0.5em;
color: rgb(var(--gray));
}
.blog-post-page .last-updated-on {
font-style: italic;
}
.blog-post-page .blog-nav-link {
display: inline-flex;
align-items: center;
gap: 10px;
border: 1px solid rgba(255, 255, 255, 0.24);
border-radius: 999px;
padding: 10px 16px;
font-size: 0.875rem;
letter-spacing: 0.04em;
text-transform: uppercase;
transition:
border-color 0.25s ease,
transform 0.25s ease,
background-color 0.25s ease;
background: rgba(255, 255, 255, 0.04);
}
.blog-post-page .blog-nav-link:hover {
border-color: rgba(255, 255, 255, 0.48);
background: rgba(255, 255, 255, 0.08);
transform: translateY(-2px);
}
.blog-post-page .blog-nav-link::before {
content: "\2190";
font-size: 1rem;
line-height: 1;
}
.blog-post-page .blog-nav-link.bottom {
margin: 28px auto 0;
}
.blog-post-page .blog-nav-wrap {
width: 720px;
max-width: calc(100% - 2em);
margin: 0 auto;
padding: 0 1em;
display: flex;
justify-content: center;
} }

View file

@ -3,22 +3,22 @@
*, *,
*::before, *::before,
*::after { *::after {
box-sizing: border-box; box-sizing: border-box;
} }
html { html {
font-size: 100.01%; font-size: 100.01%;
} }
body { body {
margin: 0; margin: 0;
min-height: 100vh; min-height: 100vh;
text-rendering: optimizeSpeed; text-rendering: optimizeSpeed;
line-height: 1.5; line-height: 1.5;
} }
main { main {
display: block; display: block;
} }
/* Remove default margin */ /* Remove default margin */
@ -34,25 +34,25 @@ figure,
blockquote, blockquote,
dl, dl,
dd { dd {
margin: 0; margin: 0;
} }
/* Reset list styles */ /* Reset list styles */
ul[role="list"], ul[role="list"],
ol[role="list"] { ol[role="list"] {
list-style: none; list-style: none;
} }
/* Links */ /* Links */
a:not([class]) { a:not([class]) {
text-decoration-skip-ink: auto; text-decoration-skip-ink: auto;
} }
/* Images */ /* Images */
img, img,
picture { picture {
max-width: 100%; max-width: 100%;
display: block; display: block;
} }
/* Reset button and input styles */ /* Reset button and input styles */
@ -62,46 +62,46 @@ input[type="submit"],
input, input,
textarea, textarea,
select { select {
font: inherit; font: inherit;
cursor: pointer; cursor: pointer;
} }
button, button,
input[type="button"], input[type="button"],
input[type="submit"] { input[type="submit"] {
background: transparent; background: transparent;
border: 0; border: 0;
padding: 0; padding: 0;
margin: 0; margin: 0;
box-shadow: none; box-shadow: none;
color: inherit; color: inherit;
font-size: inherit; font-size: inherit;
} }
button::-moz-focus-inner, button::-moz-focus-inner,
input[type="button"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner { input[type="submit"]::-moz-focus-inner {
border: 0; border: 0;
padding: 0; padding: 0;
} }
/* Hidden elements */ /* Hidden elements */
[hidden] { [hidden] {
display: none !important; display: none !important;
} }
/* Reduce motion preferences */ /* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
html:focus-within { html:focus-within {
scroll-behavior: auto; scroll-behavior: auto;
} }
*, *,
*::before, *::before,
*::after { *::after {
animation-duration: 0.01ms !important; animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important; animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important; transition-duration: 0.01ms !important;
scroll-behavior: auto !important; scroll-behavior: auto !important;
} }
} }

View file

@ -3,6 +3,7 @@
"services": "Services", "services": "Services",
"about_us": "About Us", "about_us": "About Us",
"portfolio": "Portfolio", "portfolio": "Portfolio",
"blog": "Blog",
"pricing": "Pricing", "pricing": "Pricing",
"contact_us": "Contact Us", "contact_us": "Contact Us",
"home": "Home" "home": "Home"
@ -46,10 +47,14 @@
"amount_experience": "6+", "amount_experience": "6+",
"experience": "Years experience" "experience": "Years experience"
}, },
"blog": {
"back": "Back",
"read_more": "Read more of our stories"
},
"projects": [ "projects": [
{ {
"title": "Inflid", "title": "Inflid",
"image": "inflid_full_1.png", "image": "inflid_full_1_1.png",
"info": ["Website", "Platform", "UI / UX"], "info": ["Website", "Platform", "UI / UX"],
"text": "Smart matching platform for Streamers and Advertisers" "text": "Smart matching platform for Streamers and Advertisers"
}, },

View file

@ -3,6 +3,7 @@
"services": "Servisi", "services": "Servisi",
"about_us": "Par mums", "about_us": "Par mums",
"portfolio": "Portfolio", "portfolio": "Portfolio",
"blog": "Blogs",
"pricing": "Cenas", "pricing": "Cenas",
"contact_us": "Sazināties", "contact_us": "Sazināties",
"home": "Mājas" "home": "Mājas"
@ -46,6 +47,10 @@
"amount_experience": "6+", "amount_experience": "6+",
"experience": "Gadu pieredze" "experience": "Gadu pieredze"
}, },
"blog": {
"back": "Atpakaļ",
"read_more": "Lasīt vairāk mūsu stāstus"
},
"projects": [ "projects": [
{ {
"title": "Inflid", "title": "Inflid",

View file

@ -1,28 +1,16 @@
{ {
"extends": "astro/tsconfigs/strict", "extends": "astro/tsconfigs/strict",
"include": [ "include": [".astro/types.d.ts", "**/*"],
".astro/types.d.ts", "exclude": ["dist"],
"**/*"
],
"exclude": [
"dist"
],
"compilerOptions": { "compilerOptions": {
"strictNullChecks": true, "strictNullChecks": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"jsxImportSource": "react", "jsxImportSource": "react",
"baseUrl": ".",
"paths": { "paths": {
"@/*": ["src/*"], "@/*": ["src/*"],
"@components/*": [ "@components/*": ["src/components/*"],
"src/components/*" "@images/*": ["src/assets/images/*"],
], "@consts": ["src/consts"]
"@images/*": [
"src/assets/images/*"
],
"@consts": [
"src/consts"
]
} }
} }
} }