picocss-gem 0.2.0 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +21 -21
- data/exe/bridgetown-picocss +21 -0
- data/lib/generators/bridgetown/install_theme_generator.rb +28 -0
- data/lib/generators/bridgetown/template_login_generator.rb +18 -0
- data/lib/generators/{picocss → rails}/install_generator.rb +1 -1
- data/lib/generators/{picocss → rails}/install_theme_generator.rb +0 -2
- data/lib/generators/{picocss → rails}/template_login_generator.rb +1 -1
- data/lib/picocss/version.rb +1 -1
- metadata +31 -27
- /data/lib/generators/{picocss/templates → templates}/login.html.erb +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.amber.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.blue.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.cyan.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.fuchsia.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.green.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.grey.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.indigo.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.jade.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.lime.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.orange.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.pink.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.pumpkin.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.purple.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.red.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.sand.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.slate.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.violet.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.yellow.min.css +0 -0
- /data/lib/generators/{picocss/templates → templates}/pico.zinc.min.css +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13514ec9b56c58860022d60ed268eaf16d235c247a8f789f7c72a4b28d407ab5
|
|
4
|
+
data.tar.gz: 4629a1276f5ea200cbc496e3b9806a4eeb7a2784cc281ab44a375bdf8e2544bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a16073ee2c4ff017559475a24bb9371c03efdadcb642a3c3f4a72c5b1870645e7fe0cfc1d7db211eaa1e8dc4ca564cd1c158d513a511b9bb07d2183a8fc543f6
|
|
7
|
+
data.tar.gz: 0c318642b13fb9d4168b096732578e1f7a2590aa9f7838834479a17c08475fe5fb0f003d50a25de8843ecacf7493a6df8e54953734c2ed03e1192f2e261acc81
|
data/README.md
CHANGED
|
@@ -76,26 +76,26 @@ rails server
|
|
|
76
76
|
bin/rails generate picocss:install_<color>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
| Theme | Color
|
|
80
|
-
| ------- |
|
|
81
|
-
| red | <
|
|
82
|
-
| pink | <
|
|
83
|
-
| fuchsia | <
|
|
84
|
-
| purple | <
|
|
85
|
-
| violet | <
|
|
86
|
-
| indigo | <
|
|
87
|
-
| blue | <
|
|
88
|
-
| cyan | <
|
|
89
|
-
| jade | <
|
|
90
|
-
| green | <
|
|
91
|
-
| lime | <
|
|
92
|
-
| yellow | <
|
|
93
|
-
| pumpkin | <
|
|
94
|
-
| orange | <
|
|
95
|
-
| sand | <
|
|
96
|
-
| grey | <
|
|
97
|
-
| zinc | <
|
|
98
|
-
| slate | <
|
|
79
|
+
| Theme | Color |
|
|
80
|
+
| ------- | ----- |
|
|
81
|
+
| red | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ff0000'/></svg>" /> |
|
|
82
|
+
| pink | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ffc0cb'/></svg>" /> |
|
|
83
|
+
| fuchsia | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ff00ff'/></svg>" /> |
|
|
84
|
+
| purple | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23800080'/></svg>" /> |
|
|
85
|
+
| violet | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ee82ee'/></svg>" /> |
|
|
86
|
+
| indigo | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%234b0082'/></svg>" /> |
|
|
87
|
+
| blue | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%230000ff'/></svg>" /> |
|
|
88
|
+
| cyan | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%2300ffff'/></svg>" /> |
|
|
89
|
+
| jade | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%232e8b57'/></svg>" /> |
|
|
90
|
+
| green | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23008000'/></svg>" /> |
|
|
91
|
+
| lime | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%2300ff00'/></svg>" /> |
|
|
92
|
+
| yellow | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ffff00'/></svg>" /> |
|
|
93
|
+
| pumpkin | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ff8c00'/></svg>" /> |
|
|
94
|
+
| orange | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23ffa500'/></svg>" /> |
|
|
95
|
+
| sand | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23f4a460'/></svg>" /> |
|
|
96
|
+
| grey | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23808080'/></svg>" /> |
|
|
97
|
+
| zinc | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23a9a9a9'/></svg>" /> |
|
|
98
|
+
| slate | <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15'><rect width='15' height='15' rx='3' ry='3' fill='%23708090'/></svg>" /> |
|
|
99
99
|
|
|
100
100
|
Example:
|
|
101
101
|
|
|
@@ -213,4 +213,4 @@ bundle exec rake release
|
|
|
213
213
|
|
|
214
214
|
## 📝 License
|
|
215
215
|
|
|
216
|
-
MIT License. See [LICENSE](./LICENSE.txt)
|
|
216
|
+
MIT License. See [LICENSE](./LICENSE.txt)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# exe/bridgetown-picocss
|
|
3
|
+
|
|
4
|
+
require "picocss/generators/bridgetown/install_theme_generator"
|
|
5
|
+
require "picocss/generators/bridgetown/template_login_generator"
|
|
6
|
+
|
|
7
|
+
command = ARGV[0]&.downcase
|
|
8
|
+
param = ARGV[1] # Nome do tema, se fornecido
|
|
9
|
+
|
|
10
|
+
case command
|
|
11
|
+
when "theme"
|
|
12
|
+
Picocss::Generators::InstallThemeGenerator.generate(param || "min")
|
|
13
|
+
when "login"
|
|
14
|
+
Picocss::Generators::TemplateLoginGenerator.generate
|
|
15
|
+
else
|
|
16
|
+
puts "Uso: bridgetown-picocss [theme <cor>|login]"
|
|
17
|
+
puts
|
|
18
|
+
puts "Exemplos:"
|
|
19
|
+
puts " bridgetown-picocss theme blue"
|
|
20
|
+
puts " bridgetown-picocss login"
|
|
21
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require "fileutils"
|
|
2
|
+
|
|
3
|
+
module Picocss
|
|
4
|
+
module Generators
|
|
5
|
+
class InstallThemeGenerator
|
|
6
|
+
THEMES = %w[
|
|
7
|
+
red pink fuchsia purple violet indigo blue
|
|
8
|
+
cyan jade green lime yellow amber pumpkin
|
|
9
|
+
orange sand grey zinc slate min
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
def self.generate(theme = "min")
|
|
13
|
+
theme = "min" unless THEMES.include?(theme)
|
|
14
|
+
puts "📦 Instalando tema PicoCSS '#{theme}' no projeto Bridgetown..."
|
|
15
|
+
|
|
16
|
+
gem_path = Gem.loaded_specs["picocss-gem"].full_gem_path
|
|
17
|
+
css_file = File.join(gem_path, "lib", "generators", "picocss", "templates", "pico.#{theme}.min.css")
|
|
18
|
+
|
|
19
|
+
dest_dir = "src/assets/stylesheets"
|
|
20
|
+
FileUtils.mkdir_p(dest_dir)
|
|
21
|
+
FileUtils.cp(css_file, File.join(dest_dir, "pico.css"))
|
|
22
|
+
|
|
23
|
+
puts "✅ Tema '#{theme}' copiado para #{dest_dir}/pico.css"
|
|
24
|
+
puts "Adicione no layout: <link rel='stylesheet' href='/assets/css/pico.css' />"
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require "fileutils"
|
|
2
|
+
|
|
3
|
+
module Picocss
|
|
4
|
+
module Generators
|
|
5
|
+
class TemplateLoginGenerator
|
|
6
|
+
def self.generate
|
|
7
|
+
gem_path = Gem.loaded_specs["picocss-gem"].full_gem_path
|
|
8
|
+
template_file = File.join(gem_path, "lib", "generators", "picocss", "templates", "login.html.erb")
|
|
9
|
+
|
|
10
|
+
dest_dir = "src/_includes"
|
|
11
|
+
FileUtils.mkdir_p(dest_dir)
|
|
12
|
+
FileUtils.cp(template_file, File.join(dest_dir, "login.html"))
|
|
13
|
+
|
|
14
|
+
puts "✅ Template de login copiado para #{dest_dir}/login.html"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/picocss/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: picocss-gem
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- douglas-vitoriano
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -72,35 +72,39 @@ dependencies:
|
|
|
72
72
|
description: Easily use PicoCSS with Rails, Bridgetown, and Sinatra
|
|
73
73
|
email:
|
|
74
74
|
- dvitoriano89@gmail.com
|
|
75
|
-
executables:
|
|
75
|
+
executables:
|
|
76
|
+
- bridgetown-picocss
|
|
76
77
|
extensions: []
|
|
77
78
|
extra_rdoc_files: []
|
|
78
79
|
files:
|
|
79
80
|
- README.md
|
|
80
|
-
-
|
|
81
|
-
- lib/generators/
|
|
82
|
-
- lib/generators/
|
|
83
|
-
- lib/generators/
|
|
84
|
-
- lib/generators/
|
|
85
|
-
- lib/generators/
|
|
86
|
-
- lib/generators/
|
|
87
|
-
- lib/generators/
|
|
88
|
-
- lib/generators/
|
|
89
|
-
- lib/generators/
|
|
90
|
-
- lib/generators/
|
|
91
|
-
- lib/generators/
|
|
92
|
-
- lib/generators/
|
|
93
|
-
- lib/generators/
|
|
94
|
-
- lib/generators/
|
|
95
|
-
- lib/generators/
|
|
96
|
-
- lib/generators/
|
|
97
|
-
- lib/generators/
|
|
98
|
-
- lib/generators/
|
|
99
|
-
- lib/generators/
|
|
100
|
-
- lib/generators/
|
|
101
|
-
- lib/generators/
|
|
102
|
-
- lib/generators/
|
|
103
|
-
- lib/generators/
|
|
81
|
+
- exe/bridgetown-picocss
|
|
82
|
+
- lib/generators/bridgetown/install_theme_generator.rb
|
|
83
|
+
- lib/generators/bridgetown/template_login_generator.rb
|
|
84
|
+
- lib/generators/rails/install_generator.rb
|
|
85
|
+
- lib/generators/rails/install_theme_generator.rb
|
|
86
|
+
- lib/generators/rails/template_login_generator.rb
|
|
87
|
+
- lib/generators/templates/login.html.erb
|
|
88
|
+
- lib/generators/templates/pico.amber.min.css
|
|
89
|
+
- lib/generators/templates/pico.blue.min.css
|
|
90
|
+
- lib/generators/templates/pico.cyan.min.css
|
|
91
|
+
- lib/generators/templates/pico.fuchsia.min.css
|
|
92
|
+
- lib/generators/templates/pico.green.min.css
|
|
93
|
+
- lib/generators/templates/pico.grey.min.css
|
|
94
|
+
- lib/generators/templates/pico.indigo.min.css
|
|
95
|
+
- lib/generators/templates/pico.jade.min.css
|
|
96
|
+
- lib/generators/templates/pico.lime.min.css
|
|
97
|
+
- lib/generators/templates/pico.min.css
|
|
98
|
+
- lib/generators/templates/pico.orange.min.css
|
|
99
|
+
- lib/generators/templates/pico.pink.min.css
|
|
100
|
+
- lib/generators/templates/pico.pumpkin.min.css
|
|
101
|
+
- lib/generators/templates/pico.purple.min.css
|
|
102
|
+
- lib/generators/templates/pico.red.min.css
|
|
103
|
+
- lib/generators/templates/pico.sand.min.css
|
|
104
|
+
- lib/generators/templates/pico.slate.min.css
|
|
105
|
+
- lib/generators/templates/pico.violet.min.css
|
|
106
|
+
- lib/generators/templates/pico.yellow.min.css
|
|
107
|
+
- lib/generators/templates/pico.zinc.min.css
|
|
104
108
|
- lib/picocss.rb
|
|
105
109
|
- lib/picocss/bridgetown.rb
|
|
106
110
|
- lib/picocss/gem.rb
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|