Initial commit
This commit is contained in:
commit
c8e491e923
9 changed files with 1614 additions and 0 deletions
19
.eleventy.js
Normal file
19
.eleventy.js
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
const markdownIt = require("markdown-it");
|
||||||
|
const markdownItAnchor = require("markdown-it-anchor");
|
||||||
|
|
||||||
|
module.exports = function(eleventyConfig) {
|
||||||
|
eleventyConfig.addPassthroughCopy({ "static": "/" })
|
||||||
|
|
||||||
|
eleventyConfig.setLibrary("md", markdownIt({
|
||||||
|
html: true
|
||||||
|
}).use(markdownItAnchor, {
|
||||||
|
level: 2
|
||||||
|
}))
|
||||||
|
|
||||||
|
return {
|
||||||
|
passthroughFileCopy: true,
|
||||||
|
dir: {
|
||||||
|
input: "src"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
.eleventyignore
Normal file
1
.eleventyignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
README.md
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
.scripts/
|
||||||
|
.idea/
|
||||||
|
_site/
|
||||||
|
node_modules/
|
12
README.md
Normal file
12
README.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Eleventy Base
|
||||||
|
|
||||||
|
A template for creating [11ty](https://www.11ty.dev/docs/) websites.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
Make sure to check the following files and change them according to your needs:
|
||||||
|
* [src/_includes/base_page.njk](src/_includes/base_page.njk). This is the base page, you should change the title of the
|
||||||
|
page.
|
||||||
|
* [static/css/base.css](static/css/base.css). This is the base theme, you should at least change the colors.
|
||||||
|
|
||||||
|
After changing the files, run `yarn serve` to serve the website.
|
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "eleventy-base",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "A template for creating 11ty websites.",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "Sofía Aritz",
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
"private": true,
|
||||||
|
"devDependencies": {
|
||||||
|
"@11ty/eleventy": "^2.0.1",
|
||||||
|
"markdown-it": "^13.0.2",
|
||||||
|
"markdown-it-anchor": "^8.6.7"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "npx @11ty/eleventy",
|
||||||
|
"serve": "npx @11ty/eleventy --serve",
|
||||||
|
"tree": "tree --gitignore",
|
||||||
|
"fresh-build": "rm -rf _site/ && yarn build",
|
||||||
|
"deploy": "cd .scripts/ && ./deploy.sh"
|
||||||
|
}
|
||||||
|
}
|
29
src/_includes/base_page.njk
Normal file
29
src/_includes/base_page.njk
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width, user-scalable=yes, initial-scale=1.0, minimum-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<link href="/css/base.css" rel="stylesheet">
|
||||||
|
<title>{% if title %} {{ title }} - {% endif %}11ty base</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1><a href="/">11TY BASE</a></h1>
|
||||||
|
<div class="page-container">
|
||||||
|
<nav>
|
||||||
|
<div>
|
||||||
|
<i>main</i>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/">home</a></li>
|
||||||
|
<li><a href="/">home 1</a></li>
|
||||||
|
<li><a href="/">home 2</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<main>
|
||||||
|
{{ content | safe }}
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
src/index.md
Normal file
13
src/index.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
layout: base_page.njk
|
||||||
|
---
|
||||||
|
|
||||||
|
# eleventy base
|
||||||
|
|
||||||
|
This is a template for creating [11ty](https://www.11ty.dev/docs/) websites.
|
||||||
|
|
||||||
|
The default theme isn't beautiful, but it isn't meant to be. Head over to the `static/css/base.css` file and change
|
||||||
|
the colors to suit your style.
|
||||||
|
|
||||||
|
Make sure to check the `src/_includes/base_page.njk` to change things like the title and stuff like that.
|
||||||
|
|
91
static/css/base.css
Normal file
91
static/css/base.css
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
:root {
|
||||||
|
font-family: "Rubik", Inter, Avenir, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
min-height: 100%;
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
|
||||||
|
background: #29468c;
|
||||||
|
|
||||||
|
font-synthesis: none;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #b8c3de;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body > h1 {
|
||||||
|
font-size: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
body > h1 > a {
|
||||||
|
color: #fafafa;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: #2c9ad5;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
width: 40vw;
|
||||||
|
margin-bottom: 75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-container {
|
||||||
|
display: flex;
|
||||||
|
margin: 0 10px;
|
||||||
|
gap: 15px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1600px) {
|
||||||
|
:root {
|
||||||
|
background-repeat: repeat-y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 900px) {
|
||||||
|
.page-container {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav div ul a {
|
||||||
|
display: block;
|
||||||
|
width: 175px;
|
||||||
|
padding: 3px;
|
||||||
|
margin: 10px 0;
|
||||||
|
|
||||||
|
transition: all 150ms;
|
||||||
|
background-color: #686b77;
|
||||||
|
border: solid 3px #2c9ad5;
|
||||||
|
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 900px) {
|
||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue