feat(contact, header): fixed header link hover and made header able to match inital main color

This commit is contained in:
darkicewolf50 2025-06-11 16:13:18 -06:00
parent ff0134eb0f
commit ba16485b9a
5 changed files with 31 additions and 14 deletions

View File

@ -44,13 +44,16 @@
#Contact div:nth-child(1) div:last-child { #Contact div:nth-child(1) div:last-child {
flex-direction: column; flex-direction: column;
margin: 0px;
margin-left: auto; margin-left: auto;
margin-right: 16svw; margin-right: 16svw;
font-size: 30px;
} }
#Contact div:nth-child(1) div:last-child h1 { #Contact div:nth-child(1) div:last-child h1 {
margin: 0px; margin: 0px;
font-size: 40px; font-size: 40px;
width: inherit;
} }
#Contact div:nth-child(1) img { #Contact div:nth-child(1) img {

View File

@ -8,7 +8,8 @@ export default function Contact() {
updatedTitleText="" updatedTitleText=""
updatedSubtitleText="" updatedSubtitleText=""
updatedImgUrl="" updatedImgUrl=""
updatetdImgAlt="Lorem Picsum" updatedImgAlt="Lorem Picsum"
updatedHeaderBackgroundColour="black"
/> />
<div> <div>
<div> <div>

View File

@ -1,19 +1,22 @@
header { header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin: 1%; /* margin: 1%;
margin-top: 1svh; margin-top: 1svh; */
padding-right: 0.5svw; margin: 1svh 0.5svw;
/* width: 100%; */ /* width: 100%; */
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background-color: #1f1f1f; background-color: #1f1f1f;
/* position: absolute; */ /* position: absolute; */
z-index: 1; z-index: 1;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
color: whitesmoke;
} }
header a { header a {
@ -30,6 +33,8 @@ header div button {
background-color: inherit; background-color: inherit;
border: solid 2px gray; border: solid 2px gray;
border-radius: 1rem; border-radius: 1rem;
margin-right: 0.5svw;
} }
header div button img { header div button img {
@ -65,25 +70,20 @@ nav a {
text-decoration: none; text-decoration: none;
color: inherit; color: inherit;
cursor: pointer; cursor: pointer;
background-color: #1f1f1f; /* background-color: #1f1f1f; */
color: whitesmoke; /* color: whitesmoke; */
font-size: larger; font-size: larger;
/* border-left: solid 2px white; */ /* border-left: solid 2px white; */
} }
/* removes first divider */
/* can be removed if no borders from above */
nav a:first-child {
border-left: none;
}
nav a li:hover { nav a:hover {
color: #a80029; color: #a80029;
} }
/* correct colour of links in dark mode */ /* correct colour of links in dark mode */
.darkmode nav a li::hover { .darkmode nav a:hover {
filter: hue-rotate(180deg); filter: hue-rotate(180deg);
} }

View File

@ -18,6 +18,7 @@ export default function Header() {
subtitleText: "Hello", subtitleText: "Hello",
imgUrl: "https://picsum.photos/200", imgUrl: "https://picsum.photos/200",
headerPostion: "absolute", headerPostion: "absolute",
headerBackgroundColour: "white",
}); });
/** /**
@ -57,6 +58,10 @@ export default function Header() {
bannerInfo.titleText === "" && bannerInfo.imgUrl === "" bannerInfo.titleText === "" && bannerInfo.imgUrl === ""
? "relative" ? "relative"
: "absolute", : "absolute",
outline:
bannerInfo.titleText === "" && bannerInfo.imgUrl === ""
? `1.25svh solid ${bannerInfo.headerBackgroundColour}`
: "",
}}> }}>
<Link to={"/"}> <Link to={"/"}>
<img <img

View File

@ -27,6 +27,7 @@ export default function UpdateBanner({
updatedSubtitleText = "Hello", updatedSubtitleText = "Hello",
updatedImgUrl = "https://picsum.photos/200", updatedImgUrl = "https://picsum.photos/200",
updatedImgAlt = "Lorem picsum", updatedImgAlt = "Lorem picsum",
updatedHeaderBackgroundColour = "white",
}) { }) {
const context = useOutletContext(); const context = useOutletContext();
const updateBanner = context.setBannerInfo; const updateBanner = context.setBannerInfo;
@ -35,7 +36,14 @@ export default function UpdateBanner({
titleText: updatedTitleText, titleText: updatedTitleText,
subtitleText: updatedSubtitleText, subtitleText: updatedSubtitleText,
imgUrl: updatedImgUrl, imgUrl: updatedImgUrl,
headerBackgroundColour: updatedHeaderBackgroundColour,
}); });
}, [updatedTitleText, updatedSubtitleText, updatedImgUrl, updateBanner]); }, [
updatedTitleText,
updatedSubtitleText,
updatedImgUrl,
updateBanner,
updatedHeaderBackgroundColour,
]);
return <></>; return <></>;
} }