Add basic styling

main
~erin 2023-04-16 14:14:25 -04:00
parent 27aee01a21
commit d1a87dc988
Signed by untrusted user: erin
GPG Key ID: 9A8E308CEFA37A47
10 changed files with 252 additions and 25 deletions

View File

@ -1,7 +1,14 @@
site:
title: cobalt blog
description: Blog Posts Go Here
base_url: http://example.com
title: Mercury OS
description: A radically different operating system
base_url: https://mercury.the-system.eu.org
sitemap: ~
posts:
rss: rss.xml
syntax_highlight:
theme: "InspiredGitHub"
enabled: true
assets:
sass:
style: Nested

14
_includes/meta.liquid Normal file
View File

@ -0,0 +1,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style.css">
<link rel="alternate" title="Main RSS Feed" type="application/rss+xml" href="/rss.xml">
<!-- preview metadata -->
<meta property="og:site_name" content="{{ site.title }}"/>
<meta property="og:title" content="{{ page.title }}"/>
<meta name="description" content="{{ site.description }}"/>
<meta property="og:description" content="{{ site.description }}">
<meta property="og:image" content="/assets/logo.svg"/>
<link rel="icon" href="/assets/logo.svg">
<title>{{ site.title }} | {{ page.title }}</title>

6
_includes/nav.liquid Normal file
View File

@ -0,0 +1,6 @@
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>

View File

@ -1,13 +1,11 @@
<!DOCTYPE html>
<html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
{% include "meta.liquid" %}
</head>
<body>
<div>
<h2>{{ page.title }}</h2>
{{ page.content }}
</div>
{% include "nav.liquid" %}
<div class="page">
{{ page.content }}
</div>
</body>
</html>

115
_scss/_base.scss Normal file
View File

@ -0,0 +1,115 @@
body {
image-rendering: pixelated;
line-height: 1.6;
font-size: 18px;
color: $foreground-color;
background: $background-color;
text-align: center;
margin: 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
gap: 2em;
}
.page {
display: flex;
flex-direction: column;
justify-content: right;
align-items: left;
text-align: left;
margin-left: 40em;
margin-right: 40em;
}
/* Smooth scrolling IF user doesn't have a preference due to motion sensitivities */
@media screen and (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
h1, h2, h3 {
line-height: 1.2;
}
h1 {
border-bottom: 4px solid $accent-color;
}
h2 {
margin-top: 1cm;
margin-bottom: 0;
}
h3 {
margin-top: 1cm;
margin-bottom: 0;
}
::selection {
background-color: $foreground-color;
color: $background-color;
}
a {
color: $accent-color;
&:hover {
color: $accent-color-light;
}
&:visited {
color: $accent-color-dark;
}
}
pre {
border-radius: $radius;
padding: 4px;
}
blockquote {
margin-left: 5mm;
padding-left: 2mm;
color: scale-color($foreground-color, $lightness: -10%);
}
blockquote {
border-left: 4px solid #F28FAD;
}
blockquote blockquote {
border-left: 4px solid #F8BD96;
}
blockquote blockquote blockquote {
border-left: 4px solid #FAE3B0;
}
blockquote blockquote blockquote blockquote {
border-left: 4px solid #ABE9B3;
}
blockquote blockquote blockquote blockquote blockquote {
border-left: 4px solid #B5E8E0;
}
blockquote blockquote blockquote blockquote blockquote blockquote {
border-left: 4px solid #96CDFB;
}
blockquote blockquote blockquote blockquote blockquote blockquote blockquote {
border-left: 4px solid #DDB6F2;
}
code, pre {
font-family: "Fira Code", monospace;
overflow: auto;
}
code {
display: inline;
}

15
_scss/_navigation.scss Normal file
View File

@ -0,0 +1,15 @@
nav {
margin-top: 20px;
ul {
padding: 0px;
margin: auto;
display: flex;
flex-direction: row;
justify-content: space-around;
gap: 2.5em;
li {
list-style: none;
}
}
}

View File

@ -1,10 +1,11 @@
---
layout: default.liquid
---
## Blog!
## Blog Posts
{% for post in collections.posts.pages %}
#### {{post.title}}
### [{{ post.title}}]({{ post.permalink }})
**{{ post.published_date }}**
[{{ post.title }}]({{ post.permalink }})
{{post.description}}
{% endfor %}

View File

@ -0,0 +1,73 @@
---
title: Formatting Test
description: Page to test formatting and CSS
categories:
- test
- formatting
published_date: 2023-04-16 17:50:37 +0000
layout: default.liquid
is_draft: false
---
# Formatting Test
This is just a page to test formatting and CSS.
## Header 1
Some text.
### Header 3
Some text.
#### Header 4
Some text.
## Common Styles
Some *italics* and **bold**. Maybe ***both***.
Tree blockquote sample
> Level one
>> Level two
>>> Level three
>>>> Level four
>>>>> Level five
>>>>>> Level six
>>>>>>> Level seven
Code highlighting
```rust
fn foobar(x: i32, y: Option<i32>) -> i32 {
match y {
Some(bar) => x * bar,
None => x * 42,
}
}
```
```c
int main(int argc, char** argv, char** envp) {
printf("%d\n", argc);
}
```
Bulleted list:
- Item one
- Item two
- Item three
Numbered list:
1. First item
2. Second item
3. Third item
## Large Paragraph
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.

View File

@ -1,10 +0,0 @@
---
layout: default.liquid
title: First Post
is_draft: true
---
# This is our first Post!
Welcome to the first post ever on cobalt.rs!

8
style.scss Normal file
View File

@ -0,0 +1,8 @@
$background-color: #EEEEEE;
$foreground-color: #444;
$accent-color: #ca9ee6;
$accent-color-light: #f4b8e4;
$accent-color-dark: #ea999c;
$radius: 10px;
@import '_scss/base', '_scss/navigation';