beautiful_scaffold 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/beautiful_scaffold.gemspec +1 -1
  2. data/lib/generators/USAGE +0 -3
  3. data/lib/generators/beautiful_migration_generator.rb +13 -2
  4. data/lib/generators/beautiful_scaffold_common_methods.rb +4 -1
  5. data/lib/generators/beautiful_scaffold_generator.rb +35 -8
  6. data/lib/generators/templates/app/assets/images/glyphicons-halflings-white.png +0 -0
  7. data/lib/generators/templates/app/assets/images/glyphicons-halflings.png +0 -0
  8. data/lib/generators/templates/app/assets/javascripts/beautiful_scaffold.js +49 -73
  9. data/lib/generators/templates/app/assets/javascripts/bootstrap-alert.js +90 -0
  10. data/lib/generators/templates/app/assets/javascripts/bootstrap-dropdown.js +100 -0
  11. data/lib/generators/templates/app/assets/javascripts/bootstrap-modal.js +218 -0
  12. data/lib/generators/templates/app/assets/javascripts/bootstrap-tooltip.js +275 -0
  13. data/lib/generators/templates/app/assets/javascripts/bootstrap.js +1825 -0
  14. data/lib/generators/templates/app/assets/javascripts/bootstrap.min.js +6 -0
  15. data/lib/generators/templates/app/assets/stylesheets/beautiful-scaffold.css.scss +88 -0
  16. data/lib/generators/templates/app/assets/stylesheets/bootstrap-responsive.css +815 -0
  17. data/lib/generators/templates/app/assets/stylesheets/bootstrap-responsive.min.css +9 -0
  18. data/lib/generators/templates/app/assets/stylesheets/bootstrap.css +4983 -0
  19. data/lib/generators/templates/app/assets/stylesheets/bootstrap.min.css +9 -0
  20. data/lib/generators/templates/app/controllers/base.rb +3 -2
  21. data/lib/generators/templates/app/controllers/master_base.rb +22 -1
  22. data/lib/generators/templates/app/helpers/beautiful_helper.rb +75 -56
  23. data/lib/generators/templates/app/initializers/link_renderer.rb +51 -0
  24. data/lib/generators/templates/app/locales/beautiful_scaffold.en.yml +6 -2
  25. data/lib/generators/templates/app/locales/beautiful_scaffold.fr.yml +7 -3
  26. data/lib/generators/templates/app/views/_beautiful_menu.html.erb +1 -9
  27. data/lib/generators/templates/app/views/_form.html.erb +3 -3
  28. data/lib/generators/templates/app/views/_modal_columns.html.erb +41 -0
  29. data/lib/generators/templates/app/views/dashboard.html.erb +0 -0
  30. data/lib/generators/templates/app/views/edit.html.erb +5 -6
  31. data/lib/generators/templates/app/views/index.html.erb +87 -74
  32. data/lib/generators/templates/app/views/layout.html.erb +77 -41
  33. data/lib/generators/templates/app/views/new.html.erb +5 -5
  34. data/lib/generators/templates/app/views/partials/_form_field.html.erb +45 -25
  35. data/lib/generators/templates/app/views/partials/_index_batch.html.erb +2 -2
  36. data/lib/generators/templates/app/views/partials/_index_column.html.erb +1 -1
  37. data/lib/generators/templates/app/views/partials/_index_header.html.erb +1 -1
  38. data/lib/generators/templates/app/views/show.html.erb +8 -7
  39. metadata +18 -11
  40. data/lib/generators/templates/app/assets/images/bg-bottom-login.jpg +0 -0
  41. data/lib/generators/templates/app/assets/images/bg-error.png +0 -0
  42. data/lib/generators/templates/app/assets/images/bg-left.jpg +0 -0
  43. data/lib/generators/templates/app/assets/images/bg-notice.jpg +0 -0
  44. data/lib/generators/templates/app/assets/images/bg-notice.png +0 -0
  45. data/lib/generators/templates/app/assets/images/bg-success.png +0 -0
  46. data/lib/generators/templates/app/assets/images/bg-top-login.jpg +0 -0
  47. data/lib/generators/templates/app/assets/images/bg-warning.png +0 -0
  48. data/lib/generators/templates/app/assets/stylesheets/beautiful_scaffold.css.scss +0 -719
@@ -7,11 +7,15 @@
7
7
  <meta name="description" content="Beautiful Scaffold">
8
8
  <meta name="author" content="You or me Sylvain Claudel (http://blog.escarworld.com)">
9
9
 
10
- <%%= stylesheet_link_tag "reset", "beautiful_scaffold" %>
11
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
12
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
13
- <%%= javascript_include_tag "application", "jquery.pjax", "beautiful_scaffold" %>
14
-
10
+ <%%= stylesheet_link_tag "reset", "bootstrap.min", "bootstrap-responsive.min", "beautiful-scaffold" %>
11
+ <style>
12
+ body {
13
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
14
+ }
15
+ </style>
16
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
17
+ <!--<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>-->
18
+ <%%= javascript_include_tag "application", "jquery.pjax" %>
15
19
  <%%= javascript_include_tag "jquery.markitup.js" %>
16
20
  <%%= javascript_include_tag "markitup/sets/default/set.js" %>
17
21
  <%%= stylesheet_link_tag "markitup/skins/simple/style.css" %>
@@ -24,47 +28,79 @@
24
28
  <%%= yield :head %>
25
29
  </head>
26
30
  <body>
27
- <div id="admin">
28
- <div id="left-panel">
29
- <p id="logo">Beautiful Scaffold</p>
30
- <p id="home">Hello
31
- <span id="username">
32
- <%%= l(Date.today, :format => :long) %>
33
- </span>
34
- <span id="message"></span>
35
- </p>
36
- <p id="home-link">
37
- <a href="#">Homepage</a>
38
- <div class="loader" style="display:none">
39
- <div class="circle"></div>
40
- <div class="circle1"></div>
31
+ <div class="container-fluid">
32
+ <div class="navbar navbar-fixed-top">
33
+ <div class="navbar-inner">
34
+ <div class="container">
35
+ <a class="brand" href="#">
36
+ Beautiful-Scaffold
37
+ </a>
38
+ <ul class="nav">
39
+ <li class="active">
40
+ <a href="beautiful/dashboard">Home</a>
41
+ </li>
42
+ </ul>
43
+ <div class="btn-group pull-right">
44
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
45
+ <i class="icon-user"></i> Username
46
+ <span class="caret"></span>
47
+ </a>
48
+ <ul class="dropdown-menu">
49
+ <li><a href="#">Profile</a></li>
50
+ <li class="divider"></li>
51
+ <li><a href="#">Sign Out</a></li>
52
+ </ul>
53
+ </div>
41
54
  </div>
42
- </p>
43
-
44
- <%%= render :partial => "layouts/beautiful_menu" %>
55
+ </div>
45
56
  </div>
46
- <div id="right-panel">
47
- <h1>Administration Panel</h1>
48
- <p class="subtitle">Beautiful Scaffold</p>
49
57
 
50
- <!--<p id="flash-warning">Lorem ipsum....</p>-->
51
- <%% if not flash[:notice].blank? then %>
52
- <p id="flash-notice"><%%= flash[:notice] %></p>
53
- <%% end %>
54
- <!--<p id="flash-success">Lorem ipsum....</p>-->
55
- <%% if not flash[:error].blank? then %>
56
- <p id="flash-error"><%%= flash[:error] %></p>
57
- <%% end %>
58
-
59
- <div id="pjax-container">
60
- <%%= yield %>
58
+ <div class="row-fluid">
59
+ <div class="span2">
60
+ <ul class="nav nav-list well">
61
+ <li class="nav-header">
62
+ Menu
63
+ </li>
64
+ <%%= render :partial => "layouts/beautiful_menu" %>
65
+ </ul>
66
+ </div>
67
+ <div class="span10">
68
+ <!-- Zone PJAX -->
69
+
70
+ <!-- TODO with pjax -->
71
+ <%% if not flash[:notice].blank? then %>
72
+ <div class="alert alert-info">
73
+ <a class="close" data-dismiss="alert" href="#">×</a>
74
+ <h4 class="alert-heading">Info : </h4>
75
+ <%%= flash[:notice] %>
76
+ </div>
77
+ <%% end %>
78
+ <%% if not flash[:error].blank? then %>
79
+ <div class="alert alert-error">
80
+ <a class="close" data-dismiss="alert" href="#">×</a>
81
+ <h4 class="alert-heading">Info : </h4>
82
+ <%%= flash[:error] %>
83
+ </div>
84
+ <%% end %>
85
+
86
+ <div id="pjax-container">
87
+ <%%= yield %>
88
+ </div>
89
+
90
+ <!-- FIN Zone PJAX -->
61
91
  </div>
62
-
63
- <p id="footer">
64
- Copyright 2011 Beautiful Scaffold | Powered by <a href="http://blog.escarworld.com">rivsc</a> | <a href="http://www.beautiful-scaffold.com">Beautiful Scaffold</a>
65
- </p>
66
-
67
92
  </div>
68
93
  </div>
94
+
95
+ <div class="loader" style="display:none">
96
+ <div class="circle"></div>
97
+ <div class="circle1"></div>
98
+ </div>
99
+
100
+ <%%= javascript_include_tag "bootstrap.min", "bootstrap-alert", "bootstrap-dropdown", "bootstrap-modal", "bootstrap-tooltip" %>
101
+ <script type="text/javascript">
102
+ $('.dropdown-toggle').dropdown();
103
+ </script>
104
+
69
105
  </body>
70
106
  </html>
@@ -1,5 +1,5 @@
1
- <div class="box content-box">
2
- <div class="box-title"><%%= t(:new, :default => 'New') %> <%= singular_table_name %></div>
3
- <%%= render 'form' %>
4
- <%%= link_to t(:back, :default => "Back"), <%= namespace_for_route %><%= plural_table_name %>_path, :class => "btn" %>
5
- </div>
1
+ <h2><%%= t(:new, :default => 'New') %> <%= singular_table_name %></h2>
2
+
3
+ <%%= render 'form' %>
4
+
5
+ <%%= link_to t(:back, :default => "Back"), <%= namespace_for_route %><%= plural_table_name %>_path, :class => "btn" %>
@@ -1,37 +1,57 @@
1
1
  <%- attributes.each do |attribute| -%>
2
2
  <%- if @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
3
- <div class="field">
4
- <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name %>") %>
5
- <%%= f.text_area :<%= attribute.name %>, :class => "richtext-editor" %>
3
+ <div class="control-group">
4
+ <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
5
+ <div class="controls">
6
+ <%%= f.text_area :<%= attribute.name %>, :class => "richtext-editor" %>
7
+ </div>
6
8
  </div>
7
- <div class="field">
8
- <% for type in richtext_type %>
9
- <%% hashradio = {:id => "<%= attribute.name %>-<%= type %>", :class => "select-richtext", 'data-editor' => 'markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>', 'data-spleditor' => '<%= singular_table_name %>_<%= attribute.name %>' } %>
10
- <%% hashradio[:checked] = "checked" if @<%= singular_table_name %>.<%= attribute.name %>_typetext == "<%= type %>" %>
11
- <%%= f.radio_button :<%= attribute.name %>_typetext, "<%= type %>", hashradio %>
12
- <label for="<%= attribute.name %>-<%= type %>" class="label-richtext-type"><%= type.capitalize %></label>
13
- <% end %>
9
+ <div class="control-group">
10
+ <label class="control-label" for="inlineCheckboxes"></label>
11
+ <div class="controls">
12
+ <% for type in richtext_type %>
13
+ <%% hashradio = {:id => "<%= attribute.name %>-<%= type %>", :class => "select-richtext", 'data-editor' => 'markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>', 'data-spleditor' => '<%= singular_table_name %>_<%= attribute.name %>' } %>
14
+ <%% hashradio[:checked] = "checked" if @<%= singular_table_name %>.<%= attribute.name %>_typetext == "<%= type %>" %>
15
+ <label for="<%= attribute.name %>-<%= type %>" class="label-richtext-type checkbox inline">
16
+ <%%= f.radio_button :<%= attribute.name %>_typetext, "<%= type %>", hashradio %>
17
+ <%= type.capitalize %>
18
+ </label>
19
+ <% end %>
20
+ </div>
14
21
  </div>
15
22
 
16
- <%% rttype = @<%= singular_table_name %>.<%= attribute.name %>_typetext.to_s %>
17
- <%% if not rttype.blank? then %>
18
- <script language="javascript">
19
- $(document).ready(function(){
20
- $('#<%= singular_table_name %>_<%= attribute.name %>').markItUp(my<%%= rttype.capitalize %>Settings);
21
- $('#markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>').addClass('<%%= rttype.downcase %>');
22
- });
23
- </script>
24
- <%% end %>
23
+ <%% rttype = @<%= singular_table_name %>.<%= attribute.name %>_typetext.to_s %>
24
+ <%% if not rttype.blank? then %>
25
+ <script language="javascript">
26
+ $(document).ready(function(){
27
+ $('#<%= singular_table_name %>_<%= attribute.name %>').markItUp(my<%%= rttype.capitalize %>Settings);
28
+ $('#markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>').addClass('<%%= rttype.downcase %>');
29
+ });
30
+ </script>
31
+ <%% end %>
25
32
 
26
33
  <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
27
- <div class="field">
28
- <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name %>") %>
29
- <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption %>
34
+ <div class="control-group">
35
+ <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
36
+ <div class="controls">
37
+ <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption %>
38
+ </div>
39
+ </div>
40
+ <%- elsif @beautiful_attributes.include?(attribute.name + ':price') then -%>
41
+ <div class="control-group">
42
+ <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
43
+ <div class="controls">
44
+ <div class="input-prepend">
45
+ <span class="add-on">$</span><%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
46
+ </div>
47
+ </div>
30
48
  </div>
31
49
  <%- else -%>
32
- <div class="field">
33
- <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name %>") %>
34
- <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
50
+ <div class="control-group">
51
+ <%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
52
+ <div class="controls">
53
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
54
+ </div>
35
55
  </div>
36
56
  <%- end -%>
37
57
  <%- end -%>
@@ -1,6 +1,6 @@
1
1
  <%- attributes.each{ |attribute| -%>
2
2
  <%- if attribute.type.to_s == "boolean" then -%>
3
- <option value="<%= attribute.name %>.true"><%%= t(:settrueforattr, :attr => "<%= attribute.name %>", :default => "Set <%= attribute.name %> to true") %></option>
4
- <option value="<%= attribute.name %>.false"><%%= t(:setfalseforattr, :attr => "<%= attribute.name %>", :default => "Set <%= attribute.name %> to false") %></option>
3
+ <option value="<%= attribute.name %>.true"><%%= t(:settrueforattr, :attr => "'<%= attribute.name %>'", :default => "Set <%= attribute.name %> to true") %></option>
4
+ <option value="<%= attribute.name %>.false"><%%= t(:setfalseforattr, :attr => "'<%= attribute.name %>'", :default => "Set <%= attribute.name %> to false") %></option>
5
5
  <%- end -%>
6
6
  <%- } -%>
@@ -1,5 +1,5 @@
1
1
  <%- attributes.each do |attribute| -%>
2
- <td class="<%%= align_attribute("<%= attribute.type %>") %>">
2
+ <td <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="col-<%= attribute.name %> <%%= align_attribute("<%= attribute.type %>") %>">
3
3
  <% if @beautiful_attributes.include?(attribute.name + ':price') then %>
4
4
  <%%= number_to_currency(<%= singular_table_name %>.<%= attribute.name %>) %>
5
5
  <% elsif @beautiful_attributes.include?(attribute.name + ':richtext') then %>
@@ -1,5 +1,5 @@
1
1
  <%- attributes.each do |attribute| -%>
2
- <th>
2
+ <th <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="col-<%= attribute.name %>">
3
3
  <%- id_or_not = "" -%>
4
4
  <%- if @beautiful_attributes.include?(attribute.name + ':references') then -%>
5
5
  <%- id_or_not = "_id" -%>
@@ -1,7 +1,8 @@
1
- <div class="box content-box">
2
- <div class="box-title"><%%= t(:show, :default => "Show") %> <%= singular_table_name %></div>
3
- <%= render_partial 'app/views/partials/_show_field.html.erb' %>
4
- <!-- Beautiful_scaffold - AddField - Field - Do not remove -->
5
- <%%= link_to t(:edit, :default => "Edit"), edit_<%= namespace_for_route %><%= singular_table_name %>_path(@<%= singular_table_name %>), :class => "btn" %>
6
- <%%= link_to t(:back, :default => "Back"), <%= namespace_for_route %><%= plural_table_name %>_path, :class => "btn" %>
7
- </div>
1
+ <h2><%%= t(:show, :default => "Show") %> <%= singular_table_name %></h2>
2
+
3
+ <%= render_partial 'app/views/partials/_show_field.html.erb' %>
4
+ <!-- Beautiful_scaffold - AddField - Field - Do not remove -->
5
+
6
+ <%%= link_to t(:edit, :default => "Edit"), edit_<%= namespace_for_route %><%= singular_table_name %>_path(@<%= singular_table_name %>), :class => "btn" %>
7
+ <%%= link_to t(:back, :default => "Back"), <%= namespace_for_route %><%= plural_table_name %>_path, :class => "btn" %>
8
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beautiful_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-12 00:00:00.000000000Z
12
+ date: 2012-07-25 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Beautiful Scaffold generate a complete scaffold (sort, export, paginate
15
15
  and filter data)
@@ -27,28 +27,35 @@ files:
27
27
  - lib/generators/beautiful_migration_generator.rb
28
28
  - lib/generators/beautiful_scaffold_common_methods.rb
29
29
  - lib/generators/beautiful_scaffold_generator.rb
30
- - lib/generators/templates/app/assets/images/bg-bottom-login.jpg
31
- - lib/generators/templates/app/assets/images/bg-error.png
32
- - lib/generators/templates/app/assets/images/bg-left.jpg
33
- - lib/generators/templates/app/assets/images/bg-notice.jpg
34
- - lib/generators/templates/app/assets/images/bg-notice.png
35
- - lib/generators/templates/app/assets/images/bg-success.png
36
- - lib/generators/templates/app/assets/images/bg-top-login.jpg
37
- - lib/generators/templates/app/assets/images/bg-warning.png
30
+ - lib/generators/templates/app/assets/images/glyphicons-halflings-white.png
31
+ - lib/generators/templates/app/assets/images/glyphicons-halflings.png
38
32
  - lib/generators/templates/app/assets/javascripts/beautiful_scaffold.js
33
+ - lib/generators/templates/app/assets/javascripts/bootstrap-alert.js
34
+ - lib/generators/templates/app/assets/javascripts/bootstrap-dropdown.js
35
+ - lib/generators/templates/app/assets/javascripts/bootstrap-modal.js
36
+ - lib/generators/templates/app/assets/javascripts/bootstrap-tooltip.js
37
+ - lib/generators/templates/app/assets/javascripts/bootstrap.js
38
+ - lib/generators/templates/app/assets/javascripts/bootstrap.min.js
39
39
  - lib/generators/templates/app/assets/javascripts/jquery.pjax.js
40
40
  - lib/generators/templates/app/assets/javascripts/modernizr.custom.js
41
- - lib/generators/templates/app/assets/stylesheets/beautiful_scaffold.css.scss
41
+ - lib/generators/templates/app/assets/stylesheets/beautiful-scaffold.css.scss
42
+ - lib/generators/templates/app/assets/stylesheets/bootstrap-responsive.css
43
+ - lib/generators/templates/app/assets/stylesheets/bootstrap-responsive.min.css
44
+ - lib/generators/templates/app/assets/stylesheets/bootstrap.css
45
+ - lib/generators/templates/app/assets/stylesheets/bootstrap.min.css
42
46
  - lib/generators/templates/app/assets/stylesheets/reset.css
43
47
  - lib/generators/templates/app/controllers/base.rb
44
48
  - lib/generators/templates/app/controllers/master_base.rb
45
49
  - lib/generators/templates/app/helpers/beautiful_helper.rb
46
50
  - lib/generators/templates/app/helpers/model_helper.rb
51
+ - lib/generators/templates/app/initializers/link_renderer.rb
47
52
  - lib/generators/templates/app/locales/beautiful_scaffold.en.yml
48
53
  - lib/generators/templates/app/locales/beautiful_scaffold.fr.yml
49
54
  - lib/generators/templates/app/models/pdf_report.rb
50
55
  - lib/generators/templates/app/views/_beautiful_menu.html.erb
51
56
  - lib/generators/templates/app/views/_form.html.erb
57
+ - lib/generators/templates/app/views/_modal_columns.html.erb
58
+ - lib/generators/templates/app/views/dashboard.html.erb
52
59
  - lib/generators/templates/app/views/edit.html.erb
53
60
  - lib/generators/templates/app/views/index.html.erb
54
61
  - lib/generators/templates/app/views/layout.html.erb
@@ -1,719 +0,0 @@
1
- $bgleft:"../assets/bg-left.jpg";
2
-
3
- $warning:"../assets/bg-warning.png";
4
- $success:"../assets/bg-success.png";
5
- $error:"../assets/bg-error.png";
6
- $notice:"../assets/bg-notice.png";
7
-
8
- $bg-color-warning:#FFFBCC;
9
- $bg-color-success:#D5FFCF;
10
- $bg-color-error:#FFCECF;
11
- $bg-color-notice:#DCE3FF;
12
-
13
- $border-color-warning:#E5DB55;
14
- $border-color-success:#9ADF8F;
15
- $border-color-error:#DF8F90;
16
- $border-color-notice:#A3B3EE;
17
-
18
- $gradient-top:#6fb200;
19
- $gradient-bottom:#4b9200;
20
-
21
- $box-title-gradient-top:#e8e8e8;
22
- $box-title-gradient-bottom:#dadada;
23
-
24
- $border-spinner:#4b9200;
25
- $shadow-spinner:#6fb200;
26
-
27
- $selected-text:#6fb200;
28
- $selected-text-bg:white;
29
-
30
- @mixin border-radius($content){
31
- -ms-border-radius:$content;
32
- -o-border-radius:$content;
33
- -webkit-border-radius:$content;
34
- -moz-border-radius:$content;
35
- border-radius:$content;
36
- }
37
- @mixin box-shadow($content){
38
- -ms-box-shadow:$content;
39
- -o-box-shadow:$content;
40
- -webkit-box-shadow:$content;
41
- -moz-box-shadow:$content;
42
- box-shadow:$content;
43
- }
44
- @mixin gradient($color-top, $color-bottom){
45
- background: $color-top; /* Old browsers */
46
- background: -moz-linear-gradient(top, $color-top 0%, $color-bottom 100%); /* FF3.6+ */
47
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$color-top), color-stop(100%,$color-bottom)); /* Chrome,Safari4+ */
48
- background: -webkit-linear-gradient(top, $color-top 0%,$color-bottom 100%); /* Chrome10+,Safari5.1+ */
49
- background: -o-linear-gradient(top, $color-top 0%,$color-bottom 100%); /* Opera11.10+ */
50
- background: -ms-linear-gradient(top, $color-top 0%,$color-bottom 100%); /* IE10+ */
51
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$color-top', endColorstr='$color-bottom',GradientType=0 ); /* IE6-9 */
52
- background: linear-gradient(top, $color-top 0%,$color-bottom 100%); /* W3C */
53
- }
54
- ::selection{
55
- background-color:$selected-text;
56
- color:$selected-text-bg;
57
- }
58
- h1, h2{
59
- font-size:27px;
60
- font-family:helvetica;
61
- }
62
- body{
63
- background:transparent url($bgleft) repeat;
64
- }
65
- #left-panel, #right-panel{
66
- padding-top:30px;
67
- }
68
- #left-panel{
69
- width:230px;
70
- background:transparent url($bgleft) repeat;
71
- position:absolute;
72
- top:0;
73
- left:0;
74
- }
75
- #right-panel{
76
- margin:0px;
77
- margin-left:230px;
78
- top:0;
79
- z-index:10;
80
- position: relative;
81
- @include box-shadow(0px 0px 10px black);
82
- padding-left:20px;
83
- padding-right:20px;
84
- background-color:#F4F4F4;
85
- }
86
- #logo{
87
- font-size:31px;
88
- font-family:helvetica;
89
- font-variant:small-caps;
90
- color:#EEE;
91
- margin-bottom:25px;
92
- text-align:center;
93
- }
94
- #home, #message, #username, a{
95
- font-size:11px;
96
- font-family:helvetica;
97
- color:#CCCCCA;
98
- }
99
- #home-link, #home, a:hover{
100
- color:#6D7B6C;
101
- text-align:right;
102
- }
103
- #home-link, #home{
104
- margin-bottom:15px;
105
- padding-right:10px;
106
- }
107
- .subtitle{
108
- font-size:17px;
109
- font-family:helvetica;
110
- color:#555;
111
- margin-top:10px;
112
- margin-bottom:10px;
113
- }
114
- .menuelt{
115
- transition-property:padding,width;
116
- transition-duration:1s;
117
- -ms-transition-property:padding,width;
118
- -ms-transition-duration:1s;
119
- -webkit-transition-property:padding,width;
120
- -webkit-transition-duration:1s;
121
- -moz-transition-property:padding,width;
122
- -moz-transition-duration:1s;
123
- -o-transition-property:padding,width;
124
- -o-transition-duration:1s;
125
-
126
- font-family:helvetica;
127
- position:relative;
128
- z-index:5;
129
- width:192px;
130
-
131
- font-size:14px;
132
- height: 17px;
133
- margin: 8px 0px 4px 28px;
134
- padding: 11px 15px 7px 0px;
135
-
136
- text-align:right;
137
- cursor:pointer;
138
- line-height:14px;
139
-
140
- @include border-radius(3px);
141
-
142
- color:white;
143
-
144
- @include gradient($gradient-top,$gradient-bottom);
145
- }
146
- .menuelt:hover{
147
- padding-right:35px;
148
- width:172px;
149
- }
150
- .menuelt.active{
151
- z-index:15;
152
- background:#F4F4F4;
153
- color:#555;
154
- }
155
- .submenu{
156
- display:block;
157
- height:auto;
158
- }
159
- .submenu.hidden{
160
- display:none;
161
- height:0;
162
- }
163
- .submenu li{
164
- font-size:12px;
165
- font-family:helvetica;
166
- color:#AAA;
167
- text-align:right;
168
- margin:10px;
169
- }
170
- .submenu li:hover{
171
- color:white;
172
- }
173
- .menu-box{
174
- @include border-radius(3px);
175
- border:1px solid #BCBCBC;
176
- color:#333;
177
- width:120px;
178
- height:20px;
179
- margin:10px;
180
- padding-top:80px;
181
- text-align:center;
182
- float:left;
183
- font-family:helvetica;
184
- font-size:12px;
185
-
186
- background-color:#F4F4F4;
187
- background-position:23px 4px;
188
- background-repeat:no-repeat;
189
- }
190
- .menu-box:hover{
191
- background-color:white;
192
- }
193
- .menu-box:first-of-type{
194
- margin-left:0px;
195
- }
196
- #write-article{ background-image:url(../assets/img1.jpg);}
197
- #create-page{ background-image:url(../assets/img2.jpg);}
198
- #upload-picture{ background-image:url(../assets/img3.jpg);}
199
- #add-event{ background-image:url(../assets/img4.jpg);}
200
- #manage-comments{ background-image:url(../assets/img5.jpg);}
201
- .box{
202
- @include border-radius(3px);
203
- border:1px solid #CDCDCD;
204
- border-top-color:#DDDDDD;
205
- background-color:white;
206
- clear:left;
207
- }
208
- .box h2{
209
- font-family:helvetica;
210
- font-size:13px;
211
- font-weight:bold;
212
- color:black;
213
- padding:6px;
214
- margin-top:4px;
215
- }
216
- .box p{
217
- font-family:helvetica;
218
- font-size:12px;
219
- font-weight:normal;
220
- color:#555;
221
- padding:6px;
222
- }
223
- .box-title{
224
- font-family:helvetica;
225
- font-size:14px;
226
- font-weight:bold;
227
- color:black;
228
- padding:6px;
229
- cursor:pointer;
230
- @include gradient($box-title-gradient-top,$box-title-gradient-bottom);
231
- border-bottom:1px solid #BCBCBC;
232
- }
233
- form{
234
- padding:15px;
235
- }
236
- .field{
237
- clear:left;
238
- }
239
- select, option, textarea, input[type=text],
240
- input[type=color],
241
- input[type=date],
242
- input[type=datetime],
243
- input[type=datetime-local],
244
- input[type=email],
245
- input[type=file],
246
- input[type=image],
247
- input[type=month],
248
- input[type=number],
249
- input[type=password],
250
- input[type=range],
251
- input[type=reset],
252
- input[type=search],
253
- input[type=tel],
254
- input[type=text],
255
- input[type=time],
256
- input[type=url],
257
- input[type=week]{
258
- @include border-radius(3px);
259
- background-color:white;
260
- border:1px solid #DDD;
261
- margin-bottom:15px;
262
- clear:left;
263
- font-size:13px;
264
- padding:3px;
265
- font-family:helvetica;
266
- font-size:13px;
267
- line-height:18px;
268
- }
269
- option{
270
- margin:0;
271
- border:0;
272
- }
273
- select:focus, option:focus, textarea:focus, input[type=text]:focus,
274
- input[type=color]:focus,
275
- input[type=date]:focus,
276
- input[type=datetime]:focus,
277
- input[type=datetime-local]:focus,
278
- input[type=email]:focus,
279
- input[type=file]:focus,
280
- input[type=image]:focus,
281
- input[type=month]:focus,
282
- input[type=number]:focus,
283
- input[type=password]:focus,
284
- input[type=range]:focus,
285
- input[type=reset]:focus,
286
- input[type=search]:focus,
287
- input[type=tel]:focus,
288
- input[type=text]:focus,
289
- input[type=time]:focus,
290
- input[type=url]:focus,
291
- input[type=week]:focus{
292
- @include box-shadow(0px 0px 3px #5BA000);
293
- border:1px solid #DDD;
294
- }
295
- label{
296
- clear:left;
297
- display:block;
298
- font-family:helvetica;
299
- font-size:13px;
300
- color:#444;
301
- margin-bottom:7px;
302
- }
303
- label.label-richtext-type{
304
- display:inline;
305
- }
306
- label.inlabel{
307
- display:inline;
308
- }
309
- .btn, input[type=submit]{
310
- display:inline-block;
311
-
312
- font-size:12px;
313
- font-family:helvetica;
314
- position:relative;
315
- z-index:11;
316
- margin:4px;
317
- padding:6px 10px;
318
- text-align:center;
319
-
320
- -moz-box-sizing: content-box;
321
- -o-box-sizing: content-box;
322
- -ms-box-sizing: content-box;
323
- -webkit-box-sizing: content-box;
324
- box-sizing: content-box;
325
-
326
- line-height:18px;
327
- @include border-radius(3px);
328
- border:none;
329
- color:white;
330
- text-decoration:none;
331
- @include gradient($gradient-top,$gradient-bottom);
332
- }
333
- .btn:hover, input[type=submit]:hover{
334
- color:white;
335
- text-decoration:none;
336
-
337
- @include gradient($gradient-bottom,$gradient-top);
338
- }
339
- .content-box{
340
- clear:both;
341
- margin-top:10px;
342
- margin-bottom:10px;
343
- }
344
- .content-box-left, .content-box-right{
345
- width:49%;
346
- height:229px;
347
- margin-top:10px;
348
- margin-bottom:10px;
349
- }
350
- .content-box-left{
351
- float:left;
352
- clear:left;
353
- }
354
- .content-box-right{
355
- float:right;
356
- clear:right;
357
- }
358
- .close{
359
- height:26px;
360
- overflow:hidden;
361
- }
362
- .index_filter{ display:table-cell;vertical-align: top;width:24%;height:100%;padding-top:52px;}
363
- .index_table{ display:block;width:100%;height:100%;}
364
-
365
- .filter-min{
366
- display:inline-block;
367
- width:98px;
368
- margin-right:5px;
369
- }
370
- .filter-max{
371
- display:inline-block;
372
- width:99px;
373
- }
374
- .filter{
375
- width:210px;
376
- }
377
-
378
- #footer{
379
- clear:left;
380
- font-family:helvetica;
381
- font-size:11px;
382
- color:#666;
383
- margin-top:8px;
384
- padding-top:8px;
385
- border-top:1px solid #BBB;
386
- height:20px;
387
- }
388
- #flash-warning,
389
- #flash-notice,
390
- #flash-success,
391
- #flash-error{
392
- font-family:helvetica;
393
- font-size:12px;
394
- border-style:solid;
395
- border-width:1px;
396
- @include border-radius(3px);
397
- padding:8px;
398
- padding-left:28px;
399
- display:block;
400
- color:#333;
401
- clear:left;
402
- margin:3px 0px;
403
- }
404
- #flash-warning{
405
- border-color:$border-color-warning;
406
- background:$bg-color-warning url($warning) no-repeat 7px 8px;
407
- }
408
- #flash-notice{
409
- border-color:$border-color-notice;
410
- background:$bg-color-notice url($notice) no-repeat 7px 8px;
411
- }
412
- #flash-success{
413
- border-color:$border-color-success;
414
- background:$bg-color-success url($success) no-repeat 7px 8px;
415
- }
416
- #flash-error{
417
- border-color:$border-color-error;
418
- background:$bg-color-error url($error) no-repeat 7px 8px;
419
- }
420
- .successful, .error{
421
- font-family:helvetica;
422
- font-size:13px;
423
- color:#333;
424
- padding:0px 0px 5px 28px;
425
- margin-top:4px;
426
- margin-left:7px;
427
- }
428
- .successful{
429
- background:white url(../assets/bg-success.png) no-repeat 7px 1px;
430
- }
431
- .error{
432
- background:white url(../assets/bg-error.png) no-repeat 7px 1px;
433
- }
434
- table{
435
- margin:10px;
436
- border:1px solid #BBB;
437
- width:100%;
438
- }
439
- table tr:first-child{
440
- font-weight:bold;
441
- text-align:left;
442
- border-bottom:1px solid #DDD;
443
- border-left:none;
444
- border-right:none;
445
- background-color:#DDD;
446
- }
447
- table tr:last-child{
448
- border-bottom:1px solid #BBB;
449
- }
450
- table tr:first-child td, table tr:first-child th{
451
- color:#111;
452
- }
453
- table tr:first-child td a, table tr:first-child th a{
454
- text-decoration:none;
455
- }
456
- table tr td, table tr th{
457
- padding:5px 9px 5px 0px;
458
- font-family:helvetica;
459
- font-size:12px;
460
- color:#777;
461
- border-bottom:1px solid #DDD;
462
- }
463
- table tr td a, table tr th a{
464
- color:#777;
465
- }
466
- table tr.line-1{
467
- background-color:white;
468
- }
469
- table tr.line-2{
470
- background-color:#EEE;
471
- }
472
- table tr.line-1:hover, table tr.line-2:hover, table tr:hover{
473
- background-color:#DDD;
474
- @include box-shadow(0px 0px 7px #777);
475
- }
476
- /* Login page */
477
- html, body{
478
- height:100%;
479
- }
480
- #admin-login{
481
- height:100%;
482
- }
483
- #top-login{
484
- background:transparent url(../assets/bg-top-login.jpg);
485
- border-bottom:1px solid #eee;
486
- height:33%;
487
- width:100%;
488
- position:relative;
489
- }
490
- #top-login p{
491
- font-family:helvetica;
492
- font-weight:bold;
493
- font-size:25px;
494
- margin-bottom:30px;
495
- color:#DFDFDF;
496
- text-align:center;
497
- position:absolute;
498
- bottom:0px;
499
- width:100%;
500
- }
501
- #bottom-login{
502
- background:transparent url(../assets/bg-bottom-login.jpg);
503
- height:65%;
504
- width:100%;
505
- }
506
- label.login-label span,
507
- label.login-label-right span{
508
- color:white;
509
- font-size:14px;
510
- display:inline-block;
511
- width:125px;
512
- }
513
- label.login-label-right span{
514
- width:100px;
515
- }
516
- label.login-label input[type=text]{
517
- margin-bottom:0px;
518
- }
519
- label.login-label, label.login-label-right{
520
- margin-bottom:15px;
521
- }
522
- .submit, label.login-label-right{
523
- text-align:right;
524
- }
525
- #bottom-login form{
526
- width:293px;
527
- margin-left:auto;
528
- margin-right:auto;
529
- }
530
- .al, .ac, .ar{
531
- vertical-align:middle;
532
- }
533
- .al{
534
- text-align:left;
535
- }
536
- .ac{
537
- text-align:center;
538
- }
539
- .ar{
540
- text-align:right;
541
- }
542
- .box-margintl{
543
- margin-left:10px;
544
- margin-top:10px;
545
- }
546
- #export{
547
- margin-left:10px;
548
- }
549
- #export p{
550
- margin:0;
551
- padding:0;
552
- }
553
- #export_label{
554
- display:block;
555
- float:left;
556
- margin-left:47px;
557
- background:none;
558
- color:#777;
559
- padding-top:5px;
560
- padding-right:10px;
561
- }
562
- #batch_label{
563
- display:inline;
564
- color:#777;
565
- padding-top:5px;
566
- padding-right:10px;
567
- }
568
- label.allitems{
569
- font-size:11px;
570
- }
571
- #table-items-and-filter{
572
- display:table;
573
- }
574
- form.table-item{
575
- display:table-cell;
576
- vertical-align:top;
577
- }
578
- .beautiful_pagination{
579
- height:23px;
580
- }
581
-
582
- /* http://www.alessioatzeni.com/blog/css3-loading-animation-loop/ */
583
- .loader{
584
- position:fixed;
585
- top:50%;
586
- left:50%;
587
- width:70px;
588
- height:70px;
589
- z-index:1000;
590
- }
591
- .circle {
592
- background-color: rgba(0,0,0,0);
593
- border:5px solid $border-spinner;
594
- opacity:.9;
595
- border-right:5px solid rgba(0,0,0,0);
596
- border-left:5px solid rgba(0,0,0,0);
597
- border-radius:50px;
598
- box-shadow: 0 0 35px $shadow-spinner;
599
- width:50px;
600
- height:50px;
601
- margin:0 auto;
602
- -moz-animation:spinPulse 1s infinite ease-in-out;
603
- -webkit-animation:spinPulse 1s infinite linear;
604
- }
605
- .circle1 {
606
- background-color: rgba(0,0,0,0);
607
- border:5px solid $border-spinner;
608
- opacity:.9;
609
- border-left:5px solid rgba(0,0,0,0);
610
- border-right:5px solid rgba(0,0,0,0);
611
- border-radius:50px;
612
- box-shadow: 0 0 15px $shadow-spinner;
613
- width:30px;
614
- height:30px;
615
- margin:0 auto;
616
- position:relative;
617
- top:-50px;
618
- -moz-animation:spinoffPulse 1s infinite linear;
619
- -webkit-animation:spinoffPulse 1s infinite linear;
620
- }
621
- @-ms-keyframes spinPulse {
622
- 0% { -ms-transform:rotate(160deg); opacity:0; box-shadow:0 0 1px $shadow-spinner; }
623
- 50% { -ms-transform:rotate(145deg); opacity:1;}
624
- 100% { -ms-transform:rotate(-320deg); opacity:0; }
625
- }
626
- @-ms-keyframes spinoffPulse {
627
- 0% { -ms-transform:rotate(0deg); }
628
- 100% { -ms-transform:rotate(360deg); }
629
- }
630
- @-o-keyframes spinPulse {
631
- 0% { -o-transform:rotate(160deg); opacity:0; box-shadow:0 0 1px $shadow-spinner; }
632
- 50% { -o-transform:rotate(145deg); opacity:1;}
633
- 100% { -o-transform:rotate(-320deg); opacity:0; }
634
- }
635
- @-o-keyframes spinoffPulse {
636
- 0% { -o-transform:rotate(0deg); }
637
- 100% { -o-transform:rotate(360deg); }
638
- }
639
- @-moz-keyframes spinPulse {
640
- 0% { -moz-transform:rotate(160deg); opacity:0; box-shadow:0 0 1px $shadow-spinner;}
641
- 50% { -moz-transform:rotate(145deg); opacity:1; }
642
- 100% { -moz-transform:rotate(-320deg); opacity:0; }
643
- }
644
- @-moz-keyframes spinoffPulse {
645
- 0% { -moz-transform:rotate(0deg); }
646
- 100% { -moz-transform:rotate(360deg); }
647
- }
648
- @-webkit-keyframes spinPulse {
649
- 0% { -webkit-transform:rotate(160deg); opacity:0; box-shadow:0 0 1px $shadow-spinner; }
650
- 50% { -webkit-transform:rotate(145deg); opacity:1;}
651
- 100% { -webkit-transform:rotate(-320deg); opacity:0; }
652
- }
653
- @-webkit-keyframes spinoffPulse {
654
- 0% { -webkit-transform:rotate(0deg); }
655
- 100% { -webkit-transform:rotate(360deg); }
656
- }
657
-
658
- /* Pagination */
659
- .beautiful_pagination {
660
- background: white;
661
- cursor: default;
662
- font-size:12px;
663
- margin-left:10px;
664
- }
665
- .beautiful_pagination a, .beautiful_pagination .previous_page, .beautiful_pagination .next_page{
666
- padding:4px 7px 5px 7px;
667
- display: block;
668
- float: left;
669
- margin-right: 1px;
670
-
671
- font-family:helvetica;
672
- text-decoration: none;
673
- color:$gradient-top;
674
- border:none;
675
- font-size:12px;
676
-
677
- @include border-radius(3px);
678
-
679
- border:1px solid $gradient-top;
680
- }
681
- .beautiful_pagination a:hover{
682
- color:black;
683
- border:1px solid black;
684
- }
685
- .beautiful_pagination .current{
686
- padding:4px 7px 5px 7px;
687
- display: block;
688
- float: left;
689
- margin-right: 1px;
690
-
691
- font-family:helvetica;
692
- text-decoration: none;
693
- color: #5BA000;
694
- border:none;
695
- font-size:12px;
696
- color:white;
697
-
698
- @include border-radius(3px);
699
- @include gradient($gradient-top,$gradient-bottom);
700
-
701
- border:1px solid $gradient-top;
702
- }
703
-
704
- .beautiful_pagination .previous_page, .beautiful_pagination .previous_page:hover,
705
- .beautiful_pagination .next_page, .beautiful_pagination .next_page:hover{
706
- border:none;
707
- }
708
- .beautiful_pagination .disabled{
709
- color:gray;
710
- }
711
- .beautiful_pagination .gap{
712
- padding:4px 7px 5px 7px;
713
- display: block;
714
- float: left;
715
- margin-right: 1px;
716
- }
717
- .markItUp .markItUpContainer .markItUpHeader a:hover{
718
- color:transparent;
719
- }