codefabrik-styleguide 0.1.13 → 0.1.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c3f2bf3378fcc883e96bea122e52f96329e50ec25e66bc3332fd5dcb209cb2e
|
4
|
+
data.tar.gz: 68e40df4de672ed393e8002184c232d9b9e3121c9fd3baa391ade7f2f2134bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 877a810337682aba4640fa61c85d48bbbf3c52fc20eaf6348c69f6e7b44b3c09f0562e11e45550734c5fdac1ebee3bc33889fd91efb0c1aaf129a91e768b5214
|
7
|
+
data.tar.gz: c587350a167836199f2e28a26105e15c6018e1cd4cd39321152bdd31875c16df7ecd066d29b1c4ad7fe40f78b59e874b68857e26ac6a62c38a0cbdcbe12d4524
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Codefabrik
|
2
|
+
module Styleguide
|
3
|
+
module ViewHelpers
|
4
|
+
def breadcrumbs(links, current)
|
5
|
+
output = "<div class='breadcrumbs mb-1'>"
|
6
|
+
links.each do |link|
|
7
|
+
output << "#{link}<span class='separator'>▶</span>"
|
8
|
+
end
|
9
|
+
output << current
|
10
|
+
output << "</div>"
|
11
|
+
output.html_safe
|
12
|
+
end
|
13
|
+
|
14
|
+
def table(headers, data)
|
15
|
+
output = "<div class='table'><div class='thead'><div class='tr'>"
|
16
|
+
headers.each do |header|
|
17
|
+
output << "<div class='th'>#{header}</div>"
|
18
|
+
end
|
19
|
+
output << "</div></div><div class='tbody'>"
|
20
|
+
data.each do |row|
|
21
|
+
output << "<div class='tr'>"
|
22
|
+
row.each do |cell|
|
23
|
+
output << "<div class='td'>#{cell}</div>"
|
24
|
+
end
|
25
|
+
output << "</div>"
|
26
|
+
end
|
27
|
+
output << "</div></div>"
|
28
|
+
output.html_safe
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rails/engine"
|
4
|
+
require_relative "styleguide/view_helpers"
|
4
5
|
require_relative "styleguide/version"
|
5
6
|
|
6
7
|
module Codefabrik
|
@@ -8,6 +9,9 @@ module Codefabrik
|
|
8
9
|
class Error < StandardError; end
|
9
10
|
|
10
11
|
class Engine < ::Rails::Engine
|
12
|
+
initializer "styleguide.view_helpers" do
|
13
|
+
ActiveSupport.on_load( :action_view ){ include Codefabrik::Styleguide::ViewHelpers }
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
@@ -72,7 +72,11 @@ header, footer {
|
|
72
72
|
top: 0;
|
73
73
|
padding: 0;
|
74
74
|
padding-top: $default_distance;
|
75
|
-
background-color:
|
75
|
+
background-color: map-get($primary, 400);
|
76
|
+
|
77
|
+
@media (prefers-color-scheme: dark) {
|
78
|
+
background-color: map-get($dark, 400);
|
79
|
+
}
|
76
80
|
|
77
81
|
section {
|
78
82
|
display: flex;
|
@@ -95,7 +99,7 @@ header, footer {
|
|
95
99
|
}
|
96
100
|
|
97
101
|
&:hover {
|
98
|
-
background-color: map-get($primary,
|
102
|
+
background-color: map-get($primary, 100);
|
99
103
|
}
|
100
104
|
}
|
101
105
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codefabrik-styleguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas_Skywalker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dartsass-rails
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- dist/.gitkeep
|
85
85
|
- lib/codefabrik/styleguide.rb
|
86
86
|
- lib/codefabrik/styleguide/version.rb
|
87
|
+
- lib/codefabrik/styleguide/view_helpers.rb
|
87
88
|
- sig/codefabrik/styleguide.rbs
|
88
89
|
- vendor/assets/stylesheets/codefabrik/styleguide.scss
|
89
90
|
- vendor/assets/stylesheets/codefabrik/styleguide/01_reset.scss
|