chore: styles + meta

This commit is contained in:
Cory Dransfeldt 2024-05-29 11:08:19 -07:00
parent 2c40ef759a
commit c1f168dc90
No known key found for this signature in database
5 changed files with 17 additions and 5 deletions

View file

@ -1,7 +1,7 @@
export default async function () { export default async function () {
return { return {
"siteName": "Cory Dransfeldt", "siteName": "Cory Dransfeldt",
"siteDescription": "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 3 rescue dogs, technology, automation, music, writing, reading and tv and movies.", "siteDescription": "I'm a software developer in Camarillo, California. I write about software development, technology and music.",
"author": "Cory Dransfeldt", "author": "Cory Dransfeldt",
"email": "hi@coryd.dev", "email": "hi@coryd.dev",
"url": "https://coryd.dev", "url": "https://coryd.dev",

View file

@ -7,6 +7,10 @@
{%- assign pageTitle = title | append: ' • ' | append: meta.siteName -%} {%- assign pageTitle = title | append: ' • ' | append: meta.siteName -%}
{%- elsif artist.name_string -%} {%- elsif artist.name_string -%}
{%- assign pageTitle = 'Artists • ' | append: artist.name_string | append: ' • ' | append: meta.siteName -%} {%- assign pageTitle = 'Artists • ' | append: artist.name_string | append: ' • ' | append: meta.siteName -%}
{%- elsif schema == 'music-index' -%}
{%- assign pageTitle = 'Music • ' | append: meta.siteName -%}
{%- elsif genre.name -%}
{%- assign pageTitle = 'Music • ' | append: genre.name | append: ' • ' | append: meta.siteName -%}
{%- elsif book.title -%} {%- elsif book.title -%}
{%- assign pageTitle = 'Books • ' | append: book.title | append: ' • ' | append: meta.siteName -%} {%- assign pageTitle = 'Books • ' | append: book.title | append: ' • ' | append: meta.siteName -%}
{%- elsif movie.title -%} {%- elsif movie.title -%}
@ -17,8 +21,6 @@
{%- assign pageTitle = pageTitle | append: ' • ' | append: meta.siteName -%} {%- assign pageTitle = pageTitle | append: ' • ' | append: meta.siteName -%}
{%- elsif show.title -%} {%- elsif show.title -%}
{%- assign pageTitle = 'Shows • ' | append: show.title | append: ' • ' | append: meta.siteName -%} {%- assign pageTitle = 'Shows • ' | append: show.title | append: ' • ' | append: meta.siteName -%}
{%- elsif genre.name -%}
{%- assign pageTitle = 'Music • ' | append: genre.name | append: ' • ' | append: meta.siteName -%}
{%- endif -%} {%- endif -%}
{%- assign pageDescription = meta.siteDescription -%} {%- assign pageDescription = meta.siteDescription -%}
@ -44,8 +46,13 @@
{%- assign ogImage = meta.url | append: '/assets/img/ogi/' | append: title | slugifyString | append: '-preview.png' -%} {%- assign ogImage = meta.url | append: '/assets/img/ogi/' | append: title | slugifyString | append: '-preview.png' -%}
{%- when 'music' -%} {%- when 'music' -%}
{%- assign ogImage = music.recent.artists[0].image -%} {%- assign ogImage = music.recent.artists[0].image -%}
{%- when 'music-index' -%}
{%- assign ogImage = music.recent.artists[0].image -%}
{%- when 'artist' -%} {%- when 'artist' -%}
{%- assign ogImage = artist.image -%} {%- assign ogImage = artist.image -%}
{%- when 'genre' -%}
{%- assign sortedGenreArtists = genre.artists | sortByPlaysDescending: "total_plays" -%}
{%- assign ogImage = sortedGenreArtists[0].image -%}
{%- when 'watching' -%} {%- when 'watching' -%}
{%- assign featuredMovie = movies.recentlyWatched | first -%} {%- assign featuredMovie = movies.recentlyWatched | first -%}
{%- assign ogImage = featuredMovie.backdrop -%} {%- assign ogImage = featuredMovie.backdrop -%}

View file

@ -58,6 +58,10 @@
} }
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
.artist-focus img {
max-width: 240px;
}
.artist-focus { .artist-focus {
& .artist-display { & .artist-display {
flex-direction: row; flex-direction: row;

View file

@ -19,7 +19,7 @@ schema: artist
<a class="back-link-header link-icon flex-centered" href="/music">{% tablericon "arrow-left" "Go back" %} Go back</a> <a class="back-link-header link-icon flex-centered" href="/music">{% tablericon "arrow-left" "Go back" %} Go back</a>
<article class="artist-focus"> <article class="artist-focus">
<div class="artist-display"> <div class="artist-display">
<img src="https://coryd.dev/.netlify/images/?url={{ artist.image }}&fm=webp&q=85&w=240&h=240&fit=cover" alt="{{ alt }}" loading="eager" decoding="async" width="240" height="240" /> <img src="https://coryd.dev/.netlify/images/?url={{ artist.image }}&fm=webp&q=85&w=480&h=480&fit=cover" alt="{{ alt }}" loading="eager" decoding="async" width="480" height="480" />
<div class="artist-meta"> <div class="artist-meta">
<p class="title"><strong>{{ artist.name_string }}</strong></p> <p class="title"><strong>{{ artist.name_string }}</strong></p>
{%- if artist.favorite -%} {%- if artist.favorite -%}

View file

@ -1,9 +1,10 @@
--- ---
title: Music title: Music
description: This is everything I've been listening to recently — it's collected in a database as I listen to it and displayed here.
layout: default layout: default
permalink: "/music/index.html" permalink: "/music/index.html"
updated: "now" updated: "now"
schema: music schema: music-index
--- ---
{% capture js %} {% capture js %}
{% render "../../../assets/scripts/media-toggles.js" %} {% render "../../../assets/scripts/media-toggles.js" %}