Skip to content

Commit

Permalink
feat(gatsby-theme-emilia): Convert Emilia starter to theme (#69)
Browse files Browse the repository at this point in the history
Fixes #17

Modifies the style a bit, more polished now. Also with dark/light mode toggle and all that other good stuff.
  • Loading branch information
LekoArts authored Sep 8, 2019
1 parent 387f559 commit 3d54047
Show file tree
Hide file tree
Showing 91 changed files with 3,542 additions and 484 deletions.
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

0 comments on commit 3d54047

Please sign in to comment.