Skip to content

Commit

Permalink
feat: improve UX
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalaforge committed Jan 18, 2024
1 parent adf07d0 commit 789762f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 22 deletions.
1 change: 1 addition & 0 deletions docs/src/components/ChallengeFooter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const npxCommand = `npx nx serve ${command}`;
{command &&
<aside aria-label="Note" class="starlight-aside starlight-aside--note"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path d="M12 11C11.7348 11 11.4804 11.1054 11.2929 11.2929C11.1054 11.4804 11 11.7348 11 12V16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16V12C13 11.7348 12.8946 11.4804 12.7071 11.2929C12.5196 11.1054 12.2652 11 12 11ZM12.38 7.08C12.1365 6.97998 11.8635 6.97998 11.62 7.08C11.4973 7.12759 11.3851 7.19896 11.29 7.29C11.2017 7.3872 11.1306 7.49882 11.08 7.62C11.024 7.73868 10.9966 7.86882 11 8C10.9992 8.13161 11.0245 8.26207 11.0742 8.38391C11.124 8.50574 11.1973 8.61656 11.29 8.71C11.3872 8.79833 11.4988 8.86936 11.62 8.92C11.7715 8.98224 11.936 9.00632 12.099 8.99011C12.2619 8.97391 12.4184 8.91792 12.5547 8.82707C12.691 8.73622 12.8029 8.61328 12.8805 8.46907C12.9582 8.32486 12.9992 8.16378 13 8C12.9963 7.73523 12.8927 7.48163 12.71 7.29C12.6149 7.19896 12.5028 7.12759 12.38 7.08ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z"></path></svg>
{labels['challenge.footer.note'] ?? 'Note'}</p><section class="starlight-aside__content">
<p>{labels['challenge.footer.gettingStarted.title'] ?? 'To do this challenge, start by reading: '} <a href="/guides/getting-started">{labels['challenge.footer.gettingStarted.link'] ?? 'Getting Started'}</a>.</p>
<p>{labels['challenge.footer.running'] ?? 'Start the project by running:'} <code class="code" dir="auto">{npxCommand}
<ClipboardCopy copyText={npxCommand} />
</code></p></section></aside>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ const i18n = defineCollection({
'challenge.footer.communityAnswers': z.string(),
'challenge.footer.authorAnswer': z.string(),
'challenge.footer.blogPost': z.string(),
'challenge.footer.gettingStarted': z.object({
title: z.string(),
link: z.string(),
}),
})
.partial(),
}),
Expand Down
28 changes: 21 additions & 7 deletions docs/src/content/i18n/ es.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,25 @@
"buttons.star": "Danos una estrella",
"buttons.sponsor": "Patrocínanos",

"challenge.footer.note": "Nota",
"challenge.footer.running": "Inicia el proyecto ejecutando el siguiente comando:",
"challenge.footer.start": "El título de tu PR debe iniciar con",
"challenge.footer.reminder": "¡No lo olvides!",
"challenge.footer.communityAnswers": "Respuestas de la Comunidad",
"challenge.footer.authorAnswer": "Respuesta del Autor del Reto",
"challenge.footer.blogPost": "Blog Post"
"note": "Nota",
"running": "Inicia el proyecto ejecutando el siguiente comando:",
"start": "El título de tu PR debe iniciar con",
"reminder": "¡No lo olvides!",
"communityAnswers": "Respuestas de la Comunidad",
"authorAnswer": "Respuesta del Autor del Reto",
"blogPost": "Blog Post",

"challenge.footer": {
"note": "Nota",
"running": "Inicia el proyecto ejecutando el siguiente comando:",
"start": "El título de tu PR debe iniciar con",
"reminder": "¡No lo olvides!",
"communityAnswers": "Respuestas de la Comunidad",
"authorAnswer": "Respuesta del Autor del Reto",
"blogPost": "Blog Post",
"gettingStarted": {
"title": "Para realizar este desafío, comienza por leer: ",
"link": "Inicio"
}
}
}
20 changes: 13 additions & 7 deletions docs/src/content/i18n/ fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"buttons.star": "Donne une étoile",
"buttons.sponsor": "Sponsorise",

"challenge.footer.note": "Note",
"challenge.footer.running": "Démarre le projet en exécutant:",
"challenge.footer.start": "Le titre de ta PR doit commencer par",
"challenge.footer.reminder": "Rappel",
"challenge.footer.communityAnswers": "Solution de la communauté",
"challenge.footer.authorAnswer": "Solution de l'auteur",
"challenge.footer.blogPost": "Article"
"challenge.footer": {
"note": "Note",
"running": "Démarre le projet en exécutant:",
"start": "Le titre de ta PR doit commencer par",
"reminder": "Rappel",
"communityAnswers": "Solution de la communauté",
"authorAnswer": "Solution de l'auteur",
"blogPost": "Article",
"gettingStarted": {
"title": "Pour faire ce challenge, commencer par lire: ",
"link": "Comment Démarrer"
}
}
}
22 changes: 14 additions & 8 deletions docs/src/content/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@
"buttons.star": "Dar uma estrela",
"buttons.sponsor": "Patrocinar",

"challenge.footer.note": "Nota",
"challenge.footer.running": "Rode o projeto executando o comando:",
"challenge.footer.start": "O título do seu PR deve começar com",
"challenge.footer.reminder": "Não esqueça",
"challenge.footer.communityAnswers": "Solução da Comunidade",
"challenge.footer.authorAnswer": "Solução do Autor do Desafio",
"challenge.footer.blogPost": "Artigo",
"404.text": "Página não encontrada. Verifique a URL ou tente usar a barra de busca.",

"404.text": "Página não encontrada. Verifique a URL ou tente usar a barra de busca."
"challenge.footer": {
"note": "Nota",
"running": "Rode o projeto executando o comando:",
"start": "O título do seu PR deve começar com",
"reminder": "Não esqueça",
"communityAnswers": "Solução da Comunidade",
"authorAnswer": "Solução do Autor do Desafio",
"blogPost": "Artigo",
"gettingStarted": {
"title": "Para realizar este desafio, comece lendo: ",
"link": "Começando"
}
}
}

0 comments on commit 789762f

Please sign in to comment.