Initial commit
This commit is contained in:
commit
613ada0063
17 changed files with 2287 additions and 0 deletions
18
.eleventy.js
Normal file
18
.eleventy.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
module.exports = eleventyConfig => {
|
||||
eleventyConfig.addWatchTarget('./src/assets');
|
||||
|
||||
// --------------------- Custom Template Languages ---------------------
|
||||
eleventyConfig.addPlugin(require('./config/template-languages/css-config.js'));
|
||||
|
||||
return {
|
||||
// Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages
|
||||
pathPrefix: '/',
|
||||
|
||||
dir: {
|
||||
output: 'dist',
|
||||
input: 'src',
|
||||
includes: '_includes',
|
||||
layouts: '_layouts'
|
||||
}
|
||||
};
|
||||
};
|
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Node modules
|
||||
node_modules
|
||||
|
||||
# generated files
|
||||
dist
|
||||
src/_includes/css
|
||||
src/_includes/scripts
|
||||
|
||||
# cache
|
||||
.cache
|
||||
|
||||
# secret data
|
||||
.env
|
33
config/template-languages/css-config.js
Normal file
33
config/template-languages/css-config.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
// CSS and JavaScript as first-class citizens in Eleventy: https://pepelsbey.dev/articles/eleventy-css-js/
|
||||
|
||||
const postcss = require('postcss');
|
||||
const postcssImport = require('postcss-import');
|
||||
const postcssImportExtGlob = require('postcss-import-ext-glob');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const cssnano = require('cssnano');
|
||||
|
||||
module.exports = eleventyConfig => {
|
||||
eleventyConfig.addTemplateFormats('css');
|
||||
|
||||
eleventyConfig.addExtension('css', {
|
||||
outputFileExtension: 'css',
|
||||
compile: async (content, path) => {
|
||||
if (path !== './src/assets/css/global.css') {
|
||||
return;
|
||||
}
|
||||
|
||||
return async () => {
|
||||
let output = await postcss([
|
||||
postcssImportExtGlob,
|
||||
postcssImport,
|
||||
autoprefixer,
|
||||
cssnano
|
||||
]).process(content, {
|
||||
from: path
|
||||
});
|
||||
|
||||
return output.css;
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
19
package.json
Normal file
19
package.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "wonderfulfrog.com",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"repository": "https://github.com/wonderfulfrog/wonderfulfrog.com",
|
||||
"author": "Devin Haska",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "eleventy --serve --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^2.0.1",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"cssnano": "^6.0.3",
|
||||
"postcss": "^8.4.33",
|
||||
"postcss-import": "^16.0.0",
|
||||
"postcss-import-ext-glob": "^2.1.1"
|
||||
}
|
||||
}
|
3
src/_includes/partials/footer.njk
Normal file
3
src/_includes/partials/footer.njk
Normal file
|
@ -0,0 +1,3 @@
|
|||
<footer class="site-foot">
|
||||
Footer.
|
||||
</footer>
|
3
src/_includes/partials/header.njk
Normal file
3
src/_includes/partials/header.njk
Normal file
|
@ -0,0 +1,3 @@
|
|||
<header class="wrapper">
|
||||
{% include "partials/menu.njk" %}
|
||||
</header>
|
20
src/_includes/partials/menu.njk
Normal file
20
src/_includes/partials/menu.njk
Normal file
|
@ -0,0 +1,20 @@
|
|||
<nav id="mainnav" class="navbar" aria-label="Main">
|
||||
Menu.
|
||||
<ul>
|
||||
{% for item in navigation.top %}
|
||||
<li>
|
||||
<a
|
||||
class="nav"
|
||||
href="{{ item.url }}"
|
||||
{{
|
||||
helpers.getLinkActiveState(item.url,
|
||||
page.url)
|
||||
|
|
||||
safe
|
||||
}}
|
||||
>{{ item.text }}</a
|
||||
>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
17
src/_layouts/base.njk
Normal file
17
src/_layouts/base.njk
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- charset/http-equiv/viewport -->
|
||||
<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="stylesheet" href="/assets/css/global.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include "partials/header.njk" %}
|
||||
<main id="main" class="flow">{{ content | safe }}</main>
|
||||
{% include "partials/footer.njk" %}
|
||||
</body>
|
||||
</html>
|
3
src/assets/css/global.css
Normal file
3
src/assets/css/global.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
@import "global/reset.css";
|
||||
|
||||
@import "global/global-styles.css";
|
6
src/assets/css/global/global-styles.css
Normal file
6
src/assets/css/global/global-styles.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Global styles
|
||||
|
||||
Low-specificity, global styles that apply to the whole
|
||||
project: https://cube.fyi/css.html
|
||||
*/
|
90
src/assets/css/global/reset.css
Normal file
90
src/assets/css/global/reset.css
Normal file
|
@ -0,0 +1,90 @@
|
|||
/* Box sizing rules */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Prevent font size inflation */
|
||||
html {
|
||||
-moz-text-size-adjust: none;
|
||||
-webkit-text-size-adjust: none;
|
||||
text-size-adjust: none;
|
||||
}
|
||||
|
||||
/* Remove default margin in favour of better control in authored CSS */
|
||||
body,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
p,
|
||||
figure,
|
||||
blockquote,
|
||||
dl,
|
||||
dd {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
||||
ul[role="list"],
|
||||
ol[role="list"] {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Set core body defaults */
|
||||
body {
|
||||
min-height: 100vh;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Set shorter line heights on headings and interactive elements */
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
button,
|
||||
input,
|
||||
label {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
/* Balance text wrapping on headings */
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/* A elements that don't have a class get default styles */
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto;
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
/* Make images easier to work with */
|
||||
img,
|
||||
picture {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Inherit fonts for inputs and buttons */
|
||||
input,
|
||||
button,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* Make sure textareas without a rows attribute are not tiny */
|
||||
textarea:not([rows]) {
|
||||
min-height: 10em;
|
||||
}
|
||||
|
||||
/* Anything that has been anchored to should have extra scroll margin */
|
||||
:target {
|
||||
scroll-margin-block: 5ex;
|
||||
}
|
47
src/data/meta.js
Normal file
47
src/data/meta.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
module.exports = {
|
||||
url: process.env.URL || 'http://localhost:8080',
|
||||
siteName: 'Eleventy Excellent',
|
||||
siteDescription:
|
||||
'Eleventy starter based on the workflow suggested by buildexcellentwebsit.es.',
|
||||
siteType: 'Person', // schema
|
||||
locale: 'en_EN',
|
||||
lang: 'en',
|
||||
skipContent: 'Skip to content',
|
||||
author: 'Lene Saile', // i.e. Lene Saile - author's name. Must be set.
|
||||
authorEmail: '', // i.e. hola@lenesaile.com - email of the author
|
||||
authorWebsite: '', // i.e. https.://www.lenesaile.com - the personal site of the author
|
||||
themeColor: '#DD4462', // Manifest: defines the default theme color for the application
|
||||
themeBgColor: '#F3F3F3', // Manifest: defines a placeholder background color for the application page to display before its stylesheet is loaded
|
||||
meta_data: {
|
||||
opengraph_default: '/assets/images/opengraph-default.jpg', // fallback/default meta image
|
||||
opengraph_default_alt:
|
||||
'Visible content: Eleventy starter based on workflow for Cube CSS, Every Layout, Design Tokens and Tailwind for uitility, based on the concepts explained in buildexcellentwebsit.es ', // alt text for default meta image
|
||||
twitterSite: '', // i.e. @site - twitter profile of the site
|
||||
twitterCreator: '', // i.e. @author - twitter profile of the site
|
||||
mastodonProfile: '' // i.e. https://front-end.social/@lene - url to your mastodon instance/profile
|
||||
},
|
||||
blog: {
|
||||
// this is for the rss feed
|
||||
name: 'My great Web Development Blog',
|
||||
description:
|
||||
'Tell the word what you are writing about in your blog! It will show up on feed readers.'
|
||||
},
|
||||
pagination: {
|
||||
itemsPerPage: 20
|
||||
},
|
||||
address: {
|
||||
// edit all presets or leave empty. They are being used in the pages for privacy.md and imprint.md
|
||||
firma: 'Organization name',
|
||||
street: '123 Main St.',
|
||||
city: 'Ciudad',
|
||||
state: 'Estado',
|
||||
zip: '12345',
|
||||
mobileDisplay: '+34 1234567',
|
||||
mobileCall: ' +341234567',
|
||||
email: 'hola@yoursite.com',
|
||||
cif: ''
|
||||
},
|
||||
menu: {
|
||||
closedText: 'Menu'
|
||||
}
|
||||
};
|
6
src/data/navigation.js
Normal file
6
src/data/navigation.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
top: [
|
||||
],
|
||||
bottom: [
|
||||
]
|
||||
};
|
8
src/pages/index.md
Normal file
8
src/pages/index.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
layout: "base"
|
||||
permalink: /index.html
|
||||
---
|
||||
|
||||
# Hello from index
|
||||
|
||||
This is the root page.
|
3
src/posts/hello_world.md
Normal file
3
src/posts/hello_world.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Hello world
|
||||
|
||||
This is a test post.
|
4
src/posts/posts.json
Normal file
4
src/posts/posts.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"layout": "base",
|
||||
"tags": "posts"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue