35 | 36 | {blogEntry.title} 37 | 38 |
39 | 45 | 46 |47 | 48 | Read more … 49 | 50 |
51 |├── gatsby-browser.js
├── .gitignore
├── src
├── .DS_Store
├── images
│ ├── icon.png
│ └── trials-logo.svg
├── styles
│ └── global.css
├── utils
│ └── dates.js
├── templates
│ ├── post.js
│ └── home.js
├── pages
│ ├── 404.js
│ └── event.js
└── components
│ ├── nav.js
│ └── layout.js
├── postcss.config.js
├── README.md
├── tailwind.config.js
├── gatsby-config.js
├── package.json
└── gatsby-node.js
/gatsby-browser.js:
--------------------------------------------------------------------------------
1 | import './src/styles/global.css';
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .cache/
3 | public
4 | .env
5 |
--------------------------------------------------------------------------------
/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mattlangtree/trials-australia-gatsby/main/src/.DS_Store
--------------------------------------------------------------------------------
/src/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mattlangtree/trials-australia-gatsby/main/src/images/icon.png
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/src/styles/global.css:
--------------------------------------------------------------------------------
1 | /* ./src/styles/global.css */
2 | @tailwind base;
3 | @tailwind components;
4 | @tailwind utilities;
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | An example of building out Trials Australia using Gatsby.
2 |
3 | This is a demo for now and not actually powering the [TA site](https://trials.com.au/).
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | purge: ['./src/**/*.{js,jsx,ts,tsx}'],
3 | darkMode: false, // or 'media' or 'class'
4 | theme: {
5 | extend: {},
6 | },
7 | variants: {
8 | extend: {},
9 | },
10 | plugins: ['gatsby-plugin-postcss'],
11 | }
12 |
--------------------------------------------------------------------------------
/gatsby-config.js:
--------------------------------------------------------------------------------
1 | require("dotenv").config({
2 | path: `.env`,
3 | })
4 |
5 | module.exports = {
6 | siteMetadata: {
7 | siteUrl: "https://www.trials.com.au",
8 | title: "Trials Australia",
9 | },
10 | plugins: [
11 | "gatsby-plugin-postcss",
12 | `gatsby-source-craft`
13 | ],
14 | };
15 |
--------------------------------------------------------------------------------
/src/utils/dates.js:
--------------------------------------------------------------------------------
1 | const shortMonthNames = [
2 | "Jan",
3 | "Feb",
4 | "Mar",
5 | "Apr",
6 | "May",
7 | "Jun",
8 | "Jul",
9 | "Aug",
10 | "Sep",
11 | "Oct",
12 | "Nov",
13 | "Dec",
14 | ]
15 |
16 | function getPrettyDate(dateString) {
17 | const date = new Date(dateString)
18 |
19 | const year = date.getFullYear()
20 | const monthIndex = date.getMonth()
21 | const month = shortMonthNames[monthIndex]
22 | const day = date.getDate()
23 |
24 | return `${day} ${month} ${year}`
25 | }
26 |
27 | function getStandardDate(dateString) {
28 | const date = new Date(dateString)
29 | const formatted = date.toISOString().slice(0, 10)
30 |
31 | return formatted
32 | }
33 |
34 | export { getPrettyDate, getStandardDate }
35 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trials-australia",
3 | "version": "1.0.0",
4 | "private": true,
5 | "description": "Trials Australia",
6 | "author": "Matt Langtree",
7 | "keywords": [
8 | "gatsby"
9 | ],
10 | "scripts": {
11 | "develop": "gatsby develop",
12 | "start": "gatsby develop",
13 | "build": "gatsby build",
14 | "serve": "gatsby serve",
15 | "clean": "gatsby clean"
16 | },
17 | "dependencies": {
18 | "dotenv": "^10.0.0",
19 | "gatsby": "^3.10.2",
20 | "gatsby-source-graphql": "^3.14.0",
21 | "react": "^17.0.1",
22 | "react-dom": "^17.0.1",
23 | "react-helmet": "^6.1.0"
24 | },
25 | "devDependencies": {
26 | "autoprefixer": "^10.3.1",
27 | "gatsby-plugin-postcss": "^4.10.0",
28 | "gatsby-source-craft": "^2.0.3",
29 | "postcss": "^8.3.6",
30 | "tailwindcss": "^2.2.7"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/templates/post.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | import { graphql } from 'gatsby'
4 | import Layout from "../components/layout"
5 |
6 | import { getPrettyDate, getStandardDate } from "../utils/dates"
7 |
8 | export const query = graphql`
9 | query BlogPostQuery($slug: String!) {
10 | entry: craftPostsPostsEntry(slug: { eq: $slug }) {
11 | id
12 | title
13 | postDate
14 | postBody
15 | url
16 | author {
17 | fullName
18 | }
19 | }
20 | }
21 | `
22 |
23 | const BlogPostPage = ({ data: { entry } }) => {
24 | return (
25 |
34 | Sorry{" "}
35 |
36 | 😔
37 | {" "}
38 | we couldn’t find what you were looking for.
39 |
47 |
48 | Read more …
49 |
50 | {entry.title}
27 |
28 | Page not found
33 |
40 | {process.env.NODE_ENV === "development" ? (
41 | <>
42 |
43 | Try creating a page in src/pages/.
44 |
45 | >
46 | ) : null}
47 |
48 | Go home.
49 |
14 |
15 |
29 |
29 | {site.siteMetadata.title}
30 |
31 |
32 | {blogPosts.nodes.map((blogEntry, i) => (
33 |
35 |
36 | {blogEntry.title}
37 |
38 |
39 |
45 |
46 |
58 | Glenmaggie is back in 2022 with lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur 61 | tincidunt consequat sapien, sed aliquam felis molestie vitae. Ut dignissim nisl quis euismod 62 | tristique. Aenean eget sapien nec ligula egestas scelerisque sed quis diam. Duis porttitor aliquam 63 | justo, et vulputate velit aliquam eget. Mauris volutpat, nibh sed elementum ornare, tortor nisi 64 | convallis diam, in aliquam neque magna non erat. Phasellus venenatis pharetra nulla. Proin id 65 | ullamcorper dolor, in rhoncus libero.
66 |Entries will open on the 20th March with lorem ipsum dolor sit amet, consectetur adipiscing elit. 67 | Curabitur tincidunt consequat sapien, sed aliquam felis molestie vitae. Ut dignissim nisl quis 68 | euismod tristique. Aenean eget sapien nec ligula egestas scelerisque sed quis diam. Duis porttitor 69 | aliquam justo, et vulputate velit aliquam eget. Mauris volutpat, nibh sed elementum ornare, tortor 70 | nisi convallis diam, in aliquam neque magna non erat. Phasellus venenatis pharetra nulla. Proin id 71 | ullamcorper dolor, in rhoncus libero.
72 |Oakleigh MCC is a passionate group of 100+ trials riders and operates out of the club grounds in 76 | the Melbourne suburb of Clayton. They have been hosting the annual Easter Trial at Glenmaggie for 77 | decades.
78 |79 | Oakleigh MCC Website | Oakleigh MCC Facebook 81 |
82 |Glenmaggie, Victoria
121 |How to find the venue
122 |From Glenmaggie, travel north on the Heyfield Jamieson Rd (C486) for approx. 8kms. Site is at 124 | Greens Gully Bridge on the left hand side. 125 |
126 |Maps Reference: -37.854593, 146.706603
127 |