gibier 0.8.11 → 0.8.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5aabc0d1586e400deb20155328b6bb2a579fb54a75c76dba6ae52a6edcbc0831
4
- data.tar.gz: 38c32fe911c3575483032e25f83428b19792b22f766be2494b5891c5d3a91340
3
+ metadata.gz: 1ede1ff09145accf500f777520ca36150193313709d70083b623f984ca70acda
4
+ data.tar.gz: c0ba66fff0d5a67c71e01fb4b97f9fac99a0347b1c2771b9585f9f50447d30bd
5
5
  SHA512:
6
- metadata.gz: 0fb1c164b0464033c4bb989d502d1ffa06c5a726c146150766b30e2abbf4c5321c5f3f1299ee70e396c37d146732e1fecbfafe9cbde635defbb86c78c83ae073
7
- data.tar.gz: e8352a563aba3f65a7d915e95572b97d03463e0fad48a638b1772ee5d56b341f98c7980a9033cd39e20b602759d332319a42046152960d65d446635681bb947a
6
+ metadata.gz: 0ed0f0fcc704db0834f7b268fd0588e67715fcc541656a95328f289421989acd358197564b8ddb6862902fcaef1fa5c844e7413e917d3c8ff2c069b0512e5990
7
+ data.tar.gz: e308393b7db13d6818c9ab6754fbf01ec19c009c4db84c55068769539946e319e58b6f45e1c86d26ac708a6d93211618b1dac3c75dc4b6eb6b9f1bebe00ad6da
@@ -13,7 +13,8 @@ module Gibier
13
13
  generate_page(name, assets_path)
14
14
  end
15
15
 
16
- convert_html(File.expand_path('../../../template/gh_pages/index.haml', __FILE__), "docs/index.html", slides: @slide_loader.slides)
16
+ convert_html(File.expand_path('../views/index.haml', @data_dir), "docs/index.html", slides: @slide_loader.slides)
17
+ FileUtils.cp_r(File.expand_path('../assets', @data_dir), "docs")
17
18
  end
18
19
 
19
20
  def generate_page(name, assets_path = 'assets', slide_dir = nil)
@@ -22,8 +23,8 @@ module Gibier
22
23
 
23
24
  slide_dir = "#{@target_dir}/#{name}" unless slide_dir
24
25
  FileUtils.mkdir_p slide_dir
25
- slide_haml = File.expand_path('../../../template/gh_pages/slide.haml', __FILE__)
26
- convert_html(slide_haml, "#{slide_dir}/index.html", slide_name: name, assets_path: assets_path)
26
+ slide_haml = File.expand_path('../views/slide.haml', @data_dir)
27
+ convert_html(slide_haml, "#{slide_dir}/index.html", slide_name: name, static: true, assets_path: assets_path)
27
28
 
28
29
  assets_dir = "#{@target_dir}/assets/#{name}"
29
30
  FileUtils.mkdir_p assets_dir
@@ -1,3 +1,3 @@
1
1
  module Gibier
2
- VERSION = "0.8.11"
2
+ VERSION = "0.8.12"
3
3
  end
@@ -2,33 +2,10 @@ class PageBackground
2
2
  include Hyalite::Component
3
3
 
4
4
  def background
5
- case @props[:page_number]
6
- when 0
7
- [
8
- div({class: 'particleground'},
9
- div({class: 'logo'}),
10
- div({class: 'copyright'}, "© 2017 Retrieva, Inc.")
11
- ),
12
- div({class: 'vborder'})
13
- ]
14
- when Gibier.page_count - 1
15
- [
16
- div({class: 'particleground'},
17
- div({class: 'logo large'}),
18
- div({class: 'copyright'}, "© 2017 Retrieva, Inc.")
19
- ),
20
- ]
21
- else
22
- [
23
- div({class: 'border'}),
24
- div({class: 'dog'}),
25
- div({class: 'copyright'}, "© 2017 Retrieva, Inc.")
26
- ]
27
- end
5
+ []
28
6
  end
29
7
 
30
8
  def render
31
9
  div({class: 'page-background', style: {zoom: @props[:zoom]}}, background)
32
10
  end
33
11
  end
34
-
@@ -16,7 +16,7 @@ body {
16
16
  top: 0;
17
17
  width: 100%;
18
18
  height: 100%;
19
- font-size: 32px;
19
+ font-size: 40px;
20
20
  }
21
21
 
22
22
  .gibier .background {
@@ -33,14 +33,10 @@ body {
33
33
 
34
34
  .slide {
35
35
  position: absolute;
36
- width: 960px;
37
- height: 720px;
38
36
  margin: 0 auto;
39
37
  }
40
38
 
41
39
  .wrap-page {
42
- width: 960px;
43
- height: 720px;
44
40
  margin: 0 auto;
45
41
  color: #000;
46
42
  background-color: #fff;
@@ -55,10 +51,35 @@ body {
55
51
  }
56
52
 
57
53
  .slide .page {
54
+ position: absolute;
55
+ }
56
+
57
+ .slide .page-background {
58
+ position: absolute;
59
+ width: 100%;
60
+ height: 100%;
61
+ }
62
+
63
+ .slide .page-container {
64
+ position: absolute;
65
+ }
66
+
67
+ .slide .page-header {
68
+ position: absolute;
69
+ width: 100%;
70
+ margin: 1em 0;
71
+ z-index: 103;
72
+ }
73
+
74
+ .slide .page-content {
58
75
  top: 50%;
59
76
  transform: translateY(-50%);
60
77
  position: absolute;
61
- width: 100%;
78
+ width: 80%;
79
+ left: 0;
80
+ right: 0;
81
+ margin: 0 auto;
82
+ z-index: 104;
62
83
  }
63
84
 
64
85
  .slide-controll {
@@ -71,7 +92,7 @@ body {
71
92
  position: absolute;
72
93
  width: 25%;
73
94
  height: 100%;
74
- z-index: 10;
95
+ z-index: 101;
75
96
  background-color: rgba(0, 0, 0, 0);
76
97
  }
77
98
 
@@ -80,7 +101,7 @@ body {
80
101
  width: 25%;
81
102
  height: 100%;
82
103
  left: 75%;
83
- z-index: 10;
104
+ z-index: 102;
84
105
  background-color: rgba(0, 0, 0, 0);
85
106
  }
86
107
 
@@ -114,14 +135,28 @@ body {
114
135
  background-repeat: no-repeat;
115
136
  }
116
137
 
117
- .page img {
118
- width: 1em;
138
+ .page img.inline {
139
+ height: 2rem;
119
140
  background-size: contain;
120
141
  background-repeat: no-repeat;
121
142
  }
122
143
 
144
+ .page .inline {
145
+ margin: 0 8px;
146
+ float: left;
147
+ }
148
+
149
+ .page p.huge {
150
+ text-align: center;
151
+ font-size: 2.6em;
152
+ font-weight: bold;
153
+ margin: 0;
154
+ }
155
+
123
156
  .page p.large {
124
157
  text-align: center;
158
+ font-size: 1.6em;
159
+ font-weight: bold;
125
160
  margin: 0;
126
161
  }
127
162
 
@@ -129,6 +164,86 @@ body {
129
164
  width: 80%;
130
165
  }
131
166
 
167
+ .page p.middle {
168
+ text-align: center;
169
+ font-size: 1.6em;
170
+ font-weight: bold;
171
+ margin: 0;
172
+ margin-top: 4em;
173
+ }
174
+
175
+ .page p.middle img {
176
+ width: 60%;
177
+ }
178
+
179
+ .page p.portlait {
180
+ text-align: center;
181
+ font-size: 1.6em;
182
+ font-weight: bold;
183
+ margin: 0;
184
+ }
185
+
186
+ .page p.portlait img {
187
+ width: 40%;
188
+ margin-top: 4em;
189
+ }
190
+
191
+ .page p.portlait-left {
192
+ text-align: left;
193
+ font-size: 1.6em;
194
+ font-weight: bold;
195
+ margin: 0;
196
+ }
197
+
198
+ .page p.portlait-left img {
199
+ width: 38%;
200
+ margin-top: 12%;
201
+ float: left;
202
+ }
203
+
204
+ .page .right ~ * {
205
+ position: relative;
206
+ float: left;
207
+ margin-top: 10em;
208
+ margin-left: 2em;
209
+ width: 20em;
210
+ }
211
+
212
+ .page p.w90 {
213
+ text-align: center;
214
+ font-size: 1.6em;
215
+ font-weight: bold;
216
+ margin: 0;
217
+ }
218
+
219
+ .page p.w90 img {
220
+ width: 90%;
221
+ }
222
+
223
+ .page p.w70 {
224
+ text-align: center;
225
+ font-size: 1.6em;
226
+ font-weight: bold;
227
+ margin: 0;
228
+ margin-top: 4em;
229
+ }
230
+
231
+ .page p.w70 img {
232
+ width: 70%;
233
+ }
234
+
235
+ .page p.w50 {
236
+ text-align: center;
237
+ font-size: 1.6em;
238
+ font-weight: bold;
239
+ margin: 0;
240
+ margin-top: 4em;
241
+ }
242
+
243
+ .page p.w50 img {
244
+ width: 50%;
245
+ }
246
+
132
247
  h1 {
133
248
  font-size: 1.6em;
134
249
  text-align: center;
@@ -0,0 +1,6 @@
1
+ .gibier .page_0 p.icon {
2
+ margin: 0;
3
+ position: relative;
4
+ left: 32em;
5
+ top: -3em;
6
+ }
@@ -45,6 +45,7 @@ class Server < Sinatra::Base
45
45
 
46
46
  get '/:slide_name' do
47
47
  @slide_name = params['slide_name']
48
+ @assets_path = 'assets'
48
49
  haml :slide
49
50
  end
50
51
 
@@ -4,9 +4,9 @@
4
4
  %meta{charset:"utf-8"}
5
5
  %meta{name:"viewport", content:"width=device-width,initial-scale=1.0,minimum-scale=1.0"}
6
6
  %title= @slide_name
7
- %link{rel:"stylesheet", href:"assets/css/application.css"}
8
- %link{rel:"stylesheet", href:"assets/#{@slide_name}/css/custom.css"}
9
- %link{rel:"stylesheet", href:"assets/css/highlight.css"}
7
+ %link{rel:"stylesheet", href:"#{@assets_path}/css/application.css"}
8
+ %link{rel:"stylesheet", href:"#{@assets_path}/#{@slide_name}/css/custom.css"}
9
+ %link{rel:"stylesheet", href:"#{@assets_path}/css/highlight.css"}
10
10
 
11
11
  %body
12
12
  %section.gibier
@@ -14,4 +14,12 @@
14
14
  :javascript
15
15
  window.slideName = '#{@slide_name}'
16
16
  window.assetsPath = 'assets/#{@slide_name}'
17
- = ::Opal::Sprockets.javascript_include_tag("slides/#{@slide_name}/app", sprockets: settings.opal.sprockets, prefix: 'assets', debug: true)
17
+
18
+ - if @static
19
+ :javascript
20
+ window.ghPages = true;
21
+
22
+ %script{type:"text/javascript", src:"#{@assets_path}/#{@slide_name}/javascripts/application.js"}
23
+
24
+ - else
25
+ = ::Opal::Sprockets.javascript_include_tag("slides/#{@slide_name}/app", sprockets: settings.opal.sprockets, prefix: 'assets', debug: true)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gibier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.11
4
+ version: 0.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - youchan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -270,8 +270,6 @@ files:
270
270
  - lib/gibier/static_generator.rb
271
271
  - lib/gibier/version.rb
272
272
  - template/app.rb
273
- - template/gh_pages/index.haml
274
- - template/gh_pages/slide.haml
275
273
  - template/project/Gemfile
276
274
  - template/project/app/page_background.rb
277
275
  - template/project/app/page_base.rb
@@ -1,13 +0,0 @@
1
- !!! 5
2
- %html(lang="en" data-framework="hyalite")
3
- %head
4
- %meta{charset:"utf-8"}
5
- %title Index of slides
6
-
7
- %body
8
- %h1 Index of slides
9
- %section
10
- %ul
11
- - @slides.each do |slide|
12
- %li
13
- %a{href: slide[:name]}= "[#{slide[:name]}] \"#{slide[:title]}\""
@@ -1,18 +0,0 @@
1
- !!!
2
- %html(lang="en" data-framework="hyalite")
3
- %head
4
- %meta{charset:"utf-8"}
5
- %title= @slide_name
6
- %link{rel:"stylesheet", href:"#{@assets_path}/css/application.css"}
7
- %link{rel:"stylesheet", href:"#{@assets_path}/#{@slide_name}/css/custom.css"}
8
- %link{rel:"stylesheet", href:"#{@assets_path}/css/highlight.css"}
9
-
10
- %body
11
- %section.gibier
12
-
13
- :javascript
14
- window.slideName = '#{@slide_name}'
15
- window.ghPages = true;
16
- window.assetsPath = '#{@assets_path}/#{@slide_name}';
17
-
18
- %script{type:"text/javascript", src:"#{@assets_path}/#{@slide_name}/javascripts/application.js"}