mirror of
https://github.com/harivansh-afk/React-Portfolio.git
synced 2026-04-17 11:04:58 +00:00
chore: project page edits etc
This commit is contained in:
parent
7bacec764b
commit
1b599490ae
6 changed files with 248 additions and 118 deletions
|
|
@ -5,6 +5,19 @@
|
|||
height: 200px;
|
||||
position: fixed;
|
||||
margin-top: -100px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.stick_follow_icon {
|
||||
left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.stick_follow_icon {
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.stick_follow_icon ul {
|
||||
|
|
@ -16,7 +29,7 @@
|
|||
.stick_follow_icon svg {
|
||||
width: 1.3em;
|
||||
height: 1.3em;
|
||||
fill: var(--text-color)
|
||||
fill: var(--text-color);
|
||||
}
|
||||
|
||||
.stick_follow_icon p {
|
||||
|
|
@ -38,7 +51,7 @@
|
|||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.stick_follow_icon p:after {
|
||||
|
|
@ -54,15 +67,17 @@
|
|||
|
||||
@media only screen and (max-width: 991px) {
|
||||
.stick_follow_icon {
|
||||
width: unset;
|
||||
height: unset;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: static;
|
||||
margin-top: unset;
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: center;
|
||||
padding: 40px 0;
|
||||
padding: 20px 0;
|
||||
align-items: center;
|
||||
background: var(--background-color);
|
||||
z-index: 1;
|
||||
}
|
||||
.stick_follow_icon p {
|
||||
top: unset;
|
||||
|
|
|
|||
|
|
@ -279,8 +279,10 @@ function CursorCore({
|
|||
}
|
||||
}
|
||||
|
||||
// Hide / Show global cursor
|
||||
// Hide native cursor only on non-mobile devices
|
||||
if (!IsDevice.any()) {
|
||||
document.body.style.cursor = 'none'
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
--text-color-3: rgb(204, 0, 0);
|
||||
--overlay-color: rgb(8 8 8 / 63%);
|
||||
--image-container-bg: #060606;
|
||||
--card-border: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
|
|
@ -18,6 +19,7 @@
|
|||
--text-color-3: rgb(204, 0, 0);
|
||||
--overlay-color: rgb(227 218 201 / 70%);
|
||||
--image-container-bg: #d8c9b2;
|
||||
--card-border: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
html,
|
||||
|
|
@ -27,9 +29,9 @@ body {
|
|||
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
overflow-x: hidden;
|
||||
overflow-y: visible;
|
||||
overflow-y: hidden;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
font-family: "Raleway", sans-serif;
|
||||
|
|
@ -40,6 +42,14 @@ body {
|
|||
border-right: 10px solid var(--primary-color);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
overflow-y: auto;
|
||||
height: auto;
|
||||
min-height: 100vh;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import "./style.css";
|
||||
import { Helmet, HelmetProvider } from "react-helmet-async";
|
||||
import Typewriter from "typewriter-effect";
|
||||
|
|
@ -6,6 +6,36 @@ import { introdata, meta } from "../../content_option";
|
|||
import { Link } from "react-router-dom";
|
||||
|
||||
export const Home = () => {
|
||||
const [needsScroll, setNeedsScroll] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const checkOverflow = () => {
|
||||
const body = document.body;
|
||||
const html = document.documentElement;
|
||||
const documentHeight = Math.max(
|
||||
body.scrollHeight,
|
||||
body.offsetHeight,
|
||||
html.clientHeight,
|
||||
html.scrollHeight,
|
||||
html.offsetHeight
|
||||
);
|
||||
const windowHeight = window.innerHeight;
|
||||
setNeedsScroll(documentHeight > windowHeight);
|
||||
};
|
||||
|
||||
// Initial check
|
||||
checkOverflow();
|
||||
|
||||
// Add resize listener
|
||||
window.addEventListener('resize', checkOverflow);
|
||||
|
||||
// Cleanup
|
||||
return () => window.removeEventListener('resize', checkOverflow);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
document.body.style.overflowY = needsScroll ? 'auto' : 'hidden';
|
||||
}, [needsScroll]);
|
||||
return (
|
||||
<HelmetProvider>
|
||||
<section id="home" className="home">
|
||||
|
|
|
|||
|
|
@ -34,13 +34,64 @@ section {
|
|||
height: calc(100vh - 60px);
|
||||
min-height: 700px;
|
||||
height: 100vh;
|
||||
margin-top: -60px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Mobile-first responsive styles */
|
||||
@media (max-width: 991.98px) {
|
||||
.intro_sec {
|
||||
display: block;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: auto !important;
|
||||
padding: 20px 0;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.intro_sec .text,
|
||||
.intro_sec .h_bg-image {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.intro_sec .text h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.intro_sec .text h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.intro_sec > .h_bg-image {
|
||||
min-height: 400px;
|
||||
margin-top: 10px !important;
|
||||
margin-bottom: 30px !important;
|
||||
}
|
||||
|
||||
.ac_btn {
|
||||
padding: 12px 24px;
|
||||
margin: 10px 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Extra small devices (phones, 600px and down) */
|
||||
@media (max-width: 600px) {
|
||||
.intro_sec .text h1 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.intro_sec .h_bg-image {
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
.btn-portfolio,
|
||||
.btn-about {
|
||||
font-size: 14px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
.project_items_ho {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
gap: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.project_item {
|
||||
|
|
@ -10,16 +14,25 @@
|
|||
text-align: center;
|
||||
margin: 0.5rem;
|
||||
position: relative;
|
||||
background: var(--image-container-bg);
|
||||
padding: 6px;
|
||||
border: 1px solid var(--image-container-bg);
|
||||
transition: 0.3s ease;
|
||||
background: var(--card-bg, var(--background));
|
||||
padding: 1rem;
|
||||
border: 0.5px solid var(--card-border, var(--foreground));
|
||||
border-radius: 8px;
|
||||
outline: 3px solid var(--card-outline-color, var(--primary));
|
||||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
font-size: 0;
|
||||
min-height: 300px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.project_item:hover {
|
||||
transform: translateY(-2px);
|
||||
border-color: var(--card-outline-hover, var(--primary));
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
|
@ -50,10 +63,11 @@
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: var(--overlay-color);
|
||||
background: var(--overlay-bg, rgba(var(--background-rgb), 0.9));
|
||||
backdrop-filter: blur(4px);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
padding: 10px;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
padding: 1.5rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
|
@ -62,21 +76,29 @@
|
|||
}
|
||||
|
||||
.project_item .content p {
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 10px;
|
||||
color: var(--foreground);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
.project_item .content a {
|
||||
background: var(--bg-color);
|
||||
border: solid 1px var(--text-color);
|
||||
padding: 4px 8px;
|
||||
background: var(--button-bg, var(--background));
|
||||
border: 1px solid var(--button-border, var(--border));
|
||||
border-radius: 6px;
|
||||
padding: 0.5rem 1rem;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
color: var(--text-color);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: var(--foreground);
|
||||
text-decoration: none;
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.project_item .content a:hover {
|
||||
text-decoration: none;
|
||||
background: var(--button-hover-bg, var(--muted));
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue