deleted avatar, modified header img as bkg, added animation on header h1
This commit is contained in:
@@ -6,14 +6,13 @@
|
|||||||
<title>Peter the Baker</title>
|
<title>Peter the Baker</title>
|
||||||
|
|
||||||
<!-- Optional: system fonts for speed; swap later if you like -->
|
<!-- Optional: system fonts for speed; swap later if you like -->
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link rel="stylesheet" href="/resources/css/index.css" />
|
<link href="https://fonts.googleapis.com/css2?family=Iceland&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="/resources/css/index.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a class="skip-link" href="#main">Skip to content</a>
|
|
||||||
|
|
||||||
<header class="site-header">
|
<header class="site-header">
|
||||||
<img class="avatar" src="/resources/img/pb.png" alt="Portrait of Peter Baker" width="200" height="200"/>
|
<img src="/resources/img/pb.png" alt="Portrait of Peter Baker" width="1280" height="372"/>
|
||||||
<h1 class="site-title">Peter Baker</h1>
|
<h1 class="site-title">Peter Baker</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
@@ -1,52 +1,62 @@
|
|||||||
/* Basic reset & layout */
|
/* Reset the default 8px body margin so the image can touch the edges */
|
||||||
* { box-sizing: border-box; }
|
* { box-sizing: border-box; }
|
||||||
html, body { margin: 0; padding: 0; }
|
html, body { margin: 0; padding: 0; }
|
||||||
|
|
||||||
|
/* Optional base text */
|
||||||
body {
|
body {
|
||||||
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
|
font-family: 'Iceland';
|
||||||
color: #efefef;
|
color: #BF8915;
|
||||||
background: #2c2c2c;
|
background: #1c1c1c;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Accessibility: visible focus */
|
/* Full-bleed banner at the very top */
|
||||||
:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 2px; }
|
|
||||||
.skip-link {
|
|
||||||
position: absolute; left: -9999px; top: -9999px;
|
|
||||||
}
|
|
||||||
.skip-link:focus { left: 1rem; top: 1rem; background:#111; color:#fff; padding:.5rem .75rem; border-radius:.5rem; }
|
|
||||||
|
|
||||||
/* Header with centered image at the very top */
|
|
||||||
.site-header {
|
.site-header {
|
||||||
display: grid;
|
position: relative; /* allows overlay title */
|
||||||
place-items: center;
|
|
||||||
padding: 3rem 1rem 2rem;
|
|
||||||
gap: .5rem;
|
|
||||||
background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0));
|
|
||||||
}
|
|
||||||
.site-header .avatar {
|
|
||||||
display: block;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 4px solid rgba(255,255,255,.15);
|
|
||||||
max-width: 40vw; /* keeps it reasonable on mobile */
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
.site-title {
|
|
||||||
margin: .25rem 0 0;
|
|
||||||
font-size: clamp(1.5rem, 2.5vw + 1rem, 2.5rem);
|
|
||||||
letter-spacing: .5px;
|
|
||||||
}
|
|
||||||
.site-tagline {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #cfcfcf;
|
padding: 0;
|
||||||
font-size: clamp(.95rem, .5vw + .8rem, 1.1rem);
|
/* line-height: 0; /* removes stray gap under inline images */
|
||||||
}
|
}
|
||||||
|
.site-header img {
|
||||||
|
display: block; /* removes inline whitespace */
|
||||||
|
width: 100%; /* full width */
|
||||||
|
height: auto; /* keep aspect ratio */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Overlay title on the banner (optional; keep if you like this look) */
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
line-height: 1; /* restore readable line height */
|
||||||
|
position: absolute; /* overlay on the banner */
|
||||||
|
left: 50%;
|
||||||
|
bottom: 8%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
/* animations */
|
||||||
|
opacity: 1;
|
||||||
|
animation: fadeSlideIn 2s ease-out forwards, goldShine 4s ease-in-out infinite;
|
||||||
|
animation-delay: 0s, 2s;
|
||||||
|
|
||||||
|
/* gold shine */
|
||||||
|
background: linear-gradient(90deg, #b8860b, #ffd700, #b8860b);
|
||||||
|
background-size: 200% auto;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
-webkit-text-fill-color: transparent; /* extra safety for WebKit */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Horizontal nav under header */
|
/* Horizontal nav under header */
|
||||||
.site-nav {
|
.site-nav {
|
||||||
position: sticky; /* optional: keeps it visible on scroll */
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
background: rgba(20,20,20,.75);
|
||||||
backdrop-filter: blur(6px);
|
backdrop-filter: blur(6px);
|
||||||
background: rgba(20,20,20,.7);
|
|
||||||
border-top: 1px solid rgba(255,255,255,.07);
|
border-top: 1px solid rgba(255,255,255,.07);
|
||||||
border-bottom: 1px solid rgba(255,255,255,.07);
|
border-bottom: 1px solid rgba(255,255,255,.07);
|
||||||
}
|
}
|
||||||
@@ -57,38 +67,18 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
max-width: 900px;
|
max-width: 1000px;
|
||||||
}
|
}
|
||||||
.site-nav a {
|
.site-nav a {
|
||||||
display: inline-block;
|
|
||||||
padding: .5rem .75rem;
|
|
||||||
border-radius: .5rem;
|
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
padding: .5rem .75rem;
|
||||||
|
border-radius: .5rem;
|
||||||
}
|
}
|
||||||
.site-nav a:hover,
|
.site-nav a:hover, .site-nav a:focus-visible {
|
||||||
.site-nav a:focus-visible {
|
|
||||||
background: rgba(255,255,255,.08);
|
background: rgba(255,255,255,.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Content */
|
/* Content + footer */
|
||||||
.content {
|
.content { max-width: 1000px; margin: 2rem auto; padding: 0 1rem 3rem; }
|
||||||
max-width: 900px;
|
.site-footer { text-align: center; color: #bdbdbd; padding: 1.5rem 1rem 3rem; }
|
||||||
margin: 2rem auto;
|
|
||||||
padding: 0 1rem 3rem;
|
|
||||||
}
|
|
||||||
.content h2 { margin-top: 2rem; font-size: 1.35rem; }
|
|
||||||
|
|
||||||
/* Footer */
|
|
||||||
.site-footer {
|
|
||||||
border-top: 1px solid rgba(255,255,255,.07);
|
|
||||||
color: #bdbdbd;
|
|
||||||
padding: 1.5rem 1rem 3rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Responsive tweaks */
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.site-header { padding: 4rem 1rem 2.25rem; }
|
|
||||||
.site-nav ul { gap: 1.25rem; }
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user