In trying to figure out my own template for a .gitmessage
template, I've collected up a couple of examples here.
It can be set with:
git config --global commit.template ~/.gitmessage
... and many git clients will pick it up and use it.
In tailwindcss v4, instead of using @apply
in @layer components
, the recommendation is to use tailwind variables like:
@layer components {
.card {
background-color: var(--color-white);
border-radius: var(--rounded-lg);
padding: var(--spacing-6);
box-shadow: var(--shadow-xl);
}
// Load this first | |
(function() { | |
var userAgent = navigator.userAgent || navigator.vendor || window.opera; | |
if (/windows phone/i.test(userAgent)) { | |
document.body.classList.add('os-windows-phone'); | |
} else if (/android/i.test(userAgent)) { | |
document.body.classList.add('os-android'); | |
} else if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { | |
document.body.classList.add('os-ios'); |
<!DOCTYPE html> | |
<html lang="en" class="bg-sky-600"><head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Home Top - Comp. Overview Top</title> | |
<meta name="supported-color-schemes" content="light dark"> | |
<meta name="theme-color" content="hsl(33.38 100% 70%)" media="(prefers-color-scheme: light)"> | |
<meta name="theme-color" content="hsl(237.79 38% 28.000000000000004%)" media="(prefers-color-scheme: dark)"> | |
<link rel="stylesheet" href="/pagefind/pagefind-ui.css"><link rel="stylesheet" href="/styles.css?cb=1747793055952" type="text/css"> |
If I add a default keywords string to the metas settings, say in src/_data.yml
like this:
...
metas:
lang: en
...
default_keywords: [aaaaa,bbbbb,ccccc]
keywords: "=tags || =default_keywords"
...
This Vento template engine partial works as of Lume v3.0.1. Vento allows you to use javascript code by adding a greater-than sign after the opening curly brackets, like {{> code here}}
.
index.yml
is calling home.vto
, which is in turn calling this top-top-hero-ticker-image.vto
partial among others. The index.yml
has an array of images hero.images
which is referenced here. The site is bilingual, so there is a Japanese (default lang) src/index.yml
and an English src/en/index.yml
.{{> ... const randomIndex
sets up a random index number based on the length of the hero.images
array.randomImage
is then used as the index number to get the info from that image, so it can be referenced directly.Every build of Lume, a different image is thus used, adding a little dynamism to the site.
This Vento template engine partial works in Lume v3.0.0. Vento allows you to use javascript code by adding a greater-than sign after the opening curly brackets, like {{> code here}}
.
index.yml
is calling home.vto
, which is in turn calling this top-projects.vto
partial among others. The index.yml
has the data like {{ recentprojects.subtitle }}
which is referenced here.{{> ... const gradientOptions
sets up an object that is picked from randomly in the code under it.projectslast
which is fetched from an API, and stored in src/_data/projectslast.json
. This is a list of completed projects and dates._config.ts
. This randomizes the order of cards. Some people might hate that they become slightly out of chrolological order, but I like the idea of randomly listing the last three projects, in any order, every site build.Tailwind v4 has new syntax for arbitrary values, variants, properties, and more. Here's the cheatsheet that I would have wanted when I first started using it.
margin
or color
. Are set to a value.Documentation uses RGB. https://tailwindcss.com/docs/background-color
bg-black : #000000
bg-white : #FFFFFF
bg-slate-50 : #F8FAFC
bg-slate-100 : #F1F5F9
bg-slate-200 : #E2E8F0
bg-slate-300 : #CBD5E1
<!DOCTYPE html> | |
<html lang="en"><head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Home - eSolia Pro Blog</title> | |
<meta name="supported-color-schemes" content="light dark"> | |
<meta name="theme-color" content="hsl(33.38 100% 70%)" media="(prefers-color-scheme: light)"> | |
<meta name="theme-color" content="hsl(237.79 38% 28.000000000000004%)" media="(prefers-color-scheme: dark)"> |