← Pablo Murad

Snippets

A some.pics template that matches Pika

Robert Birming's template for some.pics, the photo page from omg.lol, that makes it look like a blog on Pika: same header, tag pills, EXIF table, and the color and font themes Pika offers. Saved here, with credit, so it's easy to find.

This one isn't mine. Robert Birming made it, and I saved a copy. It's a template for some.pics, the photo-sharing service from omg.lol1, that makes the photo page look like a blog on Pika2: the same header with avatar and links, the same tag pills, an EXIF table styled like Pika's tables, and light and dark modes that follow the system.

The original lives on his snippets page. This is a copy of the current version.

It's meant to be edited in four places, all marked in the file:

  1. Your details: page title, description, favicon.
  2. The font link: only needed for web font themes.
  3. The theme: copy the six colors and the font from Pika's settings. The comment block lists every Pika color theme and font theme with its values.
  4. The header: name, links and avatar.

The rest follows those values on its own.

Robert Birming's some.pics page: his avatar and name at the top with links to Blog, Photos, Guestbook and About, a thin rule, the heading "Photos" and a three-column grid of square photos of lakes, foggy water, a cemetery, autumn leaves, a cat on a staircase and coastal landscapes.
The template in use on Robert Birming's own photo page.
a-some-pics-template-that-matches-pika.html raw
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
  <meta name="color-scheme" content="light dark">

  <!-- 1. Your details -->
  <title>Photos - Your Name</title>
  <meta name="description" content="Photos from my everyday life.">
  <meta property="og:title" content="Photos - Your Name">
  <meta property="og:description" content="Photos from my everyday life.">
  <meta property="og:type" content="website">
  <link rel="icon" href="https://profiles.cache.lol/OMG-USERNAME/picture">
  <link rel="alternate" type="application/rss+xml" title="Photos" href="/rss">

  <!-- 2. Font: only needed for web font themes (see list in section 3). Remove for System, Times New Roman and Verdana. -->
  <link rel="preconnect" href="https://fonts.bunny.net" crossorigin>
  <link rel="stylesheet" href="https://fonts.bunny.net/css?family=atkinson-hyperlegible-next:400,400i,700,700i,800&display=swap">

  <!-- Icons: omg.lol's copy of Font Awesome Free -->
  <link rel="stylesheet" href="https://cdn.cache.lol/type/fontawesome-free/css/all.css">

  <style>
/*
  3. Theme: match your Pika settings

  COLOR THEMES (light bg / text / primary, then dark bg / text / primary)
  Default    #ffffff #1e1e1e #2563eb  |  #000000 #d7d7d7 #60a5fa
  Beach      #fffcf5 #283b43 #0486a2  |  #283b43 #fffaf0 #4fc9e4
  Gameboy    #e4e9e2 #1f5138 #1f5138  |  #191c1a #c7d1cd #c7d1cd
  Grayscale  #f3f3f3 #3c3c3c #3c3c3c  |  #141414 #d7d7d7 #d7d7d7
  Halloween  #f6eee9 #2f2f2f #fc5c0e  |  #0a0a0a #f0f0f0 #fc5c0e
  Lavender   #fcf3fa #4e3c5c #9333ea  |  #1c101e #e8dcf0 #e879f9
  Notepad    #fdf7ed #3a2412 #d29600  |  #211308 #f1e1cd #ebaa07
  Sonnet     #fff2f0 #3e3e3e #e02400  |  #1b0607 #d7d7d7 #fd6262
  Custom     copy the six values from Pika > Settings > Colors

  FONT THEMES (font, size / line height, headline weight, Bunny Fonts slug)
  System             system stack       18px / 1.5  700
  Atkinson           Atkinson Hyp. Next 19px / 1.4  700  atkinson-hyperlegible-next
  Barry              Source Serif 4     18px / 1.5  800  source-serif-4 (headlines: system)
  Courier            Courier Prime      18px / 1.4  700  courier-prime
  Franklin Gothic    Libre Franklin     18px / 1.5  700  libre-franklin
  Garamond           EB Garamond        20px / 1.5  800  eb-garamond
  IBM Plex           IBM Plex Sans      18px / 1.5  700  ibm-plex-sans
  IBM Plex Mono      IBM Plex Mono      17px / 1.6  700  ibm-plex-mono
  Inter              Inter              18px / 1.5  700  inter
  Lora               Lora               17px / 1.6  700  lora
  Times New Roman    Times New Roman    19px / 1.5  700  (no web font)
  Verdana            Verdana            17px / 1.6  700  (no web font)
*/

/* Your theme: copy your colors and font from the lists above */
:root {
  --light-bg: #ffffff;
  --light-txt: #1e1e1e;
  --light-primary: #2563eb;

  --dark-bg: #000000;
  --dark-txt: #d7d7d7;
  --dark-primary: #60a5fa;

  --font-body: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-headlines: var(--font-body);
  --font-headlines-weight: 700;
  --font-size: 19px;
  --line-height: 1.4;

  /* Optional: set to 0 for square photos, like images in Pika posts */
  --image-radius: 5px;
}

/* Everything below follows the values above */
:root {
  --bg: var(--light-bg);
  --txt: var(--light-txt);
  --primary: var(--light-primary);

  --txt-light: color-mix(in srgb, var(--txt) 65%, transparent);
  --bg-light: color-mix(in srgb, var(--txt) 5%, transparent);
  --bg-light-hover: color-mix(in srgb, var(--txt) 8.75%, transparent);
  --border: color-mix(in srgb, var(--txt) 20%, transparent);
  --selection: color-mix(in srgb, var(--primary) 25%, transparent);

  --line-height-xs: calc(var(--line-height) * 0.85);
  --line-height-s: calc(var(--line-height) * 0.95);
  --paragraph-space: calc(var(--font-size) * var(--line-height));
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--dark-bg);
    --txt: var(--dark-txt);
    --primary: var(--dark-primary);
    --bg-light: color-mix(in srgb, var(--txt) 10%, transparent);
    --bg-light-hover: color-mix(in srgb, var(--txt) 15%, transparent);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  overflow-wrap: break-word;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  background-color: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
  background-color: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: var(--font-size);
  line-height: var(--line-height);
}

::selection {
  background-color: var(--selection);
}

:focus-visible {
  outline: 2px solid var(--primary);
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg);
  box-shadow: 0 4px 8px rgb(0 0 0 / 15%), 0 12px 24px rgb(0 0 0 / 15%);
  font-size: 0.875em;
  font-weight: bolder;
}

.skip-link:not(:focus-visible) {
  opacity: 0;
  pointer-events: none;
}

/* Header, same as Pika */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.site-header-avatar-link {
  align-self: flex-start;
  flex-shrink: 0;
  border-radius: var(--radius);
}

.avatar {
  display: block;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius);
  object-fit: cover;
}

.site-title {
  font-family: var(--font-headlines);
  font-size: 1.5em;
  font-weight: var(--font-headlines-weight);
  line-height: var(--line-height-xs);
  transform: translateY(-1px);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li:not(:last-of-type) {
  margin-inline-end: 0.75rem;
}

hr {
  width: 100%;
  height: 1px;
  margin: 1.5rem 0 2rem;
  border: 0;
  background-color: var(--border);
}

.site-main {
  flex: 1;
}

h1 {
  margin: 0 0 var(--paragraph-space);
  font-family: var(--font-headlines);
  font-size: 2em;
  font-weight: var(--font-headlines-weight);
  line-height: var(--line-height-xs);
  letter-spacing: -0.33px;
}

/* Grid */
.pics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.pic-card {
  display: block;
  overflow: hidden;
  border-radius: var(--image-radius);
  background-color: var(--bg-light);
}

.pic-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: opacity 150ms ease;
}

@media (pointer: fine) {
  .pic-card:hover img {
    opacity: 0.85;
  }
}

/* Single photo */
.pic-showcase-image {
  width: 100%;
  border-radius: var(--image-radius);
}

.pic-description {
  margin-top: var(--paragraph-space);
}

.pic-description p {
  margin: 0 0 var(--paragraph-space);
}

.pic-description > *:last-child {
  margin-bottom: 0;
}

.site-meta {
  margin-top: 2rem;
  font-size: 0.875em;
}

.site-meta div + div {
  margin-top: 0.125rem;
}

/* Icons, spaced like Pika's post meta */
.site-meta i {
  width: 1.25em;
  margin-inline-end: 0.5rem;
  line-height: normal;
  text-align: center;
}

/* Tags, styled like Pika's tag pills */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.tags a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  background-color: var(--bg-light);
  color: var(--txt);
  text-decoration: none;
}

@media (pointer: fine) {
  .tags a:hover {
    background-color: var(--bg-light-hover);
  }
}

/* EXIF, styled like Pika's details and tables */
details {
  margin-top: var(--paragraph-space);
  font-size: 0.875em;
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▶";
  display: inline-block;
  margin-inline-end: 0.5ch;
  transition: 50ms;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details table {
  width: 100%;
  margin-top: 0.5rem;
  border-spacing: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

details td {
  min-width: 8ch;
  padding: 1ch;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

details td.key {
  width: 40%;
  background-color: var(--bg-light);
  font-weight: bolder;
}

details td.value {
  overflow-wrap: anywhere;
}

/* Footer, same as Pika's branding */
.pics-branding {
  margin-top: auto;
  padding: 4rem 1rem 1rem;
  color: var(--txt);
  font-weight: 700;
  text-align: center;
}

.pics-branding a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 599px) {
  .pics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
  </style>
</head>

<body>
  <a class="skip-link" href="#main">Skip to content</a>

  <!-- 4. Header: name, links, avatar -->
  <header class="site-header h-card">
    <a class="site-header-avatar-link" href="https://example.com/" title="Your Name">
      <img class="avatar u-photo" src="https://profiles.cache.lol/OMG-USERNAME/picture" alt="" width="72" height="72">
    </a>
    <div>
      <div class="site-title">
        <a class="p-name u-url" href="https://example.com/">Your Name</a>
      </div>
      <nav class="site-nav" aria-label="Site">
        <ul>
          <li><a class="site-nav-link" href="https://example.com/about">About</a></li>
          <li><a class="site-nav-link" href="https://example.com/archive">Archive</a></li>
          <li><a class="site-nav-link" href="/" aria-current="page">Photos</a></li>
        </ul>
      </nav>
    </div>
  </header>

  <hr>

  <main id="main" class="site-main">

    <!-- if:landing -->
    <h1>Photos</h1>
    {tag-header}

    <div class="pics-grid">
      <!-- foreach:picture -->
      <a class="pic-card" href="{picture-page-url}">
        <img src="{picture-url}" alt="{alt}" loading="lazy">
      </a>
      <!-- endforeach:picture -->
    </div>
    <!-- endif:landing -->

    <!-- if:picture -->
    <article>
      <a href="{picture-url}">
        <img class="pic-showcase-image" src="{picture-url}" alt="{alt}">
      </a>

      <div class="pic-description">
        {description-markdown}
      </div>

      <footer class="site-meta">
        {tags}
        <div><i class="fa-regular fa-calendar fa-fw" aria-hidden="true"></i>Shared {relative-timestamp}</div>
        <div><i class="fa-regular fa-image fa-fw" aria-hidden="true"></i>{file-format} · {width} × {height}</div>
        <div><a href="/"><i class="fa-regular fa-circle-left fa-fw" aria-hidden="true"></i>Back to all photos</a></div>
      </footer>

      <details>
        <summary>EXIF information</summary>
        {exif}
      </details>
    </article>
    <!-- endif:picture -->

  </main>

  <footer class="pics-branding">
    <a href="https://some.pics">PICS</a>
  </footer>
</body>
</html>

curl -O https://pablomurad.com/snippets/a-some-pics-template-that-matches-pika.html

Notes

  1. some.pics is the photo side of omg.lol. Members upload pictures and get a page of them, and the page's HTML can be swapped for a template like this one, with placeholders such as {picture-url} and {exif} filled in by the service. ↩

  2. Pika is a small blogging service from Good Enough, with built-in color and font themes. The comment block in the template copies the values of each of them. ↩

Reply by email

Comments

Leave a comment

Comments are read before they show up here. No email address needed.