diff --git a/.codeclimate.yml b/.codeclimate.yml
new file mode 100644
index 00000000..84ccb8b8
--- /dev/null
+++ b/.codeclimate.yml
@@ -0,0 +1,5 @@
+version: '2'
+checks:
+ method-lines:
+ config:
+ threshold: 50 # Gatsby's StaticQuery makes render functions pretty long
diff --git a/LICENSE b/LICENSE
index fc487c46..c4331e38 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2008-2017 Matthias Kretschmann
+Copyright (c) 2008-2018 Matthias Kretschmann
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:
diff --git a/LICENSE-content b/LICENSE-content
index ac50ae93..5ce29441 100644
--- a/LICENSE-content
+++ b/LICENSE-content
@@ -1,5 +1,3 @@
-All post content under `_src/_posts` is licensed under a
-Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
-License.
+All post content under `./content/posts` is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
http://creativecommons.org/licenses/by-nc-sa/4.0/.
diff --git a/LICENSE-photos b/LICENSE-photos
index d789f81c..e4e1e1d5 100644
--- a/LICENSE-photos
+++ b/LICENSE-photos
@@ -1,7 +1,6 @@
-All photos & image assets under `_src/_media`, `_src/assets/img`, and
-`assets sheet.psd` are plain ol' copyright.
+All photos & image assets under `./content/media`, `./src/images`, and `assets sheet.psd` are plain ol' copyright.
-Copyright (c) 2008–2017 Matthias Kretschmann
+Copyright (c) 2008–2018 Matthias Kretschmann
Don't care if you fork & play with it, but you're not allowed to publish
anything from it as a whole without my written permission.
diff --git a/README.md b/README.md
index c02e6c74..3e7942c3 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,18 @@
# blog
-> [kremalicious.com](http://kremalicious.com) built with [Gatsby](http://gatsbyjs.org). Neat.
+> My blog [kremalicious.com](http://kremalicious.com) built with [Gatsby](http://gatsbyjs.org). Neat.
[![Build Status](https://travis-ci.com/kremalicious/kremalicious3.svg?branch=master)](https://travis-ci.com/kremalicious/kremalicious3)
+[![Maintainability](https://api.codeclimate.com/v1/badges/1b7f317ccca9a430ee59/maintainability)](https://codeclimate.com/github/kremalicious/kremalicious3/maintainability)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/22716f4e00d14df8991af76384193953)](https://www.codacy.com/app/kremalicious/kremalicious3)
[![Greenkeeper badge](https://badges.greenkeeper.io/kremalicious/kremalicious3.svg)](https://greenkeeper.io/)
## Requirements
You need to have the following tools installed on your development machine before moving on:
-- [Node.js](http://nodejs.org/) & [npm](https://npmjs.org/)
+- [Node.js](http://nodejs.org/)
+- [npm](https://npmjs.org/)
## Get up and running
@@ -18,7 +21,7 @@ You need to have the following tools installed on your development machine befor
Run the following command from the repository's root folder to install all dependencies.
```bash
-npm install
+npm i
```
### Development server
@@ -35,21 +38,22 @@ npm run build
## Licenses
+The MIT License (MIT)
+
+except for:
+
### Posts
-
-All post content under `_src/_posts` is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
+
+
+All post content under `./content/posts` is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
### Photos & images
-All photos & image assets under `_src/_media`, `_src/assets/img`, and `assets sheet.psd` are plain ol' copyright.
+All photos & image assets under `./content/media`, `./src/images`, and `assets sheet.psd` are plain ol' copyright.
Copyright (c) 2008–2018 Matthias Kretschmann
Don't care if you fork & play with it, but you're not allowed to publish anything from it as a whole without my written permission.
-
-### Everything else
-
-The MIT License (MIT)
diff --git a/_src/_assets/js/_menu.js b/_src/_assets/js/_menu.js
deleted file mode 100644
index 80546c51..00000000
--- a/_src/_assets/js/_menu.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* exported krlcMenu */
-
-const krlcMenu = (() => { // eslint-disable-line no-unused-vars
- const _config = {
- thesite: document.getElementsByClassName('site')[0],
- thelink: document.getElementsByClassName('menu-btn')[0],
- thepop: document.getElementsByClassName('nav-popover')[0]
- }
-
- const _private = {
- toggleMenu() {
- _config.thelink.addEventListener('click', e => {
- e.preventDefault()
-
- // Toggle menu
- _config.thesite.classList.toggle('has-menu-open')
-
- // Dont close thepop when you click on thepop
- _config.thepop.addEventListener('click', e => {
- e.stopPropagation()
- })
-
- // And dont close thepop now
- e.stopPropagation()
- })
- }
- }
-
- return {
- init: _private.toggleMenu
- }
-})(); // eslint-disable-line semi
diff --git a/_src/_assets/js/_modals.js b/_src/_assets/js/_modals.js
deleted file mode 100644
index c0376d5f..00000000
--- a/_src/_assets/js/_modals.js
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Vex modals
-//
-
-/* global vex, fetch, ClipboardJS, QRious */
-/* exported krlcModals */
-
-/* eslint-disable spaced-comment */
-//=require vex-js/dist/js/vex.combined.js
-//=require clipboard/dist/clipboard.js
-//=require qrious/dist/qrious.js
-/* eslint-enable spaced-comment */
-
-const krlcModals = (() => { // eslint-disable-line no-unused-vars
- const _config = {
- btcVexTriggers: document.querySelectorAll('.js-vex-btc')
- }
-
- let btcAddress
- let ethAddress
-
- const _private = {
- getBtcAddress() {
- const url = '/api/site.json'
-
- fetch(url)
- .then(res => res.json())
- .then(data_ => {
- btcAddress = data_[0].author.bitcoin
- ethAddress = data_[0].author.ether
- })
- .catch(err => console.error(err))
-
- return { btcAddress, ethAddress }
- },
-
- vexBtc() {
- _config.btcVexTriggers.forEach(el => {
- el.addEventListener('click', e => {
- e.preventDefault()
-
- vex.defaultOptions.className = 'vex-theme-kremalicious vex-bitcoin'
- vex.dialog.buttons.YES.text = 'Close'
- vex.open({ unsafeContent: `
-