chaltron 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e9ae962f2dd9c241da700b59ffff814b0e10483
4
- data.tar.gz: 738cf12df8205c411047c8e245e4580d86b95204
3
+ metadata.gz: b0fe3df9d17f0db477b913f4ed19300753254565
4
+ data.tar.gz: d54a1cbe476d113c5d27dd60fe9aa15aab52f7a3
5
5
  SHA512:
6
- metadata.gz: ab99ee8301b42f336a2f9f844978787b456fc8ada3bc422cf49ad244a93396a9f63dcbefc7748f7438e535d27de11ee30d979062aade8d5ef98e267e0f34c73e
7
- data.tar.gz: 3120ad2fd6985cbeda1e4ace7e7e0eaf319ee6e8cc81af4a80d2907f0f520e5952609bb192cbba90d1ab6f0a38dd98c72ef67fc37064310c2c290bb9b6ccddae
6
+ metadata.gz: ebf40cf18b315eb791b0bfd705c00324965b7a687535901654ee4074a07b1d379b751ed241823b94569f2188bb521011f94cfb2a9b1816a593647fef6af2aa8c
7
+ data.tar.gz: ba10dd2f156c3d6b94b6d84ea70f4021acdad503c7cb9e15b64e95c3695270992b764d875c612ba7e0e5de495bc616eaa2f57a03f9542a11ce75dd0455e5889a
data/README.md CHANGED
@@ -5,6 +5,14 @@
5
5
  [![PullReview stats](https://www.pullreview.com/github/vicvega/chaltron/badges/master.svg?)](https://www.pullreview.com/github/vicvega/chaltron/reviews/master)
6
6
  [![security](https://hakiri.io/github/vicvega/chaltron/master.svg)](https://hakiri.io/github/vicvega/chaltron/master)
7
7
 
8
+ ## Important note
9
+
10
+ **The latest chaltron release (1.x) targets bootstrap v4.**
11
+
12
+ If you are using bootstrap v3, refer to the [bootstrap3](https://github.com/vicvega/chaltron/tree/bootstrap3) branch (chaltron version 0.x).
13
+
14
+ ## Usage
15
+
8
16
  In a fresh new rails application simply add to your `Gemfile`
9
17
  ```ruby
10
18
  gem 'chaltron'
@@ -44,7 +52,7 @@ Chaltron is powered by
44
52
 
45
53
  * [devise](https://github.com/plataformatec/devise/)
46
54
  * [cancancan](https://github.com/CanCanCommunity/cancancan/)
47
- * [bootstrap](https://github.com/twbs/bootstrap-sass)
55
+ * [bootstrap](https://github.com/twbs/bootstrap-rubygem)
48
56
  * [font-awesome](https://github.com/FortAwesome/font-awesome-sass)
49
57
  * [datatables](http://datatables.net/)
50
58
 
@@ -21,8 +21,9 @@ class NavbarBuilder
21
21
  links = el.find('li a')
22
22
 
23
23
  klass = 'dropdown-menu'
24
- klass += ' dropdown-menu-right' if el.hasClass('dropdown-menu-right')
25
- div = $('<div></div>').addClass('dropdown-menu').attr('aria-labelledby': 'navbarDropdown').append(links)
24
+ klass += ' dropdown-menu-right' if el.parent().hasClass('dropdown-menu-right')
25
+
26
+ div = $('<div></div>').addClass(klass).attr('aria-labelledby': 'navbarDropdown').append(links)
26
27
  el.replaceWith(div)
27
28
 
28
29
  prepend_class: (item, klass) ->
@@ -22,9 +22,6 @@
22
22
  @import 'nprogress';
23
23
  @import 'nprogress-bootstrap';
24
24
 
25
- // Core variables and mixins
26
- @import 'chaltron/mixins';
27
-
28
25
  // Core CSS
29
26
  @import 'chaltron/layout';
30
27
 
@@ -1,11 +1,3 @@
1
- body {
2
- }
3
-
4
- div#content {
5
- margin-top: 2.5rem;
6
- margin-bottom: 2.5rem;
7
- }
8
-
9
1
  /**
10
2
  * Flash messages
11
3
  *
@@ -15,13 +7,12 @@ div#content {
15
7
  margin: 0;
16
8
  text-align: center;
17
9
  position: fixed;
18
- top: 2.5rem;
10
+ top: 2.5em;
19
11
  width: 100%;
20
12
  opacity: 0.8;
21
13
  z-index: 100;
22
14
  .alert {
23
15
  margin: 0;
24
- border-radius: 0;
25
16
  }
26
17
  }
27
18
 
@@ -31,7 +22,7 @@ div#content {
31
22
  */
32
23
  .login-box{
33
24
  margin-top: 100px;
34
- @include form-box(650px);
25
+ max-width: 650px;
35
26
  }
36
27
 
37
28
  #nprogress .spinner {
@@ -17,7 +17,7 @@ module ChaltronHelper
17
17
  end
18
18
 
19
19
  def flash_message(message, type)
20
- content_tag(:div, message, class: "alert #{bootstrap_class_for(type)}") do
20
+ content_tag(:div, message, class: "alert #{bootstrap_class_for(type)} rounded-0") do
21
21
  content_tag(:strong, I18n.t("chaltron.flash.#{type}") + ': ') +
22
22
  message
23
23
  end
@@ -10,10 +10,10 @@ SimpleNavigation::Configuration.run do |navigation|
10
10
  admin.item :logs, I18n.t('chaltron.menu.logs'), logs_path, link_html: { icon: 'book' },
11
11
  highlights_on: /\/logs/ if can?(:read, Log)
12
12
  end if can?(:manage, User) or can?(:read, Log)
13
- primary.item :logged, current_user.display_name.html_safe, '#' do |user|
14
- user.dom_class = 'dropdown-menu-right'
13
+ primary.item :logged, current_user.display_name.html_safe, '#',
14
+ html: { class: 'dropdown-menu-right' } do |user|
15
15
  user.item :self_edit, I18n.t('chaltron.menu.self_show'), self_show_users_path,
16
- link_html: { icon: 'user'},
16
+ link_html: { icon: 'user' },
17
17
  highlights_on: /\/self_(show|edit|update)/
18
18
  user.item :logout, 'Logout', destroy_user_session_path, method: :delete,
19
19
  link_html: { icon: 'sign-out' }
@@ -1,3 +1,3 @@
1
1
  module Chaltron
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -74,6 +74,7 @@ RUBY
74
74
 
75
75
  def setup_chaltron
76
76
  copy_file 'config/initializers/chaltron.rb'
77
+ copy_file 'app/assets/stylesheets/chaltron_custom.scss'
77
78
  end
78
79
 
79
80
  def setup_authorization
@@ -0,0 +1,22 @@
1
+ /*
2
+ * See http://getbootstrap.com/docs/4.0/getting-started/theming to learn customization
3
+ */
4
+
5
+ $font-size-base: 0.85rem;
6
+
7
+ // $theme-colors: (
8
+ // 'primary': #343A40, // Bootstrap dark color
9
+ // 'primary': #6C757D // Bootstrap secondary color
10
+ // );
11
+
12
+ @import 'chaltron';
13
+
14
+ // to keep space for navbars (top and bottom)
15
+ div#content {
16
+ margin-top: 2.7em;
17
+ margin-bottom: 2.7em;
18
+ }
19
+
20
+ .flash-container {
21
+ top: 4em;
22
+ }
@@ -2,8 +2,6 @@
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: http://sass-lang.com/
4
4
 
5
- @import 'chaltron';
6
-
7
5
  #main-carousel {
8
6
  img {
9
7
  height: 400px;
@@ -1,4 +1,4 @@
1
- <div id='main-carousel' class='carousel slide border-bottom border-primary' data-ride='carousel'>
1
+ <div id='main-carousel' class='carousel slide img-thumbnail' data-ride='carousel'>
2
2
 
3
3
  <ol class="carousel-indicators">
4
4
  <li data-target="#main-carousel" data-slide-to="0" class="active"></li>
@@ -4,15 +4,20 @@
4
4
  link_text ||= 'Learn more'
5
5
  %>
6
6
 
7
- <div class='col-md-4'>
8
- <div class='card'>
9
- <h5 class='card-header text-white bg-primary'>
7
+ <div class='card'>
8
+ <%= image_tag('700x300.gif', class: 'card-img-top') %>
9
+ <div class='card-body'>
10
+ <h5 class='card-title'>
10
11
  <%= icon(icon) %>
11
12
  <%= title %>
12
13
  </h5>
13
- <div class='card-body'>
14
- <p><%= raw body %> </p>
15
- <%= link_to link_text, link, class: 'btn btn-primary' %>
16
- </div>
14
+ <p class='card-text'><%= raw body %> </p>
15
+ <%= link_to link_text, link, class: 'btn btn-primary' %>
16
+ </div>
17
+ <div class='card-footer'>
18
+ <small class='text-muted'>
19
+ <%= icon('thumbs-o-up') %>
20
+ <%= raw footer %>
21
+ </small>
17
22
  </div>
18
23
  </div>
@@ -1,34 +1,44 @@
1
- <%= render 'carousel' %>
2
1
  <div class='container-fluid'>
3
2
  <div class='row'>
4
3
  <div class='col-lg-12'>
5
4
  <h1 class='pt-4'>
6
5
  Welcome to Chaltron! <small> aka Muffaster reloaded</small>
7
6
  </h1>
7
+
8
+ <div class='card-deck'>
9
+ <%= render 'panel', title: 'Bootstrap v4',
10
+ link: 'http://getbootstrap.com', icon: 'check',
11
+ body: 'Bootstrap rocks! And there are lots of good template ready to ' \
12
+ 'use, and free. Just as this one ;-)',
13
+ footer: 'Bootstrap rocks!'
14
+ %>
15
+ <%= render 'panel', title: 'Free &amp; Open Source'.html_safe,
16
+ icon: 'github', link_text: 'Fork me on GitHub',
17
+ body: "It's all free and open and much is still to do. " \
18
+ 'So pull request are very welcome',
19
+ footer: 'Open source rocks!'
20
+ %>
21
+ <%= render 'panel', title: 'Easy to use', icon: 'compass',
22
+ body: "It's so easy to build up and running web applications in a " \
23
+ 'few seconds. Try by yourself', link_text: 'Have a look',
24
+ footer: 'Chaltron rocks!'
25
+ %>
26
+ </div>
27
+
8
28
  </div>
9
- <%= render 'panel', title: 'Bootstrap v4',
10
- link: 'http://getbootstrap.com', icon: 'check',
11
- body: 'Bootstrap rocks! And there are lots of good template ready to ' \
12
- 'use, and free. Just as this one ;-)'
13
- %>
14
- <%= render 'panel', title: 'Free &amp; Open Source'.html_safe,
15
- icon: 'github', link_text: 'Fork me on GitHub',
16
- body: "It's all free and open and much is still to do. " \
17
- 'So pull request are very welcome'
18
- %>
19
- <%= render 'panel', title: 'Easy to use', icon: 'compass',
20
- body: "It's so easy to build up and running web applications in a " \
21
- 'few seconds. Try by yourself', link_text: 'Have a look'
22
- %>
23
29
  </div>
24
30
 
25
31
  <hr>
26
32
 
27
33
  <div class='row'>
28
- <div class='col-lg-12'>
29
- <h2 class='pt-4'>Main features</h2>
34
+ <div class='col-md-7'>
35
+ <%= render 'carousel' %>
30
36
  </div>
31
- <div class='col-md-6'>
37
+ <div class='col-md-5'>
38
+ <h2 class='pt-4'>
39
+ <%= icon('hand-o-down') %>
40
+ Main features
41
+ </h2>
32
42
  <p>Chaltron provides:</p>
33
43
  <ul class='fa-ul'>
34
44
  <li>
@@ -52,10 +62,8 @@
52
62
  <p>
53
63
  Try
54
64
  <strong><%= link_to 'Chaltron', 'https://github.com/vicvega/chaltron' %></strong>,
55
- taste <strong>L</strong>ight <strong>S</strong>peed <strong>A</strong>pplication <strong>D</strong>evelopment!</p>
56
- </div>
57
- <div class='col-md-6'>
58
- <%= image_tag('700x300.gif', class: 'img-responsive img-thumbnail border border-primary') %>
65
+ taste <strong>L</strong>ight <strong>S</strong>peed <strong>A</strong>pplication <strong>D</strong>evelopment!
66
+ </p>
59
67
  </div>
60
68
  </div>
61
69
 
@@ -63,7 +71,10 @@
63
71
 
64
72
  <div class='row'%>
65
73
  <div class='col-lg-12'>
66
- <h2 class='pt-4'>FAQ</h2>
74
+ <h2 class='pt-4'>
75
+ <%= icon('question-circle') %>
76
+ FAQ
77
+ </h2>
67
78
  </div>
68
79
  </div>
69
80
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chaltron
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vicvega
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-22 00:00:00.000000000 Z
11
+ date: 2018-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -394,7 +394,6 @@ files:
394
394
  - app/assets/stylesheets/chaltron.scss
395
395
  - app/assets/stylesheets/chaltron/layout.scss
396
396
  - app/assets/stylesheets/chaltron/logs.scss
397
- - app/assets/stylesheets/chaltron/mixins.scss
398
397
  - app/controllers/chaltron/ldap_controller.rb
399
398
  - app/controllers/chaltron/logs_controller.rb
400
399
  - app/controllers/chaltron/omniauth_callbacks_controller.rb
@@ -463,6 +462,7 @@ files:
463
462
  - lib/generators/chaltron/templates/app/assets/images/slide2.gif
464
463
  - lib/generators/chaltron/templates/app/assets/images/slide3.gif
465
464
  - lib/generators/chaltron/templates/app/assets/javascripts/home.js.coffee
465
+ - lib/generators/chaltron/templates/app/assets/stylesheets/chaltron_custom.scss
466
466
  - lib/generators/chaltron/templates/app/assets/stylesheets/home.scss
467
467
  - lib/generators/chaltron/templates/app/controllers/home_controller.rb
468
468
  - lib/generators/chaltron/templates/app/models/ability.rb
@@ -1,30 +0,0 @@
1
- /**
2
- * Generic mixins
3
- */
4
- @mixin box-shadow($shadow) {
5
- -webkit-box-shadow: $shadow;
6
- -moz-box-shadow: $shadow;
7
- -ms-box-shadow: $shadow;
8
- -o-box-shadow: $shadow;
9
- box-shadow: $shadow;
10
- }
11
-
12
- @mixin border-radius($radius) {
13
- -webkit-border-radius: $radius;
14
- -moz-border-radius: $radius;
15
- -ms-border-radius: $radius;
16
- -o-border-radius: $radius;
17
- border-radius: $radius;
18
- }
19
-
20
- @mixin border-radius-left($radius) {
21
- @include border-radius($radius 0 0 $radius)
22
- }
23
-
24
- /**
25
- * Form boxes
26
- */
27
-
28
- @mixin form-box($width){
29
- max-width: $width;
30
- }