Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/sfbrigade/compass into abou…
Browse files Browse the repository at this point in the history
…t-page
  • Loading branch information
SeldomseenSchweig committed Nov 3, 2023
2 parents ded0e8e + eda7701 commit efb5d0d
Show file tree
Hide file tree
Showing 15 changed files with 389 additions and 147 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ coverage
build
.terraform*
terraform.tfstate*
!.terraform.lock.hcl

# Ignore all .env files except .env.example
.env*
Expand Down
8 changes: 7 additions & 1 deletion src/backend/auth/options.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import GoogleProvider from "next-auth/providers/google";
import { createPersistedAuthAdapter } from "@/backend/auth/adapter";
import { KyselyDatabaseInstance } from "../lib";
import type { NextAuthOptions } from "next-auth";

export const getNextAuthOptions = (db: KyselyDatabaseInstance) => ({
export const getNextAuthOptions = (
db: KyselyDatabaseInstance
): NextAuthOptions => ({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
}),
],
adapter: createPersistedAuthAdapter(db),
pages: {
signIn: "/signInPage",
},
});
17 changes: 13 additions & 4 deletions src/components/layout/Layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
color: var(--on-background);
height: 100%;
width: 100%;
padding: 1em;
padding: 5em 3em 3em 3em;
}

.mainPurple {
Expand All @@ -24,18 +24,27 @@
background-color: var(--grey-80);
}

/* @media only screen and (max-width: 480px) {
.main {
padding: 5em 3em 3em 3em;
}
} */

@media only screen and (min-width: 480px) {
.main {
padding: 5em 3em 3em 3em;
}
}

/* Small Devices, Tablets */
@media only screen and (min-width: 768px) {
.main {
padding: 5em 3em 3em 3em;
}
}

/* Medium Devices, Desktops */
@media only screen and (min-width: 992px) {
.main {
padding: 5em;
}
}

/* Large Devices, Wide Screens */
Expand Down
30 changes: 20 additions & 10 deletions src/components/navbar/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
import React from "react";
import CloseIcon from "@mui/icons-material/Close";
import CoPresent from "@mui/icons-material/CoPresent";
import Logout from "@mui/icons-material/Logout";
import MenuIcon from "@mui/icons-material/Menu";
import PeopleOutline from "@mui/icons-material/PeopleOutline";
import Settings from "@mui/icons-material/Settings";
import AppBar from "@mui/material/AppBar";
import Box from "@mui/material/Box";
import Drawer from "@mui/material/Drawer";
import IconButton from "@mui/material/IconButton";
import List from "@mui/material/List";
import ListItem from "@mui/material/ListItem";
import Toolbar from "@mui/material/Toolbar";
import useMediaQuery from "@mui/material/useMediaQuery";
import { signOut, useSession } from "next-auth/react";
import Image from "next/image";
import Link from "next/link";
import * as React from "react";
import { MouseEventHandler } from "react";
import $navbar from "./Navbar.module.css";
import Link from "next/link";
import Image from "next/image";
Expand All @@ -7,7 +25,6 @@ import {
CoPresent,
Settings,
Logout,
Info,
} from "@mui/icons-material";
import { signOut } from "next-auth/react";
import { useSession } from "next-auth/react";
Expand All @@ -19,7 +36,7 @@ const NavBar = () => {
<>
{status === "authenticated" && (
<nav className={$navbar.sidebar}>
<Link href="/about">
<Link href="/">
<Image
src="/img/compass-logo-white.svg"
alt="logo"
Expand Down Expand Up @@ -47,11 +64,6 @@ const NavBar = () => {
<p className={$navbar.linkTitle}>Settings</p>
</Link>
<br />
<Link href="/about" className={$navbar.link}>
<Info className={$navbar.icon} />
<p className={$navbar.linkTitle}>About</p>
</Link>
<br />
<Link href="" className={$navbar.link}>
<Logout className={$navbar.icon} />
<p
Expand All @@ -67,5 +79,3 @@ const NavBar = () => {
</>
);
};

export default NavBar;
43 changes: 24 additions & 19 deletions src/components/navbar/Navbar.module.css
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
.sidebar {
flex: 2;
background-color: var(--primary-20);
.logo {
padding: 1rem;
}

.linkContainer {
.toolbar {
background-color: var(--primary-40);
display: flex;
flex-direction: column;
justify-content: space-between;
box-shadow: 0;
}

.logo {
padding-left: 28px;
padding-top: 12px;
padding-bottom: 10px;
.sidebar {
background-color: var(--primary-40);
}

.linkItem {
padding: 1.25rem 0 1.25rem calc(45% - 1.5rem * 1.5);
}

.link {
color: var(--on-primary);
padding-left: 30px;
padding-top: 12px;
padding-bottom: 12px;
display: flex;
align-items: center;
text-decoration: none;
display: flex;
}

.linkTitle {
padding-left: 8px;
padding-left: 1rem;
}

.link:hover {
background-color: #383473;
.linkItem:hover {
background-color: var(--primary-60);
}

.icon {
color: var(--on-primary);
.burger {
color: var(--primary-99);
}

@media (min-width: 992px) {
.linkItem {
padding-left: 9%;
}
}
Loading

0 comments on commit efb5d0d

Please sign in to comment.