nanocabc 0.0.5 → 0.0.6

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: f20419986ec51b479dc663e554d01178a4b235dc64802239fd7198b21bf832cf
4
- data.tar.gz: ce26f19429d7ff9edd62dc71459aec42c20a44bdc4087a33dd9c6afd39f50b00
3
+ metadata.gz: 518e3c0a17fb533870755039c1b2f084114105c8b9c0e27d4a7990f3167356c9
4
+ data.tar.gz: ffd4e71258ece26118b822613ef5728e9109a78fd534a9a612aa27838d604b12
5
5
  SHA512:
6
- metadata.gz: 8eae399773e3e9180fe5eaef854709984fe5191eaed55df073fa2d6858a0385d7f41b9cb995f53ec4b844085378ef068ed627535b2c6bc7777f3378a667e483a
7
- data.tar.gz: cbcc61569324aa230a7f281ac51485b81d8194fbba5eef9c90e2839a817312454859abb118259b2b5d24890307ee04d7fdd165b8793f209955358a789522efc1
6
+ metadata.gz: 9f40e341fb9583642a5ed42520d158d0dc88102cfbd217c6e8a1ce84b92e4a530ab7dafb85bbaf867eb8179d8187a0e0ba4d520689c4898a17a950b1a76baeb3
7
+ data.tar.gz: a38770b806cb1b2828ae62797aafa775c91e3fd20bfa4916a8462e780c88f45b72e17995abcb5f01b67aa0efb8ec19c6321ac202aa1b60b6daa3dda4350ccd11
@@ -0,0 +1,3 @@
1
+ module Nanocabc
2
+ VERSION = "0.0.6"
3
+ end
data/lib/nanocabc.rb ADDED
@@ -0,0 +1,60 @@
1
+ require "nanocabc/version"
2
+
3
+ module Nanocabc
4
+ def sidebar(name)
5
+ if(name)
6
+ output = '';
7
+ output << '<nav class="mt-8">'
8
+ # ul starts here
9
+ output << '<ul>'
10
+ @config[:sidebar].each do |item|
11
+ if (item[:dropdown_menu_items])
12
+ # collapse
13
+ output << '<div class="collapse mb-2">'
14
+ # collapse title
15
+ output << '<div class="collapse-title flex items-center font-opensans font-semibold text-primary-N110 cursor-pointer">'
16
+ output << "#{item[:dropdown_menu_title]}"
17
+ output << '</div>'
18
+
19
+ # collapse body
20
+ output << '<div class="collapse-body hidden">'
21
+ output << '<ul class="px-3">'
22
+ item[:dropdown_menu_items].each do |menu|
23
+ if menu[:subsection]
24
+ output << '<li class="mt-1 font-opensans text-sm">'
25
+ output << '<ul class="mb-5">'
26
+ menu[:subsection].each do |subsectionItem|
27
+ if subsectionItem[:heading]
28
+ output << '<div class="font-opensans mt-5 font-bold text-primary-N80 dark:text-primary-DN60 text-sm px-3">'
29
+ output << "#{subsectionItem[:heading]}"
30
+ output << '</div>'
31
+ else
32
+ output << '<li class="mt-1 font-opensans text-sm">'
33
+ output << "#{active_link(subsectionItem[:title], subsectionItem[:link])}"
34
+ output << '</li>'
35
+ end
36
+ end
37
+ output << '</ul>'
38
+ output << '</li>'
39
+ else
40
+ output << '<li class="mt-1 font-opensans text-sm">'
41
+ output << "#{active_link(menu[:title], menu[:link])}"
42
+ output << '</li>'
43
+ end
44
+ end
45
+ output << '</ul>'
46
+ output << '</div>'
47
+ output << '</div>'
48
+ else
49
+ output << '<li class="mt-2 mb-2 px-3 font-opensans text-sm">'
50
+ output << "#{active_link(item[:title], item[:link])}"
51
+ output << '</li>'
52
+ end
53
+ end
54
+ # ul ends here
55
+ output << '</ul>'
56
+ output << '</nav>'
57
+ output
58
+ end
59
+ end
60
+ end
data/nanocabc.gemspec ADDED
@@ -0,0 +1,39 @@
1
+ # lib = File.expand_path("lib", __dir__)
2
+ # $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ # require "nanocabc/version"
4
+
5
+ begin
6
+ require_relative 'lib/nanocabc/version'
7
+ rescue LoadError
8
+ require "nanocabc/version"
9
+ end
10
+
11
+ Gem::Specification.new do |spec|
12
+ spec.name = "nanocabc"
13
+ spec.version = Nanocabc::VERSION
14
+ spec.authors = ["Prashant"]
15
+ spec.email = ["prashant.permi2@gmail.com"]
16
+
17
+ spec.summary = "Sidebar navigation"
18
+ spec.description = ""
19
+ spec.homepage = "https://rubygems.org/gems/nanocabc"
20
+ spec.license = 'MIT'
21
+
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+
24
+
25
+ # Specify which files should be added to the gem when it is released.
26
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
+ begin
28
+ files = (result = `git ls-files -z`.split ?\0).empty? ? Dir['**/*'] : result
29
+ rescue
30
+ files = Dir['**/*']
31
+ end
32
+ spec.files = files.grep %r/^(?:(?:data|lib|man)\/.+|LICENSE|(?:CHANGELOG|README(?:-\w+)?)\.adoc|\.yardopts|#{spec.name}\.gemspec)$/
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ spec.add_development_dependency "bundler", "~> 2.0"
38
+ spec.add_development_dependency "rake", "~> 10.0"
39
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanocabc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prashant
@@ -44,7 +44,10 @@ email:
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
- files: []
47
+ files:
48
+ - lib/nanocabc.rb
49
+ - lib/nanocabc/version.rb
50
+ - nanocabc.gemspec
48
51
  homepage: https://rubygems.org/gems/nanocabc
49
52
  licenses:
50
53
  - MIT