Skip to content

Commit

Permalink
Enhanced CSS customisability
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminEHowe committed Jul 13, 2024
1 parent 3097583 commit 1642250
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 82 deletions.
88 changes: 88 additions & 0 deletions 11ty-src/assets/css/_core.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
html {
font-family: sans-serif;
padding: 10px;
}

#container {
width: 100%;
}

/* typography */

h1, h2, h3, h4, h5, h6, strong, th {
font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
padding: 1rem 0;
}

p, ol, ul {
line-height: 1.5;
}

h1 {
font-size: 2em;
text-align: center;
}

h2 {
font-size: 1.5em;
}

h3 {
font-size: 1.17em;
}

p, ol, ul, pre {
padding-bottom: 1rem;
}

em {
font-style: italic;
}

ol {
list-style: decimal;
}

ul {
list-style: disc;
}

ul, ol {
margin-left: 2em;
}

p + ul {
margin-top: -0.375rem;
}

/* links */

ul#links {
list-style-type: none;
margin-left: 0;
padding: 0;
}

ul#links li a {
display: block;
text-decoration: none;
}

/* form */

#contact-form {
margin-top: -15px;
}

#contact-form fieldset {
border: none;
margin: 15px 0;
padding: 0;
}

#contact-form textarea {
height: 5em;
}
90 changes: 8 additions & 82 deletions 11ty-src/assets/css/bundle.css
Original file line number Diff line number Diff line change
@@ -1,99 +1,29 @@
@import "_reset.css";
@import "_core.css";

html {
font-family: sans-serif;
padding: 10px;
background-image: url("/assets/img/webb.png");
}

body {
#container {
background: #fff;
border: 1px solid #ccc;
border-radius: 10px;
margin: 10px auto;
max-width: 600px;
margin: 0 auto;
width: 100%;
}

/* typography */

h1, h2, h3, h4, h5, h6, strong, th {
font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
padding: 1rem 0;
}

p, ol, ul {
line-height: 1.5;
}

h1 {
font-size: 2em;
text-align: center;
}

h2 {
font-size: 1.5em;
}

h3 {
font-size: 1.17em;
}

p, ol, ul, pre {
padding-bottom: 1rem;
}

em {
font-style: italic;
}

ol {
list-style: decimal;
}

ul {
list-style: disc;
}

ul, ol {
margin-left: 2em;
}

p + ul {
margin-top: -0.375rem;
}

/* links */

ul#links {
list-style-type: none;
margin-left: 0;
padding: 0;
padding: 15px;
}

ul#links li a {
background: #00b;
border-radius: 8px;
color: #fff;
display: block;
margin: 25px 0;
padding: 10px 0;
text-align: center;
text-decoration: none;
width: 100%;
}

/* form */

#contact-form {
margin-top: -15px;
}

#contact-form fieldset {
border: none;
margin: 15px 0;
padding: 0;
}

#contact-form button, input, textarea {
border: 1px solid #000;
border-radius: 5px;
Expand All @@ -103,10 +33,6 @@ ul#links li a {
width: calc(100% - (2 * 1px) - (2 * 10px));
}

#contact-form textarea {
height: 5em;
}

#contact-form button {
padding: 10px 0;
width: 100%;
Expand Down
Binary file added 11ty-src/assets/img/webb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ let targets = browserslistToTargets(browserslist("> 0.2% and not dead"));
export default async function (eleventyConfig) {
eleventyConfig.addDataExtension("json", (contents) => JSON.parse(contents) );

eleventyConfig.addPassthroughCopy("11ty-src/assets/img");

eleventyConfig.addPlugin(eleventyAutoCacheBuster, {
hashTruncate: 8,
});
Expand Down

0 comments on commit 1642250

Please sign in to comment.