Skip to content

Commit

Permalink
feat: add link for rss (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung authored Nov 22, 2022
1 parent a3c354e commit 87e5efa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
14 changes: 7 additions & 7 deletions app/components/SidebarNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import templateIcon from '~/icons/layer-group.svg';
import exampleIcon from '~/icons/code.svg';
import eventIcon from '~/icons/calendar-alt.svg';
import opinionIcon from '~/icons/mail-bulk.svg';
import rssIcon from '~/icons/rss-square.svg';
import type { UserProfile } from '~/types';
import {
PaneContainer,
Expand Down Expand Up @@ -197,6 +198,9 @@ function SidebarNavigation({
<SearchLink list="history">
<SvgIcon className="w-4 h-4" href={historyIcon} /> History
</SearchLink>
{isAdministrator(profile.name) ? (
<MenuLink to="/admin">⌨ Admin</MenuLink>
) : null}
</List>
) : null}
<List title="Menu">
Expand All @@ -210,13 +214,6 @@ function SidebarNavigation({
</SearchLink>
))}
</List>
{isAdministrator(profile?.name) ? (
<List title="Administrator">
<MenuLink to="/admin/pages">🌐 Pages</MenuLink>
<MenuLink to="/admin/users">👥 Users</MenuLink>
<MenuLink to="/admin/resources">🗃 Backup / Restore</MenuLink>
</List>
) : null}
</div>
<div className="border-t">
<List>
Expand All @@ -232,6 +229,9 @@ function SidebarNavigation({
<ExternalLink href="https://www.meetup.com/pro/remix-run/">
<SvgIcon className="w-4 h-4" href={meetupIcon} /> Meetup
</ExternalLink>
<ExternalLink href="/rss.xml">
<SvgIcon className="w-4 h-4" href={rssIcon} /> RSS
</ExternalLink>
</List>
</div>
</PaneContent>
Expand Down
5 changes: 5 additions & 0 deletions app/icons/rss-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion app/routes/_layout.admin.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { LoaderArgs } from '@remix-run/cloudflare';
import { json } from '@remix-run/cloudflare';
import { Outlet, useLoaderData, useLocation } from '@remix-run/react';
import { Link, Outlet, useLoaderData, useLocation } from '@remix-run/react';
import { useMemo } from 'react';
import menuIcon from '~/icons/menu.svg';
import FlashMessage from '~/components/FlashMessage';
Expand Down Expand Up @@ -30,6 +30,19 @@ export default function Admin() {
<div className="flex-1 leading-8 line-clamp-1">Administrator</div>
</PaneHeader>
<PaneContent>
<div className="px-2.5 flex flex-row gap-4">
<Link to="pages" className="hover:underline">
Pages
</Link>
<span>/</span>
<Link to="users" className="hover:underline">
Users
</Link>
<span>/</span>
<Link to="resources" className="hover:underline">
Resources
</Link>
</div>
<Outlet />
</PaneContent>
<PaneFooter>
Expand Down

0 comments on commit 87e5efa

Please sign in to comment.