-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from vevcom/feat/navbar
Feat/navbar
- Loading branch information
Showing
34 changed files
with
748 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["./src/*"], | ||
"@/components": ["./src/components/*"], | ||
"@/styles": ["./src/styles/*"], | ||
"@/images": ["./src/images/*"] | ||
"@/*": ["src/*"], | ||
"@/components/*": ["src/app/components/*"], | ||
"@/styles/*": ["src/styles/*"], | ||
"@/images/*": ["src/images/*"] | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import Image from 'next/image' | ||
import Link from 'next/link' | ||
|
||
import styles from './Footer.module.scss' | ||
|
||
import addToHomeScreen from '@/images/add_to_home_screen.png' | ||
import logo from '@/images/omega_logo_white.png' | ||
import nordic from '@/images/nordic.png' | ||
|
||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' | ||
import { | ||
faXTwitter, | ||
faFacebookSquare, | ||
faInstagram | ||
} from '@fortawesome/free-brands-svg-icons' | ||
|
||
function Footer() { | ||
return ( | ||
<footer className={styles.Footer}> | ||
<div> | ||
<Image src={logo} width={350} alt="sct. omega broderskab" /> | ||
<p> | ||
Linjeforeningen for Elektronisk Systemdesign og Innovasjon (MTELSYS) og Kybernetikk og | ||
Robotikk (MTTK) ved Norges Tekniske-Naturvitenskapelige Universitet (NTNU) | ||
</p> | ||
<div> | ||
<Link className={styles.pwa} href="/infopages/pwa"> | ||
<Image src={addToHomeScreen} width={200} alt="add to homescreen" /> | ||
</Link> | ||
<div className={styles.icons}> | ||
<Link href="https://twitter.com/OmegaVevcom" target="_blank"> | ||
<FontAwesomeIcon icon={faXTwitter} /> | ||
</Link> | ||
<Link href="https://www.facebook.com/SctOmegaBroderskab/" target="_blank"> | ||
<FontAwesomeIcon icon={faFacebookSquare} /> | ||
</Link> | ||
<Link href="https://www.instagram.com/sctomega/" target="_blank"> | ||
<FontAwesomeIcon icon={faInstagram} /> | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
<div className={styles.info}> | ||
<p>Kontakt:</p> | ||
<p>Bedrift: <a href="mailto:[email protected]">[email protected]</a></p> | ||
<p>Teknisk: <a href="mailto:[email protected]">[email protected]</a></p> | ||
<p>PR: <a href="mailto:[email protected]">[email protected]</a></p> | ||
<p>Annet: <a href="mailto:[email protected]">[email protected]</a></p> | ||
<p>Tlf: 73 59 42 11</p> | ||
</div> | ||
<div className={styles.info}> | ||
<p>Adresse:</p> | ||
<p>Sct.Omega Broderskab</p> | ||
<p>NTNU Gløshaugen</p> | ||
<p>Elektro-bygget</p> | ||
<p>7491 Trondheim</p> | ||
</div> | ||
<div className={styles.nordic}> | ||
<Link href="http://www.nordicsemi.com" target="_blank"> | ||
<Image src={nordic} width={170} alt="nordic logo"/> | ||
</Link> | ||
</div> | ||
</footer> | ||
) | ||
} | ||
|
||
export default Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
@use "@/styles/ohma"; | ||
|
||
.Footer { | ||
font-weight: ohma.$sFontWeight; | ||
background-color: ohma.$gray-800; | ||
color: ohma.$white; | ||
display: grid; | ||
padding: 10*ohma.$gap 20*ohma.$gap; | ||
> * { | ||
p { | ||
margin-bottom: ohma.$gap; | ||
line-height: 1.7em; | ||
} | ||
padding: 0 5*ohma.$gap 0 2*ohma.$gap; | ||
&:nth-child(1) { | ||
padding-left: 0; | ||
grid-area: logos; | ||
} | ||
&:nth-child(2) { | ||
grid-area: info1; | ||
} | ||
&:nth-child(3) { | ||
grid-area: info2; | ||
} | ||
&:nth-child(4) { | ||
grid-area: nordic; | ||
} | ||
} | ||
> .info { | ||
> *:first-child { | ||
color: ohma.$yellow; | ||
font-weight: ohma.$mFontWeight; | ||
font-size: ohma.$lFont | ||
} | ||
border-left: solid 1px ohma.$gray-700; | ||
a { | ||
text-decoration: none; | ||
color: ohma.$white; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
.pwa { | ||
@include ohma.yellowIconLink; | ||
padding-left: 0; | ||
} | ||
.icons { | ||
display: flex; | ||
justify-content: flex-start; | ||
> a > * { | ||
@include ohma.yellowIconLink; | ||
> *:first-child { | ||
padding-left: 0; | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
@media (min-width: 1100px) { | ||
.Footer { | ||
grid-template-columns: 2fr 1fr 1fr 1fr; | ||
grid-template-areas: | ||
"logos info1 info2 nordic"; | ||
} | ||
} | ||
|
||
@media (min-width: ohma.$mobileBreakpoint) and (max-width: 1100px) { | ||
.Footer { | ||
grid-template-columns: 2fr 1fr 1fr; | ||
grid-template-rows: auto auto; | ||
grid-template-areas: | ||
"logos info1 info2" | ||
"nordic nordic nordic" | ||
; | ||
} | ||
.nordic { | ||
width: 100%; | ||
display: grid; | ||
place-items: center; | ||
margin-top: 2*ohma.$gap | ||
} | ||
} | ||
|
||
@media (max-width: ohma.$mobileBreakpoint) { | ||
.Footer { | ||
padding: ohma.$gap 2*ohma.$gap; | ||
padding-bottom: 4*ohma.$gap; | ||
grid-template-rows: repeat(auto, 4); | ||
grid-template-areas: | ||
"logos" | ||
"info1" | ||
"info2" | ||
"nordic" | ||
; | ||
place-items: center; | ||
> .info { | ||
border-left: none; | ||
} | ||
> * { | ||
padding: 0; | ||
margin-top: 5*ohma.$gap; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
:nth-child(1) { | ||
padding-left: none; | ||
} | ||
} | ||
.icons { | ||
justify-content: center; | ||
} | ||
p { | ||
text-align: center; | ||
max-width: 400px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' | ||
import Link from 'next/link' | ||
|
||
import styles from './BurgerItem.module.scss' | ||
|
||
function BurgerItem({ href, name, icon, shortName }) { | ||
shortName ??= name; | ||
return ( | ||
<Link href={href} className={styles.BurgerItem}> | ||
<FontAwesomeIcon icon={icon} className={styles.icon}/> | ||
<div className={styles.name}>{name}</div> | ||
<div className={styles.shortName}>{shortName}</div> | ||
</Link> | ||
) | ||
} | ||
|
||
export default BurgerItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@use "@/styles/ohma"; | ||
|
||
.BurgerItem { | ||
width: 100%; | ||
height: 100%; | ||
display: grid; | ||
place-items: center; | ||
&:active { | ||
background-color: ohma.$yellow; | ||
} | ||
> .icon { | ||
color: ohma.$white; | ||
width: 25px; | ||
height: 25px; | ||
} | ||
text-decoration: none; | ||
> .name, .shortName { | ||
color: ohma.$white; | ||
text-decoration: none; | ||
font-size: .65em; | ||
word-break: break-all; | ||
} | ||
> .name { | ||
display: block; | ||
} | ||
> .shortName { | ||
display: none; | ||
} | ||
} | ||
|
||
@media (max-width: 450px) { | ||
.BurgerItem { | ||
> .name { | ||
display: none; | ||
} | ||
> .shortName { | ||
display: block; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import BurgerItem from './BurgerItem' | ||
import { | ||
faShoppingCart, | ||
faComment, | ||
faPoo, | ||
faNewspaper, | ||
faCamera, | ||
faBriefcase, | ||
faList, | ||
faUsers, | ||
faCircleInfo, | ||
faGamepad, | ||
faBeer, | ||
faQuestionCircle, | ||
faAddressCard, | ||
faGraduationCap, | ||
} from "@fortawesome/free-solid-svg-icons" | ||
|
||
import styles from './BurgerMenu.module.scss' | ||
|
||
function BurgerMenu({ isLoggedIn, applicationPeriod }) { | ||
return ( | ||
<div className={styles.BurgerMenu}> | ||
<BurgerItem href="/ombul" name="OmBul" icon={faNewspaper}/> | ||
<BurgerItem href="/infopages/about" name="Om Omega" icon={faCircleInfo}/> | ||
<BurgerItem href="/infopages/committees" name="Komitéer" icon={faBeer}/> | ||
<BurgerItem href="/infopages/guides" name="Guider" icon={faQuestionCircle}/> | ||
{!isLoggedIn && | ||
<BurgerItem href="/infopages/nystudent" name="Ny Student?" icon={faGraduationCap}/> | ||
} | ||
{isLoggedIn && | ||
<> | ||
<BurgerItem href="/money/shop" name="Omegashop" icon={faShoppingCart}/> | ||
<BurgerItem href="/omegaquotes" name="Omegaquotes" icon={faComment}/> | ||
<BurgerItem href="/bulshit" name="Bulshit" icon={faPoo}/> | ||
<BurgerItem href="/images" name="Bilder" icon={faCamera}/> | ||
<BurgerItem href="/infopages/jobbannonser" name="Jobbannonser" icon={faBriefcase}/> | ||
<BurgerItem href="/userlist" name="Klasselister" icon={faList}/> | ||
<BurgerItem href="/committees" name="Komitémedlemmer" shortName="Kom.med." icon={faUsers}/> | ||
<BurgerItem href="/infopages/interessegrupper" name="Interessegrupper" shortName="Interessegr." icon={faGamepad}/> | ||
{applicationPeriod && | ||
<BurgerItem href="/applications" name="Søknad" icon={faAddressCard}/> | ||
} | ||
</> | ||
} | ||
</div> | ||
) | ||
} | ||
|
||
export default BurgerMenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@use "@/styles/ohma"; | ||
|
||
.BurgerMenu { | ||
display: grid; | ||
grid-template-columns: repeat(5, 1fr); | ||
gap: 2*ohma.$gap; | ||
padding: 3*ohma.$gap ohma.$gap ohma.$gap ohma.$gap; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Link from "next/link" | ||
import styles from "./Dropdown.module.scss" | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' | ||
import { v4 as uuid } from 'uuid' | ||
|
||
function DropDown({ name, items }) { | ||
return ( | ||
<li className={styles.Dropdown}> | ||
<div className={styles.name}>{ name }</div> | ||
<div className={styles.dropdownContent} name={name}> | ||
{items.map(item => | ||
<div className={styles.dropdownItem} key={uuid()}> | ||
<Link href={item.href}> | ||
<FontAwesomeIcon className={styles.icon} icon={item.icon} /> | ||
<h2 className={styles.linkName}>{item.name}</h2> | ||
</Link> | ||
</div> | ||
)} | ||
</div> | ||
</li> | ||
) | ||
} | ||
|
||
export default DropDown |
Oops, something went wrong.