Skip to content

Commit

Permalink
Finalize project layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Mar 29, 2024
1 parent 42d5edb commit a5dfc9d
Show file tree
Hide file tree
Showing 20 changed files with 1,054 additions and 508 deletions.
13 changes: 6 additions & 7 deletions src/components/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const pixels = Array.from(digest).map((digit) => {
<div class="pixel" data-x={pixels[0].x} data-y="0"></div>
<div class="pixel" data-x={pixels[1].x} data-y="0"></div>
<div class="pixel" data-x={pixels[2].x} data-y="0"></div>
<h3>{title}</h3>
<h4>{title}</h4>
<p class="justified"><slot /></p>
<a class="no-effect" href={href} aria-label={title}></a>
<span class="more">
Expand All @@ -44,7 +44,7 @@ const pixels = Array.from(digest).map((digit) => {
flex: 1 1 0;
background: var(--color-primary-dark);
padding: var(--gap-lg);
min-height: calc(max(28rem, min(55vh, 55vw)));
min-height: calc(max(30rem, min(60vh, 60vw)));
position: relative;
}

Expand Down Expand Up @@ -93,27 +93,26 @@ const pixels = Array.from(digest).map((digit) => {
}
}

h3 {
h4 {
font-family: var(--font-secondary);
color: var(--color-secondary);
margin-bottom: var(--gap-md);
font-size: 1.5em;
font-weight: 300;
}

span.more {
display: inline-block;
color: var(--color-secondary);
font-family: var(--font-mono);
font-variant: small-caps;
margin-top: auto;
text-decoration: none;
font-size: 0.8em;
text-align: right;
text-transform: uppercase;
position: relative;

& > svg.icon.slide {
position: absolute;
top: 0.1em;
top: 0.2em;
right: 0;
opacity: 0;
transition: all 100ms ease-in;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExternalLink.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ type Props = HTMLAttributes<'a'>;
const { href, ...attributes } = Astro.props;
---

<a href={href} {...attributes}>
<a href={href} target="_blank" {...attributes}>
<slot /><svg class="icon slide"><use xlink:href="#external-link"></use></svg>
</a>
6 changes: 2 additions & 4 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const twitterUrl = `https://twitter.com/${socials.twitter}`;
<use xlink:href="#logo-mark"></use>
</svg>
<aside>
<h2>Build together. With PRAGMA.</h2>
<h4>Build together. With PRAGMA.</h4>

<ul class="flex-col">
<li><a href="/privacy-policy">Privacy Policy</a></li>
Expand Down Expand Up @@ -89,10 +89,8 @@ const twitterUrl = `https://twitter.com/${socials.twitter}`;
}
}

h2 {
h4 {
grid-area: title;
font-size: 2em;
margin-bottom: var(--gap-md);
}

ul {
Expand Down
33 changes: 33 additions & 0 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
import type { HTMLAttributes } from 'astro/types';
import Grid from '../components/Grid.astro';
interface Props extends HTMLAttributes<'section'> {
title: string;
tag: string;
}
const { title, tag, ...props } = Astro.props;
---

<header {...props}>
<span class="tag">{tag}</span>
<h1>{title}</h1>
<slot />
</header>

<Grid rows={1} actives={new Set([2, 3, 6, 7, 8, 9, 12, 13, 18, 19])} />

<style>
header {
padding: var(--gap-md);
}

span.tag {
font-size: 0.8em;
display: inline-block;
font-family: var(--font-mono);
color: var(--color-secondary);
}
</style>
5 changes: 5 additions & 0 deletions src/components/Pattern.astro
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ const patternId = createHash('sha256')
</svg>

<style>
svg {
outline: 1px solid var(--color-primary);
outline-offset: -1px;
}

svg pattern > polygon {
filter: url(#outline);
fill: transparent;
Expand Down
6 changes: 2 additions & 4 deletions src/components/Section.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ const { title, tag, ...props } = Astro.props;
padding: var(--gap-md);

& h2 {
font-size: 2.5em;
max-width: 65vw;
max-width: 55vw;
text-align: center;
margin-bottom: var(--gap-md);
}
}

span.tag {
font-size: 0.8em;
display: inline-block;
font-family: var(--font-mono);
color: var(--color-secondary);
margin-bottom: var(--gap-md);
}

@media (max-width: 770px) {
Expand Down
Loading

0 comments on commit a5dfc9d

Please sign in to comment.