fuel 0.3.3 → 0.3.20

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.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/app/assets/images/fuel/icon-test.png +0 -0
  4. data/app/assets/images/fuel/icons/application-icons.svg +1 -0
  5. data/app/assets/images/fuel/icons/calendar-icon.svg +1 -0
  6. data/app/assets/images/fuel/icons/dropdown-arrow-icon.svg +10 -0
  7. data/app/assets/images/fuel/icons/navigation-icons.svg +1 -0
  8. data/app/assets/javascripts/fuel/admin.js.erb +17 -17
  9. data/app/assets/javascripts/fuel/application.js +8 -0
  10. data/app/assets/javascripts/fuel/datepicker.js +11 -0
  11. data/app/assets/javascripts/fuel/facebook.js +12 -0
  12. data/app/assets/javascripts/fuel/posts.js.erb +16 -0
  13. data/app/assets/javascripts/fuel/rich-text.js +9 -0
  14. data/app/assets/javascripts/fuel/sliding-panel.js +11 -0
  15. data/app/assets/stylesheets/fuel/_page-layout.scss +61 -0
  16. data/app/assets/stylesheets/fuel/_post-list.scss +70 -0
  17. data/app/assets/stylesheets/fuel/application.css.scss +27 -2
  18. data/app/assets/stylesheets/fuel/base/_base.scss +5 -0
  19. data/app/assets/stylesheets/fuel/base/_layout.scss +54 -0
  20. data/app/assets/stylesheets/fuel/base/_typography.scss +102 -0
  21. data/app/assets/stylesheets/fuel/components/_alerts.scss +27 -0
  22. data/app/assets/stylesheets/fuel/components/_animations.scss +26 -0
  23. data/app/assets/stylesheets/fuel/components/_application-icons.scss +42 -0
  24. data/app/assets/stylesheets/fuel/components/_buttons.scss +106 -0
  25. data/app/assets/stylesheets/fuel/components/_card.scss +39 -0
  26. data/app/assets/stylesheets/fuel/components/_components.scss +13 -0
  27. data/app/assets/stylesheets/fuel/components/_forms.scss +90 -0
  28. data/app/assets/stylesheets/fuel/components/_navbar.scss +45 -0
  29. data/app/assets/stylesheets/fuel/components/_navigation-icons.scss +41 -0
  30. data/app/assets/stylesheets/fuel/components/_page-sidebar.scss +60 -0
  31. data/app/assets/stylesheets/fuel/components/_sliding-panel.scss +59 -0
  32. data/app/assets/stylesheets/fuel/settings/_reset.scss +46 -0
  33. data/app/assets/stylesheets/fuel/settings/_settings.scss +19 -0
  34. data/app/assets/stylesheets/fuel/settings/mixins/_layout.scss +20 -0
  35. data/app/assets/stylesheets/fuel/settings/mixins/_misc.scss +27 -0
  36. data/app/assets/stylesheets/fuel/settings/mixins/_rem.scss +46 -0
  37. data/app/assets/stylesheets/fuel/settings/mixins/_typography.scss +64 -0
  38. data/app/assets/stylesheets/fuel/settings/variables/_alerts.scss +9 -0
  39. data/app/assets/stylesheets/fuel/settings/variables/_buttons.scss +8 -0
  40. data/app/assets/stylesheets/fuel/settings/variables/_colors.scss +55 -0
  41. data/app/assets/stylesheets/fuel/settings/variables/_typography.scss +25 -0
  42. data/app/controllers/fuel/admin/admin_controller.rb +7 -0
  43. data/app/controllers/fuel/admin/authors_controller.rb +80 -0
  44. data/app/controllers/fuel/admin/posts_controller.rb +68 -54
  45. data/app/controllers/fuel/fuel_controller.rb +5 -0
  46. data/app/controllers/fuel/posts_controller.rb +13 -7
  47. data/app/controllers/fuel_controller.rb +5 -0
  48. data/app/helpers/fuel/posts_helper.rb +28 -1
  49. data/app/models/fuel.rb +5 -0
  50. data/app/models/fuel/author.rb +18 -0
  51. data/app/models/fuel/post.rb +32 -2
  52. data/app/views/fuel/admin/authors/_authors.html.erb +24 -0
  53. data/app/views/fuel/admin/authors/_form.html.erb +52 -0
  54. data/app/views/fuel/admin/authors/edit.html.erb +9 -0
  55. data/app/views/fuel/admin/authors/index.html.erb +7 -0
  56. data/app/views/fuel/admin/authors/new.html.erb +6 -0
  57. data/app/views/fuel/admin/posts/_content.html.erb +5 -0
  58. data/app/views/fuel/admin/posts/_form.html.erb +56 -0
  59. data/app/views/fuel/admin/posts/_post_preview.html.erb +12 -0
  60. data/app/views/fuel/admin/posts/_posts.html.erb +23 -0
  61. data/app/views/fuel/admin/posts/edit.html.erb +11 -0
  62. data/app/views/fuel/admin/posts/index.html.erb +6 -0
  63. data/app/views/fuel/admin/posts/new.html.erb +9 -0
  64. data/app/views/fuel/components/_navbar.html.erb +22 -0
  65. data/app/views/fuel/posts/_additional_info.html.erb +7 -0
  66. data/app/views/fuel/posts/_facebook_sdk.html.erb +17 -0
  67. data/app/views/fuel/posts/_tweet.html.erb +1 -1
  68. data/app/views/fuel/posts/index.html.erb +27 -6
  69. data/app/views/fuel/posts/show.html.erb +19 -2
  70. data/app/views/layouts/fuel/application.html.erb +19 -12
  71. data/config/routes.rb +18 -10
  72. data/db/migrate/20141114201953_add_featured_image_field.rb +5 -0
  73. data/db/migrate/20141118162158_add_teaser_to_posts.rb +5 -0
  74. data/db/migrate/20141217174229_add_featured_image_to_posts.rb +10 -0
  75. data/db/migrate/20150414220732_add_seo_fields_to_post.rb +6 -0
  76. data/db/migrate/20150529201715_add_posted_at_to_posts.rb +5 -0
  77. data/db/migrate/20150529202105_create_fuel_authors.rb +13 -0
  78. data/db/migrate/20150530180444_add_author_id_to_posts.rb +5 -0
  79. data/db/migrate/20150603205232_add_contact_methods_to_authors.rb +8 -0
  80. data/db/migrate/20150604155028_add_published_at_to_fuel_posts.rb +5 -0
  81. data/db/migrate/20150604161900_remove_posted_at_from_fuel_posts.rb +5 -0
  82. data/lib/blog_importer.rb +82 -0
  83. data/lib/example_author.rb +108 -0
  84. data/lib/fuel.rb +7 -1
  85. data/lib/fuel/configuration.rb +16 -1
  86. data/lib/fuel/engine.rb +13 -1
  87. data/lib/fuel/version.rb +1 -1
  88. data/lib/generators/fuel/install_generator.rb +4 -0
  89. data/lib/generators/fuel/views_generator.rb +1 -1
  90. data/lib/generators/templates/fuel.rb +22 -0
  91. data/lib/kaminari/helpers/tag.rb +16 -0
  92. data/lib/tasks/fuel_tasks.rake +35 -4
  93. data/test/fixtures/fuel/authors.yml +11 -0
  94. data/test/models/fuel/author_test.rb +7 -0
  95. metadata +191 -15
  96. data/app/assets/stylesheets/fuel/admin.css.sass +0 -91
  97. data/app/assets/stylesheets/fuel/posts.css.sass +0 -23
  98. data/app/controllers/fuel/application_controller.rb +0 -4
  99. data/app/helpers/fuel/application_helper.rb +0 -34
  100. data/app/views/fuel/admin/posts/_content.html.slim +0 -3
  101. data/app/views/fuel/admin/posts/_form.html.slim +0 -28
  102. data/app/views/fuel/admin/posts/edit.html.slim +0 -4
  103. data/app/views/fuel/admin/posts/index.html.slim +0 -18
  104. data/app/views/fuel/admin/posts/new.html.slim +0 -4
  105. data/app/views/fuel/posts/_post.html.erb +0 -19
@@ -0,0 +1,27 @@
1
+ // Alerts Component
2
+ // ========================================
3
+
4
+ @each $alert in $alerts {
5
+ $name: nth($alert, 1);
6
+ $color-1: nth($alert, 2);
7
+ $color-2: nth($alert, 3);
8
+
9
+ .alert--#{$name} {
10
+ @include position(relative);
11
+ @include rem(margin-bottom, 10px);
12
+ @include rem(padding, 10px);
13
+ background: lighten($color-1, 10%);
14
+ border: 1px solid $color-2;
15
+ color: $color-2;
16
+ text-align: center;
17
+ width: 100%;
18
+ z-index: 2;
19
+
20
+ #app-icon{ fill: $color-2; }
21
+ }
22
+
23
+ .alert--content { @include font-type($primary-sans-serif, normal, 700); }
24
+ .alert--close-icon {
25
+ @include position(absolute, 5px 5px null null);
26
+ }
27
+ };
@@ -0,0 +1,26 @@
1
+ // Animation Components
2
+ // ========================================
3
+
4
+
5
+ // Fade In
6
+ @include keyframes(fade-in) {
7
+ 0% { opacity: 0; }
8
+ 100% { opacity: 100%; }
9
+ }
10
+
11
+ @include keyframes(fade-in-down) {
12
+ 0% { opacity: 0; transform: translate3d(0, -100%, 0); }
13
+ 100% { opacity: 1; transform: none; }
14
+ }
15
+
16
+ @include keyframes(fade-in-up){
17
+ 0% { opacity: 0; transform: translate3d(0, 20%, 0); }
18
+ 100% { opacity: 1; transform: none; }
19
+ }
20
+
21
+
22
+ // Slide
23
+ @include keyframes(slide-in-up){
24
+ 0%{ transform: translate3d(0, -20%, 0); visibility: visible; }
25
+ 100%{ transform: translate3d(0, 0, 0); }
26
+ }
@@ -0,0 +1,42 @@
1
+ // Application Icons Component
2
+ // ========================================
3
+
4
+
5
+ // Variables
6
+ $application-height: 30px;
7
+ $application-icon-size: 95px 31px;
8
+ $application-width: 32px;
9
+ $application-icons: image-url('fuel/icons/application-icons.svg');
10
+
11
+
12
+ // Basic Styles
13
+ %application-icon{
14
+ @include hide-text;
15
+ background-image: $application-icons;
16
+ background-size: $application-icon-size;
17
+ background-repeat: no-repeat;
18
+ display: inline-block;
19
+ height: $application-height;
20
+ width: $application-width;
21
+
22
+ }
23
+
24
+
25
+ // List
26
+ $icons: (
27
+ add $application-width * 0,
28
+ search $application-width * 1,
29
+ arrow $application-width * 3
30
+ );
31
+
32
+
33
+ // Loop
34
+ @each $icon in $icons{
35
+ $name: nth($icon, 1);
36
+ $position: nth($icon, 2);
37
+
38
+ .#{$name}-icon{
39
+ background-position: -($position * 1) 0;
40
+ @extend %application-icon;
41
+ }
42
+ }
@@ -0,0 +1,106 @@
1
+ // Buttons Component
2
+ // ========================================
3
+
4
+ // Main Button
5
+ .button{
6
+ @include font-type($primary-sans-serif, normal, 700);
7
+ @include position(relative, null null null null);
8
+ @include s-foxtrot;
9
+ @include rem(margin-bottom, 15px);
10
+ @include rem(padding, 10px 12px);
11
+ @include transition (all 0.3s ease-in-out);
12
+ border-radius: 2px;
13
+ display: inline-block;
14
+ line-height: normal;
15
+ text-align: center;
16
+ text-transform: uppercase;
17
+ -webkit-appearance: none;
18
+
19
+ &:hover{ cursor: pointer; opacity: 1; }
20
+
21
+ &:focus{
22
+ border: none;
23
+ outline: none;
24
+ text-decoration: none;
25
+ }
26
+ }
27
+
28
+ // Button Styles
29
+ @each $button in $buttons{
30
+ $type: nth($button, 1);
31
+ $bg-1: nth($button, 2);
32
+ $color: nth($button, 3);
33
+
34
+ .button--#{$type}{
35
+ background: $bg-1;
36
+ border-radius: 2px;
37
+ color: $color;
38
+
39
+ &:hover{
40
+ background-color: darken($bg-1, 5%);
41
+ opacity: 1;
42
+ }
43
+
44
+ &:active{
45
+ background-color: darken($bg-1, 3%);
46
+ color: darken($bg-1, 5%);
47
+ }
48
+
49
+ &:focus{ @include box-shadow(0 0 0, transparent); border: none; }
50
+ }
51
+
52
+ .button--header{
53
+ @include box-shadow(0 0 10px, rgba(0, 0, 0, 0.25));
54
+ @include rem(margin, 15px auto);
55
+ @include rem(padding, 15px 35px);
56
+ text-transform: uppercase;
57
+
58
+ &:hover{ @include box-shadow(0 0 0, rgba(0, 0, 0, 0)); }
59
+ }
60
+
61
+
62
+ // Links
63
+ .link-#{$type}{
64
+ color: $bg-1;
65
+
66
+ &:hover{ opacity: 0.6; }
67
+ }
68
+
69
+ .link__underline{
70
+ text-decoration: underline;
71
+ &:hover{ text-decoration: underline; }
72
+ }
73
+ }
74
+
75
+
76
+ // Button List Styles
77
+ .button-list{
78
+ @include span-columns(12 of 12);
79
+ text-align: center;
80
+
81
+ li{ display: inline; }
82
+
83
+ li > a{
84
+ @include rem(min-width, 135px);
85
+ display: inline-block;
86
+ }
87
+ }
88
+
89
+
90
+ // Button Scroll
91
+ .button--scroll{
92
+ @include box-shadow(0 4px 15px, rgba(0, 0, 0, 0.25));
93
+ @include position(absolute, null 10% -25px null);
94
+ @include rem(height, 45px);
95
+ @include rem(width, 45px);
96
+ background-color: $white-base;
97
+ border-radius: 30em;
98
+
99
+ &:hover{ opacity: 0.85; }
100
+
101
+ .icon{
102
+ @include position(absolute, 20px 0 null 0);
103
+ @include rem(width, 20px);
104
+ margin: 0 auto;
105
+ }
106
+ }
@@ -0,0 +1,39 @@
1
+ // Card Component
2
+ // ========================================
3
+
4
+
5
+ // Variables
6
+ $card-background: $white-base;
7
+ $card-border: 1px solid $grey-base;
8
+ $card-border-radius: 3px;
9
+ $card-padding: 20px;
10
+
11
+ // Structure
12
+ .card {
13
+ @include rem(padding, $card-padding);
14
+ background-color: $card-background;
15
+ border: $card-border;
16
+ border-radius: $card-border-radius;
17
+ overflow: hidden;
18
+ }
19
+
20
+ .card-image {
21
+ @include rem(margin, 20px auto);
22
+ border-radius: 30em;
23
+ overflow: hidden;
24
+
25
+ img {
26
+ height: 100%;
27
+ width: 100%;
28
+ }
29
+ }
30
+
31
+ .card-image--avatar {
32
+ @include rem(height, 100px);
33
+ @include rem(width, 100px);
34
+ }
35
+
36
+ .card-image--featured_image {
37
+ @include rem(height, 200px);
38
+ @include rem(width, 200px);
39
+ }
@@ -0,0 +1,13 @@
1
+ // Fuel Components
2
+ // ========================================
3
+
4
+ @import "animations";
5
+ @import "alerts";
6
+ @import "application-icons";
7
+ @import "buttons";
8
+ @import "card";
9
+ @import "forms";
10
+ @import "navigation-icons";
11
+ @import "navbar";
12
+ @import "page-sidebar";
13
+ @import "sliding-panel";
@@ -0,0 +1,90 @@
1
+ // Form Styles Stylesheet
2
+ // ========================================
3
+
4
+ // Labels
5
+ label {
6
+ @include font-type($primary-sans-serif, normal, 700);
7
+ @include rem(margin-bottom, 3px);
8
+ @include s-golf;
9
+ color: $grey-dark;
10
+ display: block;
11
+ text-transform: uppercase;
12
+ }
13
+
14
+ fieldset{ @include rem(margin-bottom, 30px); }
15
+
16
+ .half-group {
17
+ @include span-columns(6 of 12);
18
+
19
+ .half-group__nested {
20
+ @include span-columns(3 of 6);
21
+ }
22
+ }
23
+
24
+ .third-group {
25
+ @include span-columns(4 of 12);
26
+ }
27
+
28
+ .half-group,
29
+ .third-group {
30
+
31
+ &.last {
32
+ @include rem(margin-bottom, 20px);
33
+ margin-right: 0;
34
+ }
35
+ }
36
+
37
+ // Inputs
38
+ #{$all-text-inputs},
39
+ input,
40
+ input[type="file"],
41
+ select,
42
+ textarea{
43
+ @include appearance(none);
44
+ @include font-type($primary-sans-serif, normal, 300);
45
+ @include placeholder{ font-style: italic; }
46
+ @include s-golf;
47
+ background-color: $white-base;
48
+ border: 1px solid $grey-light;
49
+ border-radius: 2px;
50
+ box-sizing: border-box;
51
+ height: 40px;
52
+ padding: 8px 6px;
53
+ width: 100%;
54
+ -webkit-font-smoothing: antialiased;
55
+ -ms-appearance: none;
56
+
57
+ &:focus{
58
+ @include box-shadow(0 0 0, transparent);
59
+ border-color: $grey-light;
60
+ outline: none;
61
+ }
62
+ }
63
+
64
+ input[type="submit"] {
65
+ @include s-golf;
66
+ border: none;
67
+ width: inherit;
68
+
69
+ &:hover { cursor: pointer; }
70
+ }
71
+
72
+ .datepicker {
73
+ background-image: image-url('fuel/icons/calendar-icon.svg');
74
+ background-position: 97%;
75
+ background-repeat: no-repeat;
76
+ background-size: 18px;
77
+ }
78
+
79
+ // Specific Teaser Heights
80
+ textarea {
81
+ &.tease { @include rem(height, 60px); }
82
+ &.post { @include rem(height, 250px); }
83
+ }
84
+
85
+ select{
86
+ background-image: image-url('fuel/icons/dropdown-arrow-icon.svg');
87
+ background-position: 97%;
88
+ background-repeat: no-repeat;
89
+ background-size: 10px;
90
+ }
@@ -0,0 +1,45 @@
1
+ // Navbar Component
2
+ // ========================================
3
+
4
+
5
+ // Variables
6
+ $navbar-background-color: $blue-dark;
7
+ $navbar-padding: 15px 10px;
8
+ $navbar-position: fixed;
9
+ $navbar-shadow-color: rgba(0, 0, 0, 0.5);
10
+ $navbar-shadow-spread: inset 0 0 5px;
11
+ $navbar-width: 70px;
12
+
13
+ $navbar-logo-size: 100px;
14
+
15
+ $navbar-link-color: $white-base;
16
+
17
+
18
+ // Structure
19
+ .navbar {
20
+ @include box-shadow($navbar-shadow-spread, $navbar-shadow-color);
21
+ @include position($navbar-position, -5px null 0 0);
22
+ @include rem(padding, $navbar-padding);
23
+ @include rem(width, $navbar-width);
24
+ background-color: $navbar-background-color;
25
+ }
26
+
27
+ .navbar-logo {
28
+ @include rem(height, $navbar-logo-size - 20px);
29
+ @include rem(width, $navbar-logo-size);
30
+
31
+ img{ width: 50%; }
32
+ }
33
+
34
+ .navbar-link {
35
+ @include font-type($primary-sans-serif, normal, 700);
36
+ @include rem(margin-bottom, 15px);
37
+ @include s-hotel;
38
+ @include transition(all 0.3s ease-in-out);
39
+ color: $navbar-link-color;
40
+ text-align: center;
41
+ text-transform: uppercase;
42
+
43
+ &:hover { color: $blue-base; }
44
+
45
+ }
@@ -0,0 +1,41 @@
1
+ // Navigation Icons Component
2
+ // ========================================
3
+
4
+
5
+ // Variables
6
+ $navigation-height: 50px;
7
+ $navigation-icon-size: 152px 55px;
8
+ $navigation-width: 50px;
9
+ $navigation-icons: image-url('fuel/icons/navigation-icons.svg');
10
+
11
+
12
+ // Basic Styles
13
+ %navigation-icon{
14
+ background-image: $navigation-icons;
15
+ background-size: $navigation-icon-size;
16
+ background-repeat: no-repeat;
17
+ display: inline-block;
18
+ height: $navigation-height;
19
+ width: $navigation-width;
20
+
21
+ }
22
+
23
+
24
+ // List
25
+ $icons: (
26
+ authors $navigation-width * 0,
27
+ posts $navigation-width * 1,
28
+ settings $navigation-width * 3
29
+ );
30
+
31
+
32
+ // Loop
33
+ @each $icon in $icons{
34
+ $name: nth($icon, 1);
35
+ $position: nth($icon, 2);
36
+
37
+ .#{$name}-icon{
38
+ background-position: -($position * 1) 0;
39
+ @extend %navigation-icon;
40
+ }
41
+ }
@@ -0,0 +1,60 @@
1
+ // Page Siebar Component
2
+ // ========================================
3
+
4
+
5
+ // Variables
6
+ $sidebar-background-color: $white-base;
7
+ $sidebar-position: fixed;
8
+ $sidebar-shadow-color: rgba(0, 0, 0, 0.35);
9
+ $sidebar-shadow-spread: 0 0 5px;
10
+ $sidebar-width: 250px;
11
+
12
+ $sidebar-header-background: $blue-base;
13
+ $sidebar-header-padding: 20px 10px;
14
+ $sidebar-header-shadow-color: rgba(0, 0, 0, 0.35);
15
+ $sidebar-header-shadow-spread: 2px 0 5px;
16
+
17
+
18
+ // Structure
19
+ .page-sidebar{
20
+ @include box-shadow($sidebar-shadow-spread, $sidebar-shadow-color);
21
+ @include position($sidebar-position, 0 null 0 80px);
22
+ @include rem(width, $sidebar-width);
23
+ background-color: $sidebar-background-color;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .page-sidebar--header{
28
+ @include box-shadow($sidebar-header-shadow-spread, $sidebar-header-shadow-color);
29
+ @include rem(padding, $sidebar-header-padding);
30
+ background-color: $sidebar-header-background;
31
+
32
+ .header-container--right,
33
+ .header-container--left{
34
+ display: inline-block;
35
+ }
36
+
37
+ .header-container--right{
38
+ @include position(relative, -10px null null null);
39
+ float: right;
40
+ }
41
+
42
+ .header--title{
43
+ @include s-foxtrot;
44
+ color: $white-base;
45
+ margin-bottom: 0;
46
+ text-transform: uppercase;
47
+ }
48
+ }
49
+
50
+ .header-container--right__actions{
51
+
52
+ li{
53
+ @include rem(margin-right, 5px);
54
+ display: inline;
55
+ float: left;
56
+ vertical-align: middle;
57
+
58
+ &:last-child{ margin-right: 0; }
59
+ }
60
+ }