jekyll-theme-fast 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19e3b02719651fc288e8f63aea61d1685c0d44b4bb452355938aeec96f7b7b3f
4
- data.tar.gz: 1b4da44c09b4a01d5616b1ccfed5276449ea374d08eb1ec98f4908d0d6320883
3
+ metadata.gz: 3e5f6d8db58cb8d213b17ce946543b7573fdca079fcc13cb82f297372057029c
4
+ data.tar.gz: 1fdf806ce56721f53887e37411e52bf74ef22b6879a70e3eb00f71dc3d463a19
5
5
  SHA512:
6
- metadata.gz: f4c63c5f8763a097269376499707dfea7c5898c0a1a74584f195fbdeaa670d7063ff276e76e84e064e791ca387219bc9e7fe68da5256306154e75638075cd6a4
7
- data.tar.gz: 8443619afb5af09cccda26be360d1207a0248f628e4e97ba4b6867d88f9e95e3fe736a40706893ee06323706b1ab4fc54a9c6bc67c36f975c74c0de9b8770292
6
+ metadata.gz: c7b83aab912b01f3ae4979d9f9ab53b0eed5e5e60b33748ad9ed55d43b13ce152d216568fa6fadf86fb4db70141497a80caf12ee63d7c088946af10e541d3163
7
+ data.tar.gz: 235fd150f8916d58dec75d3e4dc7814e9c55a18889bbb7da2e1aaac85e7f0f3d6e1519a25629b96c99740062ef1c4c5c2dd62cea435cfc062e8cbf94bc09a17f
@@ -22,7 +22,7 @@ body,
22
22
 
23
23
  header {
24
24
  text-align: center;
25
- padding-top: 30px;
25
+ padding: 16px 0;
26
26
  h1 {
27
27
  color: #f1f1f1;
28
28
  font-size: 1.6em;
@@ -37,9 +37,11 @@ nav {
37
37
  left: 50%;
38
38
  z-index: 99;
39
39
  margin-left: calc(66vw * .5 + 30px - 100px);
40
+ height: calc(100vh - 100px);
41
+ overflow: scroll;
40
42
  div {
41
43
  padding-left: 12px;
42
- margin-bottom: 6px;
44
+ margin-bottom: 10px;
43
45
  color: #ffffff;
44
46
  a {
45
47
  text-decoration: none;
@@ -71,19 +73,22 @@ section {
71
73
  position: relative;
72
74
  width: 66vw;
73
75
  padding: 30px 30px 50px 30px;
74
- margin: 30px auto;
76
+ margin: 0 auto;
75
77
  -webkit-transform: translateX(-100px);
76
78
  transform: translateX(-100px);
77
79
  background: #fbfaf8;
78
80
  border-radius: 3px;
79
81
  box-shadow: 0 0 80px rgba(0, 0, 0, .45);
80
- min-height: calc(100vh - 300px); // max-width: 800px;
82
+ min-height: calc(100vh - 200px);
81
83
  .page-title {
82
84
  text-align: center;
83
85
  font-size: 20px;
84
86
  margin-bottom: 30px;
85
87
  color: #bcb2a5;
86
88
  }
89
+ &.page {
90
+ margin-top: 30px;
91
+ }
87
92
  &.default {
88
93
  width: 80vw;
89
94
  -webkit-transform: none;
@@ -98,7 +103,7 @@ section {
98
103
 
99
104
  footer {
100
105
  text-align: center;
101
- padding: 10px 0;
106
+ padding: 20px 0;
102
107
  color: #bbbbbb;
103
108
  a {
104
109
  color: #f0f0f0;
@@ -106,12 +111,20 @@ footer {
106
111
  }
107
112
 
108
113
  // 覆盖 github-markdown 样式
109
- .markdown-body .highlight pre,
110
- .markdown-body pre {
111
- background-color: inherit;
114
+ .markdown-body {
115
+ .highlight pre,
116
+ pre {
117
+ background-color: inherit;
118
+ }
119
+ img {
120
+ background-color: inherit;
121
+ }
112
122
  }
113
123
 
114
124
  @media screen and(max-width: 1000px) {
125
+ header {
126
+ padding: 10px 0;
127
+ }
115
128
  nav {
116
129
  display: none;
117
130
  }
data/assets/js/main.js CHANGED
@@ -2,14 +2,16 @@
2
2
  let oNavUl = document.querySelector('nav');
3
3
  let oNavs = document.querySelectorAll('h1,h2,h3');
4
4
 
5
- let aNavs = [], sNavs = '', aText = '', showText = '';
5
+ let aNavs = [], sNavs = '', aText = '', showText = '',nodeName;
6
6
 
7
7
  for (let i = 0, len = oNavs.length; i < len; i++) {
8
8
 
9
9
  // 保留字母数字下划线、中文、空格,然后再将空格替换成-
10
10
  aText = oNavs[i].textContent.replace(/[^ \w\u4e00-\u9fa5]/g, '').replace(/ /g, '-').toLowerCase();
11
- showText = htmlencode(oNavs[i].innerText)
12
- aNavs.push('<div class="' + oNavs[i].nodeName.toLowerCase() + '"><a href="#' + aText + '">' + showText + '</a></div>');
11
+ showText = htmlencode(oNavs[i].innerText);
12
+ nodeName = oNavs[i].nodeName.toLowerCase();
13
+
14
+ aNavs.push('<div class="' + nodeName + '"><a href="#' + aText + '">' + showText + '</a></div>');
13
15
  }
14
16
 
15
17
  sNavs = aNavs.join('');
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-fast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - liurongqing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: phpgege@gmail.com