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

Fix Accessibility for themes - Lighthouse Integration #64

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
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
27 changes: 27 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# https://github.com/marketplace/actions/lighthouse-ci-action
name: Lighthouse CI for Netlify sites
on: pull_request
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: v18.13.0
- run: npm ci

- name: Wait for the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
id: netlify
with:
site_name: academic-folio
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v9
with:
urls: |
${{ steps.netlify.outputs.url }}
${{ steps.netlify.outputs.url }}/posts/
budgetPath: ./budget.json
uploadArtifacts: true
3 changes: 2 additions & 1 deletion assets/css/_base.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
a {
font-weight: 500;
text-decoration: underline;
color: var(--global-theme-color);

&:hover {
color: var(--global-theme-color);
text-decoration: underline;
}
}

Expand Down
1 change: 1 addition & 0 deletions budget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
2 changes: 1 addition & 1 deletion config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ showRecentNews: true
socialNavbar: true # show social icons on navbar
socialHomePage: true # show social icons on the home page

colorTheme: blue # choose a theme from `data/themes` folder
colorTheme: green # choose a theme from `data/themes` folder
28 changes: 14 additions & 14 deletions data/themes/green.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
lightmode_text_color: '#171717'
lightmode_text_color_light: '#525252'
lightmode_bg_color: '#f5f5f5'
lightmode_theme_color: '#16a34a'
lightmode_header_color: '#f5f5f5'
lightmode_footer_color: '#f5f5f5'
lightmode_divider_color: '#525252'
lightmode_text_color: '#28293d'
lightmode_text_color_light: '#555770'
lightmode_bg_color: '#ffffff'
lightmode_theme_color: '#06C270'
lightmode_header_color: '#f7f7fa'
lightmode_footer_color: '#f7f7fa'
lightmode_divider_color: '#555770'

darkmode_text_color: '#f5f5f5'
darkmode_text_color_dark: '#a3a3a3'
darkmode_bg_color: '#171717'
darkmode_theme_color: '#4ade80'
darkmode_header_color: '#171717'
darkmode_footer_color: '#171717'
darkmode_divider_color: '#a3a3a3'
darkmode_text_color: '#fafafa'
darkmode_text_color_dark: '#8f90a6'
darkmode_bg_color: '#28293d'
darkmode_theme_color: '#39d98a'
darkmode_header_color: '#1c1c28'
darkmode_footer_color: '#1c1c28'
darkmode_divider_color: '#8f90a6'
5 changes: 4 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
typography: ({ theme }) => ({
DEFAULT: {
css: {
a: {
'text-decoration': 'none',
},
h2: {
'margin-top': '0',
},
Expand All @@ -41,7 +44,7 @@ module.exports = {
'--tw-prose-body': theme('colors.primary'),
'--tw-prose-headings': theme('colors.primary'),
'--tw-prose-lead': theme('colors.primary'),
'--tw-prose-links': theme('colors.primary'),
'--tw-prose-links': theme('colors.theme'),
'--tw-prose-bold': theme('colors.primary'),
'--tw-prose-counters': theme('colors.primary'),
'--tw-prose-bullets': theme('colors.primary'),
Expand Down