Skip to content

Commit 478d7e8

Browse files
chore/upgrade greenwood 0.10.0 (#22)
* initial upgrade test with yarn link * use greenwood serve task for serving * install alpha.0 * alpha.1 update * upgrade alpha.2 * upgrade to alpha.3 and refactor * home page css * fix linting * update alpha.4 * upgrade chromimum-lib for github workflows * update Netlify to Node v12 * update Netlify to Node v12 * upgrade v0.10.0-alpha.6 * update alpha.7 * upgrade alpha.8 * meta for favicon * upgrade alpha.9 * clean up meta * fix Lighthouse a11y feedback * github badge height and width * alpha.10 update * v0.10.0 release version
1 parent 34d027c commit 478d7e8

12 files changed

+4769
-16370
lines changed

.github/workflows/chromium-lib-install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ sudo apt-get update \
66
&& sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - \
77
&& sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
88
&& sudo apt-get update \
9-
&& sudo apt-get install -y google-chrome-unstable --no-install-recommends \
9+
&& sudo apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
10+
--no-install-recommends \
1011
&& sudo rm -rf /var/lib/apt/lists/*

greenwood.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const pkg = require('./package.json');
33
module.exports = {
44
title: 'My Personal Blog',
55
meta: [
6+
{ rel: 'icon', href: '/assets/favicon.ico' },
67
{ name: 'description', content: pkg.description } // replace the pkg.description with a custom string if you prefer
78
]
89
};

netlify.toml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build]
2+
publish = "public/"
3+
command = "npm run build"
4+
5+
[build.processing]
6+
skip_processing = true
7+
8+
9+
[build.environment]
10+
NODE_VERSION = "12.13.0"

package-lock.json

+4,627-16,256
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "greenwood build",
77
"develop": "greenwood develop",
88
"start": "npm run develop",
9-
"serve": "rimraf ./public && npm run build && ws -d ./public",
9+
"serve": "rimraf ./public && greenwood serve",
1010
"lint:js": "eslint \"*.js\" \"./src/**/**/*.js\"",
1111
"lint:css": "stylelint \"./src/**/*.js\", \"./src/**/*.css\"",
1212
"lint": "ls-lint && npm run lint:js && npm run lint:css"
@@ -25,9 +25,9 @@
2525
},
2626
"homepage": "https://github.com/ProjectEvergreen/greenwood-getting-started#readme",
2727
"devDependencies": {
28-
"@greenwood/cli": "^0.9.0",
29-
"eslint": "^6.1.0",
28+
"@greenwood/cli": "^0.10.0",
3029
"@ls-lint/ls-lint": "^1.9.2",
30+
"eslint": "^6.1.0",
3131
"stylelint": "^13.8.0",
3232
"stylelint-a11y": "^1.2.3",
3333
"stylelint-config-standard": "^20.0.0"

src/components/header/header.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import logo from '../../assets/greenwood-logo.png';
2-
31
class HeaderComponent extends HTMLElement {
42
constructor() {
53
super();
@@ -53,21 +51,28 @@ class HeaderComponent extends HTMLElement {
5351
text-align: right;
5452
}
5553
54+
.header img.github-badge {
55+
display: inline-block;
56+
width: 90px;
57+
height: 20px;
58+
}
59+
5660
</style>
5761
5862
<header class="header">
5963
<div class="head-wrap">
6064
<div class="brand">
6165
<a href="/">
62-
<img src="${logo}" />
66+
<img src="/assets/greenwood-logo.png" alt="Greenwood logo"/>
6367
<h4>My Personal Blog</h4>
6468
</a>
6569
</div>
6670
<div class="social">
67-
<a href="">
68-
<a href="https://github.com/ProjectEvergreen/greenwood">
69-
<img src="https://img.shields.io/github/stars/ProjectEvergreen/greenwood.svg?style=social&logo=github&label=github" />
70-
</a>
71+
<a href="https://github.com/ProjectEvergreen/greenwood">
72+
<img
73+
src="https://img.shields.io/github/stars/ProjectEvergreen/greenwood.svg?style=social&logo=github&label=github"
74+
alt="Greenwood GitHub badge"
75+
class="github-badge"/>
7176
</a>
7277
</div>
7378
</div>
@@ -76,4 +81,4 @@ class HeaderComponent extends HTMLElement {
7681
}
7782
}
7883

79-
customElements.define('app-header', HeaderComponent);
84+
customElements.define('app-header', HeaderComponent);

src/styles/blog.css

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.content {
2+
flex: 1;
3+
max-width: 50em;
4+
height: 100%;
5+
margin: auto;
6+
font-size: 1.2rem;
7+
padding: 2rem;
8+
}
9+
10+
.content h2 {
11+
color: #0b6623;
12+
}
13+
14+
.content h2,
15+
.content h3 {
16+
font-size: 2rem;
17+
margin: 5px 0;
18+
}
19+
20+
.content a {
21+
color: #1d337a;
22+
}

src/styles/home.css

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.content {
2+
flex: 1;
3+
max-width: 50em;
4+
height: 100%;
5+
margin: auto;
6+
font-size: 1.2rem;
7+
padding: 2rem;
8+
}
9+
10+
.content h3 {
11+
color: #0b6623;
12+
font-size: 2rem;
13+
margin: 5px 0;
14+
}
15+
16+
.content a {
17+
color: #1d337a;
18+
}
19+
20+
.content ul li {
21+
padding: 5px 0;
22+
}

src/templates/blog-template.js

-56
This file was deleted.

src/templates/blog.html

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html lang="en" prefix="og:http://ogp.me/ns#">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta-outlet></meta-outlet>
8+
9+
<!-- TODO have to use forward slash / for path references? translate on the fly in serve.js? -->
10+
<script type="module" src="/components/footer/footer.js"></script>
11+
<script type="module" src="/components/header/header.js"></script>
12+
13+
<link rel="stylesheet" href="/styles/theme.css"></link>
14+
<link rel="stylesheet" href="/styles/blog.css"></link>
15+
</head>
16+
17+
<body>
18+
19+
<app-header></app-header>
20+
21+
<div class='page-template content'>
22+
23+
<content-outlet></content-outlet>
24+
25+
<h3>More Posts</h3>
26+
<nav>
27+
<ul>
28+
<li><a href="/blog/second-post/">My Second Post</a></li>
29+
<li><a href="/blog/first-post/">My First Post</a></li>
30+
</ul>
31+
</nav>
32+
</div>
33+
34+
<app-footer></app-footer>
35+
36+
</body>
37+
38+
</html>

src/templates/page-template.js

-46
This file was deleted.

src/templates/page.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en" prefix="og:http://ogp.me/ns#">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta-outlet></meta-outlet>
8+
9+
<!-- TODO have to use forward slash / for path references? translate on the fly in serve.js? -->
10+
<script type="module" src="/components/footer/footer.js"></script>
11+
<script type="module" src="/components/header/header.js"></script>
12+
13+
<link rel="stylesheet" href="/styles/theme.css"></link>
14+
<link rel="stylesheet" href="/styles/home.css"></link>
15+
</head>
16+
17+
<body>
18+
19+
<div>
20+
<app-header></app-header>
21+
22+
<div class='content'>
23+
<content-outlet></content-outlet>
24+
</div>
25+
26+
<app-footer></app-footer>
27+
</div>
28+
29+
</body>
30+
31+
</html>

0 commit comments

Comments
 (0)