diff --git a/src/components/StickyNav.astro b/src/components/StickyNav.astro
new file mode 100644
index 0000000..73c2d0c
--- /dev/null
+++ b/src/components/StickyNav.astro
@@ -0,0 +1,101 @@
+---
+import { getRelativeLocaleUrl } from "astro:i18n";
+import { useTranslations } from "../i18n/utils";
+
+interface Props {
+ id: string;
+ total: number;
+ prev: { slug: string; title: string } | null;
+ next: { slug: string; title: string } | null;
+}
+
+const { id, total, prev, next } = Astro.props;
+const lang = (Astro.currentLocale as "es" | "en") || "es";
+const t = useTranslations(lang);
+const tipPath = lang === "es" ? "consejo" : "tip";
+---
+
+
+
+
+
+
+
+
+
+ {prev ? (
+
+
+
+ ) : (
+
+ )}
+
+
+ 100cosasdev
+ #{id} / {total}
+
+
+ {next ? (
+
+
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/TipPage.astro b/src/components/TipPage.astro
index 8f3c25a..e88c440 100644
--- a/src/components/TipPage.astro
+++ b/src/components/TipPage.astro
@@ -3,6 +3,7 @@ import { getEntry, getCollection, render, type CollectionEntry } from "astro:con
import Layout from "../layouts/Layout.astro"
import Navbar from "./Navbar.astro"
import Footer from "./Footer.astro"
+import StickyNav from "./StickyNav.astro"
import { getRelativeLocaleUrl } from "astro:i18n"
import { useTranslations } from "../i18n/utils"
@@ -21,7 +22,7 @@ interface Props {
next?: TipNavItem | null
}
-const { entry, total, alternateUrl, canonical, noindex = false, prev, next } = Astro.props
+const { entry, total, alternateUrl, canonical, noindex = false, prev = null, next = null } = Astro.props
const { Content } = await render(entry)
const { id, title, category, author: authorId, categoryColor } = entry.data
const description = (entry.body ?? "").slice(0, 160).replace(/[#>]/g, "").trim()
@@ -358,17 +359,9 @@ const jsonLd = {
+
+
-
-
diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts
index 380fab6..ac09cd3 100644
--- a/src/i18n/ui.ts
+++ b/src/i18n/ui.ts
@@ -57,6 +57,8 @@ export const ui = {
'tip.more_by_author': 'Más de este autor',
'tip.view_profile': 'Ver perfil',
'tip.category_label': 'Categoría',
+ 'tip.mark_completed': '¿Completar?',
+ 'tip.completed': 'Completado',
'author.title': 'Autor',
'author.tips': 'Consejos de',
'book.download': 'Descargar gratis',
@@ -122,6 +124,8 @@ export const ui = {
'tip.more_by_author': 'More by this author',
'tip.view_profile': 'View profile',
'tip.category_label': 'Category',
+ 'tip.mark_completed': 'Complete?',
+ 'tip.completed': 'Completed',
'author.title': 'Author',
'author.tips': 'Tips by',
'book.download': 'Download free',