diff --git a/src/TopNav.php b/src/TopNav.php
index 285fb506..986a18cd 100644
--- a/src/TopNav.php
+++ b/src/TopNav.php
@@ -2,21 +2,29 @@
namespace App;
use Symfony\Contracts\Translation\TranslatorInterface;
+
+enum TopNavItemType {
+ case Link;
+ case Dropdown;
+ case ThemeToggle;
+}
+
class TopNav
{
public function __construct(TranslatorInterface $tr)
{
$this->navbar = [
- [$tr->trans('News'), '/news'],
- [$tr->trans('Download'), '/download'],
- [$tr->trans('Get Involved'), '/get-involved'],
- [[$tr->trans('Documentation'), $tr->trans('Docs')], '/documentation'],
- [$tr->trans('Forum'), '/forum'],
- [[$tr->trans('Sharing Platform'), $tr->trans('Share')], '/lsp'],
+ [$tr->trans('News'), '/news', TopNavItemType::Link],
+ [$tr->trans('Download'), '/download', TopNavItemType::Link],
+ [$tr->trans('Get Involved'), '/get-involved', TopNavItemType::Link],
+ [[$tr->trans('Documentation'), $tr->trans('Docs')], '/documentation', TopNavItemType::Link],
+ [$tr->trans('Forum'), '/forum', TopNavItemType::Link],
+ [[$tr->trans('Sharing Platform'), $tr->trans('Share')], '/lsp', TopNavItemType::Link],
[$tr->trans('More'), null, [
['fa-eye', $tr->trans('Showcase'), '/showcase'],
['fa-trophy', $tr->trans('Competitions'), '/competitions'],
- ['fa-tags', $tr->trans('Branding'), '/branding']]],
+ ['fa-tags', $tr->trans('Branding'), '/branding']], TopNavItemType::Link],
+ [$tr->trans('Theme'), null, TopNavItemType::Link]
];
}
diff --git a/templates/macros.twig b/templates/macros.twig
index 1924f089..2bf8a7c5 100644
--- a/templates/macros.twig
+++ b/templates/macros.twig
@@ -62,7 +62,7 @@
{% set extension = file_name|split('.')|last %}
{{file_name}}
({{macros.get_file_description(extension)|trim}})
-
+
{% endif %}
{% endfor %}