Школи, університети, громадські організації, стартапи та інші організації можуть звертатися до нас з проханням надати Толокари для проведення проєктів, семінарів та тренінгів.
Ми шукаємо окремих мейкерів, фаблаби, хакерспейси, мейкерспейси та інші спільноти, які хочуть співпрацювати з нами в Україні та онлайн на міжнародному рівні.
diff --git a/src/pages/ua/interventions/[...slug].astro b/src/pages/ua/interventions/[...slug].astro
new file mode 100644
index 00000000..88dff611
--- /dev/null
+++ b/src/pages/ua/interventions/[...slug].astro
@@ -0,0 +1,44 @@
+---
+import {
+ ContentSection,
+ InterventionImageCarousel,
+ InterventionSingleViewHeading,
+} from "@components";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+
+export async function getStaticPaths() {
+ const interventions = await getCollection("interventions");
+ return interventions.map((intervention) => ({
+ params: { slug: intervention.slug.replace("ua/", "") },
+ props: { entry: intervention },
+ }));
+}
+
+const { entry } = Astro.props;
+const { Content } = await entry.render();
+---
+
+
+
+
+ {
+ entry?.data?.images && (
+
+ )
+ }
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/ua/legal.mdx b/src/pages/ua/legal.mdx
index 02f390c0..c1fe33f6 100644
--- a/src/pages/ua/legal.mdx
+++ b/src/pages/ua/legal.mdx
@@ -1,7 +1,7 @@
---
-layout: "@layouts/BaseLayout.astro"
+layout: "@layouts/BaseLayoutMarkdown.astro"
title: Legal Notice
-footerGrey: true
+darkFooter: true
darkNavigation: true
---
diff --git a/src/pages/ua/playbook.mdx b/src/pages/ua/resources/playbook.mdx
similarity index 97%
rename from src/pages/ua/playbook.mdx
rename to src/pages/ua/resources/playbook.mdx
index be9c592b..4feb93ca 100644
--- a/src/pages/ua/playbook.mdx
+++ b/src/pages/ua/resources/playbook.mdx
@@ -1,7 +1,7 @@
---
-layout: "@layouts/AwardsLayout.astro"
+layout: "@layouts/BaseLayoutMarkdown.astro"
title: "ЯК ТОЛОКАРИТИ: Практичний посібник для мобільних мейкерспейсів"
-footerGrey: false
+darkFooter: false
metaImage: images/playbook/og_playbook.jpg
metaDescription: "ЯК ТОЛОКАРИТИ: У цьому Практичний посібник ми ділимося нашими усвідомленнями, здобутими в межах проєкту «Tolocar», а також різноманітними можливостями та варіантами застосування мобільних мейкерспейсів в Україні з травня 2022 року."
---
@@ -42,7 +42,7 @@ export const baseUrl = CommonUtils.getBaseUrl(false);
Читати практичний посібник
-
+
diff --git a/src/util/Airtable.ts b/src/util/Airtable.ts
index d1b7d758..66b9436f 100644
--- a/src/util/Airtable.ts
+++ b/src/util/Airtable.ts
@@ -72,11 +72,11 @@ interface AirtablePoiRecord {
interface AirtablePoiFields {
"Short description"?: string;
- "End"?: string;
+ End?: string;
"Project or Intervention"?: string;
"Impact reason"?: string;
Kind?: string;
- "Start"?: string;
+ Start?: string;
"Geo cash (Event)"?: string;
"Public Photos"?: Array;
Status?: string;
@@ -210,7 +210,7 @@ export const getNewsItems = async (
// return dateB - dateA;
// })
.map((record) => {
- return {
+ const pickedValues = {
id: record.id,
description:
locale === "ua"
@@ -228,6 +228,8 @@ export const getNewsItems = async (
"large"
]?.url,
} as INewsItem;
+
+ return pickedValues;
});
const trimmed = count ? filtered.slice(0, count) : filtered;
@@ -238,6 +240,17 @@ export const getNewsItems = async (
isCached
);
+ withLocalImages.forEach((item, i) => {
+ fs.writeFileSync(
+ `./news-json/${locale}/${withLocalImages.length - (i + 1)}.json`,
+ JSON.stringify(
+ { ...item, order: withLocalImages.length - (i + 1) },
+ null,
+ 2
+ )
+ );
+ });
+
return withLocalImages;
}
};
@@ -356,8 +369,7 @@ export const getMapPois = async (baseUrl?: string) => {
// Now transform into the proper UI structure
const transformed = withLocationDecoded.map((poi) => {
const startDate =
- poi.fields["Start"] &&
- new Date(Date.parse(poi.fields["Start"]));
+ poi.fields["Start"] && new Date(Date.parse(poi.fields["Start"]));
const formattedStartDate =
startDate &&
new Intl.DateTimeFormat("en-GB", {
diff --git a/src/util/CommonUtils.ts b/src/util/CommonUtils.ts
index 0fc2dd97..5c08f212 100644
--- a/src/util/CommonUtils.ts
+++ b/src/util/CommonUtils.ts
@@ -1,3 +1,5 @@
+import type { IMenuItem } from "@interfaces/IMenu";
+
const CommonUtils = {
/**
* Return the base URL of the current page with or without trailing slash depending on the given parameter
@@ -11,6 +13,44 @@ const CommonUtils = {
else if (endsWithSlash && !trailingSlash) return baseUrl.slice(0, -1);
return baseUrl;
},
+
+ rebaseSingleMenuItem: (item: IMenuItem, baseUrl: string): IMenuItem => {
+ let itemWithoutChildren;
+
+ if (item.target?.startsWith("https") || item.target?.startsWith("mailto")) {
+ itemWithoutChildren = {
+ ...item,
+ };
+ } else {
+ itemWithoutChildren = {
+ ...item,
+ ...(item.target
+ ? {
+ target: baseUrl === "/" ? item.target : baseUrl + item.target,
+ }
+ : {}),
+ };
+ }
+
+ if (item.children?.length) {
+ return {
+ ...itemWithoutChildren,
+ children: item.children.map((child) =>
+ CommonUtils.rebaseSingleMenuItem(child, baseUrl)
+ ),
+ };
+ }
+ return itemWithoutChildren;
+ },
+
+ /**
+ * Attach baseURl to all Menu items
+ * */
+ rebaseMenu: (baseUrl: string, menu: IMenuItem[]): IMenuItem[] => {
+ return menu?.map((menuItem) =>
+ CommonUtils.rebaseSingleMenuItem(menuItem, baseUrl)
+ );
+ },
};
export default CommonUtils;
diff --git a/tailwind.config.cjs b/tailwind.config.cjs
index daed625d..49a9ae2c 100644
--- a/tailwind.config.cjs
+++ b/tailwind.config.cjs
@@ -36,6 +36,14 @@ module.exports = {
"community-messages":
"linear-gradient(-6.5deg, rgba(0, 150, 100, 1) 0%, rgba(0, 150, 100, 0) 31.54%, rgba(0, 150, 100, 0) 66.78%, rgba(0, 150, 100, 1) 100%), url(/community_messages.svg)",
},
+ typography: {
+ DEFAULT: {
+ css: {
+ "blockquote p:first-of-type::before": { content: "none" },
+ "blockquote p:first-of-type::after": { content: "none" },
+ },
+ },
+ },
},
colors: {
transparent: "transparent",
diff --git a/tsconfig.json b/tsconfig.json
index 68685fa7..c848bcd7 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,5 +1,6 @@
{
"extends": "astro/tsconfigs/strict",
+ "exclude": ["dist", "public"],
"compilerOptions": {
"jsx": "react",
"baseUrl": ".",