-
Notifications
You must be signed in to change notification settings - Fork 5
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 CMP26Projects/landing-page
- Loading branch information
Showing
15 changed files
with
191 additions
and
3 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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,34 @@ | ||
.Nav { | ||
padding: var(--side-spacing); | ||
|
||
.container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
flex-direction: row-reverse; | ||
} | ||
|
||
&__logo a { | ||
display: flex; | ||
flex-direction: row-reverse; | ||
gap: 5px; | ||
align-items: center; | ||
|
||
h2 { | ||
font-size: 1.875rem; | ||
font-style: normal; | ||
font-weight: 800; | ||
margin: 0; | ||
} | ||
} | ||
|
||
&__icons { | ||
display: flex; | ||
gap: 1rem; | ||
align-items: center; | ||
} | ||
|
||
&__icon { | ||
width: 24px; | ||
} | ||
} |
Empty file.
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,36 @@ | ||
// _layout.scss | ||
// Classes or the layout of the app | ||
|
||
section, | ||
.section { | ||
padding: var(--section-spacing) 0; | ||
} | ||
|
||
.container { | ||
max-width: 700px; | ||
margin: 0 auto; | ||
padding: 0 var(--side-spacing); | ||
} | ||
|
||
.row { | ||
display: flex; | ||
flex-wrap: wrap; | ||
margin: 0 -var(--side-spacing); | ||
gap: var(--side-spacing); | ||
|
||
.col-1 { | ||
flex: 0 1 calc(25% - var(--side-spacing) * 2); | ||
} | ||
|
||
.col-2 { | ||
flex: 0 1 calc(50% - var(--side-spacing) * 2); | ||
} | ||
|
||
.col-3 { | ||
flex: 0 1 calc(75% - var(--side-spacing) * 2); | ||
} | ||
|
||
.col-4 { | ||
flex: 0 1 calc(100% - var(--side-spacing) * 2); | ||
} | ||
} |
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,5 +1,6 @@ | ||
@import "normalize.css"; | ||
@import "typography"; | ||
@import "layout"; | ||
|
||
*, | ||
*::before, | ||
|
Empty file.
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,43 @@ | ||
import { Link } from "react-router-dom"; | ||
import PropTypes from "prop-types"; | ||
|
||
// icons | ||
import { UserCircleIcon } from "@heroicons/react/24/outline"; | ||
import { BellIcon } from "@heroicons/react/24/outline"; | ||
// logo | ||
import logo from "../../assets/images/logo.svg"; | ||
// styles | ||
import "../../assets/styles/components/Nav.scss"; | ||
|
||
export default function Nav(props) { | ||
const { showIcons } = props; | ||
|
||
return ( | ||
<nav className="Nav"> | ||
<div className="container"> | ||
<div className="Nav__logo"> | ||
<Link to="/"> | ||
<img src={logo} alt="logo" /> | ||
<h2 className="logo-text">كشافة</h2> | ||
</Link> | ||
</div> | ||
{showIcons && ( | ||
<div className="Nav__icons"> | ||
{/* TODO: add route later */} | ||
<Link to="/"> | ||
<UserCircleIcon className="Nav__icon" /> | ||
</Link> | ||
{/* TODO: add route later */} | ||
<Link to="/"> | ||
<BellIcon className="Nav__icon" /> | ||
</Link> | ||
</div> | ||
)} | ||
</div> | ||
</nav> | ||
); | ||
} | ||
|
||
Nav.propTypes = { | ||
showIcons: PropTypes.bool.isRequired, | ||
}; |
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,9 @@ | ||
import Nav from "../common/nav"; | ||
|
||
export default function LandingPage() { | ||
return ( | ||
<> | ||
<Nav showIcons={true} /> | ||
</> | ||
); | ||
} |
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,41 @@ | ||
export default function TestLayout() { | ||
return ( | ||
<> | ||
<div className="container">Test Layout</div> | ||
<section style={{ textAlign: "center" }}> | ||
<div className="container"> | ||
<div className="row"> | ||
<div className="col-2" style={{ background: "red" }}> | ||
Test Layout | ||
</div> | ||
<div className="col-2" style={{ background: "magenta" }}> | ||
Test Layout | ||
</div> | ||
</div> | ||
<div className="row"> | ||
<div className="col-3" style={{ background: "blue" }}> | ||
Test Layout | ||
</div> | ||
<div className="col-3" style={{ background: "yellow" }}> | ||
Test Layout | ||
</div> | ||
<div className="col-3" style={{ background: "red" }}> | ||
Test Layout | ||
</div> | ||
</div> | ||
|
||
<div className="row"> | ||
<div className="col-4">Test Layout</div> | ||
<div className="col-4">Test Layout</div> | ||
<div className="col-4">Test Layout</div> | ||
</div> | ||
<div className="row"> | ||
<div className="col-2">Test Layout</div> | ||
<div className="col-2">Test Layout</div> | ||
<div className="col-4">Test Layout</div> | ||
</div> | ||
</div> | ||
</section> | ||
</> | ||
); | ||
} |
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