jsmenubuilder 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/jsmenubuilder.rb +17 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20f9e46658d2144a31d83fdbf9b48a73579db567461ea6c86611450413f28c25
|
4
|
+
data.tar.gz: 901f1040f84f8d34895f2c65db42d47c79a382d4e58149de059cd70a5dfbf68c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5fc2f02cc51cd201b74778d5b9654ded0eca88fd721ea333d48ea0db230ac80b2833a75a22602931fb496aa78b9fea8d5dfa1a3fa65a9c92ff1711c9dfe2927
|
7
|
+
data.tar.gz: bb6a937c8c676f5f10d9b7e97b084f7f6041166a6292f43b0c5efa1111415c28dd77b63b3e021cdfb6bb3d81083c07e1dd029b41fcaa0985a8a152b2e2b0b506
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/jsmenubuilder.rb
CHANGED
@@ -6,6 +6,7 @@ require 'rexle'
|
|
6
6
|
require 'rxfhelper'
|
7
7
|
require 'rexle-builder'
|
8
8
|
|
9
|
+
|
9
10
|
class JsMenuBuilder
|
10
11
|
using ColouredText
|
11
12
|
|
@@ -189,6 +190,19 @@ STICKY_NAVBAR_CSS =<<EOF
|
|
189
190
|
.sticky + .content {
|
190
191
|
padding-top: 60px;
|
191
192
|
}
|
193
|
+
/* see https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header */
|
194
|
+
.anchor {
|
195
|
+
background-color: transparent;
|
196
|
+
padding-top: 70px;
|
197
|
+
margin-top: -70px;
|
198
|
+
display: block;
|
199
|
+
}
|
200
|
+
|
201
|
+
h2.anchor {
|
202
|
+
background-color: transparent;
|
203
|
+
padding-top: 60px;
|
204
|
+
margin-top: 0px;
|
205
|
+
}
|
192
206
|
|
193
207
|
EOF
|
194
208
|
|
@@ -557,12 +571,12 @@ EOF
|
|
557
571
|
|
558
572
|
h.sort.each do |char, rows|
|
559
573
|
|
560
|
-
xml.h2({id: char.downcase}, char)
|
574
|
+
xml.h2({class: 'anchor', id: char.downcase}, char)
|
561
575
|
|
562
576
|
rows.each do |heading, inner_html|
|
563
577
|
puts 'inner_html: ' + inner_html.inspect if debug
|
564
|
-
xml.a({name: heading.downcase.gsub(/\W/,'-')
|
565
|
-
|
578
|
+
xml.a({class: 'anchor', name: heading.downcase.gsub(/\W/,'-')\
|
579
|
+
.gsub(/-{2,}/,'-').gsub(/^-|-$/,'')})
|
566
580
|
xml.button({class:'accordion'}, heading.to_s)
|
567
581
|
xml.div({class:'panel'}, inner_html)
|
568
582
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsmenubuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
haYJPATx3zs+9jtQoiFg+keM0CPYk/5LgCv9jxxzQcSS20C8O9MWRVvYfIr47ak7
|
36
36
|
yXrDPmRvbJLTNjDv6Tkg3vU6
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-02-
|
38
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|