Skip to content

Commit fb26a1d

Browse files
committed
new docs styles [skip ci]
1 parent 7ad22e8 commit fb26a1d

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

book.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
"facebook": false,
1717
"twitter": true
1818
}
19+
},
20+
"styles": {
21+
"website": "./docs/website.css"
1922
}
2023
}

docs/using_css_frameworks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using CSS frameworks
22

3-
Although this may seem like a no brainer, I'd suggest you import your third-party CSS libraries into webpack using the [/style-loader](https://github.com/webpack/style-loader), which is already setup for you. Using a `<link>` tag on our `index.ejs` that references to `node_modules` will fail on production builds, as `node_modules` are ignored.
3+
Although this may seem like a no brainer, I'd suggest you import your third-party CSS libraries into webpack using the [`style-loader`](https://github.com/webpack/style-loader), which is already setup for you. Using a `<link>` tag on our `index.ejs` that references to `node_modules` will fail on production builds, as `node_modules` are ignored.
44

55
## Use Case
66
Say you want to use [bootstrap](http://getbootstrap.com/), [bulma](http://bulma.io/), or [materialize](http://materializecss.com/) for your electron app. Go ahead and install from `npm` inside your `app` directory like you normally would, but instead of attaching the asset to `index.ejs` we will import the CSS in our JavaScript, specifically in `app/src/main.js`.

docs/website.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto|');
2+
3+
code,
4+
nav,
5+
h1, h2, h3,
6+
h4, h5, h6 {
7+
font-family: 'Roboto Mono', sans-serif;
8+
}
9+
10+
section h1:after,
11+
section h2:after,
12+
section h3:after,
13+
section h4:after,
14+
section h5:after,
15+
section h6:after {
16+
content: '¬';
17+
padding-left: .7%;
18+
opacity: .3;
19+
}
20+
21+
section { font-family: 'Roboto', sans-serif; }
22+
23+
.chapter.active, nav > ul > li:nth-child(1) > a { font-weight: bold; }
24+
25+
nav > ul > li:nth-child(1) > a:before {
26+
content: '';
27+
display: inline-block;
28+
width: 54px;
29+
height: 54px;
30+
vertical-align: middle;
31+
margin-right: 10px;
32+
background-image: url('http://i.imgur.com/bcyenS0.png');
33+
background-size: cover;
34+
}
35+
36+
.book-body { background-color: #fafafa; }
37+
38+
pre,
39+
p > code,
40+
li code {
41+
background-color: rgba(255,255,255,.75);
42+
border-radius: 8px;
43+
box-shadow: 1px 1px 8px rgba(0,0,0,.07);
44+
}

0 commit comments

Comments
 (0)