Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website updates: main page (still draft) #11

Merged
merged 7 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ trim_trailing_whitespace = false
[*.{java,ts,js}]
indent_size = 4

[*.{yml,yaml,html,rb,css,xml,scss,vto}]
[*.{yml,yaml,html,json,rb,css,xml,scss,vto}]
indent_size = 2
1 change: 1 addition & 0 deletions .github/lastmod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ async function readDir(path: string, relative: string) {

struct.date = gitLastCommitDate(filePath);
struct.layout = 'layouts/bylaws.vto';
struct.cssclasses = ['bylaws', 'has-aside'];
} else if (dirEntry.isDirectory && !ignore.includes(dirEntry.name)) {
await readDir(`${path}/${dirEntry.name}`, `${relative}${dirEntry.name}/`);
}
Expand Down
20 changes: 18 additions & 2 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import resolveUrls from "lume/plugins/resolve_urls.ts";
import sass from "lume/plugins/sass.ts";
import sitemap from "lume/plugins/sitemap.ts";
import slugify_urls from "lume/plugins/slugify_urls.ts";
import svgo from "lume/plugins/svgo.ts";

import toc from "https://deno.land/x/[email protected]/toc.ts";

import anchor from "npm:markdown-it-anchor";
Expand Down Expand Up @@ -61,6 +63,7 @@ site
}))
.use(toc())
.use(slugify_urls({
extensions: [".html"],
replace: {
"&": "and",
"@": "",
Expand Down Expand Up @@ -152,6 +155,19 @@ function ignorePages(structure: Record<string, unknown>, path: string) {
});
}

// Fixup attributes at build time if necessary
site.preprocess(['.md'], (pages) => {
for (const page of pages) {
if (typeof page.data.content !== "string") {
continue;
}
if (/^\/activity\/\d/.test(page.src.path)) {
page.data.cssclasses = page.data.cssclasses || [];
page.data.cssclasses.push('activity', 'has-aside');
}
}
});

site.preprocess([".html"], (filteredPages, allPages) => {
for (const page of filteredPages) {
// For foundation pages:
Expand All @@ -177,7 +193,7 @@ site.preprocess([".html"], (filteredPages, allPages) => {
page.data.tags.push(keys[0]);
}
} else {
console.error(`No metadata for ${page.src.path}`);
// Skip any pages that don't have a corresponding entry in the foundation.yml file
allPages.splice(allPages.indexOf(page), 1);
}

Expand Down Expand Up @@ -233,7 +249,7 @@ site.filter("postLock", (data: Record<string, unknown>) => {
if (data.lockReason) {
result += `<span aria-label="locked">${svg.lock}</span> `;
}
return result ? `<span class="act-status-icon">${result}</span>` : '<span class="act-status-icon"></span>';
return result ? `<span class="act-status-icon">${result}</span>` : `<span class="act-status-icon">${svg.blank}</span>`;
});
site.filter("testLock", (page: Page) => {
return `<span class="act-status-icon">
Expand Down
105 changes: 105 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion site/_data/bylaws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ nav:
- title: Insurance, Indemnification, and Dissolution
href: /bylaws/indemnification-dissolution.html
ord: 8
- title: Ammendments
- title: Amendments
href: /bylaws/amendments.html
ord: 9
46 changes: 46 additions & 0 deletions site/_data/projects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"draft": true,
"name": "Hibernate",
"logo": "https://raw.githubusercontent.com/hibernate/hibernate.org/production/images/hibernate-logo.svg",
"wordmark": true,
"description": "A powerful ORM framework for Java. Hibernate abstracts complex database interactions, simplifying data management and persistence in enterprise Java applications.",
"link": "https://hibernate.org/"
},
{
"name": "Jackson",
"logo": "https://avatars.githubusercontent.com/u/382692?s=200&v=4",
"wordmark": false,
"description": "The go-to library for JSON processing in Java. Jackson offers fast and flexible parsing/generation of JSON for Java applications, enabling seamless data interchange.",
"link": "https://github.com/FasterXML/jackson"
},
{
"name": "J'Bang",
"logo": "https://www.jbang.dev/assets/images/logo.png",
"wordmark": true,
"description": "Unlock Java's scripting potential. JBang makes it easy to run Java applications as scripts without the need for a project setup or build configuration. Ideal for quick experiments, prototypes, or utility scripts.",
"link": "https://www.jbang.dev/"
},
{
"name": "JReleaser",
"logo": "https://jreleaser.org/images/jreleaser-duke.png",
"wordmark": false,
"description": "Automate your Java project releases with ease. JReleaser streamlines packaging and distribution to multiple platforms, integrating with Maven, Gradle, and more. Simplify your release process, from changelogs to deployment.",
"link": "https://jreleaser.org/"
},
{
"name": "Morphia",
"logo": "https://github.com/MorphiaOrg/morphia-docs/blob/229de82b949a8bc21fa4ecc17a617f2726eb6f33/supplemental-ui/img/logo.png?raw=true",
"wordmark": false,
"description": "Bridge the gap between Java and MongoDB. Morphia provides a lightweight type-safe mapping library to simplify working with MongoDB documents using Java.",
"link": "https://morphia.dev/"
},
{
"draft": true,
"name": "OpenRewrite",
"logo": "https://avatars.githubusercontent.com/u/61478321?s=200&v=4",
"wordmark": false,
"description": "Automate the refactoring of your Java codebase. OpenRewrite offers scalable, safe, and idempotent code transformations to modernize and maintain your applications.",
"link": "https://www.openrewrite.org/"
}
]
1 change: 1 addition & 0 deletions site/_data/svg.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
activity: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity-square"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M17 12h-2l-2 5-2-10-2 5H7"/></svg>
announcement: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-megaphone"><path d="m3 11 18-5v12L3 14v-3z"/><path d="M11.6 16.8a3 3 0 1 1-5.8-1.6"/></svg>
blank: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="none" class="blank"></svg>
closed: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-circle"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/></svg>
communication: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-radio-tower"><path d="M4.9 16.1C1 12.2 1 5.8 4.9 1.9"/><path d="M7.8 4.7a6.14 6.14 0 0 0-.8 7.5"/><circle cx="12" cy="9" r="2"/><path d="M16.2 4.8c2 2 2.26 5.11.8 7.47"/><path d="M19.1 1.9a9.96 9.96 0 0 1 0 14.1"/><path d="M9.5 18h5"/><path d="m8 22 4-11 4 11"/></svg>
down: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>
Expand Down
Loading