Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
surjithctly committed Sep 21, 2020
0 parents commit 80bfee6
Show file tree
Hide file tree
Showing 16 changed files with 256 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = function (eleventyConfig) {
eleventyConfig.setUseGitIgnore(false);

eleventyConfig.addWatchTarget("./_tmp/static/css/style.css");

eleventyConfig.addPassthroughCopy({
"./_tmp/static/css/style.css": "./static/css/style.css",
"./admin/config.yml": "./admin/config.yml",
"./node_modules/alpinejs/dist/alpine.js": "./static/js/alpine.js",
});

eleventyConfig.setBrowserSyncConfig({
injectChanges: false,
});

eleventyConfig.addPassthroughCopy("./static/img");

eleventyConfig.addShortcode("version", function () {
return String(Date.now());
});

};
2 changes: 2 additions & 0 deletions .eleventyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
README.md
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_site/
_tmp/
.DS_Store
node_modules/
.vscode/
*git/
package-lock.json
.env
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 SURJITH S M

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.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Neat Starter

Starter Template for Netlify CMS, Eleventy, Alphine JS & Tailwind CSS

## Getting Started

### 1\. Clone this Repository

```
git clone https://github.com/surjithctly/neat-starter
```

### 2\. Navigate to the directory

```
cd neat-starter
```

### 3\. Install dependencies

```
npm install
```

### 4\. Build the project to generate the first CSS

This step is only required the very first time.

```
npm run build
```

### 5\. Run Eleventy

```
npm run start
```

## Author

Surjith S M ( [@surjithctly](https://surjithctly.in/) )
4 changes: 4 additions & 0 deletions _data/settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
meta
name: Neat Starter
author: Surjith S M
url: https://surjithctly.in/
23 changes: 23 additions & 0 deletions _includes/default.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg" href="/static/img/favicon.svg"/>
<title> {{title}} </title>
{% if description %}
<meta name="description" content="{{description}}"/>
{% endif %}
{% block head %}{% endblock %}

</head>
<body>
{% include "partials/navbar.njk" %}

{{ content | safe }}

<script src="/static/js/alpine.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions _includes/partials/content.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<nav>
Hey, I'm a Content
</nav>
3 changes: 3 additions & 0 deletions _includes/partials/navbar.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<nav>
Hey, I'm a Navbasr
</nav>
63 changes: 63 additions & 0 deletions admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
backend:
name: github
repo: githubuser/reponame
media_folder: "static/img"
# local_backend: true
# publish_mode: editorial_workflow
collections:
- label: "Home Page"
name: "index"
editor:
preview: false
files:
- label: "Header"
name: "header"
file: "_data/index/header.json"
media_folder: "static/img/slider"
fields:
- { label: Title, name: title, widget: string }
- { label: Description, name: desc, widget: text }
- { label: Mobile Description, name: mobiledesc, widget: text }
- { label: Button Text, name: buttontext, widget: string }
- label: Slider
name: slider
widget: list
allow_add: false
collapsed: false
fields:
- { label: Image, name: image, widget: image }
- label: "Overview"
name: "overview"
file: "_data/index/overview.json"
fields:
- { label: Title, name: title, widget: string }
- { label: Description, name: desc, widget: text }
- label: Highlights
name: highlights
widget: list
allow_add: false
collapsed: false
fields:
- { label: Title, name: title, widget: string }
- { label: Description, name: desc, widget: string }
- { label: Icon, name: icon, widget: image }
- label: "Tab Content"
name: "tabs"
file: "_data/index/tab.json"
fields:
- label: Content
name: content
widget: list
allow_add: false
collapsed: false
fields:
- { label: Title, name: title, widget: string }
- { label: Description, name: desc, widget: string }
- { label: Icon, name: icon, widget: image }
- label: Icons
name: list
widget: list
allow_add: false
fields:
- { label: Icon, name: icon, widget: image }
- { label: Text, name: text, widget: string }
12 changes: 12 additions & 0 deletions admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: default
title: Neat Starter
---

{% include "_includes/partials/content.njk" %}


<h3>Hey, I'm just normal HTML</h3>
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"scripts": {
"start": "npm run eleventy",
"eleventy": "eleventy --serve && postcss static/css/tailwind.css --o _site/static/css/style.css --watch",
"css": "postcss static/css/tailwind.css --o _tmp/static/css/style.css --watch",
"build": "eleventy && postcss static/css/tailwind.css --o _site/static/css/style.css"
},
"devDependencies": {
"@11ty/eleventy": "^0.11.0",
"alpinejs": "^2.6.0",
"postcss-clean": "^1.1.0",
"postcss-cli": "^7.1.1",
"tailwindcss": "^1.7.2"
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: [
require(`tailwindcss`)(`./tailwind.config.js`),
require(`autoprefixer`),
],
};
3 changes: 3 additions & 0 deletions static/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
21 changes: 21 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
purge: {
enabled: true,
content: ["./**/*.njk"],
options: {
whitelist: [],
},
},
theme: {
extend: {
colors: {
primary: {
100: "#176AEF",
},
},
},
},
variants: {},
plugins: [],
experimental: "all",
};

0 comments on commit 80bfee6

Please sign in to comment.