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

feat: Update website design (GH-46) #48

Merged
merged 48 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
69723a9
feat!: update ILDH to use Trivet for redesign, WIP
BlueSlug Feb 2, 2022
c568564
fix: solve bug with getLang function
BlueSlug Feb 4, 2022
851b8c5
fix: restore more recent Docker image version
BlueSlug Feb 7, 2022
811a0a0
feat: reorganize content into collections (WIP)
BlueSlug Feb 9, 2022
c8cd51d
feat: refactor category landing page generation
BlueSlug Feb 10, 2022
b95df6b
feat: restore content, add breadcrumb & site nav
BlueSlug Feb 11, 2022
50c1a3d
feat: update collection permalinks, add redirects
BlueSlug Feb 14, 2022
744bc57
feat: add techniques templates and image sprites
BlueSlug Feb 14, 2022
f3e4b50
feat: generalize techniques templates, reuse them
BlueSlug Feb 15, 2022
a4559ce
Removing a sentence that
michelled Feb 16, 2022
bdc39a8
Merge pull request #1 from BlueSlug/feat/design-update-GH-46
michelled Feb 16, 2022
7d08dea
Merge pull request #2 from michelled/testBranch
carenwatkins Feb 16, 2022
ea365b8
not relevant in new design
carenwatkins Feb 16, 2022
9632b19
Merge pull request #1 from carenwatkins/2022-Refreshed-Content
BlueSlug Feb 16, 2022
5304147
updating semantics and expanding meaning
carenwatkins Feb 16, 2022
b6fa226
Update approaches.md
carenwatkins Feb 17, 2022
3239179
Update approaches.md
carenwatkins Feb 17, 2022
6387a37
Update home.md
carenwatkins Feb 17, 2022
026b194
Update perspectives.md
carenwatkins Feb 17, 2022
66aa7da
removed 'their produced'
carenwatkins Feb 17, 2022
c847dd1
Update perspectives.md
carenwatkins Feb 17, 2022
40c292b
Merge pull request #2 from carenwatkins/2022-Refreshed-Content
BlueSlug Feb 18, 2022
8388c27
feat: add side content, homepage content, etc
BlueSlug Feb 23, 2022
3a2ee77
fix: solve markdown not rendering inside html tags
BlueSlug Feb 24, 2022
12a2aff
feat: review linter config and fix linting errors
BlueSlug Feb 24, 2022
b699885
fix: solve missing site name in topic page titles
BlueSlug Feb 24, 2022
c7c63e6
feat: re-enable _redirects after Trivet conversion
BlueSlug Feb 24, 2022
a489e44
fix: add missing slash to many links in content
BlueSlug Feb 25, 2022
87300e1
feat: add footer content and imagery
BlueSlug Feb 25, 2022
d1545a3
feat: use Sass and add some 7-1 folders and files
BlueSlug Feb 28, 2022
23b9c53
feat: define some colours
BlueSlug Feb 28, 2022
da8e4b7
feat: add menu and section styling, BEM rules
BlueSlug Feb 28, 2022
c24b231
feat: refine styling rules, serve fonts, fix bugs
BlueSlug Mar 1, 2022
5343d27
feat: refine styles, namely menu and side content
BlueSlug Mar 1, 2022
acce6cf
fix: update "best practices" to "good practices"
BlueSlug Mar 2, 2022
91b7d15
feat: add intro content capability for sections
BlueSlug Mar 4, 2022
f4744d6
feat: refine homepage styling
BlueSlug Mar 8, 2022
323bc13
feat: refine menu, header and page styling
BlueSlug Mar 8, 2022
ebcd99d
feat: refine styling of Related Links side content
BlueSlug Mar 8, 2022
5ee1aff
feat: add thumbnail images to perspectives page
BlueSlug Mar 9, 2022
2a22d52
feat: remove unused CMS files, add note in readme
BlueSlug Mar 9, 2022
e6f8f0c
feat: remove RSS plugin and dependencies
BlueSlug Mar 9, 2022
91df59d
fix: remove now-unused CMS dependency and script
BlueSlug Mar 9, 2022
136faaa
fix: solve unexpected wrapping of nav menu
BlueSlug Mar 9, 2022
cd624e9
feat: add organizational link to header
BlueSlug Mar 9, 2022
ead1f20
fix: update phrasing to better reflect our values
BlueSlug Mar 9, 2022
500d4a9
feat: refine text styling for better readability
BlueSlug Mar 9, 2022
90da9eb
feat: many updates to improve styling
BlueSlug Mar 10, 2022
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
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
insert_final_newline = true

[*.js]
indent_style = space
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2
90 changes: 69 additions & 21 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,101 @@
/*
Copyright the Inclusive Learning Design Handbook copyright holders.

See the AUTHORS.md file at the top-level directory of this distribution and at
https://github.com/fluid-project/handbook.floeproject.org/raw/main/AUTHORS.md.

Licensed under the New BSD license. You may not use this file except in compliance with this License.

You may obtain a copy of the New BSD License at
https://github.com/fluid-project/handbook.floeproject.org/raw/main/LICENSE.md.
*/

"use strict";

const fs = require("fs");
const fluidPlugin = require("@fluid-project/eleventy-plugin-fluid");

const fluidPlugin = require("eleventy-plugin-fluid");
const { EleventyRenderPlugin } = require("@11ty/eleventy");
const MarkdownIt = require("markdown-it");
const navigationPlugin = require("@11ty/eleventy-navigation");
const syntaxHighlightPlugin = require("@11ty/eleventy-plugin-syntaxhighlight");

// Import transforms
const htmlMinTransform = require("./src/transforms/html-min-transform.js");
const parseTransform = require("./src/transforms/parse-transform.js");

// Import data files
const siteConfig = require("./src/_data/config.json");
const getResourceLinks = require("./src/utils/getResourceLinks.js");

module.exports = function (config) {
config.setUseGitIgnore(false);

// Layouts
config.addLayoutAlias("default", "layouts/default.njk");

// Plugins
config.addPlugin(fluidPlugin);
config.addPlugin(navigationPlugin);
config.addPlugin(syntaxHighlightPlugin);
// Filters
const md = new MarkdownIt({
html: true,
quotes: "“”‘’"
});
config.addFilter("markdown", (content) => {
return md.render(content);
});

// Transforms
config.addTransform("htmlmin", htmlMinTransform);
config.addTransform("parse", parseTransform);

// Passthrough copy
config.addPassthroughCopy("src/_redirects");
config.addPassthroughCopy({"src/assets/images": "assets/images"});
config.addPassthroughCopy({"src/assets/fonts": "assets/fonts"});
config.addPassthroughCopy({"node_modules/docs-core/src/static/css": "assets/styles"});
config.addPassthroughCopy({"node_modules/docs-core/src/static/lib": "lib"});
config.addPassthroughCopy({"src/assets/icons": "/"});
config.addPassthroughCopy({"src/assets/images": "assets/images"});

// Plugins
config.addPlugin(EleventyRenderPlugin);
config.addPlugin(fluidPlugin);
config.addPlugin(navigationPlugin);
config.addPlugin(syntaxHighlightPlugin);

// BrowserSync
// Shortcodes
config.addShortcode("svg_sprite", (sprite, altText, ariaHidden = true) => {
const altTextMarkup = altText ? `<title>${altText}</title>` : "";
const ariaHiddenMarkup = ariaHidden ? " aria-hidden=\"true\"" : "";
return `<svg class="ildh-${sprite}"${ariaHiddenMarkup}>${altTextMarkup}<use xlink:href="/assets/images/sprites.svg#${sprite}"></use></svg>`;
});

config.addShortcode("extract_resource_links", (content, sideContentHeadings, lang) => {
return getResourceLinks(content, sideContentHeadings, lang);
});

// 404
config.setBrowserSyncConfig({
callbacks: {
ready: (error, browserSync) => {
const content404 = fs.readFileSync("dist/404.html");
ready: function (err, bs) {

browserSync.addMiddleware("*", (request, response) => {
bs.addMiddleware("*", (req, res) => {
const content_404 = fs.readFileSync("dist/404.html");
// Provides the 404 content without redirect.
response.write(content404);
response.writeHead(404);
response.end();
res.write(content_404);
res.writeHead(404);
res.end();
});
}
}
});

config.on("beforeBuild", () => {
if (!siteConfig.languages[siteConfig.defaultLanguage]) {
process.exitCode = 1;
throw new Error(`The default language, ${siteConfig.defaultLanguage}, configured in src/_data/config.json is not one of your site's supported languages.`);
}
});

return {
dir: {
input: "src",
output: "dist"
input: "src",
output: "dist",
includes: "_includes"
},
passthroughFileCopy: true
};
};
};
20 changes: 20 additions & 0 deletions .fluidlintallrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lintspaces": {
"newlines": {
"excludes": ["./src/assets/fonts/*.ttf"]
},
"jsonindentation": {
"excludes": ["./src/_data/*.json"]
}
},
"markdownlint": {
"includes": ["./.github/**/*.md", "./CHANGELOG.md"],
"excludes": [
"./.github/pull_request_template.md",
"./src/collections/pages/en-CA/footer-context.md",
"./src/collections/pages/en-CA/footer-credits.md",
"./src/collections/pages/en-CA/footer-tagline.md",
"./src/collections/pages/en-CA/toolkits-and-guides.md"
]
}
}
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: Bug
assignees: ''
---

## Describe the bug

A clear and concise description of what the bug is.

### To reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Technical details

### Desktop

- OS: [e.g. iOS]
- Browser & version: [e.g. Chrome 95, Safari 14]

### Mobile device

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser & version: [e.g. stock browser, Safari 15]

### Assistive technology used

- Name: [Name of assistive technology]
- Version: [e.g. 22]

## Additional context or notes

Add any other context about the problem here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Enhancement
assignees: ''
---

## Is your feature request related to a problem?

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternative solutions you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context or notes

Add any other context or screenshots about the feature request here.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check for updates once a month
schedule:
interval: "monthly"
allow:
# Allow direct updates only (for packages named in package.json)
- dependency-type: "direct"
ignore:
- dependency-name: "husky"
versions: [">=5"]
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* [ ] This pull request has been linted by running `npm run lint` without errors
* [ ] This pull request has been tested by running `npm run start` and reviewing affected routes
* [ ] This pull request has been built by running `npm run build` without errors
* [ ] This isn't a duplicate of an existing pull request

## Description

<!-- A description of the pull request -->

## Steps to test

1. <!-- First step -->
2. <!-- Second step -->
3. <!-- and so on... -->

**Expected behavior:** <!-- What should happen -->

## Additional information

<!-- Please provide any additional information that can help us review your contribution. -->

## Related issues

<!-- If this pull request resolves an issue, please indicate the issue number here, e.g. 'Resolves #42' -->
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: |
npm i
env:
CI: true
- name: Lint JavaScript and JSON files
run: |
npm run lint
env:
CI: true
- name: Build with Docker
run: docker build .

16 changes: 16 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is .github/workflows/release-please.yml still needed? The build process defined in the netlify.com for this site should trigger the auto-deploy of the website when there's a push to the main branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the Netlify settings for this site specify the image and command to use for building the site, it seems you're correct that we don't need to keep this action


on:
push:
branches: [ main ]

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: handbook.floeproject.org
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist
node_modules
dist
src/_data/assets.json
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-fluid"
}
19 changes: 19 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Authors

## Copyright Holders

Copyright 2015-2022

This is the list of Inclusive Learning Design Handbook copyright holders. It does not list all individual contributors
because some have assigned copyright to an institution, only made minor changes, or their contributions no longer appear
in the codebase. Please see the version control system's revision history for details on contributions.

* OCAD University

## Contributors

Individual contributions can be viewed on the
[Contributors](https://github.com/fluid-project/handbook.floeproject.org/graphs/contributors) page,
or through the version control system's revision history.

**Note**: Individual authors may not hold copyright. See above "Copyright Holders" section for more information.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

All notable changes to this project will be documented in this file.
See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM node:14.14.0-alpine AS builder

WORKDIR /app

RUN apk add --no-cache git

COPY package.json ./

RUN apk add --no-cache git

RUN npm install

COPY . ./
Expand Down
22 changes: 0 additions & 22 deletions Gruntfile.js

This file was deleted.

Loading