From ab408e799ea89bfb99eab6983b7c125706fa1f7e Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Tue, 26 Mar 2024 18:01:23 +0000 Subject: [PATCH] add local dev steps; tweak the css for widescreen --- .devcontainer/devcontainer.json | 22 + .github/dependabot.yml | 12 + .gitignore | 3 + README.md | 19 +- devserver.js | 9 + docs/application.css | 25 +- docs/application.js | 4 +- docs/index.html | 2 +- package-lock.json | 690 ++++++++++++++++++++++++++++++++ package.json | 8 + service.mjs | 67 ---- 11 files changed, 763 insertions(+), 98 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/dependabot.yml create mode 100644 .gitignore create mode 100644 devserver.js create mode 100644 package-lock.json create mode 100644 package.json delete mode 100644 service.mjs diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3ef3aa1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +{ + "name": "Node.js", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/javascript-node:20" + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f33a02c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# 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 more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31b1b22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +# node_modules +node_modules diff --git a/README.md b/README.md index 6aa02fd..894a49a 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,12 @@ # bostonrubygroup.org -Run the service that hits the meetup.com API locally: +This is the source code for the Boston Ruby Group website: https://www.bostonrubygroup.com/ -```sh -node service.mjs -``` +## Local development -Run it with a different group name to test out the event display: +* npm install +* npm start -```sh -GROUP=awesomeboston node service.mjs -``` +## Deployment -Open the webpage locally: - -```sh -open docs/index.html -``` +This is a static no-build site hosted on github pages. To deploy it, push to the main branch. diff --git a/devserver.js b/devserver.js new file mode 100644 index 0000000..29a7312 --- /dev/null +++ b/devserver.js @@ -0,0 +1,9 @@ +const express = require('express'); +const app = express(); +const port = 3000; + +app.use(express.static(`${__dirname}/docs`)); + +app.listen(port, () => { + console.log(`Server running at http://localhost:${port}`); +}); diff --git a/docs/application.css b/docs/application.css index 4ae5fb1..391af28 100644 --- a/docs/application.css +++ b/docs/application.css @@ -287,12 +287,12 @@ footer { .events__list { display: grid; - grid-gap: 4rem + gap: 3rem } @media screen and (min-width: 80em) { .events__list { - grid-gap: 1rem; + gap: 3rem; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(6, 1fr); margin-top: 2rem @@ -313,34 +313,29 @@ footer { @media screen and (min-width: 80em) { .events__item:nth-of-type(1) { - grid-column: 4/6; - grid-row: 1/3 + grid-column: 1/6; + grid-row: 1/5 } .events__item:nth-of-type(2) { - grid-column: 1/3; - grid-row: 3/5; - text-align: right - } - - .events__item:nth-of-type(2) h2::after { - margin-left: auto + grid-column: 1/6; + grid-row: 5/6; } .events__item:nth-of-type(3) { - grid-column: 3/5; - grid-row: 5/7 + grid-column: 1/6; + grid-row: 6/7; } } .events__item-title { font-size: 1.25rem; font-weight: 700; - margin-bottom: 1.5rem + margin-bottom: .5rem } .events__description { - margin-bottom: 1.5rem; + margin-bottom: .5rem; display: block } diff --git a/docs/application.js b/docs/application.js index 3980d9e..1b9cc01 100644 --- a/docs/application.js +++ b/docs/application.js @@ -20,8 +20,8 @@
to
${event.location}${event.description}
+ +