4 Commits 5e68ac3612 ... 36d42e0f26

Author SHA1 Message Date
  Vladislav Atakhanov 36d42e0f26 fix: portfolio marker position center 6 months ago
  Vladislav Atakhanov 9b2bb9ae42 content: inshot24 & services-wa 6 months ago
  Vladislav Atakhanov d020e3defb feat: portfolio projects 6 months ago
  Vladislav Atakhanov 5b67844622 feat: add time & date to project 6 months ago

+ 28 - 0
src/api/projects.ts

@@ -0,0 +1,28 @@
+import type { MarkdownInstance } from "astro"
+import { compareByHas } from "src/utils/compare-by-has"
+
+export type Project = MarkdownInstance<{
+	link: string
+	title: string
+	links: Array<{
+		href: string
+		title: string
+		icon: string
+	}>
+	color?: string
+	time?: string
+}>
+
+export const sortProjects = (files: any[]): Project[] =>
+	files.sort(({ frontmatter: a }, { frontmatter: b }) => {
+		if (compareByHas(a, b, "date") !== 0) return compareByHas(a, b, "date")
+		if (compareByHas(a, b, "time") !== 0) return compareByHas(a, b, "time")
+
+		if (a.date && b.date) {
+			const aDate = new Date(a.date)
+			const bDate = new Date(b.date)
+			return bDate.getMilliseconds() - aDate.getMilliseconds()
+		}
+
+		return 0
+	})

+ 16 - 22
src/components/content/Project.astro

@@ -1,25 +1,16 @@
 ---
 import Icon from "../../lib/Icon.astro"
-import type { MarkdownInstance } from "astro"
 import FormatHTML from "../../lib/FormatHTML.astro"
 import { createDocument } from "../../utils"
+import type { Project as ProjectType } from "../../api/projects"
 
 export interface Props {
-    project: MarkdownInstance<{
-        link: string
-        title: string
-        links: Array<{
-            href: string
-            title: string
-            icon: string
-        }>
-        color?: string
-    }>
+    project: ProjectType
 }
 
 const { project } = Astro.props
 const {
-    frontmatter: { link, title, links, color },
+    frontmatter: { link, title, links, color, time },
 } = project
 
 const html = project.compiledContent()
@@ -30,15 +21,18 @@ const techs = document.getElementsByTagName("ul").pop()?.outerHTML
 ---
 
 <div class="project" style={{ "--color": color }}>
-    <div class="project__title">
-        <h3>
-            {title}
-            <a
-                href={link}
-                target="blank"
-                class="project__link"
-                aria-label=`Перейти на ${title}`></a>
-        </h3>
+    <div class="project__header">
+        <div class="project__title">
+            <h3>
+                {title}
+                <a
+                    href={link}
+                    target="blank"
+                    class="project__link"
+                    aria-label=`Перейти на ${title}`></a>
+            </h3>
+            {time && <div class="project__time">{time}</div>}
+        </div>
         <ul class="links">
             {
                 links.map(({ href, title, icon }) => (
@@ -78,7 +72,7 @@ const techs = document.getElementsByTagName("ul").pop()?.outerHTML
         margin: 0;
     }
 
-    .project__title {
+    .project__header {
         display: flex;
         justify-content: space-between;
     }

+ 0 - 1
src/content/portfolio.md

@@ -8,7 +8,6 @@ link: https://github.com/vladislav-atakhanov/portfolio
 - [Demonster](https://demonster.eloh1m.com/)
 - [FB2-Reader](https://reader.eloh1m.com/)
 - [Pomodoro](https://pomodoro.eloh1m.com/)
-- [Зелёная Караганда](/project/green-karaganda/)
 
 ## Боты
 - [Youtube & Genius](https://t.me/youtube_genius_bot)

+ 2 - 2
src/content/projects/demonster.md

@@ -1,6 +1,8 @@
 ---
 link: https://demonster.eloh1m.com/
 title: Demonster
+color: "#9fbf40"
+
 links:
   - icon: code
     href: https://notabug.org/vladislav-atakhanov/demonster
@@ -8,8 +10,6 @@ links:
   - icon: site
     href: https://demonster.eloh1m.com/
     title: Перейти на сайт
-
-color: "#9fbf40"
 ---
 
 Создайте свою презентацию на языке Markdown и сразу же покажите её. Выберите тему или настройте её сами. Также можете сохранить каждый слайд. Аналог [Marp](https://marp.app/).

+ 3 - 3
src/content/projects/green-karaganda.md

@@ -1,14 +1,14 @@
 ---
 link: /project/green-karaganda/
 title: Зелёная Караганда
+time: 20 часов
+color: "#569566"
+
 links:
   - icon: site
     href: /project/green-karaganda/
     title: Подробнее
-index: 1
-
 cover: https://hsto.org/getpro/freelansim/allfiles/122/1229/1229863/preview_3f37e91988.jpg
-color: "#569566"
 images:
   - src: https://habrastorage.org/getpro/freelansim/allfiles/122/1229/1229711/53c081e6fd.png
     alt: Экран компьютера

+ 18 - 0
src/content/projects/inshot24.md

@@ -0,0 +1,18 @@
+---
+link: https://whimsical-fairy-ef18fe.netlify.app/
+title: INSHOT24
+color: "#101010"
+time: 18 часов
+date: 2023-11-24
+
+links:
+  - icon: site
+    href: https://whimsical-fairy-ef18fe.netlify.app/
+    title: Перейти на сайт
+---
+
+Вёрстка. Создание интерактивности. Сохранение данных форм в Airtable, используя Serverless функции Netlify.
+
+- [Astro]()
+- [Svelte]()
+- Netlify

+ 2 - 1
src/content/projects/reader.md

@@ -1,6 +1,8 @@
 ---
 link: https://reader.eloh1m.com/
 title: FB2-Reader
+color: "#654d33"
+
 links:
   - icon: code
     href: https://github.com/vladislav-atakhanov/reader
@@ -8,7 +10,6 @@ links:
   - icon: site
     href: https://reader.eloh1m.com/
     title: Перейти на сайт
-color: "#654d33"
 ---
 
 Чтение FB2-файлов прямо в браузере

+ 18 - 0
src/content/projects/services-wa.md

@@ -0,0 +1,18 @@
+---
+link: https://services-wa.com/
+title: Services WA
+time: 18 часов
+color: "#0095ff"
+date: 2023-11-24
+
+links:
+  - icon: site
+    href: https://services-wa.com/
+    title: Перейти на сайт
+---
+
+Вёрстка. Создание интерактивности. Обработка форм. Отправка письм на почту.
+
+- [Astro]()
+- [Svelte]()
+- PHP

+ 9 - 5
src/content/job/smart-hotels.md

@@ -1,10 +1,14 @@
 ---
-title: Фронтенд-разработчик
-company: Smart Hotels
-company_link: https://smarthotels.co.il/
-start_time: 08-2023
-end_time: 10-2023
+link: https://smarthotels.co.il/
+title: Smart Hotels
+time: 80 часов
 color: "#0e86d4"
+date: 2023-10-01
+
+links:
+  - icon: site
+    href: https://smarthotels.co.il/
+    title: Перейти на сайт
 ---
 
 Вёрстка обновлённого дизайна сайта. Разделение проекта на фронтенд и бекенд. Настройка REST-api в WordPress. Поддержка проекта.

+ 0 - 0
src/content/projects/vmux.md


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