arctic_admin 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc7382812a5001ef59eb179f64ea47ca82d39b2b
4
- data.tar.gz: 5d1e23fe7dae71ec20b426f64d9e938fd1afd094
3
+ metadata.gz: 8dd901088a309ae82fb4edad8792fa1934f1062d
4
+ data.tar.gz: 913f8e49c869c63bfedefbc2b0d1b7a39f69fede
5
5
  SHA512:
6
- metadata.gz: d509ef3c0e178bb1837c0709358e92827590a368b8490a9466e936c89083dbf622f64665988035255d83a231f75a163bea1d5ac1167f10d5b7ede079a12a1b1d
7
- data.tar.gz: e3412df9b5579fda6a935257288c0f4f3152fb2343951895c8dd619304a962f5b535d2d72d1258008d670b8900bd79693451f565cf76c245fe7f50458d9b4280
6
+ metadata.gz: 63b9f81506283b5f7e30c1545e3982d24e3d69dc1a27adb72a9e552d623591c50f6a6e142fbd4bbf9d7ebb1ed7ecf1e67daebf14e9dc917ab8ac930b2f0fa250
7
+ data.tar.gz: a8b44c29ac5abdf90dff16691c34ef416f14e7cff790a001d9e3b4d99d922894ac91b0284a5e1053e0eab121d344009d85fee9aaa4d86d28ee6a0bd831143297
@@ -0,0 +1,96 @@
1
+ # ArcticAdmin
2
+ [![Gem Version](https://img.shields.io/gem/v/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
3
+ [![Gem Downloads](https://img.shields.io/gem/dt/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
4
+ [![Dependency Status](https://gemnasium.com/badges/github.com/cle61/arctic_admin.svg)](https://gemnasium.com/github.com/cle61/arctic_admin)
5
+
6
+ Simple theme for ActiveAdmin
7
+
8
+ Complete demo here : https://arctic-admin.herokuapp.com/
9
+
10
+ admin user : admin@example.com / password
11
+
12
+ ![Screenshot](doc/index.png)
13
+
14
+ ## Installation
15
+
16
+ Add this to your Gemfile:
17
+
18
+ ```ruby
19
+ gem 'arctic_admin'
20
+ ```
21
+
22
+ and run `bundle install`.
23
+
24
+ ## Usage
25
+
26
+ ### CSS
27
+
28
+ In your `active_admin.css`, include the css file:
29
+
30
+ ```css
31
+ /*
32
+ *= require arctic_admin
33
+ */
34
+ ```
35
+ Then restart your webserver if it was previously running.
36
+
37
+ ### Sass Support
38
+
39
+ If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
40
+ `active_admin.css.scss` file:
41
+
42
+ ```scss
43
+ @import "arctic_admin";
44
+ ```
45
+
46
+ If you use the
47
+ [Sass indented syntax](http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html),
48
+ add this to your `active_admin.css.sass` file:
49
+
50
+ ```sass
51
+ @import arctic_admin
52
+ ```
53
+
54
+ ### JS
55
+
56
+ In your `active_admin.js`, include the js file:
57
+
58
+ ```js
59
+ //= require active_admin/base
60
+ //= require arctic_admin
61
+ ```
62
+
63
+ ### Customization
64
+
65
+ For this, you need to use sass to custom the theme.
66
+
67
+ You can even change basic color of the theme by placing some other variables:
68
+
69
+ If you use the [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
70
+ `active_admin.css.scss` file:
71
+
72
+ ```scss
73
+ $primary-color: #2dbb43;
74
+
75
+ @import "arctic_admin";
76
+ ```
77
+
78
+ If you use the
79
+ [Sass indented syntax](http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html),
80
+ add this to your `active_admin.css.sass` file:
81
+
82
+ ```sass
83
+ $primary-color: #2dbb43
84
+
85
+ @import arctic_admin
86
+ ```
87
+
88
+ Then restart your webserver if it was previously running.
89
+
90
+ ## Contributing
91
+
92
+ 1. Fork it ( https://github.com/cle61/arctic_admin/fork )
93
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
94
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
95
+ 4. Push to the branch (`git push origin my-new-feature`)
96
+ 5. Create new Pull Request
@@ -1,3 +1,6 @@
1
+ //= require jquery
2
+ //= require jquery_ujs
3
+
1
4
  $(function() {
2
5
  $('#sidebar').click(function (e) {
3
6
  var position = $(this).position();
@@ -6,13 +9,63 @@ $(function() {
6
9
  if ($(this).css('right') == '0px') {
7
10
  $(this).animate({
8
11
  right: "-="+width
9
- }, 600, function() {});
12
+ }, 600, function() {
13
+ animationFilterDone = true;
14
+ });
10
15
  } else {
11
16
  $(this).animate({
12
17
  right: "+="+width
13
- }, 600, function() {});
18
+ }, 600, function() {
19
+ animationFilterDone = true;
20
+ });
14
21
  }
15
22
  }
16
23
  });
17
24
 
25
+ var animationDone = true;
26
+ $('#title_bar').click(function (e) {
27
+ if ($(window).width() < 960) {
28
+ var position = $(this).position();
29
+ var tabs = $('#tabs');
30
+ var width = tabs.width() + 1;
31
+
32
+ if (e.pageX < (position.left + 40)) {
33
+ if(animationDone == true) {
34
+ animationDone = false;
35
+ if (tabs.css('left') == '0px') {
36
+ tabs.animate({
37
+ left: "-="+width
38
+ }, 400, function() {
39
+ animationDone = true;
40
+ });
41
+ } else {
42
+ tabs.animate({
43
+ left: "+="+width
44
+ }, 400, function() {
45
+ animationDone = true;
46
+ });
47
+ }
48
+ }
49
+ }
50
+ }
51
+ });
52
+
53
+ $('body').click(function (e) {
54
+ if ($(window).width() < 960) {
55
+ var tabs = $('#tabs');
56
+ var width = tabs.width() + 1;
57
+ if (tabs.css('left') == '0px') {
58
+ if (e.pageX > width && e.pageY > 60) {
59
+ if(animationDone == true) {
60
+ animationDone = false;
61
+ tabs.animate({
62
+ left: "-="+width
63
+ }, 400, function() {
64
+ animationDone = true;
65
+ });
66
+ }
67
+ }
68
+ }
69
+ }
70
+ });
18
71
  });
@@ -1,6 +1,6 @@
1
1
  @import "reset";
2
2
  @import "fonts";
3
- @import "variables";
3
+ @import "variables/variables";
4
4
 
5
5
  @import "mixins/mixins";
6
6
 
@@ -27,6 +27,8 @@ body {
27
27
  font-family: "LatoWeb";
28
28
  background-color: $body-background;
29
29
  color: $text-color;
30
+ -webkit-font-smoothing: antialiased;
31
+ -moz-osx-font-smoothing: grayscale;
30
32
  }
31
33
 
32
34
  a {
@@ -11,6 +11,7 @@ html {
11
11
  html, body {
12
12
  padding: 0;
13
13
  margin: 0;
14
+ min-height: 100vh;
14
15
  }
15
16
 
16
17
  fieldset {
@@ -1 +1,2 @@
1
+ @import "font-awesome";
1
2
  @import "base";
@@ -45,6 +45,7 @@ input[type="text"], input[type="email"], input[type="password"], input[type="num
45
45
  }
46
46
 
47
47
  input[type="submit"] {
48
+ -webkit-appearance: none;
48
49
  @include primary-button($primary-color, white);
49
50
  width: 100%;
50
51
  padding: 0 12px;
@@ -55,6 +56,34 @@ input[type="submit"] {
55
56
  cursor: pointer;
56
57
  }
57
58
 
59
+ select {
60
+ background-color: #fff;
61
+ background-image: none;
62
+ border: 1px solid #e4eaec;
63
+ border-radius: 3px;
64
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
65
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
66
+ -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
67
+ -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
68
+ transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
69
+
70
+ &:focus {
71
+ border-color: #62a8ea;
72
+ -webkit-box-shadow: none;
73
+ box-shadow: none;
74
+ outline: 0;
75
+ -webkit-box-shadow: none;
76
+ box-shadow: none;
77
+ -webkit-transition: -webkit-box-shadow .25s linear,border .25s linear,color .25s linear,background-color .25s linear;
78
+ -o-transition: box-shadow .25s linear,border .25s linear,color .25s linear,background-color .25s linear;
79
+ transition: box-shadow .25s linear,border .25s linear,color .25s linear,background-color .25s linear;
80
+ }
81
+
82
+ &:-webkit-autofill {
83
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
84
+ }
85
+ }
86
+
58
87
  textarea {
59
88
  height: 80px;
60
89
  padding: 5px 10px;
@@ -11,11 +11,19 @@ thead th {
11
11
  font-weight: normal;
12
12
  width: 100%;
13
13
  display: inline-block;
14
- padding: 8px 20px 8px 8px;
14
+ padding: 4px 20px 4px 4px;
15
+
16
+ @media screen and (min-width: $md-width) {
17
+ padding: 8px 20px 8px 8px;
18
+ }
15
19
  }
16
20
 
17
21
  &.col-selectable {
18
- padding-left: 8px;
22
+ padding-left: 4px;
23
+
24
+ @media screen and (min-width: $md-width) {
25
+ padding-left: 8px;
26
+ }
19
27
  }
20
28
  }
21
29
 
@@ -33,7 +41,7 @@ tbody tr {
33
41
  }
34
42
 
35
43
  td {
36
- padding: 8px;
44
+ padding: 4px;
37
45
  line-height: 1.57142857;
38
46
  vertical-align: top;
39
47
  border-top: 1px solid #e4eaec;
@@ -43,5 +51,9 @@ tbody tr {
43
51
  &.col-actions {
44
52
  padding: 6px 8px;
45
53
  }
54
+
55
+ @media screen and (min-width: $md-width) {
56
+ padding: 8px;
57
+ }
46
58
  }
47
59
  }
@@ -1,15 +1,21 @@
1
1
  .admin_namespace {
2
- padding-left: $header-width;
3
2
  padding-top: 60px;
4
3
 
4
+ @media screen and (min-width: $md-width) {
5
+ padding-left: $header-width;
6
+ }
7
+
5
8
  @media screen and (min-width: $lg-width) {
6
9
  padding-left: $lg-header-width;
7
10
  }
8
11
 
9
12
  #active_admin_content {
10
- padding: 30px 25px;
11
-
13
+ padding: 30px 0;
12
14
  @include clear-fix();
15
+
16
+ @media screen and (min-width: $md-width) {
17
+ padding: 30px 25px;
18
+ }
13
19
  }
14
20
  }
15
21
 
@@ -116,9 +122,36 @@
116
122
  top: 0;
117
123
  left: $header-width;
118
124
  border-bottom: 1px solid $header-border-color;
119
- padding: 0 20px;
120
125
  z-index: 2;
121
126
 
127
+ @media screen and (min-width: $sm-width) {
128
+ padding: 0 20px 0 50px;
129
+
130
+ &:before {
131
+ @include icon("\f0c9");
132
+
133
+ display: inline;
134
+ visibility: visible;
135
+ cursor: pointer;
136
+ position: absolute;
137
+ top: 0;
138
+ left: 0;
139
+ color: $text-color;
140
+ padding: 20px 0;
141
+ text-align: center;
142
+ width: 40px;
143
+ font-size: 20px;
144
+ }
145
+ }
146
+
147
+ @media screen and (min-width: $md-width) {
148
+ padding: 0 20px;
149
+
150
+ &:before {
151
+ display: none;
152
+ }
153
+ }
154
+
122
155
  @media screen and (min-width: $lg-width) {
123
156
  width: $lg-screen-header-width;
124
157
  left: $lg-header-width;
@@ -8,14 +8,20 @@
8
8
  #active_admin_content.with_sidebar #main_content_wrapper {
9
9
  width: 100%;
10
10
 
11
- #main_content {
12
- margin-right: 20px;
11
+ @media screen and (min-width: $md-width) {
12
+ #main_content {
13
+ margin-right: 20px;
14
+ }
13
15
  }
14
16
  }
15
17
 
16
18
  #main_content {
17
19
  background-color: #fff;
18
- padding: 20px;
19
- border-radius: 3px;
20
20
  box-shadow: 0 0 4px 0 rgba(0,0,0,.04);
21
+ padding: 10px 5px;
22
+
23
+ @media screen and (min-width: $md-width) {
24
+ padding: 20px;
25
+ border-radius: 3px;
26
+ }
21
27
  }
@@ -3,11 +3,18 @@
3
3
  height: calc(100% - 60px);
4
4
  position: fixed;
5
5
  top: 60px;
6
- left: 0;
7
6
  background-color: $sidebar-background;
8
7
  border-right: 1px solid $sidebar-border-color;
9
8
  z-index: 1;
10
9
 
10
+ @media screen and (min-width: $sm-width) {
11
+ left: - $header-width;
12
+ }
13
+
14
+ @media screen and (min-width: $md-width) {
15
+ left: 0px;
16
+ }
17
+
11
18
  @media screen and (min-width: $lg-width) {
12
19
  width: $lg-header-width;
13
20
  }
@@ -41,10 +41,15 @@ body.index {
41
41
 
42
42
  &:after {
43
43
  @include icon("\f0dc");
44
+ font-size: 12px;
44
45
  position: absolute;
45
46
  top: 50%;
46
47
  right: 5px;
47
48
  @include transform(translateY(-50%));
49
+
50
+ @media screen and (min-width: $md-width) {
51
+ font-size: 14px/1;
52
+ }
48
53
  }
49
54
 
50
55
  &.sorted-desc:after {
@@ -1,7 +1,8 @@
1
1
  // BASIC COLOR
2
- $red: #b34247;
3
- $green: #2dbb43;
2
+ $red: #B02B2C;
3
+ $green: #00897B;
4
4
  $blue: #4bacfe;
5
+ $black: #36393D;
5
6
 
6
7
  $error: #f96868;
7
8
  $warning: #f2a654;
@@ -30,17 +31,4 @@ $sidebar-nested-item-hover-background: #e7e7e7 !default;
30
31
  $text-color: #5a5a5a !default;
31
32
  $text-color-important: #526069 !default;
32
33
 
33
- $primary-color: $blue !default;
34
-
35
- // SIZE
36
- $header-width: 200px !default;
37
- $screen-header-width: calc(100% - 200px) !default;
38
- $lg-header-width: 250px !default;
39
- $lg-screen-header-width: calc(100% - 250px) !default;
40
-
41
- $filter-width: 230px !default;
42
- $screen-filter-width: calc(100% - 230px) !default;
43
- $lg-filter-width: 270px !default;
44
- $lg-screen-filter-width: calc(100% - 270px) !default;
45
-
46
- $lg-width: 1300px;
34
+ $primary-color: $green !default;
@@ -0,0 +1,3 @@
1
+ $sm-width: 768px;
2
+ $md-width: 960px;
3
+ $lg-width: 1300px;
@@ -0,0 +1,9 @@
1
+ $header-width: 200px !default;
2
+ $screen-header-width: calc(100% - 200px) !default;
3
+ $lg-header-width: 250px !default;
4
+ $lg-screen-header-width: calc(100% - 250px) !default;
5
+
6
+ $filter-width: 230px !default;
7
+ $screen-filter-width: calc(100% - 230px) !default;
8
+ $lg-filter-width: 270px !default;
9
+ $lg-screen-filter-width: calc(100% - 270px) !default;
@@ -0,0 +1,3 @@
1
+ @import "colors";
2
+ @import "size";
3
+ @import "media_queries";
@@ -1,3 +1,4 @@
1
+ require 'font-awesome-rails'
1
2
  require 'arctic_admin/active_admin/views/pages/bases'
2
3
 
3
4
  module ArcticAdmin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arctic_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clément Prod'homme
@@ -38,17 +38,42 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: jquery-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: font-awesome-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  description: A simple theme for Active Admin
42
70
  email:
43
71
  executables: []
44
72
  extensions: []
45
73
  extra_rdoc_files: []
46
74
  files:
47
- - ".gitignore"
48
- - Gemfile
49
75
  - LICENCE.txt
50
- - README.md
51
- - app/assets/.DS_Store
76
+ - Readme.md
52
77
  - app/assets/fonts/Lato-Black.eot
53
78
  - app/assets/fonts/Lato-Black.ttf
54
79
  - app/assets/fonts/Lato-Black.woff
@@ -121,14 +146,10 @@ files:
121
146
  - app/assets/fonts/Lato-ThinItalic.ttf
122
147
  - app/assets/fonts/Lato-ThinItalic.woff
123
148
  - app/assets/fonts/Lato-ThinItalic.woff2
124
- - app/assets/images/.keep
125
- - app/assets/javascripts/.DS_Store
126
149
  - app/assets/javascripts/arctic_admin.js
127
- - app/assets/stylesheets/.DS_Store
128
150
  - app/assets/stylesheets/_base.scss
129
151
  - app/assets/stylesheets/_fonts.scss
130
152
  - app/assets/stylesheets/_reset.scss
131
- - app/assets/stylesheets/_variables.scss
132
153
  - app/assets/stylesheets/arctic_admin.scss
133
154
  - app/assets/stylesheets/components/_date_picker.scss
134
155
  - app/assets/stylesheets/components/_flash.scss
@@ -149,13 +170,11 @@ files:
149
170
  - app/assets/stylesheets/pages/_index.scss
150
171
  - app/assets/stylesheets/pages/_login.scss
151
172
  - app/assets/stylesheets/pages/_show.scss
173
+ - app/assets/stylesheets/variables/_colors.scss
174
+ - app/assets/stylesheets/variables/_media_queries.scss
175
+ - app/assets/stylesheets/variables/_size.scss
176
+ - app/assets/stylesheets/variables/_variables.scss
152
177
  - app/views/layouts/active_admin_logged_out.html.erb
153
- - arctic_admin.gemspec
154
- - doc/.DS_Store
155
- - doc/dashboard.png
156
- - doc/index.png
157
- - doc/login.png
158
- - doc/show.png
159
178
  - lib/arctic_admin.rb
160
179
  - lib/arctic_admin/active_admin/views/pages/bases.rb
161
180
  homepage: https://github.com/cle61/arctic_admin
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- gemfiles/*.lock
5
- pkg/*
6
- vendor/ruby
7
- gemfiles/vendor/ruby
8
- .rbenv-version
9
- .sass-cache
data/Gemfile DELETED
@@ -1 +0,0 @@
1
- source 'https://rubygems.org'
data/README.md DELETED
@@ -1,77 +0,0 @@
1
- # ArcticAdmin
2
- [![Gem Version](https://img.shields.io/gem/v/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
3
-
4
- Simple theme for ActiveAdmin
5
-
6
- Complete demo here : https://arctic-admin.herokuapp.com/
7
-
8
- admin user : admin@example.com / password
9
-
10
- ## Installation
11
-
12
- add the following lines to your application's Gemfile:
13
- ```
14
- gem 'font-awesome-rails'
15
- gem 'arctic_admin'
16
- ```
17
-
18
- ## Screens
19
-
20
- <table>
21
- <tr>
22
- <td>
23
- <a href="./doc/login.png"><img src="./doc/login.png"></a>
24
- </td>
25
- <td>
26
- <a href="./doc/dashboard.png"><img src="./doc/dashboard.png"></a>
27
- </td>
28
- </tr>
29
- <tr>
30
- <td>
31
- <a href="./doc/index.png"><img src="./doc/index.png"></a>
32
- </td>
33
- <td>
34
- <a href="./doc/show.png"><img src="./doc/show.png"></a>
35
- </td>
36
- </tr>
37
- </table>
38
-
39
- ## Usage
40
-
41
- include arctic admin css
42
-
43
- ```
44
- # active_admin.css.scss
45
-
46
- @import "font-awesome";
47
- @import "arctic_admin";
48
- ```
49
-
50
- include arctic admin js
51
-
52
- ```
53
- # active_admin.js
54
-
55
- //= require jquery
56
- //= require jquery_ujs
57
- //= require active_admin/base
58
- //= require arctic_admin
59
- ```
60
-
61
- You can even change basic color of the theme by placing some other variables:
62
-
63
- ```
64
- # active_admin.css.scss
65
-
66
- $primary-color: #2dbb43;
67
-
68
- @import "arctic_admin";
69
- ```
70
-
71
- ## Contributing
72
-
73
- 1. Fork it ( https://github.com/cle61/arctic_admin/fork )
74
- 2. Create your feature branch (`git checkout -b my-new-feature`)
75
- 3. Commit your changes (`git commit -am 'Add some feature'`)
76
- 4. Push to the branch (`git push origin my-new-feature`)
77
- 5. Create new Pull Request
Binary file
File without changes
@@ -1,14 +0,0 @@
1
- Gem::Specification.new do |s|
2
- s.name = 'arctic_admin'
3
- s.version = '1.0.4'
4
- s.date = '2017-02-05'
5
- s.summary = "Arctic Admin theme for ActiveAdmin"
6
- s.description = "A simple theme for Active Admin"
7
- s.authors = ["Clément Prod'homme"]
8
- s.files = `git ls-files -z`.split("\x0")
9
- s.homepage = 'https://github.com/cle61/arctic_admin'
10
- s.license = 'MIT'
11
- s.require_paths = ["lib"]
12
- s.add_development_dependency "bundler", "~> 1.5"
13
- s.add_development_dependency "rake"
14
- end
Binary file
Binary file
Binary file
Binary file
Binary file