video messaging, css improvements, image dimensions
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
</header>
|
||||
<main>
|
||||
<p>Towards the start of my time at Carnegie Mellon, I started taking
|
||||
pictures of benches. It provided me an object to seek out; and seek
|
||||
benches out I did. Since then, I've amassed a collection of photographs
|
||||
from all over the world.</p>
|
||||
pictures of benches on walk around Pittsburgh. It provided me an subject
|
||||
to seek out. Since then, I've amassed a collection of photographs from
|
||||
all over the world.</p>
|
||||
|
||||
<p>All images <a href="https://creativecommons.org/licenses/by-nc/4.0/">
|
||||
CC BY-NC</a> Aaron Gutierrez.</p>
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
<meta property="og:url" content="https://www.aarongutierrez.com">
|
||||
<meta property="og:image" content="https://www.aarongutierrez.com/img/aaron@3x.jpg">
|
||||
<meta property="og:description" content="Aaron Gutierrez is a software engineer at Asana, a CMU graduate, and fond of benches.">
|
||||
<meta name="description" content="Aaron Gutierrez is a software engineer at Asana, a CMU graduate, and fond of benches.">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Aaron Gutierrez</h1>
|
||||
<img id="aaron" alt="Aaron" src="img/aaron.jpg"
|
||||
<img id="aaron" alt="Aaron Gutierrez" src="img/aaron.jpg"
|
||||
width="128px" height="128px"
|
||||
srcset="img/aaron.jpg, img/aaron@2x.jpg 2x,img/aaron@3x.jpg 3x">
|
||||
<p>
|
||||
Engineering Manager @ <a href="https://asana.com">Asana</a><br>
|
||||
@@ -48,8 +50,9 @@
|
||||
Wufoo</a>
|
||||
</li>
|
||||
|
||||
<li>I've also worked on our <a href="https://asana.com/apps/csv-importer">
|
||||
CSV importer</a> and <a href="https://blog.asana.com/2019/02/asana-marketing-creative-teams/">Asana
|
||||
<li>I've also worked on <a href="https://blog.asana.com/2022/01/vimeo-video-messaging/">video messaging</a>,
|
||||
our <a href="https://asana.com/apps/csv-importer">CSV importer</a>,
|
||||
and <a href="https://blog.asana.com/2019/02/asana-marketing-creative-teams/">Asana
|
||||
Forms</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
15
pub.py
15
pub.py
@@ -5,6 +5,7 @@ import os
|
||||
import sys
|
||||
import subprocess
|
||||
from functools import cache
|
||||
from PIL import Image
|
||||
|
||||
import boto3
|
||||
|
||||
@@ -14,9 +15,9 @@ session = boto3.Session(profile_name='push')
|
||||
s3 = session.client('s3')
|
||||
|
||||
|
||||
bench_fmt = """<a href="/bench/view/{0}"><picture><source type="image/webp" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.webp 2x, /img/bench/{0:03d}.780.webp"><source type="image/webp" srcset="/img/bench/{0:03d}.780.webp 2x, /img/bench/{0:03d}.390.webp"><source type="image/jpeg" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.jpg 2x, /img/bench/{0:03d}.780.jpg"><source type="image/jpeg" srcset="/img/bench/{0:03d}.780.jpg 2x, /img/bench/{0:03d}.390.jpg"><img src="/img/bench/{0:03d}.780.jpg"></picture></a>"""
|
||||
bench_fmt = """<a href="/bench/view/{0}"><picture><source type="image/webp" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.webp 2x, /img/bench/{0:03d}.780.webp"><source type="image/webp" srcset="/img/bench/{0:03d}.780.webp 2x, /img/bench/{0:03d}.390.webp"><source type="image/jpeg" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.jpg 2x, /img/bench/{0:03d}.780.jpg"><source type="image/jpeg" srcset="/img/bench/{0:03d}.780.jpg 2x, /img/bench/{0:03d}.390.jpg"><img src="/img/bench/{0:03d}.780.jpg" width="{1}px" height="{2}px"></picture></a>"""
|
||||
|
||||
bench_view_ftm = """<a href="/img/bench/{0:03d}.1560.jpg"><picture><source type="image/webp" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.webp 2x, /img/bench/{0:03d}.780.webp"><source type="image/webp" srcset="/img/bench/{0:03d}.780.webp 2x, /img/bench/{0:03d}.390.webp"><source type="image/jpeg" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.jpg 2x, /img/bench/{0:03d}.780.jpg"><source type="image/jpeg" srcset="/img/bench/{0:03d}.780.jpg 2x, /img/bench/{0:03d}.390.jpg"><img src="/img/bench/{0:03d}.780.jpg"></picture></a>"""
|
||||
bench_view_ftm = """<a href="/img/bench/{0:03d}.1560.jpg"><picture><source type="image/webp" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.webp 2x, /img/bench/{0:03d}.780.webp"><source type="image/webp" srcset="/img/bench/{0:03d}.780.webp 2x, /img/bench/{0:03d}.390.webp"><source type="image/jpeg" media="(min-width: 780px)" srcset="/img/bench/{0:03d}.1560.jpg 2x, /img/bench/{0:03d}.780.jpg"><source type="image/jpeg" srcset="/img/bench/{0:03d}.780.jpg 2x, /img/bench/{0:03d}.390.jpg"><img src="/img/bench/{0:03d}.780.jpg" width="{1}px" height="{2}px"></picture></a>"""
|
||||
|
||||
TYPE_MAP = {
|
||||
'asc': 'text/plain',
|
||||
@@ -108,7 +109,10 @@ def make_bench():
|
||||
for i in range(1, num_imgs+1, 16):
|
||||
page = ''
|
||||
for j in range(i, min(num_imgs+1, i+16)):
|
||||
page += bench_fmt.format(num_imgs + 1 - j)
|
||||
idx = num_imgs + 1 - j
|
||||
with Image.open('img/bench/{0:03d}.png'.format(idx)) as img:
|
||||
width,height = img.size
|
||||
page += bench_fmt.format(idx, width, height)
|
||||
|
||||
prev_pg = i//16
|
||||
next_pg = i//16 + 2
|
||||
@@ -129,7 +133,10 @@ def make_bench_view(idx, prev, nxt):
|
||||
with open('bench_view_template.html', 'r') as f:
|
||||
template = f.read()
|
||||
|
||||
body = bench_view_ftm.format(idx)
|
||||
with Image.open('img/bench/{0:03d}.png'.format(idx)) as img:
|
||||
width,height = img.size
|
||||
|
||||
body = bench_view_ftm.format(idx, width, height)
|
||||
|
||||
preview = "/img/bench/{0:03d}.780.jpg".format(idx)
|
||||
|
||||
|
||||
27
site.css
27
site.css
@@ -1,14 +1,13 @@
|
||||
img#aaron {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 780px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
:root {
|
||||
--padding: 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
}
|
||||
@@ -23,6 +22,14 @@ footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
li, p {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.img-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -33,12 +40,15 @@ footer {
|
||||
align-items: flex-end;
|
||||
display: flex;
|
||||
margin-bottom: 40px;
|
||||
margin-bottom: var(--padding);
|
||||
max-height: min(calc(100vh - 80px), calc(100vw - 40px));
|
||||
max-height: min(calc(100vh - 80px), calc(100vw - var(--padding)));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.img-grid img {
|
||||
display: block;
|
||||
height: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 100%;
|
||||
@@ -51,6 +61,7 @@ footer {
|
||||
}
|
||||
|
||||
.img-view img {
|
||||
height: 100%;
|
||||
max-height: 100vh;
|
||||
max-width: 100%;
|
||||
}
|
||||
@@ -68,6 +79,12 @@ div.nav {
|
||||
}
|
||||
}
|
||||
|
||||
@media(min-width:820px) {
|
||||
:root {
|
||||
--padding: min(40px, calc((100vw - 820px) / 2 + 20px));
|
||||
}
|
||||
}
|
||||
|
||||
@media(prefers-color-scheme: dark) {
|
||||
body {
|
||||
background: #333;
|
||||
|
||||
Reference in New Issue
Block a user