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

feat(gatsby-theme-emilia): Convert Emilia starter to theme #69

Merged
merged 38 commits into from
Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8c4c121
initial
LekoArts Aug 28, 2019
bb5946b
initial
LekoArts Aug 28, 2019
8b4260f
emilia-core
LekoArts Sep 2, 2019
c0a7880
Merge branch 'theme/emilia' of github.com:LekoArts/gatsby-themes into…
LekoArts Sep 2, 2019
138d747
chore(deps): update dependency eslint-plugin-react-hooks to v2 (#66)
renovate[bot] Sep 2, 2019
3d51076
fix(deps): update mdx to ^1.4.0 (#65)
renovate[bot] Sep 2, 2019
9cff426
chore(deps): update theme ui (#62)
renovate[bot] Sep 2, 2019
d382187
chore(deps): Update dependencies (#68)
LekoArts Sep 2, 2019
efa4642
chore(release): Publish
LekoArts Sep 2, 2019
06ce401
emilia-core
LekoArts Sep 2, 2019
3d076ec
got -core working
LekoArts Sep 2, 2019
f5b2513
first part of index page
LekoArts Sep 2, 2019
f53e7bf
update packages
LekoArts Sep 2, 2019
e8d8ee6
index page huge progress with colors
LekoArts Sep 2, 2019
d93ae02
more projects
LekoArts Sep 2, 2019
fec6d2f
finish masonry grid
LekoArts Sep 3, 2019
bc5546c
implemented footer section and toggle
LekoArts Sep 3, 2019
7a96c65
index page working, template WIP
LekoArts Sep 3, 2019
32bf47e
finish template
LekoArts Sep 3, 2019
aa9610a
lint
LekoArts Sep 3, 2019
9736584
add page transitions with wrapPageElement API
LekoArts Sep 3, 2019
bf73770
use seo component on template
LekoArts Sep 4, 2019
40c62aa
fix some typings
LekoArts Sep 4, 2019
13f067b
remove page transition for easier use of theme and instead use only u…
LekoArts Sep 4, 2019
2582b31
guard against window error on build
LekoArts Sep 4, 2019
2fff4ff
animations using react-spring
LekoArts Sep 4, 2019
6e061e3
add cypress tests
LekoArts Sep 4, 2019
1ff9e1a
Merge branch 'master' into theme/emilia
LekoArts Sep 4, 2019
8505081
improve readme and change placeholders
LekoArts Sep 8, 2019
1d4f807
small fix
LekoArts Sep 8, 2019
2376fa3
add sitemap plugin
LekoArts Sep 8, 2019
d8a6f3f
add icons - favicons etc
LekoArts Sep 8, 2019
d328158
modify manifest plugin
LekoArts Sep 8, 2019
3e004f8
fix robots.txt
LekoArts Sep 8, 2019
a377a83
fix
LekoArts Sep 8, 2019
25c688a
update packages
LekoArts Sep 8, 2019
2e5aefe
add emilia to www
LekoArts Sep 8, 2019
8770a46
reduce emilia image file size (and size)
LekoArts Sep 8, 2019
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
16 changes: 12 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,23 @@ jobs:
- <<: *store_results
- <<: *store_results_artifacts

e2e-test-cara:
<<: *e2e-executor
steps:
- e2e-test:
example-name: cara

e2e-test-emma:
<<: *e2e-executor
steps:
- e2e-test:
example-name: emma

e2e-test-cara:
e2e-test-emilia:
<<: *e2e-executor
steps:
- e2e-test:
example-name: cara
example-name: emilia

e2e-test-status-dashboard:
<<: *e2e-executor
Expand All @@ -126,9 +132,11 @@ workflows:
jobs:
- lint
- unit_tests
- e2e-test-emma:
<<: *e2e-test-workflow
- e2e-test-cara:
<<: *e2e-test-workflow
- e2e-test-emilia:
<<: *e2e-test-workflow
- e2e-test-emma:
<<: *e2e-test-workflow
- e2e-test-status-dashboard:
<<: *e2e-test-workflow
50 changes: 50 additions & 0 deletions cypress/e2e/emilia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/// <reference types="../support/index" />
/// <reference types="cypress" />
/// <reference types="@types/testing-library__cypress" />

describe(`gatsby-theme-emilia`, () => {
beforeEach(() => {
cy.visit(`/`).waitForRouteChange()
})
it(`should render the name`, () => {
cy.get(`h1`).within(() => {
cy.getByText(/lekoarts/i)
})
})
it(`should render the location`, () => {
cy.getByText(/germany/i)
})
it(`should render the social links in the header`, () => {
cy.getByTestId(`social-header`).within(() => {
cy.getByText(/Twitter/i)
.should(`have.attr`, `href`, `https://twitter.com/lekoarts_de`)
.getByText(/Instagram/i)
.should(`have.attr`, `href`, `https://www.instagram.com/lekoarts.de/`)
})
})
it(`should render about me`, () => {
cy.getByText(/about me/i).getByText(/Boggarts lavender robes/i)
})
it(`should render the theme footer`, () => {
cy.getByLabelText(`Link to the theme's GitHub repository`)
.contains(`Theme`)
.getByLabelText(`Link to the theme author's website`)
.contains(`LekoArts`)
})
it(`should link and display the project page`, () => {
cy.getByLabelText(/visit emilia project page/i)
.click()
.waitForRouteChange()
.assertRoute(`/emilia`)
.get(`h1`)
.within(() => {
cy.getByText(/emilia/i)
})
.getByText(/10.09.2019/i)
.getByText(/Neon, Lights/i)
.getByAltText(/sean-foley-0JD7kvxAq0Y-unsplash/i)
.getByText(/more projects/i)
.getByLabelText(/visit jodie project page/i)
.getByText(/About Me/i)
})
})
8 changes: 8 additions & 0 deletions examples/emilia/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These are supported funding model platforms

github: [LekoArts]
patreon: lekoarts
open_collective: # Replace with a single Open Collective username
ko_fi: lekoarts
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL
69 changes: 69 additions & 0 deletions examples/emilia/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages
**/node_modules/**

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.*
!.env.example

.cache
**/.cache
public

.idea
.vscode
.DS_Store
21 changes: 21 additions & 0 deletions examples/emilia/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 LekoArts

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
126 changes: 126 additions & 0 deletions examples/emilia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<p align="center">
<a href="https://emilia.lekoarts.de">
<img alt="LekoArts" src="https://img.lekoarts.de/gatsby/gatsby-site-illustration.png" />
</a>
</p>
<h1 align="center">
Gatsby Starter Portfolio: Emilia
</h1>

<p align="center">
<a href="https://github.com/LekoArts/gatsby-starter-portfolio-emilia/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Gatsby Starter Portfolio: Emilia is released under the MIT license." />
</a>
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
<a href="https://twitter.com/intent/follow?screen_name=lekoarts_de">
<img src="https://img.shields.io/twitter/follow/lekoarts_de.svg?label=Follow%20@lekoarts_de" alt="Follow @lekoarts_de" />
</a>
<a href="https://app.netlify.com/sites/portfolio-emilia/deploys">
<img src="https://api.netlify.com/api/v1/badges/5da7d9e1-9b91-44c5-b23d-b47cab98c50d/deploy-status" alt="Netlify Status" />
</a>
</p>

Minimalistic portfolio/photography site with masonry grid, page transitions and big images. Themeable with Theme UI. Using the Gatsby Theme [`@lekoarts/gatsby-theme-emilia`](https://github.com/LekoArts/gatsby-themes/tree/master/themes/gatsby-theme-emilia).

[**Demo Website**](https://emilia.lekoarts.de)

Also be sure to checkout other [Free & Open Source Gatsby Themes](https://themes.lekoarts.de)

## ✨ Features

- MDX
- Fully customizable through the usage of Gatsby Themes (and Theme UI)
- Light Mode / Dark Mode
- Page Transitions
- Masonry grid and focus on big images
- Google Analytics Support
- SEO (Sitemap, OpenGraph tags, Twitter tags)
- Offline Support & WebApp Manifest

## 🚀 Getting Started

1. **Create a Gatsby site.**

Use the Gatsby CLI to create a new site, specifying this project

```sh
gatsby new project-name https://github.com/LekoArts/gatsby-starter-portfolio-emilia
```

2. **Start developing.**

Navigate into your new site's directory and start it up.

```sh
cd project-name
gatsby develop
```

3. **Open the code and start customizing!**

Your site is now running at `http://localhost:8000`!

If you want to learn more about how you can use a Gatsby starter that is configured with a Gatsby theme, you can checkout this [shorter](https://www.gatsbyjs.org/docs/themes/using-a-gatsby-theme/) or [longer](https://www.gatsbyjs.org/tutorial/using-a-theme/) tutorial. The tutorials don't exactly apply to this starter however the concepts are the same.

## 📝 Using and modifying this starter

**Important Note:** Please read the guide [Shadowing in Gatsby Themes](https://www.gatsbyjs.org/docs/themes/shadowing/) to understand how to customize the underlying theme!

This starter creates a new Gatsby site that installs and configures the theme [`@lekoarts/gatsby-theme-emilia`](https://github.com/LekoArts/gatsby-themes/tree/master/themes/gatsby-theme-emilia).

Have a look at the theme's README and files to see what options are available and how you can shadow the various components including Theme UI. Generally speaking you will want to place your files into `src/@lekoarts/gatsby-theme-emilia/` to shadow/override files. The Theme UI config can be configured by shadowing its files in `src/gatsby-plugin-theme-ui/`.

### Adding a new project

New projects will be shown on the index page of this theme and can be added by creating MDX files inside `content/projects`. General setup:

1. Create a new folder inside `content/projects`
1. Create a new `index.mdx` file, and add the frontmatter
1. Add images to the created folder (from step 1)
1. Reference your desired images as your `cover` in the frontmatter
1. Write your content below the frontmatter (optional)

**Frontmatter reference:**

```md
---
cover: "./sean-foley-0JD7kvxAq0Y-unsplash.jpg"
date: "2019-09-10"
title: "Emilia"
areas:
- Neon
- Lights
---
```

The frontmatter alone is enough, if you'd like to add additional content you can do so by writing your content (as usual with MDX) below the frontmatter. It'll be displayed in the header of the project below the date and areas.

### Change your `static` folder

The `static` folder contains the icons, social media images and robots.txt. Don't forget to change these files, too!

## 🤔 Questions or problems?

Please open up an issue on the main repository: [LekoArts/gatsby-themes](https://github.com/LekoArts/gatsby-themes). Thanks!

## 🎓 Learning Gatsby

Looking for more guidance? Full documentation for Gatsby lives [on Gatsby's website](https://www.gatsbyjs.org/).

### Themes

- To learn more about Gatsby themes specifically, we recommend checking out the [theme docs](https://www.gatsbyjs.org/docs/themes/).

### General

- **For most developers, I recommend starting with the [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.

- **To dive straight into code samples, head [to Gatsby's documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Reference Guides_ and _Gatsby API_ sections in the sidebar.

## 🌟 Supporting me

Thanks for using this project! I'm always interested in seeing what people do with my projects, so don't hesitate to tag me on [Twitter](https://twitter.com/lekoarts_de) and share the project with me.

Please star this project, share it on Social Media or consider supporting me on [Patreon](https://www.patreon.com/lekoarts)!

If you want to hire me for **contract/freelance work**, you can do so! [Get in touch with me!](https://www.lekoarts.de/en/contact)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions examples/emilia/content/projects/ars-aurea/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
cover: "./heather-ford-vAfCO8xrz0I-unsplash.jpg"
date: "2019-09-01"
title: "Ars Aurea"
areas:
- Summer
- Beach
---

Hi! I hope you like this theme and enjoy working with it. I've also made other free open-source themes! You can check them out here: [Gatsby Theme Overview](https://themes.lekoarts.de).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions examples/emilia/content/projects/cara/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
cover: "./hian-oliveira-n_L_ppO4QtY-unsplash.jpg"
date: "2019-09-02"
title: "Cara"
areas:
- Free
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions examples/emilia/content/projects/emilia/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
cover: "./sean-foley-0JD7kvxAq0Y-unsplash.jpg"
date: "2019-09-10"
title: "Emilia"
areas:
- Neon
- Lights
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions examples/emilia/content/projects/emma/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
cover: "./tim-gouw-C-lAD9Xizbg-unsplash.jpg"
date: "2019-09-03"
title: "Emma"
areas:
- Nature
- Mountains
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions examples/emilia/content/projects/gatsby-themes/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
cover: "./simon-maage-tXiMrX3Gc-g-unsplash.jpg"
date: "2019-09-04"
title: "Gatsby Themes"
areas:
- Friendship
- Together
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions examples/emilia/content/projects/jodie/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
cover: "./jordan-whitfield-3cNc1U7nJcs-unsplash.jpg"
date: "2019-09-05"
title: "Jodie"
areas:
- Mono
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions examples/emilia/content/projects/minimal-blog/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
cover: "./Space-Tourism.jpg"
date: "2019-09-12"
title: "Minimal Blog"
areas:
- Instagram
---
Loading