lato 0.1.32 → 0.1.34
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 812fbe60084c9f4d5e61352c141c5ed7ed25cdff9518231a3993c0a4eced0a86
|
4
|
+
data.tar.gz: 9ad26645a1a478fead284ebe80e16a1be758a7c2a543fa146561bc28e8c8a044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e91e5904f3cc4acce8c465011d33d880a275f00e87b568f07f36166521692b920c7e92f91cdef6ea8e109dc480fa48f6bd0a8b273dff29503eeb3b624699ddd
|
7
|
+
data.tar.gz: 91edce6bde5d126e5ce6cdf25244e7d6d8435cd64778d65daa1225cb9efa49a6283e5dfea3b2647974c8362949738e13c5aa74a91a44c3ae3618913c462d8eb1
|
@@ -7,6 +7,7 @@ module Lato
|
|
7
7
|
# NOTE: instance variables are for options used by "lato_index" component helper
|
8
8
|
key = options[:key] || 'default'
|
9
9
|
pagination = options[:pagination] || false
|
10
|
+
default_sort_by = options[:default_sort_by] || nil
|
10
11
|
@_lato_index ||= {}
|
11
12
|
@_lato_index[key] = {
|
12
13
|
columns: options[:columns] || collection.column_names || [],
|
@@ -14,6 +15,9 @@ module Lato
|
|
14
15
|
searchable_columns: options[:searchable_columns] || []
|
15
16
|
}
|
16
17
|
|
18
|
+
# manage default sort by parameter
|
19
|
+
params[:sort_by] = default_sort_by if params[:sort_by].blank? && default_sort_by
|
20
|
+
|
17
21
|
# manage sort by parameter
|
18
22
|
unless params[:sort_by].blank?
|
19
23
|
sort_by_splitted = params[:sort_by].split('|')
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width,
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,shrink-to-fit=no">
|
6
6
|
<title><%= Lato.config.application_title %></title>
|
7
7
|
<%= csrf_meta_tags %>
|
8
8
|
<%= csp_meta_tag %>
|
data/lib/lato/version.rb
CHANGED
data/lib/tasks/lato_tasks.rake
CHANGED
@@ -35,26 +35,4 @@ namespace :lato do
|
|
35
35
|
FileUtils.copy(gem_concern_path, app_concern_path) unless File.exist? app_concern_path
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
39
|
-
namespace :bootstrap do
|
40
|
-
desc 'Generate SCSS variables for grays starting from a light color'
|
41
|
-
# Usage: rails lato:bootstrap:grays light=ffffff
|
42
|
-
task :grays do
|
43
|
-
light = ENV['light']
|
44
|
-
raise 'Light color not set' if light.blank?
|
45
|
-
|
46
|
-
rgb = light.match(/(..)(..)(..)$/).captures.map(&:hex)
|
47
|
-
r_range = rgb[0] / 9
|
48
|
-
g_range = rgb[1] / 9
|
49
|
-
b_range = rgb[2] / 9
|
50
|
-
|
51
|
-
puts rgb
|
52
|
-
(1..9).each do |level|
|
53
|
-
r_value = rgb[0] - r_range * (level - 1)
|
54
|
-
g_value = rgb[1] - g_range * (level - 1)
|
55
|
-
b_value = rgb[2] - b_range * (level - 1)
|
56
|
-
puts "$gray-#{level}00: rgb(#{r_value}, #{g_value}, #{b_value});"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|