Skip to content

Commit

Permalink
update project structure with readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ninedev-i committed Aug 5, 2024
1 parent d3982ec commit d95d5cb
Show file tree
Hide file tree
Showing 209 changed files with 277 additions and 343 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
Для работы с md файлами локально можно использовать [плагин](https://marketplace.visualstudio.com/items?itemName=Nuxt.mdc) для VSCode.
Это позволит вам предварительно просматривать контент прямо в редакторе. Однако для более точного представления конечного вида контента рекомендуется запускать сайт локально. Ниже приведены инструкции по запуску сайта.

- [Как добавить партнера](./content/ru/_partners/software/.README.md);
- [Как добавить интегратора](./content/ru/_partners/integrator/.README.md);
- [Как добавить вакансию](./content/ru/jobs/.README.md);
- [Как добавить ссылку на статью](./content/ru/_articles/.README.md);
- [Как добавить партнера](./doc/partners.md);
- [Как добавить интегратора](./doc/integrators.md);
- [Как добавить вакансию](doc/vacancies);
- [Как добавить ссылку на статью](./doc/articles.md);
- [Дополнительные компоненты](./doc/components.md).

## Как запустить сайт локально
Expand Down
28 changes: 28 additions & 0 deletions common/article_categories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { Categories } from '~/common/types';

export const categories: Categories = {
ru: [
{ name: 'user_experience', label: 'Опыт пользователей', sub_category: [
{ name: 'retail', label: 'Ритейл, рестораны и отели' },
{ name: 'business_objects', label: 'Бизнес-объекты' },
{ name: 'tsod', label: 'ЦОД' },
{ name: 'apartments', label: 'Многоквартирные дома и ЖК' },
{ name: 'embedded', label: 'Встраиваемые системы и метеостанции' },
{ name: 'home_automation', label: 'Домашняя автоматизация' },
]
},
{ name: 'hardware_selection', label: 'Подбор оборудования' },
{ name: 'educational', label: 'Обучающие ролики', sub_category: [
{ name: 'beginners', label: 'Начинающим' },
{ name: 'node_red', label: 'Автоматизация на Node-RED' },
{ name: 'ventilation', label: 'Вентиляция' },
{ name: 'heating', label: 'Отопление' },
{ name: 'electrics', label: 'Электрика' },
{ name: 'integrations', label: 'Интеграция со сторонним ПО' },
{ name: '3rd_party_devices', label: 'Подключение сторонних устройств' },
]
},
{ name: 'manufactoring', label: 'О производстве и процессах' },
],
en: [],
};
17 changes: 17 additions & 0 deletions common/districts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Districts } from '~/common/types';

export const districts: Districts = {
ru: [
{ value: 'moscow', label: 'Москва и область', coordinates: [55.8, 37.5], zoom: 9 },
{ value: 'spb', label: 'Северо-Западный округ', coordinates: [59.75, 30.5], zoom: 9 },
{ value: 'center', label: 'Центральный округ', coordinates: [54.21, 37.62], zoom: 12 },
{ value: 'volga', label: 'Приволжский округ', coordinates: [57.5, 51], zoom: 6 },
{ value: 'ural', label: 'Уральский округ', coordinates: [56.84, 60.57], zoom: 12 },
{ value: 'by', label: 'Беларусь', coordinates: [53.95, 27.65], zoom: 9 },
{ value: 'kg', label: 'Кыргызстан', coordinates: [42.90, 74.5], zoom: 10 },
],
en: [
{ value: 'by', label: 'Republic of Belarus', coordinates: [53.95, 27.65], zoom: 12 },
{ value: 'kg', label: 'Republic of Kyrgyzstan', coordinates: [42.90, 74.5], zoom: 10 },
],
};
29 changes: 29 additions & 0 deletions common/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Locale } from '@intlify/core-base';

export interface Category {
name: string;
label: string;
sub_category?: Category[];
}

export interface Categories {
[locale: Locale]: Category[];
}

export interface Article {
title: string;
cover: string;
url: string;
date: string;
}

export interface District {
value: string;
label: string;
coordinates: number[];
zoom: number;
}

export interface Districts {
[locale: Locale]: District[];
}
3 changes: 2 additions & 1 deletion components/Article.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script setup lang="ts">
import dayjs from 'dayjs';
import 'dayjs/locale/ru';
import type { Article as ArticleParams } from '~/common/types';
defineProps<{ title: string; cover: string; url: string; date: string; }>();
defineProps<ArticleParams>();
</script>

<template>
Expand Down
10 changes: 9 additions & 1 deletion components/content/Partner.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<script setup lang="ts">
import { slug } from 'github-slugger';
import { districts } from '~/common/districts';
defineProps<{ title: string; logo: string; phone?: number; website?: string; email?: string; note?: string }>();
defineProps<{ title: string; logo: string; phone?: number; website?: string; email?: string; note?: string; district: string[]; }>();
const { locale } = useI18n();
const formatPhoneNumber = (phone: number) => {
if (!phone) {
Expand All @@ -26,6 +29,11 @@ const formatPhoneNumber = (phone: number) => {
<a v-if="website" :href="website" target="_blank" class="partner-contact"><Icon name="ion:earth" /> {{website}}</a>
<a v-if="email" :href="`mailto:${email}`" target="_blank" class="partner-contact"><Icon name="ion:mail" /> {{email}}</a>
<a v-if="phone" :href="`tel:+${phone}`" class="partner-contact"><Icon name="ion:call" /> {{formatPhoneNumber(phone)}}</a>
<div>
<span v-for="region in district">
{{districts[locale].find((district) => district.value === region)!.label}}<br />
</span>
</div>
</div>

</div>
Expand Down
4 changes: 3 additions & 1 deletion components/content/Youtube.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script setup lang="ts">
defineProps<{ id: string; }>();
const props = defineProps<{ url: string; }>();
const url = new URL(props.url);
const id = url.searchParams.get('v')
</script>

<template>
Expand Down
4 changes: 2 additions & 2 deletions composables/localizedData.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ParsedContent } from '@nuxt/content';
import type { Ref } from 'vue';

export const useLocalizedData = async (path: string): Promise<ParsedContent | Ref<ParsedContent>> => {
export const useLocalizedData = async (path: string, _partial = false): Promise<ParsedContent | Ref<ParsedContent>> => {
const { locale } = useI18n();
return useAsyncData<any>(path, () => queryContent(path).where({ _partial: false, _locale: locale.value }).findOne()).data;
return useAsyncData<any>(path, () => queryContent(path).where({ _partial, _locale: locale.value }).findOne()).data;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
district: [by]
coordinates: [53.946722375392426, 27.61806785065508]
title: LedFarm.by
logo: /img/partners/integrator/ledfarm.webp
logo: /img/integrators/ledfarm.webp
phone: 375259237554
website: https://ledfarm.by
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
district: [kg]
coordinates: [42.82789274724515, 74.60996178787109]
title: TekoPro LLC
logo: /img/partners/integrator/produmano.webp
logo: /img/integrators/produmano.webp
phone: 996550881155
website: https://produmano.kg
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
district: [by]
coordinates: [53.947585900865356, 27.69945695143718]
title: Private company "TKAllianceBel"
logo: /img/partners/integrator/tk_allians.webp
logo: /img/integrators/tk_allians.webp
phone: 375447987353
website: https://tk-allians.by
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: FIORD
logo: /img/partners/software/fiord.webp
logo: /img/partners/fiord.webp
phone: 78123236212
website: https://fiord.com/
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: INTERACTIVE SPACES
logo: /img/partners/software/inpro.webp
logo: /img/partners/inpro.webp
phone: 74997556219
website: https://inpro.su
email : [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: iRidium mobile
logo: /img/partners/software/iridi.webp
logo: /img/partners/iridi.webp
phone: 74993227329
website: https://iridi.com
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: LLC "Rapid Software"
logo: /img/partners/software/rapid_scada.webp
logo: /img/partners/rapid_scada.webp
phone: 74732303612
website: https://rapidscada.org
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Rightech IoT Cloud
logo: /img/partners/software/rightech.webp
logo: /img/partners/rightech.webp
phone: 74994506525
website: https://rightech.io
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Ещё три полезных сценария на Node-RED
url: https://habr.com/ru/companies/wirenboard/articles/689826/
cover: /img/articles/educational/node_red/3_scenarios.jpeg
date: 2022-09-23
category: educational
sub_category: node_red
category: node_red
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Четыре полезных сценария на Node-RED
url: https://habr.com/ru/companies/wirenboard/articles/689098/
cover: /img/articles/educational/node_red/4_scenarios.jpeg
date: 2022-09-19
category: educational
sub_category: node_red
category: node_red
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Установка Grafana на Amazon WS
url: https://sprut.ai/article/ustanovka-grafana-na-amazon-ws
cover: /img/articles/educational/integrations/amazon_with_grafana.png
date: 2019-03-09
category: educational
sub_category: integrations
category: integrations
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: 'Склад, авто, аптека: мониторинг условий
url: https://habr.com/ru/companies/wirenboard/articles/769966/
cover: /img/articles/user_experience/business_objects/auto_warehouse.jpg
date: 2023-10-26
category: user_experience
sub_category: business_objects
category: business_objects
---
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Автоматизируем вентиляцию в квартире п
url: https://habr.com/ru/companies/wirenboard/articles/752132/
cover: /img/articles/user_experience/home_automation/automating_ventilation.jpg
date: 2023-08-03
category: user_experience
sub_category: home_automation
category: home_automation
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Подключаем шторы Akko и Dooya к Алисе и Apple Home
url: https://comf.life/podklyuchaem-shtory-k-alise-i-apple-home-privody-akko-dm35eq-x-i-am82tv.html
cover: /img/articles/educational/3rd_party_devices/blinds_with_alice.webp
date: 2023-01-18
category: educational
sub_category: 3rd_party_devices
category: 3rd_party_devices
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Как собрать бюджетный умный дом. Общие п
url: https://habr.com/ru/companies/wirenboard/articles/764778/
cover: /img/articles/educational/beginners/budget_smart_home.jpg
date: 2023-10-03
category: educational
sub_category: beginners
category: beginners
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: 'Сити-ферма: майним зелень в подвале'
url: https://habr.com/ru/companies/wirenboard/articles/766876/
cover: /img/articles/user_experience/business_objects/city_farm.jpg
date: 2023-10-12
category: user_experience
sub_category: business_objects
category: business_objects
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Управление климатом в комнате с панели C
url: https://sprut.ai/article/upravlenie-klimatom-v-komnate-s-radiatornym-otopleniem-pri-pomoshchi-sensornoy-paneli-termostata
cover: /img/articles/educational/heating/cityron.webp
date: 2019-09-24
category: educational
sub_category: heating
category: heating
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Программирование Wiren Board с помощью CODESYS
url: https://wirenboard.com/wiki/CODESYS
cover: /img/articles/educational/integrations/codesys.webp
date: 2022-09-16
category: educational
sub_category: integrations
category: integrations
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Как устроен сценарий «Темная комната»
url: https://comf.life/bolshoj-obzor-scenarij-temnaya-komnata.html
cover: /img/articles/educational/beginners/dark_room_scenario.jpg
date: 2022-08-04
category: educational
sub_category: beginners
category: beginners
---
``
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Краткий обзор диммера WB-MDM3 от Wiren Board
url: https://sprut.ai/article/kratkiy-obzor-dimmera-wb-mdm3-ot-wirenboard
cover: /img/articles/educational/electrics/dimmer_wb_mdm3.webp
date: 2020-01-15
category: educational
sub_category: electrics
category: electrics
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Сборка электрического щита на Wiren Board 6
url: https://sprut.ai/article/sborka-el-shchita-na-wiren-board-6-v-tom-chisle-silovaya-chast
cover: /img/articles/educational/beginners/electrical_panel.webp
date: 2020-02-18
category: educational
sub_category: beginners
category: beginners
---
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Экскурсия на производство ПК «Энергия»
url: https://habr.com/ru/companies/wirenboard/articles/763412/
cover: /img/articles/user_experience/business_objects/energia_excursion.webp
date: 2023-09-26
category: user_experience
sub_category: business_objects
category: business_objects
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Экскурсия на производство накопителей
url: https://habr.com/ru/companies/wirenboard/articles/743432/
cover: /img/articles/user_experience/embedded/energy_storage_excursion.jpg
date: 2023-06-27
category: user_experience
sub_category: embedded
category: embedded
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: От распаковки до Node-RED. Автоматизация бе
url: https://sprut.ai/article/ot-raspakovki-do-node-red-mozhno-li-nastroit-avtomatizaciyu-na-wiren-board-7-ne-umerev-v-konsoli
cover: /img/articles/educational/node_red/execution_without_console.png
date: 2022-08-22
category: educational
sub_category: node_red
category: node_red
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Автоматизация инженерных систем клиник
url: https://habr.com/ru/companies/wirenboard/articles/793790/
cover: /img/articles/user_experience/business_objects/facility_automation.webp
date: 2024-02-15
category: user_experience
sub_category: business_objects
category: business_objects
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Управление электрическим теплым полом
url: https://dzen.ru/a/YMjxpvZDS3QA0t9y
cover: /img/articles/educational/heating/floor_heating.jpg
date: 2021-06-16
category: educational
sub_category: heating
category: heating
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Первый умный дом класса А в России «Булы
url: https://wirenboard.com/ru/pages/interview-zhelezno-bulychev/
cover: /img/articles/user_experience/apartments/frist_smart_boolichev.jpg
date: 2022-10-21
category: user_experience
sub_category: apartments
category: apartments
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Слезаем с облачной иглы Aqara и подключаем
url: https://habr.com/ru/companies/wirenboard/articles/710177/
cover: /img/articles/educational/beginners/from_aqara_to_wb.jpg
date: 2023-01-12
category: educational
sub_category: beginners
category: beginners
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Добавляем Google Home в Wiren Board
url: https://sprut.ai/article/dobavlyaem-google-home-v-wirenboard
cover: /img/articles/educational/integrations/google_home_kit.png
date: 2020-12-21
category: educational
sub_category: integrations
category: integrations
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Использование Grafana с контроллером Wiren Boar
url: https://wirenboard.com/wiki/Grafana
cover: /img/articles/educational/integrations/grafana.png
date: 2021-11-25
category: educational
sub_category: integrations
category: integrations
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Интеграция кондиционера GREE с Wiren Board + Home
url: https://sprut.ai/article/integraciya-kondicionera-gree-s-wirenboard-home-assistant
cover: /img/articles/user_experience/home_automation/gree_air_condition.png
date: 2023-07-05
category: user_experience
sub_category: home_automation
category: home_automation
---
Loading

0 comments on commit d95d5cb

Please sign in to comment.