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

Spike/update home page to lit2 #17

Merged
merged 20 commits into from
Nov 12, 2021
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
- name: Build
run: |
yarn clean && yarn build
- name: Storybook
run: |
yarn storybook:build
# - name: Storybook
# run: |
# yarn storybook:build
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ jobs:
- name: Installing project dependencies
run: |
yarn install --frozen-lockfile
- name: Lint
run: |
yarn lint
- name: Test
run: |
yarn test
- name: Build
run: |
yarn clean && yarn build
18 changes: 9 additions & 9 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)",
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)',
'../stories/**/*.stories.mdx',
'../stories/**/*.stories.@(js|jsx|ts|tsx)'
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials'
]
}
};
10 changes: 5 additions & 5 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import '../src/theme.css';

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
date: /Date$/
}
}
};
39 changes: 38 additions & 1 deletion greenwood.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
const rollupPluginAnalyzer = require('rollup-plugin-analyzer');
const path = require('path');
const pluginImportCss = require('@greenwood/plugin-import-css');
const pluginPostCss = require('@greenwood/plugin-postcss');
const rollupPluginAnalyzer = require('rollup-plugin-analyzer');
const rollupPluginVisualizer = require('rollup-plugin-visualizer').default;
const { ResourceInterface } = require('@greenwood/cli/src/lib/resource-interface');
const { getNodeModulesLocationForPackage } = require('@greenwood/cli/src/lib/node-modules-utils');

class FontAwesomeResource extends ResourceInterface {
async shouldResolve(url) {
const isFontAweome = url.indexOf('fonts/fontawesome-webfont') > 0;

return Promise.resolve(isFontAweome);
}

async resolve(url) {
const nodeModulesLocation = getNodeModulesLocationForPackage('font-awesome');
const barePath = this.getBareUrlPath(url);

return Promise.resolve(path.join(nodeModulesLocation, barePath));
}
}

module.exports = {
mode: 'spa',
Expand All @@ -11,6 +30,24 @@ module.exports = {
},
plugins: [
pluginPostCss(),
...pluginImportCss(),
...[{
type: 'copy',
name: 'plugin-copy-font-awesome',
provider: (compilation) => {
const { outputDir, projectDirectory } = compilation.context;

return [{
// can only copy a directory to a directory
from: path.join(projectDirectory, 'node_modules/font-awesome/fonts'),
to: path.join(outputDir, 'fonts')
}];
}
}, {
type: 'resource',
name: 'plugin-resource-font-awesome',
provider: (compilation, options) => new FontAwesomeResource(compilation, options)
}],
{
type: 'rollup',
name: 'rollup-plugin-analyzer',
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"license": "Apache-2.0",
"scripts": {
"clean": "rimraf .greenwood/ public/ reports/ storybook-static/",
"lint": "eslint \"*.js\" \"./src/**/*.js\" && ls-lint && stylelint \"./src/**/*.css\" \"./src/**/*.js\"",
"lint": "eslint \"*.js\" \"./.storybook/*.js\" \"./src/**/*.js\" && ls-lint \"./src/**/*.js\"",
"develop": "greenwood develop",
"build": "greenwood build",
"start": "yarn develop",
Expand All @@ -33,6 +33,7 @@
},
"dependencies": {
"bootstrap": "4.0.0-alpha.4",
"font-awesome": "4.6.3",
"lit": "^2.0.0-rc.2",
"lit-redux-router": "~0.19.0",
"pwa-helpers": "^0.9.1",
Expand All @@ -42,12 +43,14 @@
"devDependencies": {
"@babel/core": "^7.14.6",
"@esm-bundle/chai": "^4.3.4",
"@greenwood/cli": "^0.16.0",
"@greenwood/plugin-postcss": "^0.16.0",
"@greenwood/cli": "^0.19.1",
"@greenwood/plugin-import-css": "^0.19.1",
"@greenwood/plugin-postcss": "^0.19.1",
"@ls-lint/ls-lint": "^1.10.0",
"@storybook/addon-actions": "^6.3.2",
"@storybook/addon-essentials": "^6.3.2",
"@storybook/addon-links": "^6.3.2",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/web-components": "^6.3.2",
"@web/test-runner": "^0.13.13",
"@web/test-runner-junit-reporter": "^0.4.4",
Expand Down
1 change: 1 addition & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
plugins: [
require('postcss-import'),
require('postcss-nested')
]
};
Binary file added src/assets/home-banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions src/components/events-calendar/events-calendar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@import '../../theme.css';

:host {

& .as-events-calendar__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}

& .as-events-calendar__header-text {
margin: 0;
text-align: center;
}

& .as-events-calendar__month {
font-size: 1.25rem;
font-weight: 700;
}

& .as-events-calendar__btn {
background-color: var(--color-dark);
color: var(--color-tertiary);
}

& .as-events-calendar__days {
display: flex;
justify-content: space-between;
}

& .as-events-calendar__week {
display: flex;
height: 60px;
}

& .as-events-calendar__day-name {
display: flex;
justify-content: center;
width: 14.285%;
}

& .as-events-calendar__day {
display: flex;
width: 14.285%;
align-items: center;
justify-content: center;
border: 1px solid var(--color-secondary);
background-color: var(--color-dark);
color: var(--color-tertiary);
font-size: 1rem;
}

& .as-events-calendar__day-event {
color: var(--color-secondary);
font-size: 2rem;
cursor: pointer;
}
}
Loading