teddit-reddit-frontend-alte.../views/includes/topbar.pug

26 lines
912 B
Plaintext

div#topbar
nav
.nav-item.left
a(href="/")
img(src="/favicon.png", alt="")
| teddit
.settings
.icon-container
a(href="/about") [about]
.icon-container
a(href="/preferences") [preferences]
.top-links
if user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits)
a(href="/r/popular") Popular
a(href="/r/all") All
a(href="/saved") Saved
each subreddit in user_preferences.subbed_subreddits
a(href="/r/" + subreddit) #{subreddit}
else if instance_config.suggested_subreddits && Array.isArray(instance_config.suggested_subreddits)
each subreddit in instance_config.suggested_subreddits
if subreddit.toLowerCase() === 'saved'
a(href="/saved") Saved
else
a(href="/r/" + subreddit) #{subreddit}
a(href="/subreddits", id="sr-more-link") more »