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 +4 -4
- data/README.md +9 -1
- data/app/assets/javascripts/chaltron/navbar.js.coffee +3 -2
- data/app/assets/stylesheets/chaltron.scss +0 -3
- data/app/assets/stylesheets/chaltron/layout.scss +2 -11
- data/app/helpers/chaltron_helper.rb +1 -1
- data/config/chaltron_navigation.rb +3 -3
- data/lib/chaltron/version.rb +1 -1
- data/lib/generators/chaltron/install_generator.rb +1 -0
- data/lib/generators/chaltron/templates/app/assets/stylesheets/chaltron_custom.scss +22 -0
- data/lib/generators/chaltron/templates/app/assets/stylesheets/home.scss +0 -2
- data/lib/generators/chaltron/templates/app/views/home/_carousel.html.erb +1 -1
- data/lib/generators/chaltron/templates/app/views/home/_panel.html.erb +12 -7
- data/lib/generators/chaltron/templates/app/views/home/index.html.erb +34 -23
- metadata +3 -3
- data/app/assets/stylesheets/chaltron/mixins.scss +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0fe3df9d17f0db477b913f4ed19300753254565
|
4
|
+
data.tar.gz: d54a1cbe476d113c5d27dd60fe9aa15aab52f7a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebf40cf18b315eb791b0bfd705c00324965b7a687535901654ee4074a07b1d379b751ed241823b94569f2188bb521011f94cfb2a9b1816a593647fef6af2aa8c
|
7
|
+
data.tar.gz: ba10dd2f156c3d6b94b6d84ea70f4021acdad503c7cb9e15b64e95c3695270992b764d875c612ba7e0e5de495bc616eaa2f57a03f9542a11ce75dd0455e5889a
|
data/README.md
CHANGED
@@ -5,6 +5,14 @@
|
|
5
5
|
[](https://www.pullreview.com/github/vicvega/chaltron/reviews/master)
|
6
6
|
[](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-
|
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
|
-
|
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) ->
|
@@ -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.
|
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
|
-
|
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, '#'
|
14
|
-
|
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' }
|
data/lib/chaltron/version.rb
CHANGED
@@ -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
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id='main-carousel' class='carousel slide
|
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='
|
8
|
-
|
9
|
-
|
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
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
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 & 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 & 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-
|
29
|
-
|
34
|
+
<div class='col-md-7'>
|
35
|
+
<%= render 'carousel' %>
|
30
36
|
</div>
|
31
|
-
<div class='col-md-
|
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
|
56
|
-
|
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'>
|
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.
|
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
|
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
|
-
}
|