diff --git a/elixir-api/lib/routes/api/v1/about.ex b/elixir-api/lib/routes/api/v1/about.ex index 39b812da9..be25d0ebd 100644 --- a/elixir-api/lib/routes/api/v1/about.ex +++ b/elixir-api/lib/routes/api/v1/about.ex @@ -32,13 +32,9 @@ defmodule Router.Api.V1.About do ["'objectID'", "_id"], "_rev", "_type", - "at", "bio", "body", - "now", - "location", "contact", - "fullname", %{ "timeline[]" => [ "title", diff --git a/elixir-api/lib/routes/api/v1/project.ex b/elixir-api/lib/routes/api/v1/project.ex index e84d96e6c..e48074d39 100644 --- a/elixir-api/lib/routes/api/v1/project.ex +++ b/elixir-api/lib/routes/api/v1/project.ex @@ -76,20 +76,26 @@ defmodule Router.Api.V1.Project do _ -> 1 end - case params["lang"] do - "en" -> result - "fr" -> Translate.translate(:project, result, "fr", "en") - _ -> conn |> error_res(400, "Invalid request", "Invalid language") |> halt() - end - |> case do - {:error, message} -> - Logger.error("Error translating post: #{inspect(message)}") - result + translated_result = + case params["lang"] do + "en" -> result + "fr" -> Translate.translate(:project, result, "fr", "en") + _ -> conn |> error_res(400, "Invalid request", "Invalid language") |> halt() + end + |> case do + {:error, message} -> + Logger.error("Error translating post: #{inspect(message)}") + result + + translated_result -> + translated_result + end - translated_result -> - translated_result - end - |> Kernel.put_in(["result", "headings"], PT.build_summary(& &1["result"]["body"])) + Kernel.put_in( + translated_result, + ["result", "headings"], + PT.build_summary(translated_result["result"]["body"]) + ) |> Map.put("meta", %{ "total" => count, "count" => count, diff --git a/sanity-cms/schemas/author.ts b/sanity-cms/schemas/author.ts index 790acac00..2683a9d65 100644 --- a/sanity-cms/schemas/author.ts +++ b/sanity-cms/schemas/author.ts @@ -14,18 +14,6 @@ export default { type: 'string', validation: (Rule: Rule) => Rule.required() }, - { - name: 'fullname', - title: 'Full name', - type: 'string', - validation: (Rule: Rule) => Rule.required() - }, - { - name: 'at', - title: '@username', - type: 'string', - validation: (Rule: Rule) => Rule.required() - }, { name: 'image', title: 'Image', @@ -41,13 +29,6 @@ export default { of: BodyBlocks, validation: (Rule: Rule) => Rule.required() }, - { - name: 'now', - title: 'Now', - type: 'array', - of: BodyBlocks, - validation: (Rule: Rule) => Rule.required() - }, Body, { name: 'contact', diff --git a/sanity-cms/schemas/settings.ts b/sanity-cms/schemas/settings.ts index 2f0da9804..8299ae8f0 100644 --- a/sanity-cms/schemas/settings.ts +++ b/sanity-cms/schemas/settings.ts @@ -9,10 +9,6 @@ export default { name: 'pages', title: 'Pages' }, - { - name: 'experiments', - title: 'Experiments' - }, { name: 'links', title: 'Links' diff --git a/svelte-app/src/app.scss b/svelte-app/src/app.scss index 5f64da3dd..0e58e7540 100644 --- a/svelte-app/src/app.scss +++ b/svelte-app/src/app.scss @@ -30,7 +30,7 @@ img { body { @apply h-full w-full overflow-x-hidden; - background-color: $dark; + background-color: $dark; --textColour: $light; &.light { diff --git a/svelte-app/src/components/nav.svelte b/svelte-app/src/components/nav.svelte index 545a70c71..438a0acb2 100644 --- a/svelte-app/src/components/nav.svelte +++ b/svelte-app/src/components/nav.svelte @@ -3,75 +3,72 @@ import { slide } from 'svelte/transition'; import { linkTo } from '$i18n'; - import { BASE_ANIMATION_DURATION, TOP_LEVEL_ROUTES } from '$lib/consts'; + import { BASE_ANIMATION_DURATION, NAV_LINKS } from '$lib/consts'; import { navOpen } from '$stores/navigation'; import LanguageControls from '$components/controls/language-toggle.svelte'; import MenuToggle from '$components/controls/menu-toggle.svelte'; import ThemeToggle from '$components/controls/theme-toggle.svelte'; + import Hoverable from '$components/hoverable.svelte'; import NavLink from '$components/nav/nav-link.svelte'; - const navLinks = TOP_LEVEL_ROUTES.filter((route) => !route.hidden)?.map((route) => ({ - name: route.name, - url: route.path - })); + let hovered = false;