frontview 2.2.2 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/frontview/contents/style_content.rb +6 -0
- data/lib/frontview/install_generator.rb +2 -2
- data/lib/frontview/version.rb +1 -1
- metadata +2 -4
- data/assets/banner.jpg +0 -0
- data/assets/favicon.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 771f0d21d780f93283c5cc5f6df42d50307f72f1523af3c7b6721f545d16bd57
|
4
|
+
data.tar.gz: 3ef41280f05a1d59c5fcbdf2bb8e400e81fc90594540412d3a9cbfcb0d11725f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 206a74e6835b2723122957677fd9c3208f9e40a50834a942785248385f579ddb20ebd25d5899fe434915cebf3b7f9e9d73e89794d665f0aa494f8d474d1fe9dc
|
7
|
+
data.tar.gz: 8c3d8d150a2f44b99c92ec0b17def56e0433c544eb5932e0f033a99c446e858b5f05f2422236875ed73b5fc4cc7481d35e7c3787f1212dfeb69b8f65dbbd0813
|
data/README.md
CHANGED
@@ -5,16 +5,16 @@ This is frontview gem, a gem that gives the front-end template to the rails 6 ap
|
|
5
5
|
### Installation
|
6
6
|
Add this line to your application's Gemfile:
|
7
7
|
```
|
8
|
-
|
8
|
+
gem 'frontview'
|
9
9
|
```
|
10
10
|
And then execute:
|
11
11
|
```
|
12
|
-
|
12
|
+
bundle install
|
13
13
|
```
|
14
14
|
### Usage
|
15
15
|
Run scaffold. Lets assume our model is 'home' which has a 'title' and a 'body'(Optional)
|
16
16
|
```
|
17
|
-
|
17
|
+
rails g scaffold home title:string body:text
|
18
18
|
```
|
19
19
|
Delete scaffold.scss, from (assets/stylesheets/scaffold.scss).
|
20
20
|
Optional:
|
@@ -27,15 +27,15 @@ Delete all the files in views/homes except index.html.erb
|
|
27
27
|
Generate the necessary files and folders by:
|
28
28
|
N/B: You will be prompted to give the name of your model, In this case you'll write 'home' and press enter. All the files will then be in place.
|
29
29
|
```
|
30
|
-
|
30
|
+
rails g frontview:install
|
31
31
|
```
|
32
32
|
Create & Migrate DB
|
33
33
|
```
|
34
|
-
|
34
|
+
rails db:create && rails db:migrate
|
35
35
|
```
|
36
36
|
Finally run the rails server and you are good to go:
|
37
37
|
```
|
38
|
-
|
38
|
+
rails s
|
39
39
|
```
|
40
40
|
Access your web in: localhost:3000
|
41
41
|
|
@@ -2,6 +2,11 @@ module Frontview
|
|
2
2
|
module Contents
|
3
3
|
class StyleContent < Rails::Generators::Base
|
4
4
|
def write_in_style
|
5
|
+
|
6
|
+
Dir.mkdir("app/assets/stylesheets/css") unless
|
7
|
+
File.exists?("app/assets/stylesheets/css")
|
8
|
+
file = File.new("app/assets/stylesheets/css/style.css", "w+")
|
9
|
+
|
5
10
|
File.open("app/assets/stylesheets/css/style.css", "w+") {
|
6
11
|
|file| file.puts(
|
7
12
|
'.main_h {
|
@@ -194,6 +199,7 @@ p {
|
|
194
199
|
}
|
195
200
|
|
196
201
|
.hero {
|
202
|
+
margin-top: -70px;
|
197
203
|
position: relative;
|
198
204
|
background: url(../../../assets/banner.jpg) no-repeat center center fixed;
|
199
205
|
-webkit-background-size: cover;
|
@@ -11,10 +11,10 @@ require "frontview/contents/index_routes_content"
|
|
11
11
|
module Frontview
|
12
12
|
class InstallGenerator < Rails::Generators::Base
|
13
13
|
def create_assets_contents
|
14
|
-
tempfile = Down.download("https://
|
14
|
+
tempfile = Down.download("https://phpfront.herokuapp.com/assets/images/banner.jpg")
|
15
15
|
FileUtils.mv(tempfile.path, "app/assets/images/#{tempfile.original_filename}")
|
16
16
|
|
17
|
-
tempfile = Down.download("https://
|
17
|
+
tempfile = Down.download("https://phpfront.herokuapp.com/assets/images/favicon.png")
|
18
18
|
FileUtils.mv(tempfile.path, "app/assets/images/#{tempfile.original_filename}")
|
19
19
|
end
|
20
20
|
|
data/lib/frontview/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frontview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- elibiz443
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,8 +115,6 @@ files:
|
|
115
115
|
- LICENSE.txt
|
116
116
|
- README.md
|
117
117
|
- Rakefile
|
118
|
-
- assets/banner.jpg
|
119
|
-
- assets/favicon.png
|
120
118
|
- assets/logo.png
|
121
119
|
- assets/sample1.png
|
122
120
|
- assets/sample2.png
|
data/assets/banner.jpg
DELETED
Binary file
|
data/assets/favicon.png
DELETED
Binary file
|