card-mod-style 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/stylesheets/style_bootstrap_compatible.css +68 -0
- data/lib/stylesheets/style_cards.scss +1261 -0
- data/lib/stylesheets/style_jquery_ui_smoothness.css +909 -0
- data/public/assets/jquery-ui-smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-icons_222222_256x240.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-icons_454545_256x240.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-icons_888888_256x240.png +0 -0
- data/public/assets/jquery-ui-smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/set/abstract/skin_box.rb +33 -0
- data/set/abstract/skin_box/box_bottom.haml +4 -0
- data/set/right/style.rb +56 -0
- data/set/right/style/input.haml +6 -0
- data/set/self/style.rb +4 -0
- data/set/self/style_bootstrap_compatible.rb +1 -0
- data/set/self/style_cards.rb +1 -0
- data/set/self/style_jquery_ui_smoothness.rb +1 -0
- data/set/self/style_libraries.rb +1 -0
- data/set/self/style_mods.rb +1 -0
- data/set/type/css.rb +85 -0
- data/set/type/scss.rb +21 -0
- data/set/type/skin.rb +10 -0
- metadata +115 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,33 @@
|
|
1
|
+
format :html do
|
2
|
+
view :box do
|
3
|
+
class_up "box-middle", "p-0"
|
4
|
+
voo.hide :customize_button, :box_middle
|
5
|
+
super()
|
6
|
+
end
|
7
|
+
|
8
|
+
view :box_bottom, template: :haml
|
9
|
+
|
10
|
+
view :customize_button, cache: :never do
|
11
|
+
customize_button
|
12
|
+
end
|
13
|
+
|
14
|
+
def customize_button target: parent&.card, text: "Apply and customize"
|
15
|
+
return "" unless card.codename.present?
|
16
|
+
theme = card.codename.match(/^(?<theme_name>.+)_skin$/).capture(:theme_name)
|
17
|
+
link_to_card target, text,
|
18
|
+
path: { action: :update, card: { content: "[[#{card.name}]]" },
|
19
|
+
customize: true, theme: theme },
|
20
|
+
class: "btn btn-sm btn-outline-primary mr-2"
|
21
|
+
end
|
22
|
+
|
23
|
+
view :box_middle do
|
24
|
+
return unless card.field(:image)
|
25
|
+
field_nest(:image, view: :full_width, size: :large)
|
26
|
+
end
|
27
|
+
|
28
|
+
def select_button target=parent.card
|
29
|
+
link_to_card target, "Apply",
|
30
|
+
path: { action: :update, card: { content: "[[#{card.name}]]" } },
|
31
|
+
class: "btn btn-sm btn-primary"
|
32
|
+
end
|
33
|
+
end
|
data/set/right/style.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require "sassc"
|
2
|
+
include_set Abstract::Machine
|
3
|
+
|
4
|
+
store_machine_output filetype: "css"
|
5
|
+
|
6
|
+
def ok_to_read
|
7
|
+
true
|
8
|
+
end
|
9
|
+
|
10
|
+
format do
|
11
|
+
# turn off autodetection of uri's
|
12
|
+
def chunk_list
|
13
|
+
:nest_only
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
format :html do
|
18
|
+
HIDDEN_SKINS = %w[bootstrap_default_skin themeless_bootstrap_skin bootstrap_default_skin
|
19
|
+
classic_bootstrap_skin].freeze
|
20
|
+
|
21
|
+
def default_item_view
|
22
|
+
:bar
|
23
|
+
end
|
24
|
+
|
25
|
+
view :input, template: :haml
|
26
|
+
|
27
|
+
def themes
|
28
|
+
card.rule_card(:content_options).item_cards
|
29
|
+
end
|
30
|
+
|
31
|
+
def selectable_themes
|
32
|
+
themes.reject do |theme_card|
|
33
|
+
theme_card.right&.codename == :stylesheets ||
|
34
|
+
theme_card.key.in?(HIDDEN_SKINS)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
event :customize_theme, :prepare_to_validate, on: :update, when: :customize_theme? do
|
40
|
+
skin_name = free_skin_name
|
41
|
+
add_subcard skin_name, type_id: CustomizedBootswatchSkinID
|
42
|
+
self.content = "[[#{skin_name}]]"
|
43
|
+
end
|
44
|
+
|
45
|
+
def free_skin_name
|
46
|
+
name = "#{@theme} skin customized"
|
47
|
+
if Card.exist?(name)
|
48
|
+
name = "#{name} 1"
|
49
|
+
name.next! while Card.exist?(name)
|
50
|
+
end
|
51
|
+
name
|
52
|
+
end
|
53
|
+
|
54
|
+
def customize_theme?
|
55
|
+
Env.params[:customize].present? && (@theme = Env.params[:theme]).present?
|
56
|
+
end
|
data/set/self/style.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
include_set Abstract::CodeFile
|
@@ -0,0 +1 @@
|
|
1
|
+
include_set Abstract::CodeFile
|
@@ -0,0 +1 @@
|
|
1
|
+
include_set Abstract::CodeFile
|
@@ -0,0 +1 @@
|
|
1
|
+
include_set Abstract::CodePointer
|
@@ -0,0 +1 @@
|
|
1
|
+
include_set Abstract::CodePointer
|
data/set/type/css.rb
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
require "sassc"
|
4
|
+
require "benchmark"
|
5
|
+
|
6
|
+
include_set Abstract::Machine
|
7
|
+
include_set Abstract::MachineInput
|
8
|
+
|
9
|
+
store_machine_output filetype: "css"
|
10
|
+
|
11
|
+
machine_input do
|
12
|
+
compress_css format(format: :css)._render_core
|
13
|
+
end
|
14
|
+
|
15
|
+
def compress_css input
|
16
|
+
compress_css? ? SassC::Engine.new(input, style: :compressed).render : input
|
17
|
+
rescue => e
|
18
|
+
raise Card::Error, css_compression_error(e)
|
19
|
+
end
|
20
|
+
|
21
|
+
def css_compression_error error
|
22
|
+
# scss is compiled in a view
|
23
|
+
# If there is a scss syntax error we get the rescued view here
|
24
|
+
# and the error that the rescued view is no valid css
|
25
|
+
# To get the original error we have to refer to Card::Error.current
|
26
|
+
if Card::Error.current
|
27
|
+
Card::Error.current.message
|
28
|
+
else
|
29
|
+
"Sass::SyntaxError (#{name}): #{error.message}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def clean_html?
|
34
|
+
false
|
35
|
+
end
|
36
|
+
|
37
|
+
def compress_css?
|
38
|
+
return true
|
39
|
+
# !Rails.env.development?
|
40
|
+
end
|
41
|
+
|
42
|
+
format do
|
43
|
+
# def default_nest_view
|
44
|
+
# :raw
|
45
|
+
# end
|
46
|
+
|
47
|
+
def chunk_list # turn off autodetection of uri's
|
48
|
+
:references
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
format :html do
|
53
|
+
def input_type
|
54
|
+
:ace_editor
|
55
|
+
end
|
56
|
+
|
57
|
+
def ace_mode
|
58
|
+
:css
|
59
|
+
end
|
60
|
+
|
61
|
+
def default_nest_view
|
62
|
+
:closed
|
63
|
+
end
|
64
|
+
|
65
|
+
view :core do
|
66
|
+
# FIXME: scan must happen before process for inclusion interactions to
|
67
|
+
# work, but this will likely cause
|
68
|
+
# problems with including other css?
|
69
|
+
process_content ::CodeRay.scan(_render_raw, :css).div, size: :icon
|
70
|
+
end
|
71
|
+
|
72
|
+
def content_changes action, diff_type, hide_diff=false
|
73
|
+
wrap_with(:pre) { super }
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
format :css do
|
78
|
+
view :import do
|
79
|
+
%{\n@import url("#{_render_url}");\n}
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def diff_args
|
84
|
+
{ diff_format: :text }
|
85
|
+
end
|
data/set/type/scss.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
include_set Type::Css
|
2
|
+
|
3
|
+
format do
|
4
|
+
view :core, cache: :never do
|
5
|
+
compile_scss(process_content(_render_raw))
|
6
|
+
end
|
7
|
+
|
8
|
+
def compile_scss scss, style=:expanded
|
9
|
+
SassC::Engine.new(scss, style: style).render
|
10
|
+
rescue SassC::SyntaxError => e
|
11
|
+
raise Card::Error,
|
12
|
+
"SassC::SyntaxError (#{card.name}:#{e.sass_backtrace}): #{e.message}"
|
13
|
+
# "#{#scss.lines[e.sass_line - 1]}\n" \
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
format :html do
|
18
|
+
def ace_mode
|
19
|
+
:scss
|
20
|
+
end
|
21
|
+
end
|
data/set/type/skin.rb
ADDED
metadata
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: card-mod-style
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.11.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ethan McCutchen
|
8
|
+
- Philipp Kühl
|
9
|
+
- Gerry Gleason
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: card
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - '='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.101.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - '='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 1.101.0
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: card-mod-machines
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.11.0
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.11.0
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: card-mod-list
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - '='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 0.11.0
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - '='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.11.0
|
57
|
+
description: ''
|
58
|
+
email:
|
59
|
+
- info@decko.org
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- lib/stylesheets/style_bootstrap_compatible.css
|
65
|
+
- lib/stylesheets/style_cards.scss
|
66
|
+
- lib/stylesheets/style_jquery_ui_smoothness.css
|
67
|
+
- public/assets/jquery-ui-smoothness/ui-bg_glass_55_fbf9ee_1x400.png
|
68
|
+
- public/assets/jquery-ui-smoothness/ui-bg_glass_65_ffffff_1x400.png
|
69
|
+
- public/assets/jquery-ui-smoothness/ui-bg_glass_75_dadada_1x400.png
|
70
|
+
- public/assets/jquery-ui-smoothness/ui-bg_glass_75_e6e6e6_1x400.png
|
71
|
+
- public/assets/jquery-ui-smoothness/ui-bg_glass_95_fef1ec_1x400.png
|
72
|
+
- public/assets/jquery-ui-smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png
|
73
|
+
- public/assets/jquery-ui-smoothness/ui-icons_222222_256x240.png
|
74
|
+
- public/assets/jquery-ui-smoothness/ui-icons_2e83ff_256x240.png
|
75
|
+
- public/assets/jquery-ui-smoothness/ui-icons_454545_256x240.png
|
76
|
+
- public/assets/jquery-ui-smoothness/ui-icons_888888_256x240.png
|
77
|
+
- public/assets/jquery-ui-smoothness/ui-icons_cd0a0a_256x240.png
|
78
|
+
- set/abstract/skin_box.rb
|
79
|
+
- set/abstract/skin_box/box_bottom.haml
|
80
|
+
- set/right/style.rb
|
81
|
+
- set/right/style/input.haml
|
82
|
+
- set/self/style.rb
|
83
|
+
- set/self/style_bootstrap_compatible.rb
|
84
|
+
- set/self/style_cards.rb
|
85
|
+
- set/self/style_jquery_ui_smoothness.rb
|
86
|
+
- set/self/style_libraries.rb
|
87
|
+
- set/self/style_mods.rb
|
88
|
+
- set/type/css.rb
|
89
|
+
- set/type/scss.rb
|
90
|
+
- set/type/skin.rb
|
91
|
+
homepage: http://decko.org
|
92
|
+
licenses:
|
93
|
+
- GPL-3.0
|
94
|
+
metadata:
|
95
|
+
card-mod: style
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '2.5'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubygems_version: 3.0.3
|
112
|
+
signing_key:
|
113
|
+
specification_version: 4
|
114
|
+
summary: Skins, CSS, SCSS, etc
|
115
|
+
test_files: []
|