Skip to content

Commit

Permalink
fixing styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdimcheik committed Jan 10, 2024
1 parent ee41701 commit 090f128
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 9 deletions.
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/assets/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/src/assets/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
rel="stylesheet"
/>
<title>Vite App</title>
<title>La banque de tutos</title>
</head>
<body>
<div id="root"></div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/SlidingNavbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function SlidingNavbar() {
)}
</div>
)}
<h4 className="title-site">La Banque de Tutos</h4>
</div>
{mobileMode && (
<div className="navbar-burger">
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/pages/Admin.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React from "react";
import React, { useEffect } from "react";
import { useUserContext } from "../context/UserContext";

function Admin() {
const { user } = useUserContext();
useEffect(() => {
window.scrollTo(0, 0);
}, []);
return (
<div className="admin_container">
<p>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Connexion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function Connexion() {
}
useEffect(() => {
setMessageUser("");
window.scrollTo(0, 0);
}, []);
return (
<div className="inscription_container">
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/pages/ForgotPassword.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import axios from "axios";
import InputField from "../components/InputField";
Expand Down Expand Up @@ -41,6 +41,9 @@ export default function ForgotPassword() {
});
}
}
useEffect(() => {
window.scrollTo(0, 0);
}, []);

return (
<div className="inscription_container">
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function Home() {
};
useEffect(() => {
enableBodyScroll();
window.scrollTo(0, 0);
});
return (
<div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/PageUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function PageUser() {
}
const bannerImage = `./src/assets/banner.png`;
useEffect(() => {
window.scrollTo(0, 0);
if (!user.isConnected) {
navigate("/");
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/Register.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useUserContext } from "../context/UserContext";

Expand Down Expand Up @@ -48,6 +48,7 @@ function Register() {
});
}
}
useEffect(() => {}, []);

function checkError() {
register({
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/RegisterCoord.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function RegisterCoord() {
setNext(true);
}
}

return !next ? (
<div className="inscription_container">
<div className="banner" />
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/pages/RegisterUser.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import { useUserContext } from "../context/UserContext";
import InputField from "../components/InputField";
import RegisterCoord from "./RegisterCoord";
Expand All @@ -20,6 +20,9 @@ export default function RegisterUser() {
setNext(true);
}
}
useEffect(() => {
window.scrollTo(0, 250);
}, []);
return !next ? (
<div className="inscription_container">
<div className="banner" />
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/pages/SingleVideoPage.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { useEffect } from "react";
import OneVideo from "./OneVideo";

export default function SingleVideoPage() {
useEffect(() => {
window.scrollTo(0, 0);
}, []);
return (
<div className="singleVideoPage">
<OneVideo />
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/pages/Upload.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from "react";
import React, { useEffect } from "react";

function Upload() {
useEffect(() => {
window.scrollTo(0, 0);
}, []);
return (
<div className="upload_container">
<h2>Importer une vidéo</h2>
Expand Down
21 changes: 20 additions & 1 deletion frontend/src/styles/_crf.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
border-radius: 20%;
display: flex;
width: 100%;
height: 50vh;
height: 40vh;
align-items: center;
justify-content: center;
background: {
Expand All @@ -16,6 +16,14 @@
size: cover;
}
}
@media screen and (max-width: 600px) {
.center {
height: 25vh;
}
h2.center-text {
font-size: 40px;
}
}

.center-text {
margin: auto;
Expand Down Expand Up @@ -106,3 +114,14 @@
clip: rect(31px, 9999px, 149px, 0);
}
}

.title-site {
position: absolute;
right: 20px;
color: var(--font-light-grey);
transition: all 0.2s ease;
}
.title-site:hover {
color: var(--font-light);
transition: all 0.2s ease;
}
19 changes: 18 additions & 1 deletion frontend/src/styles/_inscription.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.inscription_container {
// background-color: #354d67;
margin: 0 auto;
width: 100%;
text-align: center;
Expand Down Expand Up @@ -138,3 +137,21 @@
align-items: start;
}
}

@keyframes slidein {
from {
transform: translateX(100%);
}

to {
transform: translateX(0%);
}
}

.slideIn {
animation: slidein 1000ms;
}
.slideOut {
animation-direction: reverse;
animation: slidein 1000ms;
}

0 comments on commit 090f128

Please sign in to comment.