weaver 0.8.14 → 0.9.1

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.
@@ -3,7 +3,7 @@
3
3
  module Weaver
4
4
  # Base page class
5
5
  class Page
6
- attr_accessor :scripts, :onload_scripts
6
+ attr_accessor :scripts, :onload_scripts, :favicon_name, :favicon_type
7
7
 
8
8
  def initialize(title, global_settings, options, &block)
9
9
  @title = title
@@ -91,6 +91,11 @@ module Weaver
91
91
  style = <<-ENDSTYLE
92
92
  <link href="#{mod}css/style.css" rel="stylesheet">
93
93
  ENDSTYLE
94
+ if !@options[:theme].nil?
95
+ style = <<-ENDSTYLE
96
+ <link href="#{mod}css/style-#{@options[:theme]}.css" rel="stylesheet">
97
+ ENDSTYLE
98
+ end
94
99
 
95
100
  style = '' if options[:style] == :empty
96
101
 
@@ -150,6 +155,9 @@ mixpanel.init("' + @global_settings[:mixpanel_token] + '");</script><!-- end Mix
150
155
  GOOGLE
151
156
  end
152
157
 
158
+ favicon_filename = @favicon_name || 'favicon.ico'
159
+ favicon_mimetype = @favicon_type || 'image/x-icon'
160
+
153
161
  result = <<~SKELETON
154
162
  <!DOCTYPE html>
155
163
  <html>
@@ -165,6 +173,8 @@ mixpanel.init("' + @global_settings[:mixpanel_token] + '");</script><!-- end Mix
165
173
  <link href="#{mod}font-awesome/css/font-awesome.css" rel="stylesheet">
166
174
  <link href="#{mod}css/plugins/iCheck/custom.css" rel="stylesheet">
167
175
 
176
+ <link rel="icon" href="#{favicon_filename}" type="#{favicon_mimetype}" />
177
+
168
178
  #{style}
169
179
 
170
180
  <link href="#{mod}css/animate.css" rel="stylesheet">
@@ -9,7 +9,7 @@ module Weaver
9
9
  end
10
10
 
11
11
  def header(&block)
12
- row(class: 'wrapper border-bottom white-bg page-heading', &block)
12
+ row(class: 'wrapper white-bg page-heading', &block)
13
13
  end
14
14
 
15
15
  def row(options = {}, &block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Weaver
4
- VERSION = '0.8.14'
4
+ VERSION = '0.9.1'
5
5
  end
data/weaver.gemspec CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency 'rackup'
35
35
  spec.add_dependency 'sinatra', '~> 4'
36
36
 
37
- spec.add_development_dependency 'rake', '~> 10.0'
37
+ spec.add_development_dependency 'rake'
38
38
 
39
39
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weaver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.14
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Siaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-15 00:00:00.000000000 Z
11
+ date: 2025-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '0'
83
83
  description: Site generator with a simple DSL
84
84
  email:
85
85
  - davidsiaw@gmail.com
@@ -228,6 +228,7 @@ files:
228
228
  - data/weaver/css/plugins/textSpinners/spinners.css
229
229
  - data/weaver/css/plugins/toastr/toastr.min.css
230
230
  - data/weaver/css/plugins/touchspin/jquery.bootstrap-touchspin.min.css
231
+ - data/weaver/css/style-dark.css
231
232
  - data/weaver/css/style.css
232
233
  - data/weaver/css/style.min.css
233
234
  - data/weaver/font-awesome/css/fa-brands.css
@@ -31410,7 +31411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
31410
31411
  - !ruby/object:Gem::Version
31411
31412
  version: '0'
31412
31413
  requirements: []
31413
- rubygems_version: 3.2.3
31414
+ rubygems_version: 3.5.22
31414
31415
  signing_key:
31415
31416
  specification_version: 4
31416
31417
  summary: Website generator