Skip to content

Instantly share code, notes, and snippets.

View ryangittings's full-sized avatar

Ryan Gittings ryangittings

View GitHub Profile
theme: &THEME
name: theme
label: Theme
type: select
required: false
options:
values:
- value: lily
label: Lily
{
"mapwidth": 1920,
"mapheight": 1080,
"levels": [
{
"id": "level1",
"title": "Ground Floor",
"map": "bristol.svg"
}
],
import dotenv from 'dotenv'
import Eleventy from '@11ty/eleventy'
import express from 'express'
import morgan from 'morgan'
import memoize from 'lodash/memoize.js'
import path from 'path'
import fs from 'fs'
const ENV = process.env.NODE_ENV || 'development'
const PORT = process.env.PORT || 3001
media:
input: src/uploads
output: /uploads
blocks:
content:
- name: pages
label: Pages
path: src
{% macro input(field, form) %}
{% set id = form.id + '_' + field.name | slug %}
<div class="{% if field.layout == 'full' %}col-span-full{% endif %} space-y-3xs">
{% if field.type == 'select' %}
<label for="{{ id }}">{{ field.label | safe }}{% if field.required %}*{% endif %}</label>
<select id="{{ id }}" name="{{ field.name }}" {% if field.required %}required{% endif %}>
<option disabled selected>Please choose...</option>
@ryangittings
ryangittings / default.njk
Last active February 6, 2025 15:44
<menu-toggle>
<menu-toggle class="menu-toggle">
<button class="[ menu-toggle__button ] [ lg:hidden ]" aria-label="Toggle menu"><span></span></button>
<nav class="hidden lg:block" aria-label="Primary navigation">
<ul class="flex items-center gap-s flex-col lg:flex-row" role="list">
{%- for entry in collections.all | eleventyNavigation %}
{% if entry.title %}
<li><a href="{{ entry.url | url }}"{% if entry.url == page.url or entry.url in page.url and entry.url != '/' %} data-active{% endif %}>{{ entry.title }}</a></li>
{% endif %}
{%- endfor %}
class Carouscroll extends HTMLElement {
static tagName = "carou-scroll";
static register(tagName, registry) {
if (!registry && ("customElements" in globalThis)) {
registry = globalThis.customElements;
}
registry?.define(tagName || this.tagName, this);
}
local_backend: true
backend:
name: 'github'
repo: 'Gittings-Studio/website'
branch: 'master'
media_folder: 'src/uploads'
public_folder: '/uploads'
button: &BUTTON
<script src=https://widget.reviews.co.uk/carousel-inline-iframeless/dist.js?_t=2022072111></script>
<link rel="stylesheet" href=https://assets.reviews.io/css/widgets/carousel-widget.css?_t=2022072111>
<link rel="stylesheet" href=https://assets.reviews.io/iconfont/reviewsio-icons/style.css?_t=2022072111>
<div id="reviewsio-carousel-widget"></div>
<script>
new carouselInlineWidget('reviewsio-carousel-widget',{
/*Your REVIEWS.io account ID:*/
store: 'cls-money',
sku: '',
{
publishedAdverts(first: 10, after: 0, where: { status_eq: "Published" }) {
id
jobAdTitle
status
recruitingCompany
opening {
jobNumber
}
navigation {