Skip to content

Commit

Permalink
Make navbar responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
MrArnaudMichel committed Apr 2, 2024
1 parent a5fcf21 commit 21e9a32
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/layoutComponents/NavigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function NavigationBar({t, toggleTheme, currentTheme}) {

useEffect(() => {
const handleScroll = () => {
const isScrolled = window.scrollY > 80;
const isScrolled = window.scrollY > 10;
if (isScrolled !== scrolled) {
setScrolled(!scrolled);
}
Expand Down
37 changes: 36 additions & 1 deletion src/components/layoutComponents/css/NavigationBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,39 @@ nav {

.content {
height: 2000px; /* Placeholder pour du contenu de la page */
}
}

/*add smooth keyframe effect*/

@keyframes shake {
0% {
transform: translate(0px, 1px);
}

25% {
transform: translate(0px, -1px);
}

50% {
transform: translate(0px, 1px);
}

75% {
transform: translate(0px, -1px);
}

100% {
transform: translate(0px, 1px);
}
}

@media screen and (max-width: 768px) {
.sc-dmyCSP {
width: 80%;
}

.navbar li {
padding: 0 0.5rem;
}
}

19 changes: 19 additions & 0 deletions src/components/projectsPage/css/AllProjects.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,22 @@
height: auto;
}

@media screen and (max-width: 768px) {
.all-projects-container {
grid-template-columns: repeat(2, 1fr);
}

.project-item-main {
width: 40vw;
}
}

@media screen and (max-width: 480px) {
.all-projects-container {
grid-template-columns: repeat(1, 1fr);
}

.project-item-main {
width: 80vw;
}
}
44 changes: 44 additions & 0 deletions src/components/projectsPage/css/ProjectItemShort.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,47 @@
.project-item-short.double-grid-row {
grid-row: span 2;
}

@media screen and (max-width: 768px) {
.project-item-short {
grid-template-areas:
"title logo"
"description logo"
"image image";
}

.project-item-short .logo, .project-item-short .image {
width: 80px; /* Adjust as needed */
}

.project-item-short .image {
width: 100%;
}

.project-item-short .image.large {
width: 90%;
}
}

@media screen and (max-width: 480px) {
.project-item-short {
grid-template-areas:
"title"
"logo"
"description"
"image";
}

.project-item-short .logo, .project-item-short .image {
width: 60px; /* Adjust as needed */
}

.project-item-short .image {
width: 100%;
}

.project-item-short .image.large {
width: 90%;
}
}

2 changes: 1 addition & 1 deletion src/locales/language/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Welcome": "Je suis un développeur <strong>full-stack.</strong>",

"WelcomeAboutMeTitle": "Présentation",
"WelcomeAboutMeContent": "Je suis m'appelle Arnaud <strong>Michel</strong>, je suis un développeur full-stack. Je suis actuellement en second année de BUT Informatique à l'IUT Robert Schumann (Illkirch-Graffenstaden). J'ai commencé à apprendre la programmation en 2019, et depuis je n'ai pas arrêté d'apprendre et de me perfectionner. J'ai créee ce site web pour vous présenter mes projets, mes compétences et mon parcours.",
"WelcomeAboutMeContent": "Je suis m'appelle Arnaud <strong>Michel</strong>, je suis un développeur full-stack. Je suis actuellement en second année de BUT Informatique à l'IUT Robert Schumann (Illkirch-Graffenstaden). J'ai commencé à apprendre la programmation en 2019, et depuis je n'ai pas arrêté d'apprendre et de me perfectionner. J'ai créée ce site web pour vous présenter mes projets, mes compétences et mon parcours.",

"Career": "Mon parcours",
"company": "Entreprise",
Expand Down

0 comments on commit 21e9a32

Please sign in to comment.