Skip to content

Commit

Permalink
add local dev steps; tweak the css for widescreen
Browse files Browse the repository at this point in the history
  • Loading branch information
pcai committed Mar 26, 2024
1 parent 3d48ec1 commit ab408e7
Show file tree
Hide file tree
Showing 11 changed files with 763 additions and 98 deletions.
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# node_modules
node_modules
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 9 additions & 0 deletions devserver.js
Original file line number Diff line number Diff line change
@@ -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}`);
});
25 changes: 10 additions & 15 deletions docs/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions docs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<p data-role="event-date-info"><time>${new Date(event.start_time_raw).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}</time></p>
<p><time>${event.start_time}</time> to <time>${event.end_time}</time></p>
<address data-role="event-venue-info">${event.location}<br></address>
<p><a href="${event.html_link}" class="cta--primary">RSVP</a></p>
<p>${event.description}</p>
<div><a href="${event.html_link}" class="cta--primary">RSVP</a></div>
<div class="events__description">${event.description}</div>
<p><a href="https://www.meetup.com/bostonrb">See all events</a></p>
`;
} else {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ <h2>Join our community</h2>
</main>
<footer class="footer">
</footer>
<script type="text/javascript" src="application.js"></script>
<script src="application.js"></script>
</body>
</html>
Loading

0 comments on commit ab408e7

Please sign in to comment.