css refactor :]
This commit is contained in:
parent
81ab7856c6
commit
6e5aad77dd
5 changed files with 146 additions and 158 deletions
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="/style/main.css">
|
<link rel="stylesheet" type="text/css" href="/style/main.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/style/index.css">
|
<link rel="stylesheet" type="text/css" href="/style/index.css">
|
||||||
<script type="module" src="/script/index.js" defer></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
|
@ -52,67 +51,63 @@
|
||||||
|
|
||||||
<div id="crew-list">
|
<div id="crew-list">
|
||||||
<div class="crew-item">
|
<div class="crew-item">
|
||||||
<img src="/img/avatars/arispacegirl.avif" alt="ari melody photo" class="avatar" width=64 height=64>
|
<div class="crew-avatar">
|
||||||
|
<img src="/img/avatars/arispacegirl.avif"
|
||||||
|
alt="ari melody photo"
|
||||||
|
class="avatar"
|
||||||
|
width=128 height=128>
|
||||||
|
</div>
|
||||||
<div class="crew-info">
|
<div class="crew-info">
|
||||||
<h3>ari</h3>
|
<h3>ari</h3>
|
||||||
<p><a href="https://arimelody.space" class="handle">@arispacegirl</a></p>
|
<p><a href="https://arimelody.space" class="handle">@arispacegirl</a></p>
|
||||||
<div class="crew-tags">
|
|
||||||
<span class="crew-tag">she/her</span>
|
|
||||||
<span class="crew-tag">developer</span>
|
|
||||||
<span class="crew-tag">musician</span>
|
|
||||||
<span class="crew-tag">artist</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="crew-item">
|
<div class="crew-item">
|
||||||
<img src="/img/avatars/vimae.avif" alt="vimae photo" class="avatar" width=64 height=64>
|
<div class="crew-avatar">
|
||||||
|
<img src="/img/avatars/vimae.avif"
|
||||||
|
alt="vimae photo"
|
||||||
|
class="avatar"
|
||||||
|
width=128 height=128>
|
||||||
|
</div>
|
||||||
<div class="crew-info">
|
<div class="crew-info">
|
||||||
<h3>mae</h3>
|
<h3>mae</h3>
|
||||||
<p><a href="https://mae.wtf" class="handle">@vimae</a></p>
|
<p><a href="https://mae.wtf" class="handle">@vimae</a></p>
|
||||||
<div class="crew-tags">
|
|
||||||
<span class="crew-tag">she/they</span>
|
|
||||||
<span class="crew-tag">musician</span>
|
|
||||||
<span class="crew-tag">artist</span>
|
|
||||||
<span class="crew-tag">developer</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="crew-item">
|
<div class="crew-item">
|
||||||
<img src="/img/avatars/zaire.avif" alt="claire photo" class="avatar" width=64 height=64>
|
<div class="crew-avatar">
|
||||||
|
<img src="/img/avatars/zaire.avif"
|
||||||
|
alt="claire photo"
|
||||||
|
class="avatar"
|
||||||
|
width=128 height=128>
|
||||||
|
</div>
|
||||||
<div class="crew-info">
|
<div class="crew-info">
|
||||||
<h3>claire</h3>
|
<h3>claire</h3>
|
||||||
<p><a href="https://supitszaire.com" class="handle">@zaire</a></p>
|
<p><a href="https://supitszaire.com" class="handle">@zaire</a></p>
|
||||||
<div class="crew-tags">
|
|
||||||
<span class="crew-tag">she/her</span>
|
|
||||||
<span class="crew-tag">musician</span>
|
|
||||||
<span class="crew-tag">artist</span>
|
|
||||||
<span class="crew-tag">developer</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="crew-item">
|
<div class="crew-item">
|
||||||
<img src="/img/avatars/karakara.avif" alt="julia photo" class="avatar" width=64 height=64>
|
<div class="crew-avatar">
|
||||||
|
<img src="/img/avatars/karakara.avif"
|
||||||
|
alt="julia photo"
|
||||||
|
class="avatar"
|
||||||
|
width=128 height=128>
|
||||||
|
</div>
|
||||||
<div class="crew-info">
|
<div class="crew-info">
|
||||||
<h3>julia</h3>
|
<h3>julia</h3>
|
||||||
<p><a href="https://insertdomain.name" class="handle">@karakara</a></p>
|
<p><a href="https://insertdomain.name" class="handle">@karakara</a></p>
|
||||||
<div class="crew-tags">
|
|
||||||
<span class="crew-tag">she/her</span>
|
|
||||||
<span class="crew-tag">developer</span>
|
|
||||||
<span class="crew-tag">artist</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="crew-item">
|
<div class="crew-item">
|
||||||
<img src="/img/avatars/loudar.avif" alt="alex photo" class="avatar" width=64 height=64>
|
<div class="crew-avatar">
|
||||||
|
<img src="/img/avatars/loudar.avif"
|
||||||
|
alt="alex photo"
|
||||||
|
class="avatar"
|
||||||
|
width=128 height=128>
|
||||||
|
</div>
|
||||||
<div class="crew-info">
|
<div class="crew-info">
|
||||||
<h3>alex</h3>
|
<h3>alex</h3>
|
||||||
<p><a href="https://illegal.trading" class="handle">@loudar</a></p>
|
<p><a href="https://illegal.trading" class="handle">@loudar</a></p>
|
||||||
<div class="crew-tags">
|
|
||||||
<span class="crew-tag">he/they</span>
|
|
||||||
<span class="crew-tag">developer</span>
|
|
||||||
<span class="crew-tag">musician</span>
|
|
||||||
<span class="crew-tag">artist</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -129,9 +124,12 @@
|
||||||
<img src="/img/projects/campfire.avif" alt="screenshot of the campfire timeline" width=256>
|
<img src="/img/projects/campfire.avif" alt="screenshot of the campfire timeline" width=256>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-info">
|
<div class="project-info">
|
||||||
<h3>campfire</h3>
|
<h3>
|
||||||
|
<a href="https://campfire.bliss.town" class="col-on-primary">
|
||||||
|
campfire
|
||||||
|
</a>
|
||||||
|
</h3>
|
||||||
<p>a pretty, modern web client for the fediverse!</p>
|
<p>a pretty, modern web client for the fediverse!</p>
|
||||||
<a href="https://campfire.bliss.town" class="col-on-primary">campfire.bliss.town</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -142,5 +140,7 @@
|
||||||
made with <span role="img" aria-label="love">♥</span> by <a href="https://arimelody.space">ari</a>, 2025.
|
made with <span role="img" aria-label="love">♥</span> by <a href="https://arimelody.space">ari</a>, 2025.
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script type="module" src="/script/index.js" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,8 @@
|
||||||
import { hijackClickEvent } from './main.js';
|
import { hijackClickEvent } from "./main.js";
|
||||||
|
|
||||||
document.addEventListener('readystatechange', () => {
|
document.addEventListener("readystatechange", () => {
|
||||||
document.querySelectorAll("#project-list .project-item").forEach(projectItem => {
|
document.querySelectorAll(".project-item").forEach(container => {
|
||||||
const link = projectItem.querySelector('a');
|
const link = container.querySelector("a");
|
||||||
hijackClickEvent(projectItem, link);
|
hijackClickEvent(container, link);
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelectorAll("#crew-list .crew-item .crew-info").forEach(crewItem => {
|
|
||||||
const link = crewItem.querySelector('a.handle');
|
|
||||||
hijackClickEvent(crewItem, link);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export function hijackClickEvent(container, link) {
|
export function hijackClickEvent(container, link) {
|
||||||
container.addEventListener('click', event => {
|
container.addEventListener('click', event => {
|
||||||
if (event.target.tagName.toLowerCase() === 'a') return;
|
if (event.target.tagName.toLowerCase() === 'a') return;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
||||||
|
|
@ -8,116 +8,113 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
transition: background-color .2s linear;
|
box-shadow: 4px 4px 0 color-mix(in srgb, var(--background), #0008 50%);
|
||||||
box-shadow: 2px 2px 2px #0004;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
|
||||||
.project-item:hover {
|
|
||||||
outline: 1px solid var(--on-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-item-banner {
|
.project-item-banner {
|
||||||
width: 256px;
|
width: 256px;
|
||||||
height: 128px;
|
height: 128px;
|
||||||
}
|
|
||||||
.project-item-banner img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
.project-info {
|
img {
|
||||||
padding: .4em .5em;
|
width: 100%;
|
||||||
}
|
height: 100%;
|
||||||
.project-info h3 {
|
object-fit: cover;
|
||||||
margin: 0;
|
}
|
||||||
}
|
}
|
||||||
.project-info p {
|
|
||||||
font-size: .8em;
|
.project-info {
|
||||||
margin: 0;
|
padding: .4em .5em;
|
||||||
}
|
|
||||||
.project-info a {
|
h3 {
|
||||||
font-style: italic;
|
margin: 0 0 .2em 0;
|
||||||
font-size: .8em;
|
|
||||||
color: var(--on-background);
|
a {
|
||||||
opacity: .75;
|
color: var(--on-background);
|
||||||
transition: color .2s linear;
|
}
|
||||||
text-decoration: none;
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: .8em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
outline: 1px solid var(--on-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#crew-list {
|
#crew-list {
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
gap: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 64px 1fr;
|
|
||||||
gap: .5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item img.avatar {
|
|
||||||
width: 64px;
|
|
||||||
height: 64px;
|
|
||||||
object-fit: cover;
|
|
||||||
border-radius: 8px;
|
|
||||||
background-color: #101010;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item .crew-info {
|
|
||||||
padding: .5em;
|
|
||||||
background-color: var(--primary);
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 2px 2px 2px #0004;
|
|
||||||
transition: background-color .2s linear;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.crew-info:hover {
|
|
||||||
outline: 1px solid var(--on-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item h3 {
|
|
||||||
display: block;
|
|
||||||
margin: 0 0 -.2em 0;
|
|
||||||
transition: inherit;
|
|
||||||
}
|
|
||||||
.crew-item h3 a {
|
|
||||||
display: block;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item a.handle {
|
|
||||||
display: block;
|
|
||||||
font-style: italic;
|
|
||||||
font-size: .8em;
|
|
||||||
color: var(--on-background);
|
|
||||||
opacity: .75;
|
|
||||||
transition: color .2s linear;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item p {
|
|
||||||
margin: .2em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crew-item .crew-tags {
|
|
||||||
margin: .5em 0 0 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: .2em;
|
flex-wrap: wrap;
|
||||||
}
|
justify-content: center;
|
||||||
|
gap: 2em 4em;
|
||||||
|
|
||||||
.crew-item .crew-tag {
|
.crew-item {
|
||||||
font-size: .75em;
|
width: 10em;
|
||||||
padding: .2em .5em;
|
display: grid;
|
||||||
border-radius: 4px;
|
grid-template-rows: 8em 4em;
|
||||||
text-wrap: nowrap;
|
gap: .5em;
|
||||||
color: var(--on-primary);
|
text-align: center;
|
||||||
border: 1px solid var(--on-primary);
|
transform: rotate(2deg);
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 500px) {
|
&:nth-child(even) {
|
||||||
.crew-tags {
|
transform: rotate(-2deg);
|
||||||
flex-wrap: wrap;
|
|
||||||
|
&:hover .crew-avatar img.avatar {
|
||||||
|
transform: rotate(-4deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.crew-avatar img.avatar, .crew-info {
|
||||||
|
box-shadow: 4px 4px 0 color-mix(in srgb, var(--background), #0008 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover .crew-avatar img.avatar {
|
||||||
|
transform: rotate(2deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.crew-avatar {
|
||||||
|
img.avatar {
|
||||||
|
width: 8em;
|
||||||
|
height: 8em;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: var(--primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.crew-item:nth-child(even) .crew-avatar img.avatar {
|
||||||
|
transform: rotate(-2deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.crew-info {
|
||||||
|
padding: .5em;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: var(--primary);
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
h3, p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: .8em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.crew-item:nth-child(odd) .crew-info:before {
|
||||||
|
transform: skew(0, 2deg) translate(1.3em, -.2em);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 900px) {
|
||||||
|
#crew-list {
|
||||||
|
#grid-template-columns: repeat(2, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,11 @@ body {
|
||||||
|
|
||||||
color: var(--on-background);
|
color: var(--on-background);
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
|
}
|
||||||
|
|
||||||
transition: color .2s linear, background-color .2s linear;
|
*, *::before, *::after {
|
||||||
|
transition-property: background-color, color, box-shadow, border-color, opacity;
|
||||||
|
transition-duration: .2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
|
|
@ -38,7 +41,6 @@ header {
|
||||||
border-bottom: 1px solid var(--primary);
|
border-bottom: 1px solid var(--primary);
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
transition: background-color .2s linear, box-shadow .2s linear, border-color .2s linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header nav {
|
header nav {
|
||||||
|
|
@ -78,12 +80,10 @@ main {
|
||||||
|
|
||||||
.only-light {
|
.only-light {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: opacity .2s linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.only-dark {
|
.only-dark {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity .2s linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
|
|
@ -99,14 +99,12 @@ hr::after {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: var(--on-background);
|
color: var(--on-background);
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
transition: color .2s linear, background-color .2s linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--on-primary);
|
color: var(--on-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
transition: color .2s linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
|
|
@ -123,7 +121,6 @@ button {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 2em;
|
border-radius: 2em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color .2s linear, background-color .2s linear, transform .1s ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
|
|
@ -140,7 +137,6 @@ footer {
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
transition: opacity .1s ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer:hover {
|
footer:hover {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue