Migration to astro #1

Merged
shiseri merged 6 commits from astro-migration into main 2026-07-29 18:59:27 +03:00
115 changed files with 7488 additions and 12679 deletions

4
.dockerignore Normal file
View file

@ -0,0 +1,4 @@
node_modules
.astro
dist
.git

View file

@ -0,0 +1,28 @@
name: Build and Deploy Astro Landing
on:
push:
branches:
- main
- master
jobs:
deploy:
runs-on: ubuntu-latest # Метка вашего Forgejo Runner
steps:
- name: Deploy to VPS via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
port: 22
script: |
# 1. Переходим в директорию лендинга
cd /var/www/Landing
# 2. Подтягиваем свежие коммиты из Git
git pull origin main
# 3. Пересобираем Docker-образ и перезапускаем контейнер
docker compose up -d --build

25
.gitignore vendored
View file

@ -1,3 +1,24 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/ node_modules/
.cache/
public # logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store
# jetbrains setting folder
.idea/

201
.idea/workspace.xml Normal file
View file

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="BackgroundAgentGlobalSettings">
<option name="selectedModelId" value="auto" />
</component>
<component name="ChangeListManager">
<list default="true" id="01345e21-67ff-441a-b47b-439ace178327" name="Changes" comment="WIP: Cleaning">
<change afterPath="$PROJECT_DIR$/.dockerignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.forgejo/workflows/deploy.yml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
<change afterPath="$PROJECT_DIR$/docker-compose.local.yaml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/docker-compose.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/astro.config.mjs" beforeDir="false" afterPath="$PROJECT_DIR$/astro.config.mjs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pnpm-lock.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pnpm-lock.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pnpm-workspace.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pnpm-workspace.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/ContactForm/ContactForm.astro" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/ContactForm/ContactForm.astro" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/api/subscribe.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/styles/index.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/styles/index.css" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CopilotPersistence">
<persistenceIdMap>
<entry key="_/Users/sergejskozinecs/MIDCreative/Landing" value="2yH86MRbQxz5i3OVEdtNpqyPg19" />
</persistenceIdMap>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Astro Component" />
<option value="CSS File" />
<option value="TypeScript File" />
<option value="Dockerfile" />
<option value="Docker Compose" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="main" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 7
}</component>
<component name="ProjectId" id="2yH86MRbQxz5i3OVEdtNpqyPg19" />
<component name="ProjectSessionTemplates">
<option name="panelTemplate">
<template>
<option name="modeId" value="Ask" />
<option name="model">
<model>
<option name="modelType" value="builtin_id" />
<option name="modelValue" value="auto" />
</model>
</option>
<option name="targetType" value="BACKGROUND" />
<option name="worktreeMode" value="WORKSPACE" />
</template>
</option>
</component>
<component name="ProjectViewState">
<option name="autoscrollFromSource" value="true" />
<option name="autoscrollToSource" value="true" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
"RunOnceActivity.git.unshallow": "true",
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
"codeWithMe.voiceChat.enabledByDefault": "false",
"copilot.chat.legacySessionMetadata.migrated": "true",
"git-widget-placeholder": "astro-migration",
"javascript.preferred.runtime.type.id": "node",
"js.debugger.nextJs.config.created.client": "true",
"js.debugger.nextJs.config.created.server": "true",
"junie.onboarding.icon.badge.shown": "true",
"last_opened_file_path": "/Users/sergejskozinecs/MIDCreative/Landing/AstroLanding/src",
"list.type.of.created.stylesheet": "CSS",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.jshint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.jshint": "",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "yarn",
"settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
"ts.external.directory.path": "/Users/sergejskozinecs/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/AstroLanding/src" />
<recent name="$PROJECT_DIR$/AstroLanding/src/components/Footer" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/AstroLanding/src/components/Contacts" />
<recent name="$PROJECT_DIR$/AstroLanding/src/components/Footer" />
<recent name="$PROJECT_DIR$/AstroLanding/src/components" />
<recent name="$PROJECT_DIR$/AstroLanding/src/styles" />
</key>
</component>
<component name="RunManager" selected="npm.Next.js: server-side">
<configuration name="Next.js: debug client-side" type="JavascriptDebugType" uri="http://localhost:3000/">
<method v="2" />
</configuration>
<configuration name="Next.js: server-side" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-js-predefined-d6986cc7102b-4abd2a77f808-JavaScript-WS-262.8665.259" />
</set>
</attachedChunks>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="01345e21-67ff-441a-b47b-439ace178327" name="Changes" comment="" />
<created>1749479961271</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1749479961271</updated>
<workItem from="1749479962358" duration="3291000" />
<workItem from="1750329701914" duration="64000" />
<workItem from="1750329776913" duration="2946000" />
<workItem from="1784537953715" duration="6202000" />
<workItem from="1784899208755" duration="13951000" />
<workItem from="1785220782898" duration="240000" />
<workItem from="1785317634340" duration="17052000" />
</task>
<task id="LOCAL-00001" summary="Add captcha verification to contact form and improve error handling">
<option name="closed" value="true" />
<created>1784538195783</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1784538195783</updated>
</task>
<task id="LOCAL-00002" summary="WIP: Astro migration">
<option name="closed" value="true" />
<created>1785320748598</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1785320748598</updated>
</task>
<task id="LOCAL-00003" summary="WIP: Cleaning">
<option name="closed" value="true" />
<created>1785324636646</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1785324636646</updated>
</task>
<task id="LOCAL-00004" summary="WIP: Cleaning">
<option name="closed" value="true" />
<created>1785324665763</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1785324665763</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="some latest test changes" />
<MESSAGE value="Add captcha verification to contact form and improve error handling" />
<MESSAGE value="WIP: Astro migration" />
<MESSAGE value="WIP: Cleaning" />
<option name="LAST_COMMIT_MESSAGE" value="WIP: Cleaning" />
</component>
</project>

12
.prettierrc.mjs Normal file
View file

@ -0,0 +1,12 @@
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};

4
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}

11
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}

22
AGENTS.md Normal file
View file

@ -0,0 +1,22 @@
## Development
When starting the dev server, use background mode:
```
astro dev --background
```
Manage the background server with `astro dev stop`, `astro dev status`, and `astro dev logs`.
## Documentation
Full documentation: https://docs.astro.build
Consult these guides before working on related tasks:
- [Adding pages, dynamic routes, or middleware](https://docs.astro.build/en/guides/routing/)
- [Working with Astro components](https://docs.astro.build/en/basics/astro-components/)
- [Using React, Vue, Svelte, or other framework components](https://docs.astro.build/en/guides/framework-components/)
- [Adding or managing content](https://docs.astro.build/en/guides/content-collections/)
- [Adding styles or using Tailwind](https://docs.astro.build/en/guides/styling/)
- [Supporting multiple languages](https://docs.astro.build/en/guides/internationalization/)

1
CLAUDE.md Symbolic link
View file

@ -0,0 +1 @@
AGENTS.md

26
Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM node:24-alpine AS build
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV CI=true
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
FROM node:24-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=4321
RUN addgroup -S nodejs && adduser -S astro -G nodejs
COPY --from=build /app/dist ./dist
USER astro
EXPOSE 4321
CMD ["node", "dist/server/entry.mjs"]

146
README.md
View file

@ -1,146 +0,0 @@
# Landing
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://gitlab.com/midcreative1/landing.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.com/midcreative1/landing/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
<p align="center">
<a href="https://www.gatsbyjs.com/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter">
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
</a>
</p>
<h1 align="center">
Gatsby minimal starter
</h1>
## 🚀 Quick start
1. **Create a Gatsby site.**
Use the Gatsby CLI to create a new site, specifying the minimal starter.
```shell
# create a new Gatsby site using the minimal starter
npm init gatsby
```
2. **Start developing.**
Navigate into your new sites directory and start it up.
```shell
cd my-gatsby-site/
npm run develop
```
3. **Open the code and start customizing!**
Your site is now running at http://localhost:8000!
Edit `src/pages/index.js` to see your site update in real-time!
4. **Learn more**
- [Documentation](https://www.gatsbyjs.com/docs/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
- [Tutorials](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
- [Guides](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
- [API Reference](https://www.gatsbyjs.com/docs/api-reference/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
- [Plugin Library](https://www.gatsbyjs.com/plugins?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
- [Cheat Sheet](https://www.gatsbyjs.com/docs/cheat-sheet/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
## 🚀 Quick start (Gatsby Cloud)
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-minimal)

42
astro.config.mjs Normal file
View file

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

30
docker-compose.local.yaml Normal file
View file

@ -0,0 +1,30 @@
services:
midcreative:
image: midcreative:latest
build:
context: .
dockerfile: Dockerfile
container_name: midcreative
restart: unless-stopped
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: 4321
# Добавьте эту секцию для локальной проверки:
ports:
- "4321:4321"
expose:
- "4321"
networks:
- traefik_proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.midcreative.rule=Host(`midcreative.eu`) || Host(`www.midcreative.eu`)"
- "traefik.http.routers.midcreative.entrypoints=websecure"
- "traefik.http.routers.midcreative.tls=true"
- "traefik.http.routers.midcreative.tls.certresolver=letsencrypt"
- "traefik.http.services.midcreative.loadbalancer.server.port=4321"
networks:
traefik_proxy:
external: true

28
docker-compose.yaml Normal file
View file

@ -0,0 +1,28 @@
services:
midcreative:
# Оставляем image, чтобы CI/CD мог за push/pull обновлять образ
image: midcreative:latest
build:
context: .
dockerfile: Dockerfile
container_name: midcreative
restart: unless-stopped
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: 4321
expose:
- "4321"
networks:
- traefik_proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.midcreative.rule=Host(`midcreative.eu`) || Host(`www.midcreative.eu`)"
- "traefik.http.routers.midcreative.entrypoints=websecure"
- "traefik.http.routers.midcreative.tls=true"
- "traefik.http.routers.midcreative.tls.certresolver=letsencrypt"
- "traefik.http.services.midcreative.loadbalancer.server.port=4321"
networks:
traefik_proxy:
external: true

View file

@ -1,35 +0,0 @@
module.exports = {
siteMetadata: {
siteUrl: "https://www.midcreative.eu",
title: "MID Creative",
description: "We are creating websites, mobile apps, e-shops, platforms",
},
plugins: [
"gatsby-plugin-sass",
"gatsby-plugin-image",
// {
// resolve: "gatsby-plugin-google-analytics",
// options: {
// trackingId: "G-8M9CZ79T4L",
// },
// },
"gatsby-plugin-react-helmet",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-manifest",
options: {
icon: "src/images/icon.png",
},
},
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "./src/images/",
},
__key: "images",
},
],
};

View file

@ -1,46 +1,30 @@
{ {
"name": "mid-creative", "name": "astrolanding",
"version": "1.0.0", "type": "module",
"private": true, "version": "0.0.1",
"description": "MID Creative", "engines": {
"author": "katherineus", "node": ">=22.12.0"
"keywords": [ },
"gatsby"
],
"scripts": { "scripts": {
"develop": "gatsby develop", "dev": "astro dev",
"start": "gatsby develop", "build": "astro build",
"build": "gatsby build", "preview": "astro preview",
"serve": "gatsby serve", "format": "prettier --write .",
"clean": "gatsby clean", "astro": "astro"
"lint:prettier": "yarn prettier ./src --check",
"format:prettier": "yarn prettier ./src -w"
}, },
"dependencies": { "dependencies": {
"@splidejs/react-splide": "^0.7.12", "@astrojs/mdx": "^7.0.3",
"axios": "^1.6.5", "@astrojs/node": "^11.0.3",
"gatsby": "^5.13.3", "@astrojs/rss": "^4.0.19",
"gatsby-plugin-google-analytics": "^5.13.0", "@astrojs/sitemap": "^3.7.3",
"gatsby-plugin-image": "^3.13.0", "astro": "^7.1.3",
"gatsby-plugin-manifest": "^5.13.0", "motion": "^12.42.2",
"gatsby-plugin-react-helmet": "^6.13.0", "react": "^19.2.8",
"gatsby-plugin-sass": "^6.13.0", "react-dom": "^19.2.8",
"gatsby-plugin-sharp": "^5.13.0", "sharp": "^0.35.0"
"gatsby-plugin-sitemap": "^6.13.0",
"gatsby-source-filesystem": "^5.13.0",
"gatsby-transformer-sharp": "^5.13.0",
"i18next": "^23.7.16",
"i18next-browser-languagedetector": "^7.2.0",
"path": "^0.12.7",
"path-browserify": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-i18next": "^14.0.0",
"sass": "^1.70.0",
"swiper": "^11.0.5"
}, },
"devDependencies": { "devDependencies": {
"prettier": "^3.3.2" "prettier": "^3.9.6",
"prettier-plugin-astro": "^0.14.1"
} }
} }

4296
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

5
pnpm-workspace.yaml Normal file
View file

@ -0,0 +1,5 @@
allowBuilds:
esbuild: true
minimumReleaseAgeExclude:
- '@astrojs/internal-helpers@0.10.2'
- '@astrojs/node@11.0.3'

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

9
public/favicon.svg Normal file
View file

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
<style>
path { fill: #000; }
@media (prefers-color-scheme: dark) {
path { fill: #FFF; }
}
</style>
</svg>

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 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,10 +0,0 @@
@use "sass:math";
@function px2rem($px) {
$root-px: 18px;
// @return #{$px/$root-px}rem;
@return #{math.div($px, $root-px)}rem;
}
@function rem2px($rem) {
@return $rem * 18px;
}

View file

@ -1,17 +0,0 @@
@mixin for-tablets {
@media all and (max-width: 1200px) {
@content;
}
}
@mixin for-mobile {
@media all and (max-width: 767px) {
@content;
}
}
@mixin for-max-width {
@media all and (max-width: 1224px) {
@content;
}
}

View file

@ -1,7 +0,0 @@
@use "mixins" as *;
$gutter: 24px;
// @include for-mobile {
// $gutter: 20px;
// }

View file

@ -1,4 +0,0 @@
$color-text-primary: #ffffff;
$color-text-secondary: rgba(255, 255, 255, 60%);
$color-accent-primary: #c16b6b;
$color-accent-secondary: #b46f8e;

View file

@ -1,87 +0,0 @@
@use "../abstracts/functions" as *;
@use "../abstracts/mixins" as *;
@use "./colors" as *;
// @import url("https://use.typekit.net/ryt1jvs.css");
* {
font-family: "proxima-nova", sans-serif;
}
a {
text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
a,
p,
span {
color: $color-text-primary;
}
h1 {
font-weight: 700;
font-size: px2rem(100px);
}
h2 {
font-weight: 700;
font-size: px2rem(50px);
}
h3 {
font-weight: 600;
font-size: px2rem(25px);
}
h4 {
font-weight: 900;
font-size: px2rem(35px);
}
h5 {
font-weight: 700;
font-size: px2rem(30px);
}
h6 {
font-size: px2rem(18px);
text-transform: uppercase;
letter-spacing: 0.05rem;
font-weight: normal;
color: $color-text-primary;
}
p {
font-weight: 400;
font-size: px2rem(18px);
}
.gray {
color: $color-text-secondary;
}
@include for-mobile {
h1 {
font-weight: 800;
font-size: px2rem(40px);
line-height: normal;
}
h2 {
font-weight: 700;
font-size: px2rem(30px);
line-height: normal;
}
h3 {
font-weight: 700;
font-size: px2rem(22px);
line-height: normal;
}
p {
line-height: normal;
font-size: px2rem(16px);
}
}

View file

@ -1,48 +0,0 @@
@use "../abstracts/variables" as *;
@use "../abstracts/mixins" as *;
.container {
display: grid;
grid-template-columns: repeat(12, minmax(0, 96px));
grid-gap: $gutter;
margin: 0 auto;
width: 100%;
max-width: 1224px;
grid-column: 1 / 13;
padding: 0 20px;
> * {
grid-column: 1 / 13;
}
@include for-mobile {
grid-template-columns: repeat(6, 1fr);
max-width: 100%;
width: auto;
> * {
grid-column: 1 / 7;
}
}
&-mobile {
@include for-mobile {
padding: 0 20px;
display: grid;
grid-template-columns: repeat(6, 1fr);
max-width: 100%;
width: auto;
> * {
grid-column: 1 / 7;
}
}
}
}
section.container {
padding-right: 20px;
padding-left: 20px;
}
div.container {
padding-right: 0;
padding-left: 0;
}

View file

@ -1,14 +0,0 @@
@use "abstracts/functions";
@use "abstracts/mixins";
@use "base/colors";
@use "base/reset";
@use "base/typography";
@use "layout/grid";
body {
background-color: #111111;
}
html {
scroll-behavior: smooth;
}

View file

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

View file

@ -0,0 +1,90 @@
---
import Image from "astro/components/Image.astro";
import FormInput from "../FormInput/FormInput.astro";
import Dog from "@images/main/contact-form/Mask.svg";
import BluePlanet from "@images/main/contact-form/Planet Blue.svg";
import YellowPlanet from "@images/main/contact-form/Planet Yellow.svg";
import { getLangFromUrl, useTranslations } from "@/i18n/utils";
import "./contact-form.style.css";
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---
<div class="container contact-form">
<h2>{t("contacts.title")}</h2>
<div class="image">
<Image src={Dog} alt="cute dog in space" />
<Image src={BluePlanet} alt="blue planet" class="planet blue" />
<Image
src={YellowPlanet}
alt="yellow planet"
class="planet yellow orbit-element"
/>
</div>
<form class="container" id="form">
<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
/>
<button class="btn" type="submit">{t("contacts.send")}</button>
</form>
</div>
<script>
const form = document.getElementById("form");
const submitBtn = form.querySelector('button[type="submit"]');
form.addEventListener("submit", async (e) => {
e.preventDefault();
const formData = new FormData(form);
formData.append("access_key", "045fb2da-314b-4d25-b127-b36c15d50031");
const originalText = submitBtn.textContent;
submitBtn.textContent = "Sending...";
submitBtn.disabled = true;
try {
const response = await fetch("https://api.web3forms.com/submit", {
method: "POST",
body: formData,
});
const data = await response.json();
if (response.ok) {
alert("Success! Your message has been sent.");
form.reset();
} else {
alert("Error: " + data.message);
}
} catch (error) {
alert("Something went wrong. Please try again.");
} finally {
submitBtn.textContent = originalText;
submitBtn.disabled = false;
}
});
</script>

View file

@ -0,0 +1,217 @@
/* contact-form.style.css */
section.content .contact-form h2 {
margin-bottom: 0;
text-align: left;
}
.contact-form h2 {
grid-column: 1/6;
grid-row: 1/2;
}
.contact-form .success {
margin-bottom: 16px;
color: rgba(116, 199, 103, 1);
}
.contact-form .error {
margin-bottom: 16px;
color: rgba(246, 81, 81, 1);
}
.contact-form .error a {
color: rgba(246, 81, 81, 1);
}
.contact-form form {
grid-column: 1/5;
grid-row: 2/3;
width: 100%;
}
.contact-form form.container {
padding: 0;
}
.contact-form form .btn {
grid-column: 1/10;
}
.contact-form .image {
grid-column: 6/13;
grid-row: 1/3;
margin-left: auto;
display: flex;
align-items: center;
position: relative;
}
.contact-form .image img:first-child {
background:
linear-gradient(0deg, rgba(27, 27, 27, 0.2), rgba(27, 27, 27, 0.2)),
rgba(255, 255, 255, 0.01);
box-shadow: inset 0px 2px 5px rgb(255 255 255 / 15%);
backdrop-filter: blur(8px);
border-radius: 33px;
}
.contact-form .image .planet {
position: absolute;
z-index: -1;
}
.contact-form .image .planet.blue {
right: -133px;
}
.contact-form .image .planet.yellow {
left: -124px;
top: 150px;
}
@keyframes circularOrbitYellow {
0% {
left: -124px;
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 */
@media (max-width: 1200px) {
.contact-form form {
padding-top: 20px;
}
.contact-form h2,
.contact-form form {
grid-column: 1/7;
}
.contact-form .image {
grid-column: 8/13;
}
}
/* Mobile breakpoint */
@media (max-width: 767px) {
.contact-form h2,
.contact-form .image,
.contact-form form {
grid-column: 1/7;
}
.contact-form h2,
.contact-form .image,
.contact-form form .btn {
grid-column: 2/6;
}
.contact-form h2 {
grid-row: 1/2;
text-align: center !important;
}
.contact-form .image {
grid-row: 2/3;
width: 100%;
margin-bottom: 16px;
min-height: 300px;
}
.contact-form .image img {
margin: 0 auto;
height: auto;
}
.contact-form form {
grid-row: 3/4;
}
}

View file

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

View file

@ -1,6 +1,3 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
// @use "../../assets/stylesheets/abstracts/variables";
#contact-us { #contact-us {
scroll-margin-block-start: 120px; scroll-margin-block-start: 120px;
} }
@ -10,7 +7,6 @@
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
padding-bottom: 100px; padding-bottom: 100px;
// padding-top: 54px;
border-bottom: 1px solid #665469; border-bottom: 1px solid #665469;
div { div {
@ -25,7 +21,7 @@
} }
} }
@include for-mobile { @media (max-width: 767px) {
flex-wrap: wrap; flex-wrap: wrap;
div { div {

View file

@ -0,0 +1,52 @@
---
import { Image } from "astro:assets";
// src/components/Footer/Footer.astro
import Contacts from "@components/Contacts/Contacts.astro";
import TopLine from "@images/main/footer/top-line.png";
import Logo from "@images/main/footer/logo.svg";
import {
getLangFromUrl,
useTranslatedPath,
useTranslations,
} from "@/i18n/utils";
import "./footer.style.css";
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
const translatePath = useTranslatedPath(lang);
---
<footer>
<Image class="line" src={TopLine} alt="" />
<Contacts />
<div class="container info">
<div>
<h6>{t("footer.company")}</h6>
<p class="gray">SIA MID Creative</p>
<h6>{t("footer.registration_nr")}</h6>
<p class="gray">40203288612</p>
<h6>{t("footer.address")}</h6>
<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="/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>

View file

@ -1,5 +1,3 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
footer { footer {
background: radial-gradient( background: radial-gradient(
62.99% 90.27% at 50% 0%, 62.99% 90.27% at 50% 0%,
@ -17,22 +15,27 @@ footer {
.info { .info {
margin-top: 68px; margin-top: 68px;
padding-bottom: 237px; padding-bottom: 237px;
div { div {
grid-row: 1/2; grid-row: 1/2;
&:first-child { &:first-child {
grid-column: 5/9; grid-column: 5/9;
h6 { h6 {
margin-bottom: 4px; margin-bottom: 4px;
} }
p { p {
margin-bottom: 24px; margin-bottom: 24px;
} }
} }
&:last-child { &:last-child {
grid-column: 1/5; grid-column: 1/5;
} }
} }
nav { nav {
grid-column: 9/13; grid-column: 9/13;
@ -45,7 +48,7 @@ footer {
display: block; display: block;
width: fit-content; width: fit-content;
@include for-mobile { @media (max-width: 767px) {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
@ -56,7 +59,7 @@ footer {
} }
} }
@include for-mobile { @media (max-width: 767px) {
padding-bottom: 110px; padding-bottom: 110px;
justify-items: center; justify-items: center;
@ -68,11 +71,9 @@ footer {
text-align: center; text-align: center;
} }
nav { nav a.mobile {
a.mobile {
display: block; display: block;
} }
} }
} }
} }
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,130 @@
---
import "./header.style.css";
import { Image } from "astro:assets";
import Logo from "@images/main/header/logo.svg";
import Logo2 from "@images/main/footer/logo.svg";
import Phone from "@images/main/footer/phone.png";
import Email from "@images/main/footer/email.png";
import { languages, type SupportedLang } from "@/i18n/ui";
import {
getLangFromUrl,
useTranslatedPath,
useTranslations,
} from "@/i18n/utils";
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
const translatePath = useTranslatedPath(lang);
---
<header>
<div class="cont">
<div class="logo">
<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="/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>
<script>
const btn = document.querySelector(".mobile-menu-btn") as HTMLElement;
const menu = document.querySelector(".mobile-menu") as HTMLElement;
btn.addEventListener("click", () => {
const isOpen = menu.classList.toggle("open");
btn.classList.toggle("open");
btn.setAttribute("aria-expanded", String(isOpen));
});
document.addEventListener("click", (e) => {
if (!menu.contains(e.target as Node) && !btn.contains(e.target as Node)) {
menu.classList.remove("open");
btn.classList.remove("open");
btn.setAttribute("aria-expanded", "false");
}
});
window.addEventListener("resize", () => {
menu.classList.remove("open");
btn.classList.remove("open");
btn.setAttribute("aria-expanded", "false");
});
</script>

View file

@ -0,0 +1,2 @@
services:

View file

@ -1,4 +1,4 @@
@use "../../assets/stylesheets/abstracts/mixins" as *; /* header.style.css */
header { header {
backdrop-filter: blur(5px); backdrop-filter: blur(5px);
@ -9,15 +9,14 @@ header {
left: 0; left: 0;
right: 0; right: 0;
.container { .cont {
padding: 44px 0; padding: 44px 20px;
max-width: 1224px; max-width: 1224px;
display: flex; display: grid;
grid-template-columns: 1fr auto 1fr;
margin: 0 auto; margin: 0 auto;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-left: 20px;
padding-right: 20px;
.navigation { .navigation {
display: flex; display: flex;
@ -31,7 +30,35 @@ header {
} }
} }
@include for-mobile { @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; display: none;
} }
} }
@ -44,29 +71,37 @@ header {
height: 23px; height: 23px;
display: none; display: none;
cursor: pointer; cursor: pointer;
background: none;
border: none;
padding: 0;
span { span {
background-color: #fff; background-color: #fff;
height: 5px; height: 5px;
position: absolute; position: absolute;
transition: all ease-in-out 0.8s; transition: all ease-in-out 0.4s;
} }
#top-left { #top-left {
width: 5px; width: 5px;
} }
#top-right { #top-right {
width: 15px; width: 15px;
} }
#center-left { #center-left {
width: 5px; width: 5px;
} }
#center-right { #center-right {
width: 9px; width: 9px;
} }
#bottom-left { #bottom-left {
width: 5px; width: 5px;
} }
#bottom-right { #bottom-right {
width: 5px; width: 5px;
} }
@ -75,10 +110,16 @@ header {
#top-right { #top-right {
top: 0; top: 0;
} }
#top-left {
right: 18px;
}
#center-left, #center-left,
#center-right { #center-right {
top: 9px; top: 9px;
} }
#bottom-left, #bottom-left,
#bottom-right { #bottom-right {
bottom: 0; bottom: 0;
@ -106,23 +147,29 @@ header {
right: 9px; right: 9px;
left: unset; left: unset;
} }
#bottom-left { #bottom-left {
right: 18px; right: 18px;
} }
#center-left { #center-left {
left: 9px; left: 9px;
} }
} }
@media (max-width: 767px) {
display: block;
}
} }
.mobile-menu { .mobile-menu {
display: none; display: flex;
transition: all ease 1s;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 96px 0; padding: 96px 0;
background: radial-gradient( background:
radial-gradient(
59.78% 25.3% at 50% 50%, 59.78% 25.3% 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%,
@ -136,8 +183,14 @@ header {
height: 100vh; height: 100vh;
width: 295px; width: 295px;
top: 0; top: 0;
right: -295px; right: 0;
bottom: 0; bottom: 0;
transform: translateX(100%);
transition: transform ease 0.4s;
&.open {
transform: translateX(0);
}
.navigation { .navigation {
display: flex; display: flex;
@ -159,38 +212,35 @@ header {
margin: 0 auto; margin: 0 auto;
} }
@include for-mobile {
a:first-child { a:first-child {
margin-bottom: 6px; margin-bottom: 6px;
} }
} }
}
&.open { .lang-switcher {
right: 0;
}
}
@include for-mobile {
.mobile-menu {
display: flex; display: flex;
column-gap: 16px;
a {
text-transform: uppercase;
opacity: 0.65;
&.active {
opacity: 1;
text-decoration: underline;
}
}
}
} }
@media (max-width: 767px) {
.logo { .logo {
width: 100%; width: 100%;
img {
margin: 0 auto;
}
} }
nav { nav {
display: none; display: none;
} }
.mobile-menu-btn {
display: block;
}
} }
} }
} }

View file

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

View file

@ -0,0 +1,280 @@
---
import BaseHead from "@components/BaseHead.astro";
import Footer from "@/components/Footer/Footer.astro";
import Header from "@components/Header/Header.astro";
import { SITE_DESCRIPTION, SITE_TITLE } from "@consts";
import ContactForm from "@/components/ContactForm/ContactForm.astro";
import { Image } from "astro:assets";
import type { ImageMetadata } from "astro";
import Circle from "@images/main/services/circle.png";
import Rocket from "@images/main/about-us/rocket.png";
import IntroSpaceship from "@images/main/intro/spaceship.svg";
import { useTranslations } from "@/i18n/utils";
import type { SupportedLang } from "@/i18n/ui";
import "../styles/index.css";
interface Props {
lang: SupportedLang;
}
const { lang } = Astro.props;
const t = useTranslations(lang);
const cards =
(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 }>(
"../assets/images/main/services/*.svg",
{ 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 path = `../assets/images/main/services/${imageName}`;
return images[path]?.default;
};
const getProjectImage = (imageName: string) => {
const path = `../assets/images/main/projects/${imageName}`;
return projectImages[path]?.default;
};
---
<!doctype html>
<html lang={lang}>
<head>
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
</head>
<body>
<div class="main-page" id="top">
<div class="intro-bg">
<Header />
<section class="container intro" id="home">
<div class="image" id="heroImg"></div>
<div class="title">
<h1>
{t("intro.creating")}{` `}
<span>{t("intro.websites")}</span>
</h1>
<div>
<p>{t("intro.apps")}</p>
<p>{t("intro.shops")}</p>
<p>{t("intro.platforms")}</p>
</div>
</div>
<div class="rocket">
<Image src={IntroSpaceship} alt="" />
<p>{t("intro.explore")}</p>
</div>
</section>
</div>
<section class="content container" id="services">
<h2>{t("services.title")}</h2>
<div class="container services">
<Image src={Circle} alt="circle" class="circle" />
{
cards.map((card) => {
const imgSrc = getImage(card.image);
return (
imgSrc && (
<div class="card">
<Image src={imgSrc} alt="icon" />
<h3>{card.title}</h3>
<p>{card.text}</p>
</div>
)
);
})
}
</div>
</section>
<section class="content container" id="about-us">
<div class="about-us container">
<div>
<Image class="rocket-img" src={Rocket} alt="rocket" />
</div>
<div>
<h2 class="header5">{t("about_us.sub_title")}</h2>
<p class="text">{t("about_us.text")}</p>
<div class="stats">
<div>
<h4>{t("about_us.amount_completed")}</h4>
<p>{t("about_us.completed")}</p>
</div>
<div>
<h4>{t("about_us.amount_webpages")}</h4>
<p>{t("about_us.webpages")}</p>
</div>
<div>
<h4>{t("about_us.amount_experience")}</h4>
<p>{t("about_us.experience")}</p>
</div>
</div>
</div>
</div>
</section>
<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 />
</section>
<Footer />
</div>
<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>

View file

@ -1,39 +0,0 @@
import React from "react";
import "./about.style.scss";
import { useTranslation } from "react-i18next";
import Rocket from "../../assets/images/main/about-us/rocket.png";
const About = () => {
const { t } = useTranslation();
return (
<div className="about-us container">
<div>
<img src={Rocket} alt="" />
</div>
<div>
<h5>{t("about_us.sub_title")}</h5>
<p className="text">{t("about_us.text")}</p>
<div className="stats">
<div>
<h4>{t("about_us.amount_completed")}</h4>
<p>{t("about_us.completed")}</p>
</div>
<div>
<h4>{t("about_us.amount_webpages")}</h4>
<p>{t("about_us.webpages")}</p>
</div>
<div>
<h4>{t("about_us.amount_experience")}</h4>
<p>{t("about_us.experience")}</p>
</div>
</div>
</div>
</div>
);
};
export default About;

View file

@ -1,58 +0,0 @@
@use "../../assets/stylesheets/abstracts/functions" as *;
@use "../../assets/stylesheets/base/colors" as *;
@use "../../assets/stylesheets/abstracts/variables" as *;
@use "../../assets/stylesheets/abstracts/mixins" as *;
#about-us {
scroll-margin-block-start: 120px;
}
.about-us {
margin-top: -80px;
> div {
&:first-child {
grid-column: 1/7;
}
&:last-child {
grid-column: 7/13;
display: flex;
flex-direction: column;
justify-content: center;
@include for-mobile {
grid-column: 1/7;
}
.text {
margin-top: 16px;
color: $color-text-secondary;
}
.stats {
display: flex;
justify-content: space-between;
margin-top: 64px;
width: 100%;
.swiper-slide {
width: 33%;
}
@include for-mobile {
text-align: center;
& > div {
padding: 4px;
}
}
}
@include for-mobile {
h5,
.text {
text-align: center;
}
}
}
}
}

View file

@ -1,122 +0,0 @@
import React, { useState, useRef } from "react";
import axios from "axios";
import { useTranslation } from "react-i18next";
import "./contact-form.style.scss";
import Dog from "../../assets/images/main/contact-form/Mask.svg";
import BluePlanet from "../../assets/images/main/contact-form/Planet Blue.svg";
import YellowPlanet from "../../assets/images/main/contact-form/Planet Yellow.svg";
import FormInput from "../form-input/form-input.component";
import CustomButton from "../custom-button/custom-button.component";
const newPost = async (data) => {
return axios
.post("https://midcreative.eu/mail/", data, {
headers: {
"Content-Type": "application/json",
},
})
.then((res) => true)
.catch((err) => err);
};
const ContactForm = () => {
const { t } = useTranslation();
const [formData, setFormData] = useState({
name: "",
email: "",
phone: "",
});
const nameInputRef = useRef(null);
const emailInputRef = useRef(null);
const phoneInputRef = useRef(null);
const [success, setSuccess] = useState();
const [error, setError] = useState();
const setName = (name) => {
setFormData({ ...formData, name: name });
};
const setEmail = (email) => {
setFormData({ ...formData, email: email });
};
const setPhone = (phone) => {
setFormData({ ...formData, phone: phone });
};
const cleanFields = () => {
nameInputRef.current.clean();
emailInputRef.current.clean();
phoneInputRef.current.clean();
};
const handlePost = (e) => {
e.preventDefault();
newPost(formData).then((res) => {
if (res === true) {
cleanFields();
setError(false);
setSuccess(true);
setTimeout(() => setSuccess(false), 6000);
} else {
cleanFields();
setError(true);
setSuccess(false);
}
});
};
return (
<div className="container contact-form">
<h2>{t("contacts.title")}</h2>
<div className="image">
<img src={Dog} alt="cute dog in space" />
<img src={BluePlanet} alt="blue planet" className="planet blue" />
<img src={YellowPlanet} alt="yellow planet" className="planet yellow" />
</div>
<form className="container" onSubmit={(e) => handlePost(e)}>
{success ? <p className="success">{t("contacts.success")}</p> : null}
{error ? (
<p className="error">
{t("contacts.error")}{" "}
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</p>
) : null}
<FormInput
name="name"
type="text"
label={t("contacts.name")}
onChange={setName}
ref={nameInputRef}
required
/>
<FormInput
name="email"
type="email"
label={t("contacts.email")}
onChange={setEmail}
ref={emailInputRef}
required
/>
<FormInput
name="phone"
type="tel"
label={t("contacts.phone")}
onChange={setPhone}
ref={phoneInputRef}
required
/>
<CustomButton text={t("contacts.send")} />
</form>
</div>
);
};
export default ContactForm;

View file

@ -1,127 +0,0 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
section.content {
.contact-form {
h2 {
margin-bottom: 0;
text-align: left;
}
}
}
.contact-form {
h2 {
grid-column: 1/6;
grid-row: 1/2;
}
.success {
margin-bottom: 16px;
color: rgba(116, 199, 103, 1);
}
.error {
margin-bottom: 16px;
color: rgba(246, 81, 81, 1);
a {
color: rgba(246, 81, 81, 1);
}
}
form {
grid-column: 1/5;
grid-row: 2/3;
width: 100%;
&.container {
padding: 0;
}
.btn {
grid-column: 1/10;
}
}
@include for-tablets {
form {
padding-top: 20px;
}
}
.image {
grid-column: 6/13;
grid-row: 1/3;
margin-left: auto;
display: flex;
align-items: center;
position: relative;
img {
&:first-child {
background: linear-gradient(
0deg,
rgba(27, 27, 27, 0.2),
rgba(27, 27, 27, 0.2)
),
rgba(255, 255, 255, 0.01);
box-shadow: inset 0px 2px 5px rgb(255 255 255 / 15%);
backdrop-filter: blur(8px);
border-radius: 33px;
}
}
.planet {
position: absolute;
z-index: -1;
&.blue {
right: -133px;
}
&.yellow {
left: -124px;
top: 150px;
}
}
}
@include for-tablets {
h2,
form {
grid-column: 1/7;
}
.image {
grid-column: 8/13;
}
}
@include for-mobile {
h2,
.image,
form {
grid-column: 1/7;
.btn {
grid-column: 2/6;
}
}
h2 {
grid-row: 1/2;
text-align: center !important;
}
.image {
grid-row: 2/3;
width: 100%;
margin-bottom: 16px;
img {
margin: 0 auto;
}
}
form {
grid-row: 3/4;
}
}
}

View file

@ -1,43 +0,0 @@
import React from "react";
import "./contacts.style.scss";
import Phone from "../../assets/images/main/footer/phone.png";
import Email from "../../assets/images/main/footer/email.png";
import Telegram from "../../assets/images/main/footer/telegram.png";
import Whatsapp from "../../assets/images/main/footer/whatsapp.png";
const Contacts = () => {
return (
<div className="container contacts">
<div>
<a href="tel:+37125704038">
<img src={Phone} alt="phone" />
</a>
<a href="tel:+37125704038">+371 25704038</a>
</div>
<div>
<a href="mailto:info@midcreative.eu">
<img src={Email} alt="email" />
</a>
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</div>
<div>
<a href="https://telegram.me/shiseri" target="_blank" rel="noreferrer">
<img src={Telegram} alt="telegram" />
</a>
<a href="https://telegram.me/shiseri" target="_blank" rel="noreferrer">
Telegram
</a>
</div>
<div>
<a href="https://wa.me/37125704038" target="_blank" rel="noreferrer">
<img src={Whatsapp} alt="whatsapp" />
</a>
<a href="https://wa.me/37125704038" target="_blank" rel="noreferrer">
WhatsApp
</a>
</div>
</div>
);
};
export default Contacts;

View file

@ -1,19 +0,0 @@
import React from "react";
import "./custom-button.style.scss";
const CustomButton = ({ text, onSubmit, ...props }) => {
return (
<button
className="btn"
onSubmit={(e) => {
e.preventDefault();
onSubmit();
}}
{...props}
>
{text}
</button>
);
};
export default CustomButton;

View file

@ -1,115 +0,0 @@
@use "../../assets/stylesheets/base/colors" as *;
@keyframes example {
0% {
background-position: -100% -100%;
}
100% {
background-position: 100% 100%;
}
}
button {
&.btn {
background: radial-gradient(
35.83% 70.83% at 0% 0%,
rgba(93, 52, 69, 0.15) 0%,
rgba(161, 183, 254, 0) 100%
),
linear-gradient(
180deg,
rgba(255, 255, 255, 0.05) 0%,
rgba(255, 255, 255, 0) 100%
),
#111;
border-radius: 37.5px;
color: $color-text-primary;
text-transform: uppercase;
font-weight: bold;
padding-top: 16px;
padding-bottom: 16px;
border: 2px solid transparent;
position: relative;
background-clip: padding-box;
&:after {
background: none;
position: absolute;
top: -2px;
bottom: -2px;
left: -2px;
right: -2px;
background: linear-gradient(
172.29deg,
rgba(241, 161, 254, 0.3) 6.23%,
rgba(161, 183, 254, 0) 94.36%
),
linear-gradient(
180deg,
rgba(255, 255, 255, 0.5) 0%,
rgba(170, 170, 170, 0.04) 100%
);
content: "";
z-index: -1;
border-radius: 37.5px;
}
&:hover {
background: linear-gradient(
180deg,
rgba(194, 64, 118, 0.25) 0%,
rgba(0, 40, 170, 0) 100%
),
linear-gradient(
180deg,
rgba(255, 255, 255, 0.05) 0%,
rgba(255, 255, 255, 0) 100%
),
#111;
background-clip: padding-box;
background-size: 100% 100%;
&:after {
background: none;
}
}
}
}
// @property --a {
// syntax: "<angle>";
// inherits: false;
// initial-value: 90deg;
// }
// @property --l {
// syntax: "<percentage>";
// inherits: false;
// initial-value: 10%;
// }
// @property --c {
// syntax: "<color>";
// inherits: false;
// initial-value: red;
// }
// button {
// /* needed for firefox to have a valid output */
// --a: 80deg;
// --l: 10%;
// --c: red;
// /**/
// cursor: pointer;
// height: 200px;
// transition: --a 0.5s 0.1s, --l 0.5s, --c 0.8s;
// background: linear-gradient(
// var(--a),
// var(--c) var(--l),
// blue,
// var(--c) calc(100% - var(--l))
// );
// }
// button:hover {
// --a: 360deg;
// --l: 40%;
// --c: green;
// }

View file

@ -1,54 +0,0 @@
import React from "react";
import "./footer.style.scss";
import { useTranslation } from "react-i18next";
import Contacts from "../contacts/contacts.component";
import TopLine from "../../assets/images/main/footer/top-line.png";
import Logo from "../../assets/images/main/footer/logo.svg";
const MidFooter = () => {
const { t } = useTranslation();
return (
<footer>
<img className="line" src={TopLine} alt="" />
<Contacts />
<div className="container info">
<div>
<h6>{t("footer.company")}</h6>
<p className="gray">SIA MID Creative</p>
<h6>{t("footer.registration_nr")}</h6>
<p className="gray">40203288612</p>
<h6>{t("footer.address")}</h6>
<p className="gray">Rīga, Gaiļezera iela 11 - 5, LV-1079</p>
</div>
<nav>
<h6>{t("footer.navigation")}</h6>
<a href="#top" className="gray mobile">
{t("menu.home")}
</a>
<a href="#services" className="gray">
{t("menu.services")}
</a>
<a href="#about-us" className="gray">
{t("menu.about_us")}
</a>
<a href="#projects" className="gray">
{t("menu.portfolio")}
</a>
<a href="#contact-us" className="gray">
{t("menu.contact_us")}
</a>
</nav>
<div>
<img src={Logo} alt="" />
</div>
</div>
</footer>
);
};
export default MidFooter;

View file

@ -1,42 +0,0 @@
import React, { useState, forwardRef, useImperativeHandle } from "react";
import "./form-input.style.scss";
const FormInput = forwardRef(
({ handleChange, label, onChange, ...otherProps }, ref) => {
const [input, setInput] = useState("");
const [toggleLabel, changeToggleLabel] = useState(false);
useImperativeHandle(ref, () => ({
clean() {
setInput("");
changeToggleLabel(false);
},
}));
return (
<div className="group">
<label
className={`${toggleLabel ? "shrink" : ""} ${
input ? "shrink" : ""
} form-input-label`}
>
{label}
</label>
<input
value={input}
onChange={(e) => {
setInput(e.target.value);
onChange(e.target.value);
}}
onFocus={() => changeToggleLabel(true)}
onBlur={() =>
input ? changeToggleLabel(true) : changeToggleLabel(false)
}
{...otherProps}
/>
</div>
);
},
);
export default FormInput;

View file

@ -1,54 +0,0 @@
@use "../../assets/stylesheets/base/colors" as *;
@mixin shrinkLabel {
top: -14px;
font-size: 12px;
}
.group {
position: relative;
.form-input-label {
position: absolute;
top: 6px;
opacity: 0.5;
color: #fff;
text-transform: uppercase;
transition: 300ms ease all;
&.shrink {
top: -20px;
font-size: 10px;
}
}
input {
grid-column: 1/4;
background: none;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
width: 100%;
height: 36px;
margin-bottom: 39px;
position: relative;
color: $color-text-primary;
&:focus-visible {
outline: none;
}
&:focus ~ .form-input-label {
@include shrinkLabel();
}
}
}
input:autofill,
input:utofill:hover,
input:autofill:focus {
// border: 1px solid green;
-webkit-text-fill-color: $color-text-primary;
// background-color: #111;
-webkit-box-shadow: 0 0 0px 1000px #111 inset;
// transition: background-color 5000s ease-in-out 0s;
}

View file

@ -1,121 +0,0 @@
import React from "react";
import { Link } from "gatsby";
import { useTranslation } from "react-i18next";
import LanguageSwitch from "../language-switch/language-switch.component";
import Logo from "../../assets/images/main/header/logo.svg";
import Logo2 from "../../assets/images/main/footer/logo.svg";
import Phone from "../../assets/images/main/footer/phone.png";
import Email from "../../assets/images/main/footer/email.png";
import "./header.style.scss";
const MidHeader = () => {
const { t } = useTranslation();
const toggleMenu = () => {
if (window !== "undefined") {
const MenuButton = document.getElementsByClassName("mobile-menu-btn")[0];
const Menu = document.getElementsByClassName("mobile-menu")[0];
MenuButton.classList.toggle("open");
Menu.classList.toggle("open");
if (Menu.classList.contains("open")) {
const outsideClickListener = (event) => {
let MenuVisible = getComputedStyle(Menu).right;
if (
!Menu.contains(event.target) &&
MenuVisible !== 0 &&
!MenuButton.contains(event.target)
) {
Menu.classList.remove("open");
MenuButton.classList.remove("open");
removeClickListener();
}
if (!Menu.classList.contains("open")) {
removeClickListener();
}
};
const removeClickListener = () => {
document.removeEventListener("click", outsideClickListener);
};
document.addEventListener("click", outsideClickListener);
}
window.addEventListener("resize", () => {
document
.getElementsByClassName("mobile-menu-btn")[0]
.classList.remove("open");
document
.getElementsByClassName("mobile-menu")[0]
.classList.remove("open");
});
}
};
return (
<header>
<div className="container">
<div className="logo">
<img src={Logo} alt="MID" />
</div>
<nav className="navigation">
<Link to="/#services">{t("menu.services")}</Link>
<Link to="/#about-us">{t("menu.about_us")}</Link>
<Link to="/#projects">{t("menu.portfolio")}</Link>
<Link to="/#contact-us">{t("menu.contact_us")}</Link>
<LanguageSwitch />
</nav>
<div
className="mobile-menu-btn"
onClick={toggleMenu}
onKeyDown={toggleMenu}
aria-label="menu button"
role="button"
tabIndex={0}
>
<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>
</div>
<div className="mobile-menu">
<img src={Logo2} alt="MID Creative Digital Agency" />
<nav className="navigation">
<a href="#top">{t("menu.home")}</a>
<a href="#services">{t("menu.services")}</a>
<a href="#about-us">{t("menu.about_us")}</a>
<a href="#projects">{t("menu.portfolio")}</a>
<a href="#contact-us">{t("menu.contact_us")}</a>
</nav>
<div className="header-contacts">
<a href="tel:+371 2662 0770">
<img src={Phone} alt="phone" />
</a>
<a href="tel:+371 2662 0770">+371 2662 0770</a>
</div>
<div className="header-contacts">
<a href="mailto:info@midcreative.eu">
<img src={Email} alt="email" />
</a>
<a href="mailto:info@midcreative.eu">info@midcreative.eu</a>
</div>
<LanguageSwitch />
</div>
</div>
</header>
);
};
export default MidHeader;

View file

@ -1,36 +0,0 @@
import React from "react";
import { useTranslation } from "react-i18next";
import "./intro.styles.scss";
import Spaceship from "../../assets/images/main/intro/spaceship.svg";
const Intro = () => {
const { t } = useTranslation();
return (
<section className="container intro">
<div className="image"></div>
<div className="title">
<h1>
{/* TODO: In latvian text is not fitting */}
{t("intro.creating")} <span>{t("intro.websites")}</span>
</h1>
<div>
<p>{t("intro.apps")}</p>
<p>{t("intro.shops")}</p>
<p>{t("intro.platforms")}</p>
</div>
{/* TODO: Finish this for mobile */}
{/* <h1 className="mobile">websites . mobileapps . e-shops . platforms</h1> */}
</div>
<div className="rocket">
<img src={Spaceship} alt="" />
<p>{t("intro.explore")}</p>
</div>
</section>
);
};
export default Intro;

View file

@ -1,121 +0,0 @@
@use "../../assets/stylesheets/base/colors" as *;
@use "../../assets/stylesheets/abstracts/mixins" as *;
.intro {
height: calc(100vh - 112px);
grid-template-rows: calc(100vh - 112px - 85px - 30px) min-content;
row-gap: unset;
padding-top: 112px;
.title {
grid-column: 1/8;
grid-row: 1/2;
display: flex;
flex-direction: column;
justify-content: center;
h1 {
line-height: 120%;
&.mobile {
display: none;
}
}
div {
display: flex;
p {
text-transform: uppercase;
color: $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;
@media all and (max-width: 1350px) {
transform: translateX(50px);
}
}
.rocket {
grid-column: 1/13;
grid-row: 2/3;
* {
margin: 0 auto;
width: max-content;
}
p {
color: $color-text-secondary;
margin-top: 15px;
}
}
@include for-mobile {
height: calc(100vh - 106px);
grid-template-rows: 400px min-content;
.title,
.rocket,
.image {
grid-column: 1/7;
}
.image {
grid-row: 1/2;
transform: none;
background-position: center;
}
.title {
grid-row: 2/3;
h1 {
text-align: center;
span {
display: none;
}
&.mobile {
display: block;
white-space: nowrap;
color: #171717;
background-color: white;
}
}
div {
text-align: center;
width: 100%;
display: flex;
justify-content: space-between;
margin-top: 16px;
}
}
.rocket {
display: none;
}
}
}

View file

@ -1,21 +0,0 @@
import React from "react";
import i18n from "../../i18n";
import "./language-switch.style.scss";
const LanguageSwitch = ({ t }) => {
const changeLanguage = (lng) => {
i18n.changeLanguage(lng);
};
return (
<button
className="btn-lng"
onClick={() => changeLanguage(i18n.language === "lv" ? "en" : "lv")}
>
{i18n.language === "lv" ? "en" : "lv"}
</button>
);
};
export default LanguageSwitch;

View file

@ -1,6 +0,0 @@
@use "../../assets/stylesheets/base/colors" as *;
.btn-lng {
color: $color-text-primary;
text-transform: uppercase;
}

View file

@ -1,13 +0,0 @@
import React from "react";
import ProjectsSwiper from "../swiper/mid-swiper.component";
import "./projects.style.scss";
const Projects = () => {
return (
<div id="projects">
<ProjectsSwiper key="wtf" />
</div>
);
};
export default Projects;

View file

@ -1,3 +0,0 @@
#projects {
scroll-margin-block-start: 120px;
}

View file

@ -1,17 +0,0 @@
import React from "react";
import "./section.style.scss";
const MidSection = (props) => {
return (
<section
className={`content container${props.mobileContainer ? "-mobile" : ""}`}
id={props.id}
>
{props.title ? <h2>{props.title}</h2> : null}
{props.children}
</section>
);
};
export default MidSection;

View file

@ -1,17 +0,0 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
section.content {
margin-top: 192px;
h2 {
text-align: center;
margin-bottom: 88px;
@include for-mobile {
margin-bottom: 54px;
}
}
}
section:first-child {
color: red;
}

View file

@ -1,39 +0,0 @@
import React from "react";
import { Script } from "gatsby";
import { useSiteMetadata } from "../hooks/use-site-metadata";
export const Seo = ({ title, description, pathname, children }) => {
const {
title: defaultTitle,
description: defaultDescription,
siteUrl,
} = useSiteMetadata();
const seo = {
title: title || defaultTitle,
description: description || defaultDescription,
url: `${siteUrl}${pathname || ``}`,
};
return (
<>
<title>{seo.title}</title>
<meta name="description" content={seo.description} />
<meta name="image" content={seo.image} />
<Script
async
src="https://www.googletagmanager.com/gtag/js?id=G-8M9CZ79T4L"
></Script>
<Script>
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-8M9CZ79T4L');
`}
</Script>
{children}
</>
);
};

View file

@ -1,14 +0,0 @@
import React from "react";
import "./card.style.scss";
const Card = (props) => {
return (
<div className="card">
<img src={props.icon} alt="icon" />
<h3>{props.title}</h3>
<p>{props.text}</p>
</div>
);
};
export default Card;

View file

@ -1,53 +0,0 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
.card {
background: rgba(255, 255, 255, 0.01);
box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.15);
backdrop-filter: blur(7px);
/* Note: backdrop-filter has minimal browser support */
border-radius: 33px;
padding: 63px 55px;
display: flex;
flex-direction: column;
align-items: center;
img {
min-height: 99px;
}
h3 {
margin-top: 63px;
margin-bottom: 16px;
}
h3,
p {
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;
}
@include for-mobile {
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;
}
}
}

View file

@ -1,36 +0,0 @@
import React from "react";
import "./services.style.scss";
import { useTranslation } from "react-i18next";
import Card from "../services-card/card.component";
import Circle from "../../assets/images/main/services/circle.png";
const Services = () => {
const { t } = useTranslation();
const cards = t("services.cards", { returnObjects: true });
const getImage = (image) => {
return require(`../../assets/images/main/services/${image}`).default;
};
return (
<div className="container services">
<img src={Circle} alt="circle" className="circle" />
{/* TODO: Add animated icons */}
{cards &&
cards.map((card, i) => (
<Card
icon={getImage(card.image)}
title={card.title}
text={card.text}
key={i}
/>
))}
</div>
);
};
export default Services;

View file

@ -1,31 +0,0 @@
@use "../../assets/stylesheets/abstracts/mixins" as *;
#services {
scroll-margin-block-start: 120px;
}
.services {
background: radial-gradient(
48.62% 45.5% at 50% 50%,
rgba(225, 104, 154, 0.15) 0%,
rgba(141, 162, 243, 0.063) 49.1%,
rgba(23, 23, 23, 0) 100%
);
position: relative;
.circle {
position: absolute;
top: -140px;
left: -530px;
@include for-mobile {
top: 10%;
right: 50%;
left: unset;
}
}
.card {
color: red;
}
}

View file

@ -1,64 +0,0 @@
import React from "react";
import "./swiper-test.style.scss";
import { useTranslation } from "react-i18next";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import "swiper/css/effect-coverflow";
import { EffectCoverflow, Pagination, Autoplay } from "swiper/modules";
const getImage = (image) => {
return require(`../../assets/images/main/projects/${image}`).default;
};
const ProjectsSwiper = () => {
const { t } = useTranslation();
const projects = t("projects", { returnObjects: true });
return (
<Swiper
loop={true}
effect={"coverflow"}
grabCursor={true}
centeredSlides={true}
slidesPerView={"auto"}
coverflowEffect={{
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: true,
}}
pagination={true}
modules={[EffectCoverflow, Pagination, Autoplay]}
autoplay={{
delay: 2500,
disableOnInteraction: true,
}}
speed={800}
className="mySwiper"
>
{projects &&
projects.map((project, i) => (
<SwiperSlide key={`swiper-${i}`}>
<h2>{project.title}</h2>
<div className="img-wrap">
<img src={getImage(project.image)} alt="inflid" />
</div>
<div className="project-info">
<div>
{project.info.map((info, i) => (
<p key={`slide-info-${i}`}>{info}</p>
))}
</div>
<p>{project.text}</p>
</div>
</SwiperSlide>
))}
</Swiper>
);
};
export default ProjectsSwiper;

View file

@ -1,73 +0,0 @@
@use "../../assets/stylesheets/base/colors" as *;
@use "../../assets/stylesheets/abstracts/mixins" as *;
.swiper {
width: 100%;
padding-top: 50px;
padding-bottom: 50px;
}
.swiper-slide {
background-position: center;
background-size: cover;
width: 80%;
height: 60%;
max-width: 860px;
@include for-mobile {
max-width: 80%;
}
}
.swiper-slide img {
display: block;
width: 100%;
object-fit: cover;
}
#projects {
.swiper-slide {
p {
&:last-of-type {
text-align: center;
color: $color-text-secondary;
padding-top: 6px;
}
}
.project-info {
div {
display: flex;
flex-direction: row;
justify-content: space-evenly;
padding-top: 33px;
margin: 0 auto;
width: 50%;
white-space: nowrap;
@include for-mobile {
width: 100%;
}
p {
margin: 0 29px;
text-transform: uppercase;
color: $color-accent-primary;
padding: 0;
@include for-mobile {
margin: 0 12px;
}
}
}
}
&:not(.swiper-slide-active) {
h2 {
opacity: 0;
}
.project-info {
opacity: 0;
}
}
}
}

View file

@ -1,174 +0,0 @@
@use "../../assets/stylesheets/base/colors" as *;
@use "../../assets/stylesheets/abstracts/mixins" as *;
#projects {
.swiper {
width: 100%;
padding-top: 50px;
padding-bottom: 50px;
@include for-mobile {
background-size: 150%;
background-position: 50%;
}
&#active-slide-0 {
background: radial-gradient(
31.95% 51.75% at 50% 51.75%,
rgba(255, 0, 92, 0.4) 0%,
rgba(23, 23, 23, 0) 90%
);
}
&#active-slide-1 {
background: radial-gradient(
31.95% 51.75% at 50% 51.75%,
rgba(255, 0, 0, 0.5) 0%,
rgba(23, 23, 23, 0) 90%
);
}
&#active-slide-2 {
background: radial-gradient(
31.95% 51.75% at 50% 51.75%,
rgba(255, 196, 105, 0.7) 0%,
rgba(23, 23, 23, 0) 90%
);
}
&#active-slide-3 {
background: radial-gradient(
31.95% 51.75% at 50% 51.75%,
rgba(37, 192, 255, 0.9) 0%,
rgba(23, 23, 23, 0) 90%
);
}
&#active-slide-4 {
background: radial-gradient(
31.95% 51.75% at 50% 51.75%,
rgba(0, 231, 10, 0.4) 0%,
rgba(23, 23, 23, 0) 90%
);
}
&#active-slide-5 {
background: radial-gradient(
31.95% 51.75% at 50% 51.75%,
rgba(245, 194, 26, 0.4) 0%,
rgba(23, 23, 23, 0) 90%
);
}
@include for-tablets {
&#active-slide-0,
&#active-slide-1,
&#active-slide-2,
&#active-slide-3,
&#active-slide-4,
&#active-slide-5 {
background-size: 150%;
background-position: 50%;
}
}
// &:before {
// content: "";
// width: 100%;
// height: 100%;
// position: absolute;
// background: linear-gradient(
// 90deg,
// rgba(17, 17, 17, 1) 0%,
// rgba(255, 255, 255, 0) 10%,
// rgba(255, 255, 255, 0) 90%,
// rgba(17, 17, 17, 1) 100%
// );
// z-index: 4;
// pointer-events: none;
// }
}
.swiper-container {
padding-top: 50px;
padding-bottom: 50px;
}
.swiper-slide {
// width: 50%;
background-position: center;
background-size: cover;
width: 300px;
height: 300px;
transition: all 0.5s;
img {
display: block;
width: 100%;
}
h2 {
width: max-content;
margin-left: auto;
margin-right: auto;
}
.img-wrap {
position: relative;
}
p {
&:last-of-type {
text-align: center;
color: $color-text-secondary;
padding-top: 6px;
}
}
img {
margin: 0 auto;
// width: 66%;
// background: linear-gradient(
// 90deg,
// rgba(0, 0, 0, 0) 0%,
// rgba(17, 17, 17, 1) 5%,
// rgba(17, 17, 17, 1) 95%,
// rgba(0, 0, 0, 0) 100%
// );
}
.project-info {
div {
display: flex;
flex-direction: row;
justify-content: space-evenly;
padding-top: 33px;
margin: 0 auto;
width: 50%;
white-space: nowrap;
@include for-mobile {
width: 66%;
}
p {
margin: 0 29px;
text-transform: uppercase;
color: $color-accent-primary;
padding: 0;
}
}
}
&:not(.swiper-slide-active) {
h2 {
opacity: 0;
}
.project-info {
opacity: 0;
}
}
}
.swiper-slide-active {
width: 600px;
pointer-events: none;
}
}

5
src/consts.ts Normal file
View file

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

20
src/content.config.ts Normal file
View file

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

View file

@ -0,0 +1,16 @@
---
title: "First post"
description: "Lorem ipsum dolor sit amet"
pubDate: "Jul 08 2022"
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.
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi.
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed 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.
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.

View file

@ -0,0 +1,214 @@
---
title: "Markdown Style Guide"
description: "Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro."
pubDate: "Jun 19 2024"
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.
## Headings
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
# H1
## H2
### H3
#### H4
##### H5
###### H6
## Paragraph
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Images
### Syntax
```markdown
![Alt text](./full/or/relative/path/of/image)
```
### Output
![blog placeholder](../../assets/blog-placeholder-about.jpg)
## Blockquotes
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
### Blockquote without attribution
#### Syntax
```markdown
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use _Markdown syntax_ within a blockquote.
```
#### Output
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use _Markdown syntax_ within a blockquote.
### Blockquote with attribution
#### Syntax
```markdown
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
```
#### Output
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables
### Syntax
```markdown
| Italics | Bold | Code |
| --------- | -------- | ------ |
| _italics_ | **bold** | `code` |
```
### Output
| Italics | Bold | Code |
| --------- | -------- | ------ |
| _italics_ | **bold** | `code` |
## Code Blocks
### Syntax
we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntax, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash
````markdown
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
````
### Output
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
## List Types
### Ordered List
#### Syntax
```markdown
1. First item
2. Second item
3. Third item
```
#### Output
1. First item
2. Second item
3. Third item
### Unordered List
#### Syntax
```markdown
- List item
- Another item
- And another item
```
#### Output
- List item
- Another item
- And another item
### Nested list
#### Syntax
```markdown
- Fruit
- Apple
- Orange
- Banana
- Dairy
- Milk
- Cheese
```
#### Output
- Fruit
- Apple
- Orange
- Banana
- Dairy
- Milk
- Cheese
## Other Elements — abbr, sub, sup, kbd, mark
### Syntax
```markdown
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
```
### Output
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

View file

@ -0,0 +1,16 @@
---
title: "Second post"
description: "Lorem ipsum dolor sit amet"
pubDate: "Jul 15 2022"
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.
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi.
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed 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.
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.

View file

@ -0,0 +1,16 @@
---
title: "Third post"
description: "Lorem ipsum dolor sit amet"
pubDate: "Jul 22 2022"
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.
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi.
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed 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.
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.

View file

@ -0,0 +1,31 @@
---
title: "Using MDX"
description: "Lorem ipsum dolor sit amet"
pubDate: "Jun 01 2024"
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.
## Why MDX?
MDX is a special flavor of Markdown that supports embedded JavaScript & JSX syntax. This unlocks the ability to [mix JavaScript and UI Components into your Markdown content](https://docs.astro.build/en/guides/integrations-guide/mdx/#mdx-in-astro) for things like interactive charts or alerts.
If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze.
## Example
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.
import HeaderLink from "../../components/HeaderLink.astro";
<HeaderLink href="#" onclick="alert('clicked!')">
Embedded component in MDX
</HeaderLink>
## More Links
- [MDX Syntax Documentation](https://mdxjs.com/docs/what-is-mdx)
- [Astro Usage Documentation](https://docs.astro.build/en/basics/astro-pages/#markdownmdx-pages)
- **Note:** [Client Directives](https://docs.astro.build/en/reference/directives-reference/#client-directives) are still required to create interactive components. Otherwise, all components in your MDX will render as static HTML (no JavaScript) by default.

View file

@ -1,15 +0,0 @@
import { graphql, useStaticQuery } from "gatsby";
export const useSiteMetadata = () => {
const data = useStaticQuery(graphql`
query {
site {
siteMetadata {
title
description
siteUrl
}
}
}
`);
return data.site.siteMetadata;
};

View file

@ -1,31 +0,0 @@
import i18n from "i18next";
import detector from "i18next-browser-languagedetector";
import { initReactI18next } from "react-i18next";
import en from "./translations/en.json";
import lv from "./translations/lv.json";
const resources = {
en: {
translation: en,
},
lv: {
translation: lv,
},
};
i18n
.use(detector)
.use(initReactI18next) // passes i18n down to react-i18next
.init({
resources,
lng: "en", // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
// you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
// if you're using a language detector, do not define the lng option
fallbackLng: "en", // use en if detected lng is not available
interpolation: {
escapeValue: false, // react already safes from xss
},
});
export default i18n;

17
src/i18n/ui.ts Normal file
View file

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

52
src/i18n/utils.ts Normal file
View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

View file

@ -0,0 +1,67 @@
---
import type { CollectionEntry } from "astro:content";
import BaseHead from "@/components/BaseHead.astro";
import Footer from "@/components/Footer/Footer.astro";
import FormattedDate from "@/components/FormattedDate.astro";
import Header from "@/components/Header/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"];
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---
<html lang={lang}>
<head>
<BaseHead title={title} description={description} />
</head>
<body class="blog-post-page">
<Header />
<main>
<article>
<div class="hero-image">
{
heroImage && (
<Image src={heroImage} alt={title} class="hero-image__media" />
)
}
</div>
<div class="prose">
<div class="title">
<div class="date">
<FormattedDate date={pubDate} />
{
updatedDate && (
<div class="last-updated-on">
Last updated on
<FormattedDate date={updatedDate} />
</div>
)
}
</div>
<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>
</article>
</main>
<section class="content container" id="contact-us">
<ContactForm />
</section>
<Footer />
</body>
</html>

View file

@ -1,44 +0,0 @@
import React from "react";
import "./main.style.scss";
import { useTranslation } from "react-i18next";
import MidHeader from "../components/header/header.component";
import Intro from "../components/intro/intro.component";
import MidSection from "../components/section/section.component";
import Services from "../components/services/services.component";
import About from "../components/about/about.component";
import ContactForm from "../components/contact-form/contact-form.component";
import MidFooter from "../components/footer/footer.component";
import Projects from "../components/projects/projects.component";
const MidMainPage = () => {
const { t } = useTranslation();
return (
<div className="main-page">
{/* Test comment */}
<div className="intro-bg">
<MidHeader />
<Intro />
</div>
<MidSection title={t("services.title")} id="services">
<Services />
</MidSection>
<MidSection title={t("about_us.title")} id="about-us">
<About />
</MidSection>
<MidSection id="projects" mobileContainer>
<Projects />
</MidSection>
<MidSection id="contact-us">
<ContactForm />
</MidSection>
<MidFooter />
</div>
);
};
export default MidMainPage;

View file

@ -1,12 +0,0 @@
.main-page {
overflow-x: hidden;
position: relative;
.intro-bg {
background: radial-gradient(
100% 100% at 0% 0%,
rgba(226, 90, 146, 0.15) 0%,
rgba(141, 162, 243, 0.063) 35.82%,
rgba(23, 23, 23, 0) 100%
);
}
}

View file

@ -1,54 +0,0 @@
import * as React from "react";
import { Link } from "gatsby";
// styles
const pageStyles = {
color: "#232129",
padding: "96px",
fontFamily: "-apple-system, Roboto, sans-serif, serif",
};
const headingStyles = {
marginTop: 0,
marginBottom: 64,
maxWidth: 320,
};
const paragraphStyles = {
marginBottom: 48,
};
const codeStyles = {
color: "#8A6534",
padding: 4,
backgroundColor: "#FFF4DB",
fontSize: "1.25rem",
borderRadius: 4,
};
// markup
const NotFoundPage = () => {
return (
<main style={pageStyles}>
<title>Not found</title>
<h1 style={headingStyles}>Page not found</h1>
<p style={paragraphStyles}>
Sorry{" "}
<span role="img" aria-label="Pensive emoji">
😔
</span>{" "}
we couldnt find what you were looking for.
<br />
{process.env.NODE_ENV === "development" ? (
<>
<br />
Try creating a page in <code style={codeStyles}>src/pages/</code>.
<br />
</>
) : null}
<br />
<Link to="/">Go home</Link>.
</p>
</main>
);
};
export default NotFoundPage;

Some files were not shown because too many files have changed in this diff Show more