-
Notifications
You must be signed in to change notification settings - Fork 23
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
cindyli
merged 48 commits into
fluid-project:dev
from
BlueSlug:feat/design-update-GH-46
Mar 10, 2022
Merged
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 c568564
fix: solve bug with getLang function
BlueSlug 851b8c5
fix: restore more recent Docker image version
BlueSlug 811a0a0
feat: reorganize content into collections (WIP)
BlueSlug c8cd51d
feat: refactor category landing page generation
BlueSlug b95df6b
feat: restore content, add breadcrumb & site nav
BlueSlug 50c1a3d
feat: update collection permalinks, add redirects
BlueSlug 744bc57
feat: add techniques templates and image sprites
BlueSlug f3e4b50
feat: generalize techniques templates, reuse them
BlueSlug a4559ce
Removing a sentence that
michelled bdc39a8
Merge pull request #1 from BlueSlug/feat/design-update-GH-46
michelled 7d08dea
Merge pull request #2 from michelled/testBranch
carenwatkins ea365b8
not relevant in new design
carenwatkins 9632b19
Merge pull request #1 from carenwatkins/2022-Refreshed-Content
BlueSlug 5304147
updating semantics and expanding meaning
carenwatkins b6fa226
Update approaches.md
carenwatkins 3239179
Update approaches.md
carenwatkins 6387a37
Update home.md
carenwatkins 026b194
Update perspectives.md
carenwatkins 66aa7da
removed 'their produced'
carenwatkins c847dd1
Update perspectives.md
carenwatkins 40c292b
Merge pull request #2 from carenwatkins/2022-Refreshed-Content
BlueSlug 8388c27
feat: add side content, homepage content, etc
BlueSlug 3a2ee77
fix: solve markdown not rendering inside html tags
BlueSlug 12a2aff
feat: review linter config and fix linting errors
BlueSlug b699885
fix: solve missing site name in topic page titles
BlueSlug c7c63e6
feat: re-enable _redirects after Trivet conversion
BlueSlug a489e44
fix: add missing slash to many links in content
BlueSlug 87300e1
feat: add footer content and imagery
BlueSlug d1545a3
feat: use Sass and add some 7-1 folders and files
BlueSlug 23b9c53
feat: define some colours
BlueSlug da8e4b7
feat: add menu and section styling, BEM rules
BlueSlug c24b231
feat: refine styling rules, serve fonts, fix bugs
BlueSlug 5343d27
feat: refine styles, namely menu and side content
BlueSlug acce6cf
fix: update "best practices" to "good practices"
BlueSlug 91b7d15
feat: add intro content capability for sections
BlueSlug f4744d6
feat: refine homepage styling
BlueSlug 323bc13
feat: refine menu, header and page styling
BlueSlug ebcd99d
feat: refine styling of Related Links side content
BlueSlug 5ee1aff
feat: add thumbnail images to perspectives page
BlueSlug 2a22d52
feat: remove unused CMS files, add note in readme
BlueSlug e6f8f0c
feat: remove RSS plugin and dependencies
BlueSlug 91df59d
fix: remove now-unused CMS dependency and script
BlueSlug 136faaa
fix: solve unexpected wrapping of nav menu
BlueSlug cd624e9
feat: add organizational link to header
BlueSlug ead1f20
fix: update phrasing to better reflect our values
BlueSlug 500d4a9
feat: refine text styling for better readability
BlueSlug 90da9eb
feat: many updates to improve styling
BlueSlug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Publish release | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
dist | ||
node_modules | ||
dist | ||
src/_data/assets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "stylelint-config-fluid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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