fuel 0.3.3 → 0.3.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/app/assets/images/fuel/icon-test.png +0 -0
- data/app/assets/images/fuel/icons/application-icons.svg +1 -0
- data/app/assets/images/fuel/icons/calendar-icon.svg +1 -0
- data/app/assets/images/fuel/icons/dropdown-arrow-icon.svg +10 -0
- data/app/assets/images/fuel/icons/navigation-icons.svg +1 -0
- data/app/assets/javascripts/fuel/admin.js.erb +17 -17
- data/app/assets/javascripts/fuel/application.js +8 -0
- data/app/assets/javascripts/fuel/datepicker.js +11 -0
- data/app/assets/javascripts/fuel/facebook.js +12 -0
- data/app/assets/javascripts/fuel/posts.js.erb +16 -0
- data/app/assets/javascripts/fuel/rich-text.js +9 -0
- data/app/assets/javascripts/fuel/sliding-panel.js +11 -0
- data/app/assets/stylesheets/fuel/_page-layout.scss +61 -0
- data/app/assets/stylesheets/fuel/_post-list.scss +70 -0
- data/app/assets/stylesheets/fuel/application.css.scss +27 -2
- data/app/assets/stylesheets/fuel/base/_base.scss +5 -0
- data/app/assets/stylesheets/fuel/base/_layout.scss +54 -0
- data/app/assets/stylesheets/fuel/base/_typography.scss +102 -0
- data/app/assets/stylesheets/fuel/components/_alerts.scss +27 -0
- data/app/assets/stylesheets/fuel/components/_animations.scss +26 -0
- data/app/assets/stylesheets/fuel/components/_application-icons.scss +42 -0
- data/app/assets/stylesheets/fuel/components/_buttons.scss +106 -0
- data/app/assets/stylesheets/fuel/components/_card.scss +39 -0
- data/app/assets/stylesheets/fuel/components/_components.scss +13 -0
- data/app/assets/stylesheets/fuel/components/_forms.scss +90 -0
- data/app/assets/stylesheets/fuel/components/_navbar.scss +45 -0
- data/app/assets/stylesheets/fuel/components/_navigation-icons.scss +41 -0
- data/app/assets/stylesheets/fuel/components/_page-sidebar.scss +60 -0
- data/app/assets/stylesheets/fuel/components/_sliding-panel.scss +59 -0
- data/app/assets/stylesheets/fuel/settings/_reset.scss +46 -0
- data/app/assets/stylesheets/fuel/settings/_settings.scss +19 -0
- data/app/assets/stylesheets/fuel/settings/mixins/_layout.scss +20 -0
- data/app/assets/stylesheets/fuel/settings/mixins/_misc.scss +27 -0
- data/app/assets/stylesheets/fuel/settings/mixins/_rem.scss +46 -0
- data/app/assets/stylesheets/fuel/settings/mixins/_typography.scss +64 -0
- data/app/assets/stylesheets/fuel/settings/variables/_alerts.scss +9 -0
- data/app/assets/stylesheets/fuel/settings/variables/_buttons.scss +8 -0
- data/app/assets/stylesheets/fuel/settings/variables/_colors.scss +55 -0
- data/app/assets/stylesheets/fuel/settings/variables/_typography.scss +25 -0
- data/app/controllers/fuel/admin/admin_controller.rb +7 -0
- data/app/controllers/fuel/admin/authors_controller.rb +80 -0
- data/app/controllers/fuel/admin/posts_controller.rb +68 -54
- data/app/controllers/fuel/fuel_controller.rb +5 -0
- data/app/controllers/fuel/posts_controller.rb +13 -7
- data/app/controllers/fuel_controller.rb +5 -0
- data/app/helpers/fuel/posts_helper.rb +28 -1
- data/app/models/fuel.rb +5 -0
- data/app/models/fuel/author.rb +18 -0
- data/app/models/fuel/post.rb +32 -2
- data/app/views/fuel/admin/authors/_authors.html.erb +24 -0
- data/app/views/fuel/admin/authors/_form.html.erb +52 -0
- data/app/views/fuel/admin/authors/edit.html.erb +9 -0
- data/app/views/fuel/admin/authors/index.html.erb +7 -0
- data/app/views/fuel/admin/authors/new.html.erb +6 -0
- data/app/views/fuel/admin/posts/_content.html.erb +5 -0
- data/app/views/fuel/admin/posts/_form.html.erb +56 -0
- data/app/views/fuel/admin/posts/_post_preview.html.erb +12 -0
- data/app/views/fuel/admin/posts/_posts.html.erb +23 -0
- data/app/views/fuel/admin/posts/edit.html.erb +11 -0
- data/app/views/fuel/admin/posts/index.html.erb +6 -0
- data/app/views/fuel/admin/posts/new.html.erb +9 -0
- data/app/views/fuel/components/_navbar.html.erb +22 -0
- data/app/views/fuel/posts/_additional_info.html.erb +7 -0
- data/app/views/fuel/posts/_facebook_sdk.html.erb +17 -0
- data/app/views/fuel/posts/_tweet.html.erb +1 -1
- data/app/views/fuel/posts/index.html.erb +27 -6
- data/app/views/fuel/posts/show.html.erb +19 -2
- data/app/views/layouts/fuel/application.html.erb +19 -12
- data/config/routes.rb +18 -10
- data/db/migrate/20141114201953_add_featured_image_field.rb +5 -0
- data/db/migrate/20141118162158_add_teaser_to_posts.rb +5 -0
- data/db/migrate/20141217174229_add_featured_image_to_posts.rb +10 -0
- data/db/migrate/20150414220732_add_seo_fields_to_post.rb +6 -0
- data/db/migrate/20150529201715_add_posted_at_to_posts.rb +5 -0
- data/db/migrate/20150529202105_create_fuel_authors.rb +13 -0
- data/db/migrate/20150530180444_add_author_id_to_posts.rb +5 -0
- data/db/migrate/20150603205232_add_contact_methods_to_authors.rb +8 -0
- data/db/migrate/20150604155028_add_published_at_to_fuel_posts.rb +5 -0
- data/db/migrate/20150604161900_remove_posted_at_from_fuel_posts.rb +5 -0
- data/lib/blog_importer.rb +82 -0
- data/lib/example_author.rb +108 -0
- data/lib/fuel.rb +7 -1
- data/lib/fuel/configuration.rb +16 -1
- data/lib/fuel/engine.rb +13 -1
- data/lib/fuel/version.rb +1 -1
- data/lib/generators/fuel/install_generator.rb +4 -0
- data/lib/generators/fuel/views_generator.rb +1 -1
- data/lib/generators/templates/fuel.rb +22 -0
- data/lib/kaminari/helpers/tag.rb +16 -0
- data/lib/tasks/fuel_tasks.rake +35 -4
- data/test/fixtures/fuel/authors.yml +11 -0
- data/test/models/fuel/author_test.rb +7 -0
- metadata +191 -15
- data/app/assets/stylesheets/fuel/admin.css.sass +0 -91
- data/app/assets/stylesheets/fuel/posts.css.sass +0 -23
- data/app/controllers/fuel/application_controller.rb +0 -4
- data/app/helpers/fuel/application_helper.rb +0 -34
- data/app/views/fuel/admin/posts/_content.html.slim +0 -3
- data/app/views/fuel/admin/posts/_form.html.slim +0 -28
- data/app/views/fuel/admin/posts/edit.html.slim +0 -4
- data/app/views/fuel/admin/posts/index.html.slim +0 -18
- data/app/views/fuel/admin/posts/new.html.slim +0 -4
- data/app/views/fuel/posts/_post.html.erb +0 -19
@@ -1,91 +0,0 @@
|
|
1
|
-
/* ALL FUEL */
|
2
|
-
.fuel
|
3
|
-
h1
|
4
|
-
margin-bottom: 10px
|
5
|
-
font-size: 2.5em
|
6
|
-
|
7
|
-
/* ADMIN */
|
8
|
-
.fuel-admin
|
9
|
-
margin-top: 20px
|
10
|
-
width: 90%
|
11
|
-
float: left
|
12
|
-
margin-left: 4%
|
13
|
-
font-family: sans-serif
|
14
|
-
margin-bottom: 100px
|
15
|
-
input[type="text"]
|
16
|
-
width: 50%
|
17
|
-
height: 2em
|
18
|
-
font-size: 1.2em
|
19
|
-
margin-top: 5px
|
20
|
-
margin-bottom: 20px
|
21
|
-
display: block
|
22
|
-
textarea
|
23
|
-
font-size: 1.2em
|
24
|
-
width: 100%
|
25
|
-
height: 400px
|
26
|
-
margin: 0
|
27
|
-
padding-top: 10px
|
28
|
-
border: none
|
29
|
-
.content-area
|
30
|
-
padding: 0
|
31
|
-
width: 80%
|
32
|
-
min-height: 400px
|
33
|
-
max-height: 500px
|
34
|
-
overflow: auto
|
35
|
-
border: thin solid #ccc
|
36
|
-
.preview-links
|
37
|
-
margin-top: 10px
|
38
|
-
.edit-preview-toggle
|
39
|
-
padding: 10px
|
40
|
-
&.active
|
41
|
-
color: #686868
|
42
|
-
cursor: default
|
43
|
-
text-decoration: none
|
44
|
-
font-weight: bold
|
45
|
-
label
|
46
|
-
font-weight: bold
|
47
|
-
font-size: 1.5em
|
48
|
-
input[type="submit"]
|
49
|
-
font-size: 2em
|
50
|
-
font-weight: bold
|
51
|
-
h1.header
|
52
|
-
margin-top: 40px
|
53
|
-
margin-bottom: 30px
|
54
|
-
.markdown
|
55
|
-
width: 400px
|
56
|
-
float: left
|
57
|
-
tr
|
58
|
-
text-align: left
|
59
|
-
border-bottom: 1px solid #ddd
|
60
|
-
table
|
61
|
-
border: thin solid #ccc
|
62
|
-
margin-top: 20px
|
63
|
-
th
|
64
|
-
padding: 2px 20px
|
65
|
-
border-bottom: 1px solid #444
|
66
|
-
font-size: 1.2em
|
67
|
-
font-weight: bold
|
68
|
-
td
|
69
|
-
padding: 10px 20px
|
70
|
-
&.date
|
71
|
-
width: 140px
|
72
|
-
&.post
|
73
|
-
width: 500px
|
74
|
-
.draft
|
75
|
-
color: green
|
76
|
-
.save
|
77
|
-
margin-left: 40px
|
78
|
-
background-color: #777
|
79
|
-
.post-contact-area
|
80
|
-
margin-top: 50px
|
81
|
-
.twitter-follow-button
|
82
|
-
margin-top: 5px
|
83
|
-
fieldset
|
84
|
-
border: none
|
85
|
-
margin-top: none
|
86
|
-
.markdown-panel
|
87
|
-
padding: 40px
|
88
|
-
background-color: #777
|
89
|
-
|
90
|
-
|
91
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
// BLOG
|
2
|
-
.fuel-posts
|
3
|
-
.fuel-post-title
|
4
|
-
font-size: 1.8em
|
5
|
-
margin-top: 20px
|
6
|
-
h1, h2, h3, h4, h5, h6
|
7
|
-
font-weight: bold
|
8
|
-
padding: 20px
|
9
|
-
.fuel-post-additional-info
|
10
|
-
margin-top: 5px
|
11
|
-
display: block
|
12
|
-
.fuel-post-author
|
13
|
-
display: inline
|
14
|
-
font-size: 1em
|
15
|
-
color: #999
|
16
|
-
|
17
|
-
.fuel-post-date
|
18
|
-
display: inline
|
19
|
-
font-size: 1em
|
20
|
-
color: #999
|
21
|
-
|
22
|
-
.fuel-posts .fuel-post-content
|
23
|
-
margin-top: 20px
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Fuel
|
2
|
-
module ApplicationHelper
|
3
|
-
Fuel.configuration.helpers.each do |helper|
|
4
|
-
include "::#{helper}".constantize
|
5
|
-
end
|
6
|
-
|
7
|
-
def markdown(text)
|
8
|
-
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
|
9
|
-
:autolink => true, :space_after_headers => true)
|
10
|
-
raw markdown.render(text)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Can search for named routes directly in the main app, omitting
|
14
|
-
# the "main_app." prefix
|
15
|
-
def method_missing method, *args, &block
|
16
|
-
if main_app_url_helper?(method)
|
17
|
-
main_app.send(method, *args)
|
18
|
-
else
|
19
|
-
super
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def respond_to?(method)
|
24
|
-
main_app_url_helper?(method) or super
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def main_app_url_helper?(method)
|
30
|
-
(method.to_s.end_with?('_path') or method.to_s.end_with?('_url')) and main_app.respond_to?(method)
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
= form_for [:admin, @post] do |f|
|
2
|
-
- if @post.errors.any?
|
3
|
-
#error_explanation
|
4
|
-
h2
|
5
|
-
=> pluralize(@post.errors.count, "error")
|
6
|
-
| prohibited this post from being saved:
|
7
|
-
ul
|
8
|
-
- @post.errors.full_messages.each do |msg|
|
9
|
-
li= msg
|
10
|
-
= f.label :title
|
11
|
-
= f.text_field :title
|
12
|
-
= f.label :tag
|
13
|
-
= f.text_field :tag
|
14
|
-
= f.label :author
|
15
|
-
= f.text_field :author
|
16
|
-
= f.label :content
|
17
|
-
br
|
18
|
-
.preview-links
|
19
|
-
= link_to 'Edit', '#', data: { id: "edit" }, class: "edit-preview-toggle active"
|
20
|
-
= link_to 'Preview', '#', data: { id: "preview" }, class: "edit-preview-toggle"
|
21
|
-
#content-edit.content-area
|
22
|
-
= f.text_area :content, cols: "80", rows: "20"
|
23
|
-
#content-preview.content-area style="display:none;"
|
24
|
-
= render 'content', content: @post.content
|
25
|
-
= f.submit 'Publish'
|
26
|
-
= f.submit 'Save Draft'
|
27
|
-
= form_tag('preview', method: "post", id: "preview_form") do
|
28
|
-
= hidden_field_tag :content
|
@@ -1,18 +0,0 @@
|
|
1
|
-
.fuel.fuel-admin.index
|
2
|
-
h1 Blog Admin Panel
|
3
|
-
=> link_to 'New Blog Post', new_admin_post_path
|
4
|
-
| | #{link_to 'View Blog', posts_path}
|
5
|
-
table.table
|
6
|
-
thead
|
7
|
-
tr
|
8
|
-
th Published On
|
9
|
-
th Title
|
10
|
-
th
|
11
|
-
th
|
12
|
-
tbody
|
13
|
-
- @posts.each do |post|
|
14
|
-
tr
|
15
|
-
td= post.published ? post.created_at.strftime('%m/%d/%Y') : 'Draft'
|
16
|
-
td= link_to post.title, post_path(post)
|
17
|
-
td= link_to "Edit", edit_admin_post_path(post)
|
18
|
-
td= link_to "Delete", admin_post_path(post), method: :delete, data: { confirm: "Are you sure you want to delete this post?" }
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<div class="fuel-post-additional-info">
|
2
|
-
<!-- <span class="fuel_post_date"><%= post.created_at.strftime('%b %d, %Y') %> - </span> -->
|
3
|
-
<span class="fuel-post-author">By <%= post.author %></span>
|
4
|
-
<span class="fuel-social-buttons">
|
5
|
-
<%= render 'tweet', post: post if action_name == "show" && Fuel.configuration.twitter %>
|
6
|
-
</span>
|
7
|
-
</div>
|
8
|
-
<% if action_name == "show" %>
|
9
|
-
<div class="fuel-post-content">
|
10
|
-
<%= markdown(post.content).html_safe %>
|
11
|
-
</div>
|
12
|
-
<% else %>
|
13
|
-
<div class="fuel-post-content">
|
14
|
-
<%= markdown(truncate post.content, length: 800).html_safe %>
|
15
|
-
</div>
|
16
|
-
<% if post.content.length > 800 %>
|
17
|
-
<p><%= link_to 'Read more', post_url(post) %></p>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|