Skip to content

Commit

Permalink
Merge pull request #21 from techswitch-learners/mm-008-homepage-styling
Browse files Browse the repository at this point in the history
Mm 008 homepage styling
  • Loading branch information
natashabuckham authored Aug 1, 2024
2 parents a189189 + 0baf4c0 commit 2dccee8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ a {
color: $text-color;
width: 100vw;
height: 100vh;
}

.app {
display: flex;
flex-direction: column;
height: 100vh;
}
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Footer from './Footer/Footer';
function App() {
const [username, setUsername] = useState("");
return (
<div className="App">
<div className="app">
<Router>
<Header/>
<Routes>
Expand Down
19 changes: 19 additions & 0 deletions src/Header/Header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.header {
display: flex;
flex-direction: column;
background-color: #2D3047;
}

@media only screen and (min-width: 480px) {
img {
width: 70vw;
align-self: center;
}
}

@media only screen and (min-width: 1024px) {
img {
width: 40vw;
align-self: center;
}
}
3 changes: 2 additions & 1 deletion src/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import Hamburger from '../Hamburgerbutton/Hamburgerbutton';
import './Header.scss'

const logo = require('../ImageAssets/marsiokartlogo.jpg')

const Header: React.FC = () => {

return (
<div className="App">
<div className="header">
<Hamburger/>
<img src={logo} alt="Marsio Kart Logo" />
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/Home/Home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.home-content {
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
1 change: 1 addition & 0 deletions src/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import DisplayBackgroundImage from '../images/DisplayBackgroundImage';
import './Home.scss'

interface getUserProp{
username:string;
Expand Down

0 comments on commit 2dccee8

Please sign in to comment.