responsive_active_admin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1d32e6e938bb78d3dc14ab5704b1f9c77bcf9d2a
4
+ data.tar.gz: a1b291c0bbeeeb9f8d65233b4a0a6ba2b6c56552
5
+ SHA512:
6
+ metadata.gz: bfcd3aab7a3e976c77a37692f13af3533b14d4095888b7e9a7d1c38f011669a35b1cca7c358c688b371cc3e7fa2257ff98ee0cb4addc3b7af819579c6150eefb
7
+ data.tar.gz: 244e794b2fa11d941925c61048f7a61ddb4e39733555ea0936b1daf10c143eb1c46491512db9f390c3fe170a2849dc7bed58752ba5b3abe5fb2211e00f77d45a
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,13 @@
1
+ Responsive ActiveAdmin
2
+ ======================
3
+
4
+ Responsive design for ActiveAdmin.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ In `app/assets/stylesheets/active_admin.css.scss`
10
+
11
+ @import "responsive_active_admin"
12
+
13
+ Released under the MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'ResponsiveActiveAdmin'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,5 @@
1
+ .with_sidebar .blank_slate_container .blank_slate {
2
+ @include responsive {
3
+ margin-top: 20px;
4
+ }
5
+ }
@@ -0,0 +1,7 @@
1
+ @include responsive {
2
+ .column {
3
+ float: none;
4
+ // Since columns are sized on the element, we have to be forceful.
5
+ width: 100% !important;
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ // Index Footer (Under Table)
2
+ #index_footer {
3
+ @include responsive {
4
+ text-align: left;
5
+ }
6
+ }
@@ -0,0 +1,49 @@
1
+ form {
2
+ fieldset {
3
+ ol > li {
4
+ label {
5
+ @include responsive {
6
+ width: 100%;
7
+ }
8
+ }
9
+ }
10
+ }
11
+
12
+ /* Nested Fieldsets and Legends */
13
+ fieldset > ol > li {
14
+ fieldset {
15
+ legend {
16
+ @include responsive {
17
+ position: static;
18
+ width: 100%;
19
+ }
20
+
21
+ &.label label {
22
+ @include responsive {
23
+ position: static;
24
+ float: none;
25
+ }
26
+ }
27
+ }
28
+
29
+ &:not(.has_many_fields) ol {
30
+ @include responsive {
31
+ width: 80%;
32
+ }
33
+ }
34
+ }
35
+ }
36
+
37
+ /* Text Fields */
38
+ input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], input[type=tel], textarea {
39
+ @include responsive {
40
+ width: calc(100% - #{$text-input-total-padding});
41
+ }
42
+ }
43
+
44
+ select {
45
+ @include responsive {
46
+ width: 100%;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,34 @@
1
+ #header {
2
+ @include responsive {
3
+ box-sizing: border-box;
4
+
5
+ display: block;
6
+ height: auto;
7
+
8
+ padding: 10px 22px;
9
+ }
10
+
11
+ ul.tabs {
12
+ @include responsive {
13
+ display: block;
14
+ }
15
+
16
+ & > li {
17
+ @include responsive {
18
+ display: block;
19
+ }
20
+ }
21
+ }
22
+
23
+ #utility_nav {
24
+ @include responsive {
25
+ text-align: left;
26
+ }
27
+
28
+ li {
29
+ @include responsive {
30
+ display: block;
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,39 @@
1
+ body.logged_out {
2
+ #content_wrapper{
3
+ @include responsive {
4
+ width: auto;
5
+ margin: 0;
6
+ }
7
+ }
8
+
9
+ h2 {
10
+ @include section-header;
11
+ @include primary-gradient;
12
+ @include text-shadow(#000);
13
+ box-shadow: 0 1px 3px rgba(0,0,0,0.3);
14
+ border: none;
15
+ color: #fff;
16
+ margin: -13px -30px 20px -30px;
17
+ }
18
+
19
+ #login {
20
+ /* Login Form */
21
+ form {
22
+ fieldset {
23
+ @include no-shadow;
24
+ background: none;
25
+ padding: 0;
26
+ li { padding: 10px 0; }
27
+
28
+ input[type=text], input[type=email], input[type=password] {
29
+ width: 70%;
30
+ }
31
+ &.buttons { margin-left: 20%; }
32
+ margin-bottom: 0;
33
+ }
34
+ }
35
+
36
+ a { float: right; margin-top: -32px; }
37
+ }
38
+
39
+ }
@@ -0,0 +1,27 @@
1
+ .index #wrapper {
2
+ @include responsive {
3
+ display: block;
4
+ }
5
+ }
6
+
7
+ #active_admin_content {
8
+ #main_content_wrapper {
9
+ @include responsive {
10
+ float: none;
11
+
12
+ #main_content {
13
+ margin-right: inherit;
14
+ }
15
+ }
16
+ }
17
+
18
+ #sidebar {
19
+ @include responsive {
20
+ float: none;
21
+ width: 100%;
22
+
23
+ margin-top: 20px;
24
+ margin-left: inherit;
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,11 @@
1
+ .pagination_information {
2
+ @include responsive {
3
+ float: none;
4
+ }
5
+ }
6
+
7
+ .download_links {
8
+ @include responsive {
9
+ float: none;
10
+ }
11
+ }
@@ -0,0 +1,9 @@
1
+ $active-admin-responsive: true !default;
2
+ $active-admin-responsive-width: 480px !default;
3
+ $active-admin-flip-table: true !default;
4
+
5
+ @mixin responsive {
6
+ @media only screen and (max-width: $active-admin-responsive-width) {
7
+ @content;
8
+ }
9
+ }
@@ -0,0 +1,74 @@
1
+ // Index Tables
2
+ table.index_table {
3
+ @if $active-admin-flip-table {
4
+ // Based around: http://elvery.net/demo/responsive-tables/#flip-scroll
5
+ @include responsive {
6
+ display: block;
7
+ position: relative;
8
+
9
+ th, td {
10
+ margin: 0;
11
+ vertical-align: top;
12
+
13
+ border-left: 0;
14
+ border-top: solid 1px #e6e6e6;
15
+
16
+ height: 1.5em;
17
+ padding: 5px 10px 3px 10px;
18
+ }
19
+
20
+ th {
21
+ display: block;
22
+ text-align: right;
23
+
24
+ & > * {
25
+ text-overflow: ellipsis;
26
+ overflow: hidden;
27
+ }
28
+ }
29
+
30
+ td {
31
+ display: block;
32
+
33
+ text-align: left;
34
+ border-right: 0;
35
+ }
36
+
37
+ thead {
38
+ display: block;
39
+ float: left;
40
+
41
+ max-width: 40%;
42
+
43
+ tr {
44
+ display: block;
45
+ }
46
+ }
47
+
48
+ tbody {
49
+ display: block;
50
+
51
+ width: auto;
52
+ position: relative;
53
+
54
+ overflow-x: auto;
55
+ overflow-y: hidden;
56
+
57
+ white-space: nowrap;
58
+
59
+ font-size: 0; /* remove space between rows */
60
+
61
+ tr {
62
+ font-size: 11.5px;
63
+
64
+ display: inline-block;
65
+ vertical-align: top;
66
+ }
67
+ }
68
+
69
+ th:last-child, td:last-child {
70
+ border-bottom: 1px solid #d4d4d4;
71
+ }
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,14 @@
1
+ #title_bar {
2
+ #titlebar_left, #titlebar_right {
3
+ @include responsive {
4
+ display: block;
5
+ }
6
+ }
7
+
8
+ #titlebar_right {
9
+ @include responsive {
10
+ text-align: left;
11
+ margin-top: 10px;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,11 @@
1
+ @import "responsive_active_admin/responsive";
2
+ @import "responsive_active_admin/blank_slates";
3
+ @import "responsive_active_admin/columns";
4
+ @import "responsive_active_admin/footer";
5
+ @import "responsive_active_admin/forms";
6
+ @import "responsive_active_admin/header";
7
+ @import "responsive_active_admin/main_structure";
8
+ @import "responsive_active_admin/pagination";
9
+ @import "responsive_active_admin/tables";
10
+ @import "responsive_active_admin/title_bar";
11
+ @import "responsive_active_admin/logged_out";
@@ -0,0 +1,40 @@
1
+ <%# NB: This is a copy of ActiveAdmin's layout, but with the meta viewport tag included %>
2
+ <!DOCTYPE html>
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+
7
+ <title><%= [@page_title, render_or_call_method_or_proc_on(self, ActiveAdmin.application.site_title)].compact.join(" | ") %></title>
8
+
9
+ <% ActiveAdmin.application.stylesheets.each do |style, options| %>
10
+ <%= stylesheet_link_tag style, options %>
11
+ <% end %>
12
+ <% ActiveAdmin.application.javascripts.each do |path| %>
13
+ <%= javascript_include_tag path %>
14
+ <% end %>
15
+
16
+ <%= favicon_link_tag ActiveAdmin.application.favicon if ActiveAdmin.application.favicon %>
17
+
18
+ <%= csrf_meta_tag %>
19
+
20
+ <meta name='viewport' content='width=device-width, initial-scale=1'>
21
+ </head>
22
+ <body class="active_admin logged_out <%= controller.action_name %>">
23
+ <div id="wrapper">
24
+
25
+ <div id="content_wrapper">
26
+ <% if active_admin_flash_messages.any? %>
27
+ <% active_admin_flash_messages.each do |type, message| %>
28
+ <%= content_tag :div, message, :class => "flash flash_#{type}" %>
29
+ <% end %>
30
+ <% end %>
31
+ <div id="active_admin_content">
32
+ <%= yield %>
33
+ </div>
34
+ </div>
35
+ <div id="footer">
36
+ <%= yield :footer %>
37
+ </div>
38
+ </div>
39
+ </body>
40
+ </html>
@@ -0,0 +1,16 @@
1
+ module ActiveAdmin
2
+ module Views
3
+ module Pages
4
+ class Base < Arbre::HTML::Document
5
+ alias_method :_build_active_admin_head, :build_active_admin_head
6
+ def build_active_admin_head
7
+ _build_active_admin_head
8
+
9
+ within @head do
10
+ meta name: 'viewport', content: 'width=device-width, initial-scale=1'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,6 @@
1
+ module ResponsiveActiveAdmin
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module ResponsiveActiveAdmin
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,5 @@
1
+ require 'responsive_active_admin/engine'
2
+ require 'responsive_active_admin/active_admin/views/pages/base'
3
+
4
+ module ResponsiveActiveAdmin
5
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: responsive_active_admin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Hayden Ball
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activeadmin
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Responsive styles for ActiveAdmin
28
+ email:
29
+ - hayden@haydenball.me.uk
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - MIT-LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - app/assets/stylesheets/responsive_active_admin.css.scss
38
+ - app/assets/stylesheets/responsive_active_admin/_blank_slates.css.scss
39
+ - app/assets/stylesheets/responsive_active_admin/_columns.css.scss
40
+ - app/assets/stylesheets/responsive_active_admin/_footer.scss
41
+ - app/assets/stylesheets/responsive_active_admin/_forms.css.scss
42
+ - app/assets/stylesheets/responsive_active_admin/_header.css.scss
43
+ - app/assets/stylesheets/responsive_active_admin/_logged_out.css.scss
44
+ - app/assets/stylesheets/responsive_active_admin/_main_structure.scss
45
+ - app/assets/stylesheets/responsive_active_admin/_pagination.css.scss
46
+ - app/assets/stylesheets/responsive_active_admin/_responsive.css.scss
47
+ - app/assets/stylesheets/responsive_active_admin/_tables.css.scss
48
+ - app/assets/stylesheets/responsive_active_admin/_title_bar.scss
49
+ - app/views/layouts/active_admin_logged_out.html.erb
50
+ - lib/responsive_active_admin.rb
51
+ - lib/responsive_active_admin/active_admin/views/pages/base.rb
52
+ - lib/responsive_active_admin/engine.rb
53
+ - lib/responsive_active_admin/version.rb
54
+ homepage: http://github.com/ball-hayden/responsive_active_admin
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.2.2
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Responsive styles for ActiveAdmin
78
+ test_files: []