smart-admin-page 0.1.0

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.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +41 -0
  9. data/Rakefile +6 -0
  10. data/app/assets/images/landing/avatar1.jpg +0 -0
  11. data/app/assets/images/landing/avatar2.jpg +0 -0
  12. data/app/assets/images/landing/avatar3.jpg +0 -0
  13. data/app/assets/images/landing/avatar4.jpg +0 -0
  14. data/app/assets/images/landing/avatar5.jpg +0 -0
  15. data/app/assets/images/landing/avatar6.jpg +0 -0
  16. data/app/assets/images/landing/avatar7.jpg +0 -0
  17. data/app/assets/images/landing/avatar8.jpg +0 -0
  18. data/app/assets/images/landing/avatar9.jpg +0 -0
  19. data/app/assets/images/landing/avatar_all.png +0 -0
  20. data/app/assets/images/landing/dashboard.png +0 -0
  21. data/app/assets/images/landing/header_one.jpg +0 -0
  22. data/app/assets/images/landing/header_two.jpg +0 -0
  23. data/app/assets/images/landing/iphone.jpg +0 -0
  24. data/app/assets/images/landing/laptop.png +0 -0
  25. data/app/assets/images/landing/perspective.png +0 -0
  26. data/app/assets/images/landing/shattered.png +0 -0
  27. data/app/assets/images/landing/word_map.png +0 -0
  28. data/app/assets/images/patterns/header-profile-skin-1.png +0 -0
  29. data/app/assets/images/patterns/header-profile-skin-2.png +0 -0
  30. data/app/assets/images/patterns/header-profile-skin-3.png +0 -0
  31. data/app/assets/images/patterns/header-profile.png +0 -0
  32. data/app/assets/images/patterns/otis_redding.png +0 -0
  33. data/app/assets/images/patterns/shattered.png +0 -0
  34. data/app/assets/javascripts/inspinia.js +270 -0
  35. data/app/assets/javascripts/smart-admin-page.js +9 -0
  36. data/app/assets/stylesheets/smart-admin-page.scss +6 -0
  37. data/app/assets/stylesheets/smart-admin-page/base/badgets_labels.scss +66 -0
  38. data/app/assets/stylesheets/smart-admin-page/base/base.scss +1298 -0
  39. data/app/assets/stylesheets/smart-admin-page/base/buttons.scss +306 -0
  40. data/app/assets/stylesheets/smart-admin-page/base/chat.scss +126 -0
  41. data/app/assets/stylesheets/smart-admin-page/base/custom.scss +14 -0
  42. data/app/assets/stylesheets/smart-admin-page/base/elements.scss +2341 -0
  43. data/app/assets/stylesheets/smart-admin-page/base/landing.scss +636 -0
  44. data/app/assets/stylesheets/smart-admin-page/base/md-skin.scss +388 -0
  45. data/app/assets/stylesheets/smart-admin-page/base/media.scss +103 -0
  46. data/app/assets/stylesheets/smart-admin-page/base/metismenu.scss +81 -0
  47. data/app/assets/stylesheets/smart-admin-page/base/mixins.scss +0 -0
  48. data/app/assets/stylesheets/smart-admin-page/base/navigation.scss +501 -0
  49. data/app/assets/stylesheets/smart-admin-page/base/pages.scss +1318 -0
  50. data/app/assets/stylesheets/smart-admin-page/base/rtl.scss +267 -0
  51. data/app/assets/stylesheets/smart-admin-page/base/sidebar.scss +201 -0
  52. data/app/assets/stylesheets/smart-admin-page/base/skins.scss +460 -0
  53. data/app/assets/stylesheets/smart-admin-page/base/spinners.scss +760 -0
  54. data/app/assets/stylesheets/smart-admin-page/base/theme-config.scss +111 -0
  55. data/app/assets/stylesheets/smart-admin-page/base/top_navigation.scss +128 -0
  56. data/app/assets/stylesheets/smart-admin-page/base/typography.scss +32 -0
  57. data/app/assets/stylesheets/smart-admin-page/base/variables.scss +41 -0
  58. data/app/assets/stylesheets/smart-admin-page/style.scss +51 -0
  59. data/bin/console +14 -0
  60. data/bin/setup +8 -0
  61. data/lib/smart/admin/page.rb +9 -0
  62. data/lib/smart/admin/page/version.rb +7 -0
  63. data/smart-admin-page.gemspec +33 -0
  64. metadata +246 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c94b4f4d777281340ba98220e94624163e59b706
4
+ data.tar.gz: 103131035e85f5b9c1975982e5b4a5d80da5f4ca
5
+ SHA512:
6
+ metadata.gz: 3bbdd78c7883f1256dc0a360323498e53c285b90737a409e3e39c14b72ed9613fa289b6e231f0b5f5389a8ca67dd69f245b328f5b771872f6042023aaf1bd2bb
7
+ data.tar.gz: ee574e38ecaf154cdf858a87b1428fb83c476ca79521d132059432fa6ed995624a7d82b138ea705983087663160af2f5fbd35bcd70f966cebc801882cb37736e
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 1.14.6
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at yohei.senju@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in smart-admin-page.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Yohei Senju
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,41 @@
1
+ # Smart::Admin::Page
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/smart/admin/page`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'smart-admin-page'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install smart-admin-page
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/smart-admin-page. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,270 @@
1
+ /*
2
+ *
3
+ * INSPINIA - Responsive Admin Theme
4
+ * version 2.3
5
+ *
6
+ */
7
+
8
+ $(document).ready(function () {
9
+ $(function() {
10
+ $('.i-checks').iCheck({
11
+ checkboxClass: 'icheckbox_square-green',
12
+ radioClass: 'iradio_square-green',
13
+ });
14
+ });
15
+
16
+ // Add body-small class if window less than 768px
17
+ if ($(this).width() < 769) {
18
+ $('body').addClass('body-small')
19
+ } else {
20
+ $('body').removeClass('body-small')
21
+ }
22
+
23
+ // MetsiMenu
24
+ $('#side-menu').metisMenu();
25
+
26
+ // Collapse ibox function
27
+ $('.collapse-link').click( function() {
28
+ var ibox = $(this).closest('div.ibox');
29
+ var button = $(this).find('i');
30
+ var content = ibox.find('div.ibox-content');
31
+ content.slideToggle(200);
32
+ button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
33
+ ibox.toggleClass('').toggleClass('border-bottom');
34
+ setTimeout(function () {
35
+ ibox.resize();
36
+ ibox.find('[id^=map-]').resize();
37
+ }, 50);
38
+ });
39
+
40
+ // Close ibox function
41
+ $('.close-link').click( function() {
42
+ var content = $(this).closest('div.ibox');
43
+ content.remove();
44
+ });
45
+
46
+ // Fullscreen ibox function
47
+ $('.fullscreen-link').click(function() {
48
+ var ibox = $(this).closest('div.ibox');
49
+ var button = $(this).find('i');
50
+ $('body').toggleClass('fullscreen-ibox-mode');
51
+ button.toggleClass('fa-expand').toggleClass('fa-compress');
52
+ ibox.toggleClass('fullscreen');
53
+ setTimeout(function() {
54
+ $(window).trigger('resize');
55
+ }, 100);
56
+ });
57
+
58
+ // Close menu in canvas mode
59
+ $('.close-canvas-menu').click( function() {
60
+ $("body").toggleClass("mini-navbar");
61
+ SmoothlyMenu();
62
+ });
63
+
64
+ // Open close right sidebar
65
+ $('.right-sidebar-toggle').click(function(){
66
+ $('#right-sidebar').toggleClass('sidebar-open');
67
+ });
68
+
69
+ // Initialize slimscroll for right sidebar
70
+ $('.sidebar-container').slimScroll({
71
+ height: '100%',
72
+ railOpacity: 0.4,
73
+ wheelStep: 10
74
+ });
75
+
76
+ // Open close small chat
77
+ $('.open-small-chat').click(function(){
78
+ $(this).children().toggleClass('fa-comments').toggleClass('fa-remove');
79
+ $('.small-chat-box').toggleClass('active');
80
+ });
81
+
82
+ // Initialize slimscroll for small chat
83
+ $('.small-chat-box .content').slimScroll({
84
+ height: '234px',
85
+ railOpacity: 0.4
86
+ });
87
+
88
+ // Small todo handler
89
+ $('.check-link').click( function(){
90
+ var button = $(this).find('i');
91
+ var label = $(this).next('span');
92
+ button.toggleClass('fa-check-square').toggleClass('fa-square-o');
93
+ label.toggleClass('todo-completed');
94
+ return false;
95
+ });
96
+
97
+ // Minimalize menu
98
+ $('.navbar-minimalize').click(function () {
99
+ $("body").toggleClass("mini-navbar");
100
+ SmoothlyMenu();
101
+
102
+ });
103
+
104
+ // Tooltips demo
105
+ $('.tooltip-demo').tooltip({
106
+ selector: "[data-toggle=tooltip]",
107
+ container: "body"
108
+ });
109
+
110
+ // Move modal to body
111
+ // Fix Bootstrap backdrop issu with animation.css
112
+ // bootsy don't work underline.
113
+ // $('.modal').appendTo("body");
114
+
115
+ // Full height of sidebar
116
+ function fix_height() {
117
+ var heightWithoutNavbar = $("body > #wrapper").height() - 61;
118
+ $(".sidebard-panel").css("min-height", heightWithoutNavbar + "px");
119
+
120
+ var navbarHeigh = $('nav.navbar-default').height();
121
+ var wrapperHeigh = $('#page-wrapper').height();
122
+
123
+ if(navbarHeigh > wrapperHeigh){
124
+ $('#page-wrapper').css("min-height", navbarHeigh + "px");
125
+ }
126
+
127
+ if(navbarHeigh < wrapperHeigh){
128
+ $('#page-wrapper').css("min-height", $(window).height() + "px");
129
+ }
130
+
131
+ if ($('body').hasClass('fixed-nav')) {
132
+ $('#page-wrapper').css("min-height", $(window).height() - 60 + "px");
133
+ }
134
+
135
+ }
136
+ fix_height();
137
+
138
+ // Fixed Sidebar
139
+ $(window).bind("load", function () {
140
+ if ($("body").hasClass('fixed-sidebar')) {
141
+ $('.sidebar-collapse').slimScroll({
142
+ height: '100%',
143
+ railOpacity: 0.9
144
+ });
145
+ }
146
+ })
147
+
148
+ // Move right sidebar top after scroll
149
+ $(window).scroll(function(){
150
+ if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav') ) {
151
+ $('#right-sidebar').addClass('sidebar-top');
152
+ } else {
153
+ $('#right-sidebar').removeClass('sidebar-top');
154
+ }
155
+ });
156
+
157
+ $(window).bind("load resize scroll", function() {
158
+ if(!$("body").hasClass('body-small')) {
159
+ fix_height();
160
+ }
161
+ });
162
+
163
+ $("[data-toggle=popover]")
164
+ .popover();
165
+
166
+ // Add slimscroll to element
167
+ $('.full-height-scroll').slimscroll({
168
+ height: '100%'
169
+ })
170
+ });
171
+
172
+
173
+ // Minimalize menu when screen is less than 768px
174
+ $(window).bind("resize", function () {
175
+ if ($(this).width() < 769) {
176
+ $('body').addClass('body-small')
177
+ } else {
178
+ $('body').removeClass('body-small')
179
+ }
180
+ });
181
+
182
+ // Local Storage functions
183
+ // Set proper body class and plugins based on user configuration
184
+ $(document).ready(function() {
185
+ if (localStorageSupport) {
186
+
187
+ var collapse = localStorage.getItem("collapse_menu");
188
+ var fixedsidebar = localStorage.getItem("fixedsidebar");
189
+ var fixednavbar = localStorage.getItem("fixednavbar");
190
+ var boxedlayout = localStorage.getItem("boxedlayout");
191
+ var fixedfooter = localStorage.getItem("fixedfooter");
192
+
193
+ var body = $('body');
194
+
195
+ if (fixedsidebar == 'on') {
196
+ body.addClass('fixed-sidebar');
197
+ $('.sidebar-collapse').slimScroll({
198
+ height: '100%',
199
+ railOpacity: 0.9
200
+ });
201
+ }
202
+
203
+ if (collapse == 'on') {
204
+ if(body.hasClass('fixed-sidebar')) {
205
+ if(!body.hasClass('body-small')) {
206
+ body.addClass('mini-navbar');
207
+ }
208
+ } else {
209
+ if(!body.hasClass('body-small')) {
210
+ body.addClass('mini-navbar');
211
+ }
212
+
213
+ }
214
+ }
215
+
216
+ if (fixednavbar == 'on') {
217
+ $(".navbar-static-top").removeClass('navbar-static-top').addClass('navbar-fixed-top');
218
+ body.addClass('fixed-nav');
219
+ }
220
+
221
+ if (boxedlayout == 'on') {
222
+ body.addClass('boxed-layout');
223
+ }
224
+
225
+ if (fixedfooter == 'on') {
226
+ $(".footer").addClass('fixed');
227
+ }
228
+ }
229
+ });
230
+
231
+ // check if browser support HTML5 local storage
232
+ function localStorageSupport() {
233
+ return (('localStorage' in window) && window['localStorage'] !== null)
234
+ }
235
+
236
+ // For demo purpose - animation css script
237
+ function animationHover(element, animation){
238
+ element = $(element);
239
+ element.hover(
240
+ function() {
241
+ element.addClass('animated ' + animation);
242
+ },
243
+ function(){
244
+ //wait for animation to finish before removing classes
245
+ window.setTimeout( function(){
246
+ element.removeClass('animated ' + animation);
247
+ }, 2000);
248
+ });
249
+ }
250
+
251
+ function SmoothlyMenu() {
252
+ if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
253
+ // Hide menu in order to smoothly turn on when maximize menu
254
+ $('#side-menu').hide();
255
+ // For smoothly turn on menu
256
+ setTimeout(
257
+ function () {
258
+ $('#side-menu').fadeIn(500);
259
+ }, 100);
260
+ } else if ($('body').hasClass('fixed-sidebar')) {
261
+ $('#side-menu').hide();
262
+ setTimeout(
263
+ function () {
264
+ $('#side-menu').fadeIn(500);
265
+ }, 300);
266
+ } else {
267
+ // Remove all inline style from jquery fadeIn function to reset menu state
268
+ $('#side-menu').removeAttr('style');
269
+ }
270
+ }