Add Github button to navbar

This commit is contained in:
VityaSchel
2023-10-02 19:07:04 +04:00
parent 755654cf9d
commit f0c1347bbd
3 changed files with 15 additions and 9 deletions

View File

@@ -1,17 +1,13 @@
# Schedule for колледж связи пгути # Schedule for колледж связи пгути
- [Schedule for колледж связи пгути](#schedule-for-колледж-связи-пгути)
- [Tech stack](#tech-stack)
- [Hire me!](#hire-me)
Reskin of https://lk.ks.psuti.ru/ since it lacks mobile support and is generally ugly. Reskin of https://lk.ks.psuti.ru/ since it lacks mobile support and is generally ugly.
![TODO: screenshot](TODO: screenshot) ![Screenshot](https://github.com/VityaSchel/kspguti-schedule/assets/59040542/07cc1f67-ccb0-4522-a59d-16387fa11987#gh-dark-mode-only)
![Screenshot](https://github.com/VityaSchel/kspguti-schedule/assets/59040542/7bd26798-5ec1-4033-a9ca-84ffa0c44f52#gh-light-mode-only)
[Visit website](TODO: host anywhere in Russia) [Visit website](TODO: host anywhere in Russia)
## Tech stack ## Tech stack & features
- React with Next.js v13.5 (pages router) - React with Next.js v13.5 (pages router)
- Tailwind CSS. This is my first project using it, after using SCSS Modules for many years - Tailwind CSS. This is my first project using it, after using SCSS Modules for many years
@@ -20,6 +16,8 @@ Reskin of https://lk.ks.psuti.ru/ since it lacks mobile support and is generally
- TypeScript with types for each package - TypeScript with types for each package
- Telegram Bot API (via [node-telegram-bot-api]) for parsing failure notifications - Telegram Bot API (via [node-telegram-bot-api]) for parsing failure notifications
- Custom [js parser for teachers' photos](https://gist.github.com/VityaSchel/28f1a360ee7798511765910b39c6086c) - Custom [js parser for teachers' photos](https://gist.github.com/VityaSchel/28f1a360ee7798511765910b39c6086c)
- Accessability & tab navigation support
- Dark theme with automatic switching based on system settings
Built under 1 day. Tools used: pnpm, eslint, react-icons. Built under 1 day. Tools used: pnpm, eslint, react-icons.

View File

@@ -24,7 +24,7 @@ export function AddGroupButton() {
return ( return (
<> <>
<Button variant='secondary' onClick={handleOpenPopup}><MdAdd /></Button> <Button variant='secondary' size='icon' onClick={handleOpenPopup}><MdAdd /></Button>
<Popup open={popupVisible} onClose={() => setPopupVisible(false)} /> <Popup open={popupVisible} onClose={() => setPopupVisible(false)} />
</> </>
) )

View File

@@ -4,6 +4,7 @@ import { Button } from '@/shadcn/ui/button'
import { useTheme } from 'next-themes' import { useTheme } from 'next-themes'
import Link from 'next/link' import Link from 'next/link'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
import { FaGithub } from 'react-icons/fa'
export function NavBar() { export function NavBar() {
const { resolvedTheme, theme } = useTheme() const { resolvedTheme, theme } = useTheme()
@@ -16,7 +17,14 @@ export function NavBar() {
<NavBarItem url="/pks35k">ПКС-35к</NavBarItem> <NavBarItem url="/pks35k">ПКС-35к</NavBarItem>
<AddGroupButton /> <AddGroupButton />
</ul> </ul>
<div className='flex gap-1 min-[500px]:gap-2'>
<Link href='https://github.com/VityaSchel/kspguti-schedule' target='_blank' rel='nofollower noreferrer'>
<Button variant='outline' size='icon' tabIndex={-1}>
<FaGithub />
</Button>
</Link>
<ThemeSwitcher /> <ThemeSwitcher />
</div>
</nav> </nav>
</header> </header>
) )