Skip to content

Commit

Permalink
Use env for api
Browse files Browse the repository at this point in the history
  • Loading branch information
katjam committed Aug 13, 2024
2 parents ba0d464 + 66e2199 commit 2bba798
Show file tree
Hide file tree
Showing 65 changed files with 7,817 additions and 4,161 deletions.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ~~
# values for elm-pages front end
# ~~

CANONICAL_URL=http://localhost:3030/
PLACECAL_API=https://placecal.org/api/v1/graphql
JOIN_US_FUNCTION_URL=https://formspree.io/f/xeqdljwl
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: gfscstudio # Replace with a single Patreon username
open_collective: gfscstudio # Replace with a single Open Collective username
ko_fi: gfscstudio # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on:
schedule:
- cron: "0 08,11,14,17,20 * * *"

jobs:
build:
runs-on: ubuntu-latest
steps:
- run:
curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/1aaca29c-199a-4a3b-b9e9-06c497746397"
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ dist/
.elm-pages/
functions/render/elm-pages-cli.js
*/.DS_Store
.DS_Store
.DS_Store

.env
src/Constants.elm

# Local Netlify folder
.netlify
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16.19.1
231 changes: 231 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

38 changes: 29 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Front-end for [The Trans Dimension](http://transdimension.uk/), an online commun

Funded by the [Comic Relief Tech for Good “Build” fund](https://techforgoodhub.co.uk/build-fund-2021). Read more about the project [here](https://gfsc.studio/2021/12/14/enter-trans-dimension.html).

- Development URL: https://transdimension.netlify.app/
- Staging url: https://transdimension.pages.dev
- Production URL (holding page currently): http://transdimension.uk/

# Development
Expand All @@ -21,6 +21,8 @@ Funded by the [Comic Relief Tech for Good “Build” fund](https://techforgoodh
- make sure you are using the correct node version with `nvm use`
- install with `npm install`

Make sure you copy `.env.example` over into `.env` and edit as appropriate! This must be done before any of the following will work as it generates `src/Constants.elm` which is used in a number of places in the code.

## Build

- `npm start` to start a dev server on http://localhost:3000
Expand All @@ -29,13 +31,13 @@ Funded by the [Comic Relief Tech for Good “Build” fund](https://techforgoodh
## Formatting

We recommend integrating `[email protected]` into your code editor, but if you don't...
- Please run `npm format` to format `.elm` files in `src` before committing code.
- Please run `npm run format` to format `.elm` files in `src` before committing code.

## Testing

We're using elm-test-rs(https://github.com/mpizenberg/elm-test-rs) to run [elm tests](https://package.elm-lang.org/packages/elm-explorations/test/latest/)
We're using [elm-test-rs](https://github.com/mpizenberg/elm-test-rs) to run [elm tests](https://package.elm-lang.org/packages/elm-explorations/test/latest/). It is required to run either `npm start` (quickest) or `npm build` at least once in the project before tests will work.

- run tests with `npm test`
- run tests with `npm test`

## Code & configs

Expand All @@ -49,13 +51,13 @@ We're using elm-test-rs(https://github.com/mpizenberg/elm-test-rs) to run [elm t

- `elm.json` for elm packages used for site
- `elm-tooling.json` for elm packages used for code
- `.env` is used to generate `src/Constants.elm` for elm-pages
- `.nvmrc` contains project node version
- `package.json` for node scripts and packages
- `package-lock.json` for current versions of node packages
- `.nvmrc` contains project node version
- `.netlify.toml` for deploy config
- `tests/*` contains test files
- `public/*` contains static files to be copied direct to build
- `src/*` contains app source files
- `tests/*` contains test files

### Content & Pages

Expand All @@ -70,11 +72,11 @@ We're using elm-test-rs(https://github.com/mpizenberg/elm-test-rs) to run [elm t

## Deployment

Deploys to Netlify
Deploys to Cloudflare Pages

- code is tested and linted automatically before deploy
- when a pull request is created, a preview site is deployed
- when a pull request is merged into `main`, the prodtion site is deployed
- when a pull request is merged into `main`, the production site is deployed

## Development workflow

Expand All @@ -96,3 +98,21 @@ Deploys to Netlify
- check the acceptance criteria have been met (with tests if appropriate)
- add comments & questions
- once approved, leave for the author to squash and merge

## License

Source code is released under the [Hippocratic License](https://firstdonoharm.dev/version/3/0/license/).

Graphic design by [Studio Squid](https://studiosquid.co.uk/) and © Gendered Intelligence 2022.

Illustrations © [Harry Woodgate](https://www.harrywoodgate.com/) 2022.

## Contributing

We welcome new contributors but strongly recommend you have a chat with us in [Geeks for Social Change's Discord server](http://discord.gfsc.studio) and say hi before you do. We will be happy to onboard you properly before you get stuck in.

## Donations

If you'd like to support development, please consider sending us a one-off or regular donation on Ko-fi.

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M43THUM)
4 changes: 3 additions & 1 deletion content/about/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ As part of the process of being listed on the Trans Dimension, we insist that ve

We also know that for many people, trying out new events or groups can sometimes be daunting! We try and make sure that listings go into as much detail as possible about their content and style, so that you know what to expect, and can feel well-informed and excited about attending events and getting to know the trans community in your area!

We have tried to design this website to be as usable as possible. If you think that there is anything we could do to improve the site, please do [drop us a message](mailto:[email protected]).
We have tried to design this website to be as usable as possible. We aim to conform to [WCAG 2.1](https://www.w3.org/WAI/WCAG21/quickref) to level AA.

If you think that there is anything we could do to improve the site, please do [drop us a message](mailto:[email protected]).
9 changes: 9 additions & 0 deletions elm-constants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"path": "./src",
"moduleName": "Constants",
"values": [
"CANONICAL_URL",
"PLACECAL_API",
"JOIN_US_FUNCTION_URL"
]
}
4 changes: 2 additions & 2 deletions elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dependencies": {
"direct": {
"avh4/elm-color": "1.0.0",
"bburdette/toop": "1.2.0",
"danyx23/elm-mimetype": "4.0.1",
"dillonkearns/elm-markdown": "7.0.0",
"dillonkearns/elm-pages": "9.0.0",
Expand All @@ -21,11 +22,10 @@
"hecrj/elm-slug": "1.0.2",
"rtfeldman/elm-css": "17.0.5",
"rtfeldman/elm-iso8601-date-strings": "1.1.4",
"ryannhg/date-format": "2.3.0"
"ryan-haskell/date-format": "1.0.0"
},
"indirect": {
"MartinSStewart/elm-serialize": "1.2.6",
"bburdette/toop": "1.2.0",
"danfishgold/base64-bytes": "1.1.0",
"dillonkearns/elm-bcp47-language-tag": "1.0.1",
"elm/bytes": "1.0.8",
Expand Down
8 changes: 0 additions & 8 deletions netlify.toml

This file was deleted.

Loading

0 comments on commit 2bba798

Please sign in to comment.