Skip to content

Commit 75bf480

Browse files
committed
feat(images): add initial brand assets
Add the official @nodewell/brand package with image and color assets. Update webpack to handle images. Add brand assets in the <header>.
1 parent cc9dcbd commit 75bf480

6 files changed

Lines changed: 63 additions & 18 deletions

File tree

package-lock.json

Lines changed: 22 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@
2626
"url": "https://github.com/nodewell/website/issues"
2727
},
2828
"homepage": "https://github.com/nodewell/website#readme",
29+
"config": {
30+
"commitizen": {
31+
"path": "./node_modules/cz-conventional-changelog"
32+
}
33+
},
2934
"devDependencies": {
3035
"@babel/core": "^7.4.3",
3136
"@babel/preset-env": "^7.4.3",
3237
"@fortawesome/fontawesome-svg-core": "^1.2.17",
3338
"@fortawesome/free-brands-svg-icons": "^5.8.1",
3439
"@fortawesome/free-solid-svg-icons": "^5.8.1",
40+
"@nodewell/brand": "^1.1.4",
3541
"@semantic-release/changelog": "^3.0.2",
3642
"@semantic-release/commit-analyzer": "^6.1.0",
3743
"@semantic-release/exec": "^3.3.2",
@@ -42,6 +48,7 @@
4248
"@types/jquery": "^3.3.29",
4349
"@types/node": "^11.13.0",
4450
"babel-loader": "^8.0.5",
51+
"bootstrap": "^4.3.1",
4552
"commitizen": "^3.0.7",
4653
"css-loader": "^2.1.1",
4754
"cz-conventional-changelog": "^2.1.0",
@@ -50,14 +57,17 @@
5057
"directory-exists": "^2.0.1",
5158
"execa": "^1.0.0",
5259
"fast-glob": "^2.2.6",
60+
"file-loader": "^3.0.1",
5361
"gulp": "^4.0.0",
5462
"handlebars": "^4.1.1",
5563
"handlebars-loader": "^1.7.1",
5664
"html-webpack-plugin": "^3.2.0",
5765
"is-travis": "^2.0.0",
66+
"jquery": "^3.3.1",
5867
"lodash": "^4.17.11",
5968
"mini-css-extract-plugin": "^0.5.0",
6069
"node-sass": "^4.11.0",
70+
"popper.js": "^1.15.0",
6171
"sass-loader": "^7.1.0",
6272
"semantic-release": "^15.13.3",
6373
"semver": "^6.0.0",
@@ -66,15 +76,5 @@
6676
"webpack": "^4.29.6",
6777
"webpack-cli": "^3.3.0",
6878
"webpack-dev-server": "^3.2.1"
69-
},
70-
"config": {
71-
"commitizen": {
72-
"path": "./node_modules/cz-conventional-changelog"
73-
}
74-
},
75-
"dependencies": {
76-
"bootstrap": "^4.3.1",
77-
"jquery": "^3.3.1",
78-
"popper.js": "^1.15.0"
7979
}
8080
}

src/markup/body/header.hbs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
<header>
22
<nav class="navbar navbar-expand-sm navbar-light bg-light">
33
<a class="navbar-brand mr-auto" href="#">
4-
<img src="https://getbootstrap.com/docs/4.3/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt="">
5-
nodewell
4+
<img
5+
class="d-block d-sm-none align-top"
6+
src="assets/images/logo.svg"
7+
width="auto"
8+
height="60"
9+
alt="">
10+
11+
<img
12+
class="d-none d-sm-inline-block align-top"
13+
src="assets/images/github-lead.svg"
14+
width="auto"
15+
height="60"
16+
alt="">
617
</a>
718

819
{{!-- <div class="collapse navbar-collapse" id="navbarNav">

src/scripts/Assets/icons.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import '@nodewell/brand/dist/logo.svg'
2+
import '@nodewell/brand/dist/github-lead.svg'

src/scripts/Assets/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
import './styles'
1+
import './icons'
22
import './FontAwesome'
3+
import './styles'

webpack.config.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@ module.exports = {
1010
output: {
1111
path: data.path.build,
1212
publicPath: '/',
13-
filename: 'bundle.js'
13+
filename: 'assets/scripts.js'
1414
},
1515
devtool: 'source-map',
1616
module: {
1717
rules: [
18+
// Image processing
19+
{
20+
test: /\.(png|jpg|gif|svg)$/,
21+
use: [
22+
{
23+
loader: 'file-loader',
24+
options: {
25+
name: 'assets/images/[name].[ext]'
26+
}
27+
}
28+
]
29+
},
1830
// Markup processing
1931
{
2032
test: /\.hbs$/,
@@ -60,7 +72,7 @@ module.exports = {
6072
templateParameters: data,
6173
filename: path.join(data.path.build, '/index.html')
6274
}),
63-
new MiniCssExtractPlugin({ filename: 'styles.css' })
75+
new MiniCssExtractPlugin({ filename: 'assets/styles.css' })
6476
],
6577
devServer: {
6678
contentBase: data.path.build,

0 commit comments

Comments
 (0)