added work folder
This commit is contained in:
parent
fe14596cfe
commit
fa89fa626b
22
.eleventy.js
Normal file
22
.eleventy.js
Normal file
@ -0,0 +1,22 @@
|
||||
const pluginWebc = require('@11ty/eleventy-plugin-webc')
|
||||
|
||||
module.exports = function(config) {
|
||||
|
||||
// webc templates
|
||||
config.addPlugin(pluginWebc, {
|
||||
components: 'src/_includes/components/*.webc'
|
||||
})
|
||||
|
||||
// admin files
|
||||
config.addPassthroughCopy('admin/**')
|
||||
config.setServerPassthroughCopyBehavior("passthrough")
|
||||
|
||||
return {
|
||||
dir: {
|
||||
input: "src/_content",
|
||||
includes: '../_includes',
|
||||
data: '../_data',
|
||||
output: "dist"
|
||||
}
|
||||
}
|
||||
};
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -59,4 +59,4 @@ typings/
|
||||
.env
|
||||
|
||||
# 11ty ignores
|
||||
dist/
|
||||
_site/
|
@ -1,7 +1,7 @@
|
||||
backend:
|
||||
name: gitea
|
||||
repo: suroh/pxls.homepage
|
||||
app_id:
|
||||
app_id: a9e54ea3-6ab8-455f-bd3d-6149f3859f4e
|
||||
api_root: https://git.suroh.tk/api/v1
|
||||
base_url: https://git.suroh.tk
|
||||
site_domain: localhost:8080
|
||||
@ -9,7 +9,7 @@ backend:
|
||||
|
||||
site_url: http://localhost:8080
|
||||
|
||||
media_folder: "src/static/images/uploads"
|
||||
media_folder: "src/assets/images/uploads"
|
||||
public_folder: "/images/uploads"
|
||||
|
||||
collections:
|
||||
@ -19,6 +19,8 @@ collections:
|
||||
create: true
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Tags", name: "tags", widget: "list"}
|
||||
- {label: "Publish Date", name: "date", widget: "datetime"}
|
||||
- {label: "Featured Image", name: "thumbnail", widget: "image"}
|
||||
- {label: "Metadata", name: "meta", widget: "list", fields: [ { label: "Name", name: "name", widget: "string" }, { label: "Value", name: "value", widget: "string" }]}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
|
26
dist/admin/config.yml
vendored
Normal file
26
dist/admin/config.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
backend:
|
||||
name: gitea
|
||||
repo: suroh/pxls.homepage
|
||||
app_id: a9e54ea3-6ab8-455f-bd3d-6149f3859f4e
|
||||
api_root: https://git.suroh.tk/api/v1
|
||||
base_url: https://git.suroh.tk
|
||||
site_domain: localhost:8080
|
||||
branch: main
|
||||
|
||||
site_url: http://localhost:8080
|
||||
|
||||
media_folder: "src/assets/images/uploads"
|
||||
public_folder: "/images/uploads"
|
||||
|
||||
collections:
|
||||
- label: "Work"
|
||||
name: "work"
|
||||
folder: "src/_content/work"
|
||||
create: true
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Tags", name: "tags", widget: "list"}
|
||||
- {label: "Publish Date", name: "date", widget: "datetime"}
|
||||
- {label: "Featured Image", name: "thumbnail", widget: "image"}
|
||||
- {label: "Metadata", name: "meta", widget: "list", fields: [ { label: "Name", name: "name", widget: "string" }, { label: "Value", name: "value", widget: "string" }]}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
13
dist/admin/index.html
vendored
Normal file
13
dist/admin/index.html
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex" />
|
||||
<title>11ty : admin</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Decap CMS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
||||
</body>
|
||||
</html>
|
27
dist/index.html
vendored
Normal file
27
dist/index.html
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>amy pickles</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="generator" content="@11ty/eleventy v2.0.1">
|
||||
|
||||
<!-- styles -->
|
||||
<link href="/assets/styles/main.css" rel="stylesheet">
|
||||
|
||||
<!-- components -->
|
||||
<style></style>
|
||||
<script type="module"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- template content -->
|
||||
<div class="single-page"><h1>index</h1>
|
||||
<p>the index page.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
8
src/_content/index.md
Normal file
8
src/_content/index.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: index
|
||||
layout: singlePage.webc
|
||||
---
|
||||
|
||||
# index
|
||||
|
||||
the index page.
|
8
src/_data/site.js
Normal file
8
src/_data/site.js
Normal file
@ -0,0 +1,8 @@
|
||||
const eleventyPackage = require('@11ty/eleventy/package.json')
|
||||
|
||||
module.exports = async () => {
|
||||
return {
|
||||
title: 'amy pickles',
|
||||
generator: `${eleventyPackage.name} v${eleventyPackage.version}`,
|
||||
}
|
||||
}
|
23
src/_includes/base.webc
Normal file
23
src/_includes/base.webc
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title @text="site.title"></title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="generator" :content="site.generator">
|
||||
|
||||
<!-- styles -->
|
||||
<link href="/assets/styles/main.css" rel="stylesheet" webc:keep>
|
||||
|
||||
<!-- components -->
|
||||
<style @raw="getBundle('css')" webc:keep></style>
|
||||
<script type="module" @raw="getBundle('js')" webc:keep></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- template content -->
|
||||
<template @html="content" webc:nokeep></template>
|
||||
</body>
|
||||
|
||||
</html>
|
5
src/_includes/singlePage.webc
Normal file
5
src/_includes/singlePage.webc
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: base.webc
|
||||
---
|
||||
|
||||
<div class="single-page" @html="content"></div>
|
5
src/assets/styles/main.css
Normal file
5
src/assets/styles/main.css
Normal file
@ -0,0 +1,5 @@
|
||||
@import url('reset.css');
|
||||
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
173
src/assets/styles/reset.css
Normal file
173
src/assets/styles/reset.css
Normal file
@ -0,0 +1,173 @@
|
||||
/*
|
||||
Made by Elly Loel - https://ellyloel.com/
|
||||
With inspiration from:
|
||||
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
|
||||
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
|
||||
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
|
||||
|
||||
Notes:
|
||||
- `:where()` is used to lower specificity for easy overriding.
|
||||
*/
|
||||
|
||||
* {
|
||||
/* Remove default margin on everything */
|
||||
margin: 0;
|
||||
/* Remove default padding on everything */
|
||||
padding: 0;
|
||||
/* Calc `em` based line height, bigger line height for smaller font size and smaller line height for bigger font size: https://kittygiraudel.com/2020/05/18/using-calc-to-figure-out-optimal-line-height/ */
|
||||
line-height: calc(0.25rem + 1em + 0.25rem);
|
||||
}
|
||||
|
||||
/* Use a more-intuitive box-sizing model on everything */
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Remove border and set sensible defaults for backgrounds, on all elements except fieldset progress and meter */
|
||||
*:where(:not(fieldset, progress, meter)) {
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
background-origin: border-box;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
html {
|
||||
/* Allow percentage-based heights in the application */
|
||||
block-size: 100%;
|
||||
/* Making sure text size is only controlled by font-size */
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
/* Smooth scrolling for users that don't prefer reduced motion */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
html:focus-within {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
/* https://marco.org/2012/11/15/text-rendering-optimize-legibility */
|
||||
text-rendering: optimizeSpeed;
|
||||
/* Allow percentage-based heights in the application */
|
||||
min-block-size: 100%;
|
||||
/* https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter#example_2 */
|
||||
/* scrollbar-gutter: stable both-edges; Removed until this bug is fixed: https://bugs.chromium.org/p/chromium/issues/detail?id=1318404#c2 */
|
||||
}
|
||||
|
||||
/* Improve media defaults */
|
||||
:where(img, svg, video, canvas, audio, iframe, embed, object) {
|
||||
display: block;
|
||||
}
|
||||
:where(img, svg, video) {
|
||||
block-size: auto;
|
||||
max-inline-size: 100%;
|
||||
}
|
||||
|
||||
/* Remove stroke and set fill colour to the inherited font colour */
|
||||
:where(svg) {
|
||||
stroke: none;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* SVG's without a fill attribute */
|
||||
:where(svg):where(:not([fill])) {
|
||||
/* Remove fill and set stroke colour to the inherited font colour */
|
||||
stroke: currentColor;
|
||||
fill: none;
|
||||
/* Rounded stroke */
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
/* Set a size for SVG's without a width attribute */
|
||||
:where(svg):where(:not([width])) {
|
||||
inline-size: 5rem;
|
||||
}
|
||||
|
||||
/* Remove built-in form typography styles */
|
||||
:where(input, button, textarea, select),
|
||||
:where(input[type="file"])::-webkit-file-upload-button {
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: inherit;
|
||||
letter-spacing: inherit;
|
||||
word-spacing: inherit;
|
||||
}
|
||||
|
||||
/* Change textarea resize to vertical only and block only if the browser supports that */
|
||||
:where(textarea) {
|
||||
resize: vertical;
|
||||
}
|
||||
@supports (resize: block) {
|
||||
:where(textarea) {
|
||||
resize: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Avoid text overflows */
|
||||
:where(p, h1, h2, h3, h4, h5, h6) {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Fix h1 font size inside article, aside, nav, and section */
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
/* Position list marker inside */
|
||||
:where(ul, ol) {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
||||
:where(ul, ol)[role="list"] {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* More readable underline style for anchor tags without a class. This could be set on anchor tags globally, but it can cause conflicts. */
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto;
|
||||
}
|
||||
|
||||
/* Make it clear that interactive elements are interactive */
|
||||
:where(a[href], area, button, input, label[for], select, summary, textarea, [tabindex]:not([tabindex*="-"])) {
|
||||
cursor: pointer;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
:where(input[type="file"]) {
|
||||
cursor: auto;
|
||||
}
|
||||
:where(input[type="file"])::-webkit-file-upload-button,
|
||||
:where(input[type="file"])::file-selector-button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Animate focus outline */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:focus-visible {
|
||||
transition: outline-offset 145ms cubic-bezier(0.25, 0, 0.4, 1);
|
||||
}
|
||||
:where(:not(:active)):focus-visible {
|
||||
transition-duration: 0.25s;
|
||||
}
|
||||
}
|
||||
:where(:not(:active)):focus-visible {
|
||||
outline-offset: 5px;
|
||||
}
|
||||
|
||||
/* Make sure users can't select button text */
|
||||
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"]),
|
||||
:where(input[type="file"])::-webkit-file-upload-button,
|
||||
:where(input[type="file"])::file-selector-button {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none;
|
||||
user-select: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Disabled cursor for disabled buttons */
|
||||
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"])[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user