diff --git a/package-lock.json b/package-lock.json index 4211716..02e59b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yarkov.tech", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "yarkov.tech", - "version": "2.1.0", + "version": "2.2.0", "license": "MIT", "dependencies": { "@astrojs/check": "^0.9.5", diff --git a/package.json b/package.json index a8bc8f4..d90e8a6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "yarkov.tech", "private": false, - "version": "2.2.0", + "version": "3.0.1", "description": "Personal website created with Astro.", "author": { "name": "Sergey Yarkov", diff --git a/public/media/arduino-uart-converter.png b/public/media/arduino-uart-converter.png deleted file mode 100644 index be74164..0000000 Binary files a/public/media/arduino-uart-converter.png and /dev/null differ diff --git a/public/media/image1.jpg b/public/media/image1.jpg deleted file mode 100644 index 2973b00..0000000 Binary files a/public/media/image1.jpg and /dev/null differ diff --git a/public/media/image2.jpg b/public/media/image2.jpg deleted file mode 100644 index 07356d8..0000000 Binary files a/public/media/image2.jpg and /dev/null differ diff --git a/public/media/image3.jpg b/public/media/image3.jpg deleted file mode 100644 index 8aaeb05..0000000 Binary files a/public/media/image3.jpg and /dev/null differ diff --git a/public/media/mplabx-ide-sim-option.png b/public/media/mplabx-ide-sim-option.png deleted file mode 100644 index 5e62634..0000000 Binary files a/public/media/mplabx-ide-sim-option.png and /dev/null differ diff --git a/public/media/screen-1.png b/public/media/screen-1.png deleted file mode 100644 index f02bc83..0000000 Binary files a/public/media/screen-1.png and /dev/null differ diff --git a/public/media/screen-2.png b/public/media/screen-2.png deleted file mode 100644 index 03ef7ab..0000000 Binary files a/public/media/screen-2.png and /dev/null differ diff --git a/public/media/screen-3.png b/public/media/screen-3.png deleted file mode 100644 index ec420d4..0000000 Binary files a/public/media/screen-3.png and /dev/null differ diff --git a/public/media/serial-port.jpg b/public/media/serial-port.jpg deleted file mode 100644 index a308bd4..0000000 Binary files a/public/media/serial-port.jpg and /dev/null differ diff --git a/public/media/uart-connect-settings.png b/public/media/uart-connect-settings.png deleted file mode 100644 index 98512c5..0000000 Binary files a/public/media/uart-connect-settings.png and /dev/null differ diff --git a/public/media/uart-connection.jpg b/public/media/uart-connection.jpg deleted file mode 100644 index beacf8d..0000000 Binary files a/public/media/uart-connection.jpg and /dev/null differ diff --git a/public/media/uart-packet.jpg b/public/media/uart-packet.jpg deleted file mode 100644 index 1794ba1..0000000 Binary files a/public/media/uart-packet.jpg and /dev/null differ diff --git a/public/media/webserial-connect.png b/public/media/webserial-connect.png deleted file mode 100644 index 868f78e..0000000 Binary files a/public/media/webserial-connect.png and /dev/null differ diff --git a/public/media/webserial-demo-1.png b/public/media/webserial-demo-1.png deleted file mode 100644 index e860571..0000000 Binary files a/public/media/webserial-demo-1.png and /dev/null differ diff --git a/public/media/webserial-demo-2.png b/public/media/webserial-demo-2.png deleted file mode 100644 index da62642..0000000 Binary files a/public/media/webserial-demo-2.png and /dev/null differ diff --git a/public/media/webserial-demo-3.gif b/public/media/webserial-demo-3.gif deleted file mode 100644 index 7bae60b..0000000 Binary files a/public/media/webserial-demo-3.gif and /dev/null differ diff --git a/schema.graphql b/schema.graphql index 0552b19..a205c59 100644 --- a/schema.graphql +++ b/schema.graphql @@ -158,6 +158,9 @@ type Subscription { directus_activity_mutated(event: EventEnum): directus_activity_mutated directus_comments_mutated(event: EventEnum): directus_comments_mutated directus_dashboards_mutated(event: EventEnum): directus_dashboards_mutated + directus_deployment_projects_mutated(event: EventEnum): directus_deployment_projects_mutated + directus_deployment_runs_mutated(event: EventEnum): directus_deployment_runs_mutated + directus_deployments_mutated(event: EventEnum): directus_deployments_mutated directus_files_mutated(event: EventEnum): directus_files_mutated directus_flows_mutated(event: EventEnum): directus_flows_mutated directus_folders_mutated(event: EventEnum): directus_folders_mutated @@ -174,7 +177,6 @@ type Subscription { directus_translations_mutated(event: EventEnum): directus_translations_mutated directus_users_mutated(event: EventEnum): directus_users_mutated directus_versions_mutated(event: EventEnum): directus_versions_mutated - directus_webhooks_mutated(event: EventEnum): directus_webhooks_mutated global_mutated(event: EventEnum): global_mutated global_translations_mutated(event: EventEnum): global_translations_mutated home_page_mutated(event: EventEnum): home_page_mutated @@ -244,7 +246,6 @@ type appeal_mutated { type article { id: ID! - title: String translations(filter: article_translations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article_translations] translations_func: count_functions } @@ -264,7 +265,6 @@ type article_aggregated { type article_aggregated_count { id: Int - title: Int translations: Int } @@ -276,7 +276,6 @@ input article_filter { _and: [article_filter] _or: [article_filter] id: number_filter_operators - title: string_filter_operators translations: article_translations_quantifier_filter translations_func: count_function_filter_operators } @@ -487,7 +486,6 @@ input create_appeal_input { input create_article_input { id: ID - title: String translations: [create_article_translations_input] } @@ -861,6 +859,130 @@ type directus_dashboards_mutated { key: ID! } +type directus_deployment_projects { + date_created: Date + date_created_func: datetime_functions + deployment(filter: directus_deployments_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): directus_deployments + external_id: String! + id: ID! + name: String! + runs(filter: directus_deployment_runs_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_deployment_runs] + runs_func: count_functions + user_created(filter: directus_users_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): directus_users +} + +input directus_deployment_projects_filter { + _and: [directus_deployment_projects_filter] + _or: [directus_deployment_projects_filter] + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + deployment: directus_deployments_filter + external_id: string_filter_operators + id: id_filter_operators + name: string_filter_operators + runs: directus_deployment_runs_quantifier_filter + runs_func: count_function_filter_operators + user_created: directus_users_filter +} + +type directus_deployment_projects_mutated { + data: directus_deployment_projects + event: EventEnum + key: ID! +} + +input directus_deployment_projects_quantifier_filter { + _and: [directus_deployment_projects_filter] + _none: directus_deployment_projects_filter + _or: [directus_deployment_projects_filter] + _some: directus_deployment_projects_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + deployment: directus_deployments_filter + external_id: string_filter_operators + id: id_filter_operators + name: string_filter_operators + runs: directus_deployment_runs_quantifier_filter + runs_func: count_function_filter_operators + user_created: directus_users_filter +} + +type directus_deployment_runs { + date_created: Date + date_created_func: datetime_functions + external_id: String! + id: ID! + project(filter: directus_deployment_projects_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): directus_deployment_projects + target: String! + user_created(filter: directus_users_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): directus_users +} + +input directus_deployment_runs_filter { + _and: [directus_deployment_runs_filter] + _or: [directus_deployment_runs_filter] + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + external_id: string_filter_operators + id: id_filter_operators + project: directus_deployment_projects_filter + target: string_filter_operators + user_created: directus_users_filter +} + +type directus_deployment_runs_mutated { + data: directus_deployment_runs + event: EventEnum + key: ID! +} + +input directus_deployment_runs_quantifier_filter { + _and: [directus_deployment_runs_filter] + _none: directus_deployment_runs_filter + _or: [directus_deployment_runs_filter] + _some: directus_deployment_runs_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + external_id: string_filter_operators + id: id_filter_operators + project: directus_deployment_projects_filter + target: string_filter_operators + user_created: directus_users_filter +} + +type directus_deployments { + credentials: String + date_created: Date + date_created_func: datetime_functions + id: ID! + options: JSON + options_func: count_functions + projects(filter: directus_deployment_projects_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_deployment_projects] + projects_func: count_functions + provider: String! + user_created(filter: directus_users_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): directus_users +} + +input directus_deployments_filter { + _and: [directus_deployments_filter] + _or: [directus_deployments_filter] + credentials: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + id: id_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + projects: directus_deployment_projects_quantifier_filter + projects_func: count_function_filter_operators + provider: string_filter_operators + user_created: directus_users_filter +} + +type directus_deployments_mutated { + data: directus_deployments + event: EventEnum + key: ID! +} + type directus_files { charset: String created_on: Date @@ -1387,10 +1509,30 @@ input directus_roles_quantifier_filter { } type directus_settings { + ai_anthropic_allowed_models: JSON + ai_anthropic_allowed_models_func: count_functions + ai_anthropic_api_key: String + ai_google_allowed_models: JSON + ai_google_allowed_models_func: count_functions + ai_google_api_key: String + ai_openai_allowed_models: JSON + ai_openai_allowed_models_func: count_functions + ai_openai_api_key: String + ai_openai_compatible_api_key: String + ai_openai_compatible_base_url: String + ai_openai_compatible_headers: JSON + ai_openai_compatible_headers_func: count_functions + ai_openai_compatible_models: JSON + ai_openai_compatible_models_func: count_functions + ai_openai_compatible_name: String + """$t:fields.directus_settings.ai_system_prompt_note""" + ai_system_prompt: String auth_login_attempts: Int auth_password_policy: String basemaps: JSON basemaps_func: count_functions + """$t:fields.directus_settings.collaborative_editing_note""" + collaborative_editing_enabled: Boolean! custom_aspect_ratios: JSON custom_aspect_ratios_func: count_functions custom_css: String @@ -1663,27 +1805,6 @@ type directus_versions_mutated { key: ID! } -type directus_webhooks { - actions: [String]! - collections: [String]! - data: Boolean - headers: JSON - headers_func: count_functions - id: ID! - method: String - migrated_flow(filter: directus_flows_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): directus_flows - name: String! - status: String - url: String! - was_active_before_deprecation: Boolean! -} - -type directus_webhooks_mutated { - data: directus_webhooks - event: EventEnum - key: ID! -} - type global { email: String! github: String! @@ -2145,7 +2266,6 @@ input update_appeal_input { input update_article_input { id: ID - title: String translations: [update_article_translations_input] } @@ -2359,7 +2479,6 @@ type version_appeal { type version_article { id: ID - title: String translations: JSON } diff --git a/src/graphql/gql.ts b/src/graphql/gql.ts index 617b032..5baeb0f 100644 --- a/src/graphql/gql.ts +++ b/src/graphql/gql.ts @@ -23,6 +23,7 @@ type Documents = { "\n\t\tquery Article_translations($slug: String!) {\n\t\t\tarticle_translations(filter: { slug: { _eq: $slug } }) {\n\t\t\t\tid\n\t\t\t\ttitle\n\t\t\t\ttags {\n\t\t\t\t\ttag_id {\n\t\t\t\t\t\ttitle\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdescription\n\t\t\t\tslug\n\t\t\t\tcontent\n\t\t\t\tauthor {\n\t\t\t\t\tfirst_name\n\t\t\t\t\tlast_name\n\t\t\t\t}\n\t\t\t\tpub_date\n\t\t\t\tviews\n\t\t\t\tlanguages_code {\n\t\t\t\t\tcode\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t\tcover_image {\n\t\t\t\t\ttitle\n\t\t\t\t\ttype\n\t\t\t\t\tfilename_disk\n\t\t\t\t}\n\t\t\t\tarticle_id {\n\t\t\t\t\ttranslations {\n\t\t\t\t\t\tslug\n\t\t\t\t\t\tlanguages_code {\n\t\t\t\t\t\t\tcode\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpub_date\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t": typeof types.Article_TranslationsDocument, "\n\t\tmutation Update_article_translations_item($id: ID!, $views: Int!) {\n\t\t\tupdate_article_translations_item(id: $id, data: { views: $views }) {\n\t\t\t\tviews\n\t\t\t}\n\t\t}\n\t": typeof types.Update_Article_Translations_ItemDocument, "\n\t\tquery AboutMeQuery($pageLang: String!) {\n\t\t\tglobal_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) {\n\t\t\t\tabout\n\t\t\t}\n\t\t}\n\t": typeof types.AboutMeQueryDocument, + "\n\t\tquery SplashInfo($pageLang: String!) {\n\t\t\thome_page_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) {\n\t\t\t\theadline\n\t\t\t\tsubheadline\n\t\t\t\tdescription\n\t\t\t}\n\t\t}\n\t": typeof types.SplashInfoDocument, "\n\t\tquery ContactsQuery {\n\t\t\tglobal {\n\t\t\t\temail\n\t\t\t\tgithub\n\t\t\t\ttelegram\n\t\t\t}\n\t\t}\n\t": typeof types.ContactsQueryDocument, "\n\t\tquery SiteSettingsQuery {\n\t\t\tglobal {\n\t\t\t\tym_counter\n\t\t\t\trecent_articles_limit\n\t\t\t\tgithub\n\t\t\t}\n\t\t}\n\t": typeof types.SiteSettingsQueryDocument, "\n\t\tquery Project_translations($pageLang: String!) {\n\t\t\tproject_translations(filter: { languages_code: { code: { _contains: $pageLang } } }, sort: [\"-year\"]) {\n\t\t\t\tid\n\t\t\t\ttitle\n\t\t\t\tyear\n\t\t\t\tdescription\n\t\t\t\tsource_url\n\t\t\t\tdemo_url\n\t\t\t\tarticle_url\n\t\t\t\ticon {\n\t\t\t\t\tfilename_disk\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t": typeof types.Project_TranslationsDocument, @@ -37,6 +38,7 @@ const documents: Documents = { "\n\t\tquery Article_translations($slug: String!) {\n\t\t\tarticle_translations(filter: { slug: { _eq: $slug } }) {\n\t\t\t\tid\n\t\t\t\ttitle\n\t\t\t\ttags {\n\t\t\t\t\ttag_id {\n\t\t\t\t\t\ttitle\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdescription\n\t\t\t\tslug\n\t\t\t\tcontent\n\t\t\t\tauthor {\n\t\t\t\t\tfirst_name\n\t\t\t\t\tlast_name\n\t\t\t\t}\n\t\t\t\tpub_date\n\t\t\t\tviews\n\t\t\t\tlanguages_code {\n\t\t\t\t\tcode\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t\tcover_image {\n\t\t\t\t\ttitle\n\t\t\t\t\ttype\n\t\t\t\t\tfilename_disk\n\t\t\t\t}\n\t\t\t\tarticle_id {\n\t\t\t\t\ttranslations {\n\t\t\t\t\t\tslug\n\t\t\t\t\t\tlanguages_code {\n\t\t\t\t\t\t\tcode\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpub_date\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t": types.Article_TranslationsDocument, "\n\t\tmutation Update_article_translations_item($id: ID!, $views: Int!) {\n\t\t\tupdate_article_translations_item(id: $id, data: { views: $views }) {\n\t\t\t\tviews\n\t\t\t}\n\t\t}\n\t": types.Update_Article_Translations_ItemDocument, "\n\t\tquery AboutMeQuery($pageLang: String!) {\n\t\t\tglobal_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) {\n\t\t\t\tabout\n\t\t\t}\n\t\t}\n\t": types.AboutMeQueryDocument, + "\n\t\tquery SplashInfo($pageLang: String!) {\n\t\t\thome_page_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) {\n\t\t\t\theadline\n\t\t\t\tsubheadline\n\t\t\t\tdescription\n\t\t\t}\n\t\t}\n\t": types.SplashInfoDocument, "\n\t\tquery ContactsQuery {\n\t\t\tglobal {\n\t\t\t\temail\n\t\t\t\tgithub\n\t\t\t\ttelegram\n\t\t\t}\n\t\t}\n\t": types.ContactsQueryDocument, "\n\t\tquery SiteSettingsQuery {\n\t\t\tglobal {\n\t\t\t\tym_counter\n\t\t\t\trecent_articles_limit\n\t\t\t\tgithub\n\t\t\t}\n\t\t}\n\t": types.SiteSettingsQueryDocument, "\n\t\tquery Project_translations($pageLang: String!) {\n\t\t\tproject_translations(filter: { languages_code: { code: { _contains: $pageLang } } }, sort: [\"-year\"]) {\n\t\t\t\tid\n\t\t\t\ttitle\n\t\t\t\tyear\n\t\t\t\tdescription\n\t\t\t\tsource_url\n\t\t\t\tdemo_url\n\t\t\t\tarticle_url\n\t\t\t\ticon {\n\t\t\t\t\tfilename_disk\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t": types.Project_TranslationsDocument, @@ -75,6 +77,10 @@ export function graphql(source: "\n\t\tmutation Update_article_translations_item * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql(source: "\n\t\tquery AboutMeQuery($pageLang: String!) {\n\t\t\tglobal_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) {\n\t\t\t\tabout\n\t\t\t}\n\t\t}\n\t"): typeof import('./graphql').AboutMeQueryDocument; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n\t\tquery SplashInfo($pageLang: String!) {\n\t\t\thome_page_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) {\n\t\t\t\theadline\n\t\t\t\tsubheadline\n\t\t\t\tdescription\n\t\t\t}\n\t\t}\n\t"): typeof import('./graphql').SplashInfoDocument; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/graphql/graphql.ts b/src/graphql/graphql.ts index c5ec537..278a185 100644 --- a/src/graphql/graphql.ts +++ b/src/graphql/graphql.ts @@ -1076,6 +1076,9 @@ export type Subscription = { directus_activity_mutated?: Maybe; directus_comments_mutated?: Maybe; directus_dashboards_mutated?: Maybe; + directus_deployment_projects_mutated?: Maybe; + directus_deployment_runs_mutated?: Maybe; + directus_deployments_mutated?: Maybe; directus_files_mutated?: Maybe; directus_flows_mutated?: Maybe; directus_folders_mutated?: Maybe; @@ -1092,7 +1095,6 @@ export type Subscription = { directus_translations_mutated?: Maybe; directus_users_mutated?: Maybe; directus_versions_mutated?: Maybe; - directus_webhooks_mutated?: Maybe; global_mutated?: Maybe; global_translations_mutated?: Maybe; home_page_mutated?: Maybe; @@ -1144,6 +1146,21 @@ export type SubscriptionDirectus_Dashboards_MutatedArgs = { }; +export type SubscriptionDirectus_Deployment_Projects_MutatedArgs = { + event?: InputMaybe; +}; + + +export type SubscriptionDirectus_Deployment_Runs_MutatedArgs = { + event?: InputMaybe; +}; + + +export type SubscriptionDirectus_Deployments_MutatedArgs = { + event?: InputMaybe; +}; + + export type SubscriptionDirectus_Files_MutatedArgs = { event?: InputMaybe; }; @@ -1224,11 +1241,6 @@ export type SubscriptionDirectus_Versions_MutatedArgs = { }; -export type SubscriptionDirectus_Webhooks_MutatedArgs = { - event?: InputMaybe; -}; - - export type SubscriptionGlobal_MutatedArgs = { event?: InputMaybe; }; @@ -1333,7 +1345,6 @@ export type Appeal_Mutated = { export type Article = { __typename?: 'article'; id: Scalars['ID']['output']; - title?: Maybe; translations?: Maybe>>; translations_func?: Maybe; }; @@ -1365,7 +1376,6 @@ export type Article_Aggregated = { export type Article_Aggregated_Count = { __typename?: 'article_aggregated_count'; id?: Maybe; - title?: Maybe; translations?: Maybe; }; @@ -1378,7 +1388,6 @@ export type Article_Filter = { _and?: InputMaybe>>; _or?: InputMaybe>>; id?: InputMaybe; - title?: InputMaybe; translations?: InputMaybe; translations_func?: InputMaybe; }; @@ -1671,7 +1680,6 @@ export type Create_Appeal_Input = { export type Create_Article_Input = { id?: InputMaybe; - title?: InputMaybe; translations?: InputMaybe>>; }; @@ -2146,6 +2154,206 @@ export type Directus_Dashboards_Mutated = { key: Scalars['ID']['output']; }; +export type Directus_Deployment_Projects = { + __typename?: 'directus_deployment_projects'; + date_created?: Maybe; + date_created_func?: Maybe; + deployment?: Maybe; + external_id: Scalars['String']['output']; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + runs?: Maybe>>; + runs_func?: Maybe; + user_created?: Maybe; +}; + + +export type Directus_Deployment_ProjectsDeploymentArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type Directus_Deployment_ProjectsRunsArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type Directus_Deployment_ProjectsUser_CreatedArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type Directus_Deployment_Projects_Filter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; + date_created?: InputMaybe; + date_created_func?: InputMaybe; + deployment?: InputMaybe; + external_id?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + runs?: InputMaybe; + runs_func?: InputMaybe; + user_created?: InputMaybe; +}; + +export type Directus_Deployment_Projects_Mutated = { + __typename?: 'directus_deployment_projects_mutated'; + data?: Maybe; + event?: Maybe; + key: Scalars['ID']['output']; +}; + +export type Directus_Deployment_Projects_Quantifier_Filter = { + _and?: InputMaybe>>; + _none?: InputMaybe; + _or?: InputMaybe>>; + _some?: InputMaybe; + date_created?: InputMaybe; + date_created_func?: InputMaybe; + deployment?: InputMaybe; + external_id?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + runs?: InputMaybe; + runs_func?: InputMaybe; + user_created?: InputMaybe; +}; + +export type Directus_Deployment_Runs = { + __typename?: 'directus_deployment_runs'; + date_created?: Maybe; + date_created_func?: Maybe; + external_id: Scalars['String']['output']; + id: Scalars['ID']['output']; + project?: Maybe; + target: Scalars['String']['output']; + user_created?: Maybe; +}; + + +export type Directus_Deployment_RunsProjectArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type Directus_Deployment_RunsUser_CreatedArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type Directus_Deployment_Runs_Filter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; + date_created?: InputMaybe; + date_created_func?: InputMaybe; + external_id?: InputMaybe; + id?: InputMaybe; + project?: InputMaybe; + target?: InputMaybe; + user_created?: InputMaybe; +}; + +export type Directus_Deployment_Runs_Mutated = { + __typename?: 'directus_deployment_runs_mutated'; + data?: Maybe; + event?: Maybe; + key: Scalars['ID']['output']; +}; + +export type Directus_Deployment_Runs_Quantifier_Filter = { + _and?: InputMaybe>>; + _none?: InputMaybe; + _or?: InputMaybe>>; + _some?: InputMaybe; + date_created?: InputMaybe; + date_created_func?: InputMaybe; + external_id?: InputMaybe; + id?: InputMaybe; + project?: InputMaybe; + target?: InputMaybe; + user_created?: InputMaybe; +}; + +export type Directus_Deployments = { + __typename?: 'directus_deployments'; + credentials?: Maybe; + date_created?: Maybe; + date_created_func?: Maybe; + id: Scalars['ID']['output']; + options?: Maybe; + options_func?: Maybe; + projects?: Maybe>>; + projects_func?: Maybe; + provider: Scalars['String']['output']; + user_created?: Maybe; +}; + + +export type Directus_DeploymentsProjectsArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type Directus_DeploymentsUser_CreatedArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + page?: InputMaybe; + search?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type Directus_Deployments_Filter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; + credentials?: InputMaybe; + date_created?: InputMaybe; + date_created_func?: InputMaybe; + id?: InputMaybe; + options?: InputMaybe; + options_func?: InputMaybe; + projects?: InputMaybe; + projects_func?: InputMaybe; + provider?: InputMaybe; + user_created?: InputMaybe; +}; + +export type Directus_Deployments_Mutated = { + __typename?: 'directus_deployments_mutated'; + data?: Maybe; + event?: Maybe; + key: Scalars['ID']['output']; +}; + export type Directus_Files = { __typename?: 'directus_files'; charset?: Maybe; @@ -2975,10 +3183,30 @@ export type Directus_Roles_Quantifier_Filter = { export type Directus_Settings = { __typename?: 'directus_settings'; + ai_anthropic_allowed_models?: Maybe; + ai_anthropic_allowed_models_func?: Maybe; + ai_anthropic_api_key?: Maybe; + ai_google_allowed_models?: Maybe; + ai_google_allowed_models_func?: Maybe; + ai_google_api_key?: Maybe; + ai_openai_allowed_models?: Maybe; + ai_openai_allowed_models_func?: Maybe; + ai_openai_api_key?: Maybe; + ai_openai_compatible_api_key?: Maybe; + ai_openai_compatible_base_url?: Maybe; + ai_openai_compatible_headers?: Maybe; + ai_openai_compatible_headers_func?: Maybe; + ai_openai_compatible_models?: Maybe; + ai_openai_compatible_models_func?: Maybe; + ai_openai_compatible_name?: Maybe; + /** $t:fields.directus_settings.ai_system_prompt_note */ + ai_system_prompt?: Maybe; auth_login_attempts?: Maybe; auth_password_policy?: Maybe; basemaps?: Maybe; basemaps_func?: Maybe; + /** $t:fields.directus_settings.collaborative_editing_note */ + collaborative_editing_enabled: Scalars['Boolean']['output']; custom_aspect_ratios?: Maybe; custom_aspect_ratios_func?: Maybe; custom_css?: Maybe; @@ -3390,39 +3618,6 @@ export type Directus_Versions_Mutated = { key: Scalars['ID']['output']; }; -export type Directus_Webhooks = { - __typename?: 'directus_webhooks'; - actions: Array>; - collections: Array>; - data?: Maybe; - headers?: Maybe; - headers_func?: Maybe; - id: Scalars['ID']['output']; - method?: Maybe; - migrated_flow?: Maybe; - name: Scalars['String']['output']; - status?: Maybe; - url: Scalars['String']['output']; - was_active_before_deprecation: Scalars['Boolean']['output']; -}; - - -export type Directus_WebhooksMigrated_FlowArgs = { - filter?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; - page?: InputMaybe; - search?: InputMaybe; - sort?: InputMaybe>>; -}; - -export type Directus_Webhooks_Mutated = { - __typename?: 'directus_webhooks_mutated'; - data?: Maybe; - event?: Maybe; - key: Scalars['ID']['output']; -}; - export type Global = { __typename?: 'global'; email: Scalars['String']['output']; @@ -4017,7 +4212,6 @@ export type Update_Appeal_Input = { export type Update_Article_Input = { id?: InputMaybe; - title?: InputMaybe; translations?: InputMaybe>>; }; @@ -4233,7 +4427,6 @@ export type Version_Appeal = { export type Version_Article = { __typename?: 'version_article'; id?: Maybe; - title?: Maybe; translations?: Maybe; }; @@ -4394,6 +4587,13 @@ export type AboutMeQueryQueryVariables = Exact<{ export type AboutMeQueryQuery = { __typename?: 'Query', global_translations: Array<{ __typename?: 'global_translations', about?: string | null }> }; +export type SplashInfoQueryVariables = Exact<{ + pageLang: Scalars['String']['input']; +}>; + + +export type SplashInfoQuery = { __typename?: 'Query', home_page_translations: Array<{ __typename?: 'home_page_translations', headline?: string | null, subheadline?: string | null, description?: string | null }> }; + export type ContactsQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -4573,6 +4773,15 @@ export const AboutMeQueryDocument = new TypedDocumentString(` } } `) as unknown as TypedDocumentString; +export const SplashInfoDocument = new TypedDocumentString(` + query SplashInfo($pageLang: String!) { + home_page_translations(filter: {languages_code: {code: {_contains: $pageLang}}}) { + headline + subheadline + description + } +} + `) as unknown as TypedDocumentString; export const ContactsQueryDocument = new TypedDocumentString(` query ContactsQuery { global { diff --git a/src/i18n/en/ui.ts b/src/i18n/en/ui.ts index 53e14a8..f8284aa 100644 --- a/src/i18n/en/ui.ts +++ b/src/i18n/en/ui.ts @@ -25,10 +25,6 @@ export default { "navigation.about": "About me", "navigation.contacts": "Contacts", /* Home page */ - "splash.headline": "Hello, I'am Sergey", - "splash.subheadline": "Fullstack web-developer & freelancer", - "splash.description": - "I develop websites and web applications of varying complexity, and also publish articles and tutorials on various IT topics.", "splash.about": "about me", "splash.contact": "text me", /* Recent articles */ diff --git a/src/i18n/ru/ui.ts b/src/i18n/ru/ui.ts index 707f401..f799b32 100644 --- a/src/i18n/ru/ui.ts +++ b/src/i18n/ru/ui.ts @@ -25,10 +25,6 @@ export default { "navigation.about": "Обо мне", "navigation.contacts": "Контакты", /* Home page */ - "splash.headline": "Hello, I'am Sergey", - "splash.subheadline": "Fullstack web-developer & freelancer", - "splash.description": - "Я занимаюсь разработкой веб-сайтов и веб-приложений разной сложности, а также публикую статьи и туториалы на разные IT темы.", "splash.about": "обо мне", "splash.contact": "написать мне", /* Recent articles */ diff --git a/src/queries/global.ts b/src/queries/global.ts index ae8c8d4..326fc73 100644 --- a/src/queries/global.ts +++ b/src/queries/global.ts @@ -17,6 +17,24 @@ export async function getAboutMe(pageLang: string) { return result.data.global_translations[0]; } +export async function getSplashInfo(pageLang: string) { + const SplashInfoQuery = graphql(` + query SplashInfo($pageLang: String!) { + home_page_translations(filter: { languages_code: { code: { _contains: $pageLang } } }) { + headline + subheadline + description + } + } + `); + + const result = await execute(SplashInfoQuery, { pageLang }); + + if (!result.data || result.data.home_page_translations.length === 0) return null; + + return result.data.home_page_translations[0]; +} + export async function getContacts() { const ContactsQuery = graphql(` query ContactsQuery { diff --git a/src/templates/Home.astro b/src/templates/Home.astro index b238daf..6c802a3 100644 --- a/src/templates/Home.astro +++ b/src/templates/Home.astro @@ -7,8 +7,10 @@ import SplashLink from "@components/Splash/SplashLink.astro"; import RecentArticles from "@components/RecentArticles.astro"; import UIString from "@components/UIString.astro"; import { getLanguageFromURL, useTranslation } from "@root/i18n/utils"; +import { getSplashInfo } from "../queries"; const pageLang = getLanguageFromURL(Astro.url.pathname); +const data = await getSplashInfo(pageLang); const t = useTranslation(Astro); --- @@ -16,10 +18,10 @@ const t = useTranslation(Astro);
-

-

Fullstack web-developer & freelancer

+

{data?.headline}

+

{data?.subheadline}

-

+

{data?.description}