diff --git a/elixir-api/lib/routes/api/v1/tag.ex b/elixir-api/lib/routes/api/v1/tag.ex
index 8675e0da7..478de8c3f 100644
--- a/elixir-api/lib/routes/api/v1/tag.ex
+++ b/elixir-api/lib/routes/api/v1/tag.ex
@@ -35,10 +35,10 @@ defmodule Router.Api.V1.Tag do
])
|> Query.project([
"_id",
- ["'objectID'", "_id"],
"_rev",
"_type",
"title",
+ "views",
"publishedAt",
%{
"tags[]" => [
@@ -46,7 +46,7 @@ defmodule Router.Api.V1.Tag do
"title",
"slug"
],
- :follow => true
+ :join => "->"
},
"slug",
"body",
@@ -74,17 +74,34 @@ defmodule Router.Api.V1.Tag do
parsed_counts = Task.await(counts)
{transformed_result, meta, code} =
- transform_result_document(query, result, :tag, params, %{
- "total" => parsed_counts["result"]["total"],
- "count" => parsed_counts["result"]["count"],
- "id" => id,
- "type" => params["type"]
- })
+ transform_result_document(
+ query,
+ result,
+ String.to_atom(params["type"] <> "s"),
+ params,
+ %{
+ "total" => parsed_counts["result"]["total"],
+ "count" => parsed_counts["result"]["count"]
+ }
+ )
+
+ # parsed_counts = Task.await(counts)
+
+ # {transformed_result, meta, code} =
+ # transform_result_document(query, result, :tag, params, %{
+ # "total" => parsed_counts["result"]["total"],
+ # "count" => parsed_counts["result"]["count"],
+ # "id" => id,
+ # "type" => params["type"]
+ # })
update_meta_and_send_response(conn, code, transformed_result, meta, duration)
end)
else
false ->
+ {:ok, params} = validate_query_params(conn, %{"type" => nil})
+ Logger.info("type param: #{inspect(params["type"])}")
+ Logger.info("ID: #{inspect(id)}")
conn |> error_res(400, "Invalid request", [%{message: "Missing ID or invalid type"}])
{:error, reason} ->
diff --git a/elixir-api/lib/routes/api/v1/tags.ex b/elixir-api/lib/routes/api/v1/tags.ex
index ca8979938..f29549dbf 100644
--- a/elixir-api/lib/routes/api/v1/tags.ex
+++ b/elixir-api/lib/routes/api/v1/tags.ex
@@ -28,8 +28,9 @@ defmodule Router.Api.V1.Tags do
|> Query.project([
"_id",
"_rev",
- ["'objectID'", "_id"],
"_type",
+ "_createdAt",
+ "_updatedAt",
"title",
"slug"
])
diff --git a/svelte-app/src/components/about/timeline-item.svelte b/svelte-app/src/components/about/timeline-item.svelte
index 60b32e708..612be3a0f 100644
--- a/svelte-app/src/components/about/timeline-item.svelte
+++ b/svelte-app/src/components/about/timeline-item.svelte
@@ -18,10 +18,11 @@
class:pb-4={!last}
>
+ class="bullet block flex-shrink-0 rounded-xs text-orange-dark dark:text-orange-light"
+ >→
-
+
{title}
@@ -43,13 +44,14 @@
$bulletTopMargin: 13px;
$bulletSize: 6px;
- $lineWidth: 2px;
+ $lineWidth: 1px;
$lineGap: 14px;
.bullet {
margin-top: $bulletTopMargin;
width: $bulletSize;
height: $bulletSize;
+ line-height: $bulletSize;
}
.content {
@@ -60,18 +62,18 @@
}
&:before {
- @apply absolute bg-dark/20;
+ @apply absolute border-l border-dashed border-neutral-200 transition-colors;
$baseSpaceFromTop: $bulletTopMargin + $bulletSize;
content: '';
top: #{$bulletTopMargin + $bulletSize + $lineGap};
bottom: #{0px + $lineGap - $bulletTopMargin};
- left: #{$bulletSize * 2 + $lineWidth};
+ left: #{$bulletSize * 2};
width: $lineWidth;
@include dark {
- @apply bg-white/20;
+ @apply border-neutral-400;
}
}
}
diff --git a/svelte-app/src/components/about/timeline-section.svelte b/svelte-app/src/components/about/timeline-section.svelte
index 0356ba87d..22c33e68d 100644
--- a/svelte-app/src/components/about/timeline-section.svelte
+++ b/svelte-app/src/components/about/timeline-section.svelte
@@ -15,7 +15,7 @@
{title}
diff --git a/svelte-app/src/components/code-block.svelte b/svelte-app/src/components/code-block.svelte
index e3f1874b3..8aace20c3 100644
--- a/svelte-app/src/components/code-block.svelte
+++ b/svelte-app/src/components/code-block.svelte
@@ -7,9 +7,8 @@
import { genericAsyncImport, getLangType } from '$components/code-block/imports';
import Divider from '$components/divider.svelte';
- import Icon from '$components/icon.svelte';
+ import Hoverable from '$components/hoverable.svelte';
import Spinner from '$components/loading/spinner.svelte';
- import Tooltip from '$components/tooltips/tooltip.svelte';
import type { ResolvedComponentType } from '$components/code-block/imports';
import type { LanguageType as _LanguageType } from 'svelte-highlight/languages';
@@ -79,20 +78,17 @@
>
{#if filename}
{filename}
{/if}
-
+
+
-
+
import { createEventDispatcher } from 'svelte';
- export let fullWidth = false,
+ import Hoverable from '$components/hoverable.svelte';
+
+ export let text: string,
+ placement: 'before' | 'after' = 'before',
+ dir: 'left' | 'right' | 'up' | 'down' = 'right',
align: 'left' | 'right' = 'left';
const dispatch = createEventDispatcher(),
@@ -15,21 +19,60 @@
};
-
-
-
+
+
+
+ {#if placement === 'after'}
+ {#if $$slots.default}
+
+ {:else}
+ {text}
+ {/if}
+ {/if}
+
+ {#if dir === 'left'}
+ ←
+ {:else if dir === 'right'}
+ →
+ {:else if dir === 'up'}
+ ↑
+ {:else if dir === 'down'}
+ ↓
+ {/if}
+
+ {#if placement === 'before'}
+ {#if $$slots.default}
+
+ {:else}
+ {text}
+ {/if}
+ {/if}
+
+
+
diff --git a/svelte-app/src/components/controls/language-toggle.svelte b/svelte-app/src/components/controls/language-toggle.svelte
index c9971a409..9d7a2f616 100644
--- a/svelte-app/src/components/controls/language-toggle.svelte
+++ b/svelte-app/src/components/controls/language-toggle.svelte
@@ -1,20 +1,26 @@
-
-
-
diff --git a/svelte-app/src/components/document/content/footer.svelte b/svelte-app/src/components/document/content/footer.svelte
index cc0d4d660..76d41b852 100644
--- a/svelte-app/src/components/document/content/footer.svelte
+++ b/svelte-app/src/components/document/content/footer.svelte
@@ -25,19 +25,12 @@
{/if}
-
- {#key $isMobile}
-
- {/key}
- {$t('Read more')}
-
-
+ />
diff --git a/svelte-app/src/components/document/content/header.svelte b/svelte-app/src/components/document/content/header.svelte
index 66de42c0e..7cab77bd0 100644
--- a/svelte-app/src/components/document/content/header.svelte
+++ b/svelte-app/src/components/document/content/header.svelte
@@ -5,7 +5,6 @@
import BulletPoint from '$components/bullet-point.svelte';
import ArrowButton from '$components/controls/arrow-button.svelte';
- import Icon from '$components/icon.svelte';
import Image from '$components/images/image.svelte';
import Link from '$components/link.svelte';
import ImageCarousel from '$components/portable-text/image-carousel.svelte';
@@ -62,17 +61,13 @@
{#if !data.tags?.length}
-
-
- {$t('Read more')}
-
-
+ />
{/if}
@@ -83,25 +78,26 @@
aria-label={$t('Tags')}
>
{#each data.tags as tag}
-
{tag.title.toLowerCase()}
-
+
{/each}
-
-
- {$t('Read more')}
-
-
+ />
{/if}
@@ -110,7 +106,10 @@