Skip to content

Commit

Permalink
Add site.yml global data
Browse files Browse the repository at this point in the history
  • Loading branch information
JedHazaymeh committed Feb 20, 2024
1 parent cf8780c commit c73bbee
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 128 deletions.
10 changes: 9 additions & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const yaml = require('js-yaml')
const { DateTime } = require('luxon')
const readingTime = require('reading-time')
const tocPlugin = require('eleventy-plugin-toc')
Expand All @@ -16,6 +17,10 @@ const pkg = require('./package.json')
module.exports = function (eleventyConfig) {
eleventyConfig.setUseGitIgnore(false)

eleventyConfig.addDataExtension('yml, yaml', (contents) =>
yaml.load(contents)
)

eleventyConfig.addPassthroughCopy('import-map.json')
eleventyConfig.addPassthroughCopy(
path.join(
Expand All @@ -26,7 +31,10 @@ module.exports = function (eleventyConfig) {
)

eleventyConfig.addPlugin(gitBuildPlugin, {
repos: [{ name: 'blog' }, { name: 'open-governance' }],
repos: [
{ name: 'blog', branch: 'patch-tags' },
{ name: 'open-governance' },
],
clean: false,
})
eleventyConfig.addPlugin(pagefindPlugin)
Expand Down
10 changes: 0 additions & 10 deletions src/_data/navbar.json

This file was deleted.

106 changes: 106 additions & 0 deletions src/_data/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
navigation:
global:
- text: Open Governance
link: /open-governance/readme.html
- text: Blog
link: /blog/posts/2024-01-31-redbrick-maintenance-with-nomad.html
blog:
- text: Events
tag: events
- text: Admin Blog
tag: admins
- text: Tutorials
tag: tutorial
- text: Conferences
tag: conferences
- text: Newsletters
tag: newsletter
drawer: navigation
home:
hero:
title:
secondary: DCU's Networking Society.
primary: Become a Member.
body: Redbrick was formed from a battered 386 PC (dubbed Nurse) and bits of borrowed memory - these days we spend our time running tech events for our members and deploying services. We’re open to everyone, regardless of computing level, who want to come and learn!
buttons:
primary:
text: Signup
link: https://dcuclubsandsocs.ie/society/redbrick
secondary:
text: Discord
link: https://discord.redbrick.dcu.ie
cta:
title: Don't Miss Out
body: Redbrick hosts events for everything tech related - from computer programming tutorials to workshops with multinational tech companies.
button:
text: Signup
link: https://dcuclubsandsocs.ie/society/redbrick
committee:
- name: James Hackett
position: 🪑 Chair
username: distro
image: /assets/img/committee/distro.jpg
- name: Shane Whelan
position: 🪑 Vice-Chair
username: pluto
image: /assets/img/committee/pluto.jpg
- name: Jake Farrell
position: 💌 Secretary
username: cheese
image: /assets/img/committee/cheese.png
- name: Malavika Shanker
position: 💸 Treasurer
username: calcifer
image: /assets/img/committee/calcifer.png
- name: Philip Leonard
position: 📢 PRO
username: payne
image: /assets/img/committee/payne.png
- name: Ishita Gupta
position: 🎨 GDO
username: ishitag
image: /assets/img/committee/ishitag.jpg
- name: Dominic Connor
position: 🚀 SysAdmin
username: wizzdom
image: /assets/img/committee/wizzdom.png
- name: Cathal O'Grady
position: 🚀 SysAdmin
username: cathalog
image: /assets/img/committee/cathalog.jpg
- name: Gavin Holahan
position: 🍼 SysAdmin
username: hypnoant
image: /assets/img/committee/hypnoant.png
- name: Jed Hazaymeh
position: 👾 Webmaster
username: magma
image: /assets/img/committee/magma.png
- name: Ayden Jahola
position: 🙌 Helpdesk
username: ayden
image: /assets/img/committee/ayden.png
- name: Francis Baxter
position: 🙌 Helpdesk
username: fbaxter
image: /assets/img/committee/fbaxter.png
- name: Robert Healy
position: 📅 Events Officer
username: orb
image: /assets/img/committee/orb.png
- name: Stefania Ogun
position: 📅 Events Officer
username: stefania
image: /assets/img/committee/stefania.jpg
- name: Callum Browne
position: 💎 Ordinary Member
username: browner
image: /assets/img/committee/browner.png
- name: Daniel McEntee
position: 💎 Ordinary Member
username: kronos
image: /assets/img/committee/kronos.png
- name: Dennis Custiuc
position: 🥇 First Year Rep.
username: swooshy
image: /assets/img/committee/swooshy.png
4 changes: 2 additions & 2 deletions src/_includes/global/drawer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<nav tabindex="0" class="menu">
<li>
<header class="menu-title">Redbrick</header>
{% for link in navbar %}
<li><a href="{{ link.url }}">{{ link.name }}</a></li>
{% for entry in site.navigation.global %}
<li><a href="{{ entry.link }}">{{ entry.text }}</a></li>
{% endfor %}
</li>
{% if page.url and "/open-governance/" in page.url %}
Expand Down
4 changes: 2 additions & 2 deletions src/_includes/global/header.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
{# Navigation #}
<nav class="hidden lg:flex" aria-label="Global">
<ul class="menu menu-horizontal px-1">
{% for link in navbar %}
<li><a href="{{ link.url }}">{{ link.name }}</a></li>
{% for entry in site.navigation.global %}
<li><a href="{{ entry.link }}">{{ entry.text }}</a></li>
{% endfor %}
</ul>
</nav>
Expand Down
4 changes: 2 additions & 2 deletions src/_includes/home/sections/committee.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="bg-base-100">
<div class="flex p-5 md:p-10 space-x-5 md:space-x-10 overflow-x-scroll">
{% for member in sections.committee -%}
{% for member in site.home.committee -%}
<div data-cmt-trigger class="flex flex-col items-center">
<h2 data-cmt-title="{{ member.position }}" class="font-mono font-bold text-sm md:text-md h-10 whitespace-nowrap">
{{ member.position}}
Expand Down Expand Up @@ -39,7 +39,7 @@
once: true,
end: "bottom bottom",
onEnter: (batch) => batch.forEach((element, i) => {
const stagger = 0.3
const stagger = 0.2
const cardElement = element.querySelector("[data-cmt-card]")
const titleElement = element.querySelector("[data-cmt-title]")
gsap.to(cardElement, {
Expand Down
8 changes: 4 additions & 4 deletions src/_includes/home/sections/cta.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div class="hero-content text-center">
<div class="max-w-xl">
<h1 class="text-white text-shadow text-3xl lg:text-5xl font-bold mb-2 lg:mb-4">
{{ sections.cta.title }}
{{ site.home.cta.title }}
</h1>
<p class="text-white text-shadow sm:text-lg/relaxed mb-8">
{{ sections.cta.body }}
{{ site.home.cta.body }}
</p>
<a
class="btn btn-primary shadow-lg w-full sm:w-36"
href="{{ sections.cta.button.link }}"
href="{{ site.home.cta.button.link }}"
rel="noreferrer"
target="_blank"
>
{{ sections.cta.button.text }}
{{ site.home.cta.button.text }}
</a>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions src/_includes/home/sections/hero.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<div class="hero-content px-5 py-10 lg:py-20 h-full w-full flex-col md:flex-row">
<div class="max-w-md lg:max-w-2xl text-center md:text-start">
<h1 class="text-3xl lg:text-5xl font-bold">
{{ sections.hero.title.secondary }}
<strong class="text-primary sm:block">{{ sections.hero.title.primary }}</strong>
{{ site.home.hero.title.secondary }}
<strong class="text-primary sm:block">{{ site.home.hero.title.primary }}</strong>
</h1>
<p class="mt-4 text-md/relaxed">
{{ sections.hero.body }}
{{ site.home.hero.body }}
</p>
<div class="mt-8 flex flex-wrap gap-4 justify-center md:justify-start">
<a class="btn btn-primary w-full sm:w-36" href="{{ sections.hero.buttons.primary.link }}" rel="noreferrer" target="_blank">
{{ sections.hero.buttons.primary.text }}
<a class="btn btn-primary w-full sm:w-36" href="{{ site.home.hero.buttons.primary.link }}" rel="noreferrer" target="_blank">
{{ site.home.hero.buttons.primary.text }}
</a>
<a class="btn btn-neutral w-full sm:w-36" href="{{ sections.hero.buttons.secondary.link }}" rel="noreferrer" target="_blank">
{{ sections.hero.buttons.secondary.text }}
<a class="btn btn-neutral w-full sm:w-36" href="{{ site.home.hero.buttons.secondary.link }}" rel="noreferrer" target="_blank">
{{ site.home.hero.buttons.secondary.text }}
</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/home/sections/hero/hero-graphic.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="relative -z-20 perspective-1000 w-full md:w-1/2 aspect-square">
<div class="relative -z-20 perspective-1600 w-full md:w-1/2 aspect-square">
<img
class="hero-card bottom-[62%] left-[12%] h-[32%]"
src="/assets/img/newsletter-snap.webp"
Expand Down
11 changes: 0 additions & 11 deletions src/_includes/home/sections/intro/terminal.njk

This file was deleted.

88 changes: 0 additions & 88 deletions src/site/index.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,5 @@
---
layout: default.njk
sections:
hero:
title:
secondary: DCU's Networking Society.
primary: Become a Member.
body: Redbrick was formed from a battered 386 PC (dubbed Nurse) and bits of borrowed memory - these days we spend our time running tech events for our members and deploying services. We’re open to everyone, regardless of computing level, who want to come and learn!
buttons:
primary:
text: Signup
link: https://dcuclubsandsocs.ie/society/redbrick
secondary:
text: Discord
link: https://discord.redbrick.dcu.ie
committee:
- name: James Hackett
position: 🪑 Chair
username: distro
image: /assets/img/committee/distro.jpg
- name: Shane Whelan
position: 🪑 Vice-Chair
username: pluto
image: /assets/img/committee/pluto.jpg
- name: Jake Farrell
position: 💌 Secretary
username: cheese
image: /assets/img/committee/cheese.png
- name: Malavika Shanker
position: 💸 Treasurer
username: calcifer
image: /assets/img/committee/calcifer.png
- name: Philip Leonard
position: 📢 PRO
username: payne
image: /assets/img/committee/payne.png
- name: Ishita Gupta
position: 🎨 GDO
username: ishitag
image: /assets/img/committee/ishitag.jpg
- name: Dominic Connor
position: 🚀 SysAdmin
username: wizzdom
image: /assets/img/committee/wizzdom.png
- name: Cathal O'Grady
position: 🚀 SysAdmin
username: cathalog
image: /assets/img/committee/cathalog.jpg
- name: Gavin Holahan
position: 🍼 SysAdmin
username: hypnoant
image: /assets/img/committee/hypnoant.png
- name: Jed Hazaymeh
position: 👾 Webmaster
username: magma
image: /assets/img/committee/magma.png
- name: Ayden Jahola
position: 🙌 Helpdesk
username: ayden
image: /assets/img/committee/ayden.png
- name: Francis Baxter
position: 🙌 Helpdesk
username: fbaxter
image: /assets/img/committee/fbaxter.png
- name: Robert Healy
position: 📅 Events Officer
username: orb
image: /assets/img/committee/orb.png
- name: Stefania Ogun
position: 📅 Events Officer
username: stefania
image: /assets/img/committee/stefania.jpg
- name: Callum Browne
position: 💎 Ordinary Member
username: browner
image: /assets/img/committee/browner.png
- name: Daniel McEntee
position: 💎 Ordinary Member
username: kronos
image: /assets/img/committee/kronos.png
- name: Dennis Custiuc
position: 🥇 First Year Rep.
username: swooshy
image: /assets/img/committee/swooshy.png
cta:
title: Don't Miss Out
body: Redbrick hosts events for everything tech related - from computer programming tutorials to workshops with multinational tech companies.
button:
text: Signup
link: https://dcuclubsandsocs.ie/society/redbrick
---
<main>
{% include "home/sections/hero.njk" %}
Expand Down

0 comments on commit c73bbee

Please sign in to comment.