Compare commits
5 Commits
main
...
monogram-w
| Author | SHA1 | Date |
|---|---|---|
|
|
9ba2d60449 | |
|
|
df02bbe888 | |
|
|
1fe069b4f6 | |
|
|
9f25e6d488 | |
|
|
ea52f6986b |
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 600 900" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g id="Artboard1" transform="matrix(0.133333,0,0,0.1875,0,0)">
|
||||
<rect x="0" y="0" width="4500" height="4800" style="fill:none;"/>
|
||||
<clipPath id="_clip1">
|
||||
<rect x="0" y="0" width="4500" height="4800"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#_clip1)">
|
||||
<g transform="matrix(1,0,0,1,-6960,-6096)">
|
||||
<g transform="matrix(3.30882,0,0,2.35294,3710.74,3458.35)">
|
||||
<path d="M1662,1801L982,1121L982,1801L1662,1801Z" style="fill:rgb(35,31,32);"/>
|
||||
</g>
|
||||
<g transform="matrix(3.30882,0,0,2.35294,5960.74,3458.35)">
|
||||
<path d="M1662,1801L982,1121L982,1801L1662,1801Z" style="fill:rgb(35,31,32);"/>
|
||||
</g>
|
||||
<g transform="matrix(2.02607e-16,2.35294,-3.30882,1.44076e-16,15169.2,5385.41)">
|
||||
<path d="M1662,1801L982,1121L982,1801L1662,1801Z" style="fill:rgb(35,31,32);"/>
|
||||
</g>
|
||||
<g transform="matrix(3.30882,0,0,2.35294,3710.74,5058.35)">
|
||||
<path d="M1662,1801L982,1121L982,1801L1662,1801Z" style="fill:rgb(35,31,32);"/>
|
||||
</g>
|
||||
<g transform="matrix(3.30882,0,0,2.35294,3710.74,6658.35)">
|
||||
<path d="M1662,1801L982,1121L982,1801L1662,1801Z" style="fill:rgb(35,31,32);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
66
index.html
66
index.html
|
|
@ -10,44 +10,48 @@
|
|||
|
||||
<div class="main">
|
||||
<div class="monogram">
|
||||
|
||||
<div class="column">
|
||||
<a href="#" class="triangle triangle-bottom">
|
||||
<img src="https://placekitten.com/300/300">
|
||||
<div class="triangle-label">Linguist</div>
|
||||
</a>
|
||||
|
||||
<a href="#" class="triangle triangle-bottom">
|
||||
<img src="https://placekitten.com/300/300">
|
||||
<div class="triangle-label">Quilter</div>
|
||||
</a>
|
||||
|
||||
<a href="#" class="triangle triangle-bottom">
|
||||
<img src="https://placekitten.com/300/300">
|
||||
<div class="triangle-label">Blog</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<a href="#" class="triangle triangle-bottom">
|
||||
<img src="https://placekitten.com/300/300">
|
||||
<div class="triangle-label multiline">Applied<br>Statistician</div>
|
||||
</a>
|
||||
|
||||
<a href="#" class="triangle triangle-top">
|
||||
<img src="https://placekitten.com/200/200">
|
||||
<div class="triangle-label">Knitter</div>
|
||||
</a>
|
||||
<div class="intro">
|
||||
<div class="bio"> I'm <h1>Elizabeth Pankratz</h1>,<br>
|
||||
a <a class="linguist" href="#">linguist</a>,
|
||||
<a class="textileartist" href="#">textile artist</a>,
|
||||
and <a class="statistician" href="#">applied statistician</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navigation">
|
||||
<h1> Elizabeth Pankratz </h1>
|
||||
<div class="links">
|
||||
<a href="#">about</a>
|
||||
<a href="#">blog</a>
|
||||
<a href="#">contact</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const monogram = document.querySelector('.monogram');
|
||||
|
||||
const links = [
|
||||
{ element: document.querySelector('.intro a.linguist'), name: 'linguist' },
|
||||
{ element: document.querySelector('.intro a.statistician'), name: 'statistician' },
|
||||
{ element: document.querySelector('.intro a.textileartist'), name: 'textileartist' },
|
||||
];
|
||||
|
||||
const bgs = {
|
||||
linguist: 'http://placekitten.com/200/300',
|
||||
textileartist: 'http://placekitten.com/500/300',
|
||||
statistician: 'http://placekitten.com/200/400',
|
||||
};
|
||||
|
||||
links.forEach((link) => {
|
||||
console.log(link);
|
||||
link.element.addEventListener('mouseover', (event) => {
|
||||
monogram.style.backgroundImage = `url(${bgs[link.name]})`;
|
||||
});
|
||||
link.element.addEventListener('mouseout', (event) => {
|
||||
monogram.style.backgroundImage = 'none';
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
106
style.css
106
style.css
|
|
@ -26,7 +26,7 @@ body {
|
|||
width: 100%;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
grid-template-columns: [gutter-left] 1fr [content-column] 1fr [gutter-right] 1fr;
|
||||
grid-template-columns: [gutter-left] 1fr [content-column] max(25vw) [gutter-right] 1fr;
|
||||
grid-template-rows: [header] 1fr [center] 1fr [footer] 1fr;
|
||||
font-family: 'Fira Sans', sans-serif;
|
||||
}
|
||||
|
|
@ -40,98 +40,52 @@ body {
|
|||
/* Monogram */
|
||||
|
||||
.monogram {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.triangle {
|
||||
display: block; /* Because these are <a> tags */
|
||||
background-color: black;
|
||||
position: relative; /* Required for the absolute positioning of the triangle-label */
|
||||
width: 20vh;
|
||||
height: 20vh;
|
||||
max-width: 40vw;
|
||||
max-height: 40vw;
|
||||
}
|
||||
|
||||
.triangle-bottom {
|
||||
clip-path: polygon(0 0, 0 100%, 100% 100%);
|
||||
}
|
||||
|
||||
.triangle-top {
|
||||
clip-path: polygon(0 0, 0 100%, 100% 0);
|
||||
}
|
||||
|
||||
.triangle img {
|
||||
display: block; /* Prevents the annoying inline-block gap after */
|
||||
filter: grayscale(100%);
|
||||
mix-blend-mode: overlay;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.triangle:hover {
|
||||
background-color: hsl(50, 90%, 50%);
|
||||
}
|
||||
|
||||
.triangle-label {
|
||||
position: absolute;
|
||||
color: black;
|
||||
left: 0.5rem;
|
||||
bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.triangle-label.multiline {
|
||||
margin-top: -2rem;
|
||||
}
|
||||
|
||||
.triangle-top .triangle-label {
|
||||
top: 0.5rem;
|
||||
aspect-ratio: 2 / 3;
|
||||
mask-image: url('assets/images/monogram.svg');
|
||||
background: black;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
|
||||
/* Title and links */
|
||||
|
||||
h1 {
|
||||
display: inline;
|
||||
font-weight: bold;
|
||||
font-size: 1.7rem;
|
||||
margin-top: 1em;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
font-size: 1.4rem;
|
||||
.intro {
|
||||
margin-top: 2em;
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.navigation a {
|
||||
.intro .bio {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.intro .links {
|
||||
display: flex;
|
||||
gap: 1.5ch;
|
||||
}
|
||||
|
||||
.intro a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
margin-left: -0.25ch;
|
||||
border-left: 0.25ch solid rgba(0,0,0,0);
|
||||
border-right: 0.25ch solid rgba(0,0,0,0);
|
||||
margin-right: 0.75ch;
|
||||
border-left: 0.33ch solid rgba(0,0,0,0);
|
||||
border-right: 0.33ch solid rgba(0,0,0,0);
|
||||
margin-left: -0.33ch;
|
||||
margin-right: -0.33ch;
|
||||
}
|
||||
|
||||
.navigation a:visited {
|
||||
.intro a:visited {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.navigation a:active,
|
||||
.navigation a:hover {
|
||||
.intro a:active,
|
||||
.intro a:hover {
|
||||
background-color:hsl(50, 100%, 70%);
|
||||
border-left: 0.25ch solid hsl(50, 100%, 70%);
|
||||
border-right: 0.25ch solid hsl(50, 100%, 70%);
|
||||
}
|
||||
|
||||
|
||||
/* Adjustments for touchscreen devices */
|
||||
|
||||
@media (hover: none) {
|
||||
.triangle-label {
|
||||
color: white;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.triangle:hover .triangle-label {
|
||||
color: black;
|
||||
opacity: 1;
|
||||
}
|
||||
border-left: 0.33ch solid hsl(50, 100%, 70%);
|
||||
border-right: 0.33ch solid hsl(50, 100%, 70%);
|
||||
}
|
||||
Loading…
Reference in New Issue