diff --git a/Gemfile b/Gemfile index 65588e0..7713904 100644 --- a/Gemfile +++ b/Gemfile @@ -37,6 +37,9 @@ gem 'high_voltage', '~> 2.1.0' gem 'clearance' gem 'paperclip' gem 'aws-sdk' +gem 'chartkick' +gem 'groupdate' +gem 'rails_admin' group :doc do # bundle exec rake doc:rails generates the API under doc/api. diff --git a/Gemfile.lock b/Gemfile.lock index bd6316d..4fce5c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,6 +39,7 @@ GEM sass (>= 3.2.0) thor builder (3.1.4) + chartkick (1.2.4) clearance (1.2.1) bcrypt email_validator (~> 1.4) @@ -61,6 +62,12 @@ GEM activemodel erubis (2.7.0) execjs (2.0.2) + font-awesome-rails (4.0.3.1) + railties (>= 3.2, < 5.0) + groupdate (2.1.0) + activerecord (>= 3.0.0) + haml (4.0.5) + tilt high_voltage (2.1.0) hike (1.2.3) i18n (0.6.9) @@ -70,7 +77,12 @@ GEM jquery-rails (3.1.0) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) + jquery-ui-rails (4.2.0) + railties (>= 3.2.16) json (1.8.1) + kaminari (0.15.1) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) @@ -81,6 +93,7 @@ GEM neat (1.5.0) bourbon (>= 2.1) sass (>= 3.2) + nested_form (0.3.2) nokogiri (1.6.1) mini_portile (~> 0.5.0) paperclip (4.1.1) @@ -91,6 +104,9 @@ GEM pg (0.17.1) polyglot (0.3.4) rack (1.5.2) + rack-pjax (0.7.0) + nokogiri (~> 1.5) + rack (~> 1.3) rack-test (0.6.2) rack (>= 1.0) rails (4.0.3) @@ -101,6 +117,20 @@ GEM bundler (>= 1.3.0, < 2.0) railties (= 4.0.3) sprockets-rails (~> 2.0.0) + rails_admin (0.6.2) + builder (~> 3.1) + coffee-rails (~> 4.0) + font-awesome-rails (>= 3.0) + haml (~> 4.0) + jquery-rails (~> 3.0) + jquery-ui-rails (~> 4.0) + kaminari (~> 0.14) + nested_form (~> 0.3) + rack-pjax (~> 0.7) + rails (~> 4.0) + remotipart (~> 1.0) + safe_yaml (~> 1.0) + sass-rails (~> 4.0) railties (4.0.3) actionpack (= 4.0.3) activesupport (= 4.0.3) @@ -109,6 +139,8 @@ GEM rake (10.2.2) rdoc (4.1.1) json (~> 1.4) + remotipart (1.2.1) + safe_yaml (1.0.2) sass (3.2.19) sass-rails (4.0.3) railties (>= 4.0.0, < 5.0) @@ -148,9 +180,11 @@ DEPENDENCIES aws-sdk bitters bourbon + chartkick clearance coffee-rails (~> 4.0.0) dotenv-rails + groupdate high_voltage (~> 2.1.0) jbuilder (~> 1.2) jquery-rails @@ -158,6 +192,7 @@ DEPENDENCIES paperclip pg rails (= 4.0.3) + rails_admin sass sass-rails (~> 4.0.0) sdoc diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 5d0c1bd..c24603e 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -13,4 +13,251 @@ @import "bourbon"; @import "neat"; -@import "bitters/bitters"; \ No newline at end of file +@import "bitters/bitters"; + +$large-screen: new-breakpoint(max-width 1200px 12); + +.comment { + $comment-gutter: 1.4em; + $comment-image-padding: .7em; + $comment-image-width: 4em; + $comment-color: $base-font-color; + $comment-background: lighten($base-accent-color, 15); + $comment-detail-color: transparentize($comment-color, .5); + $comment-image-vert-alignment: top; + + display: table; + width: 100%; + margin-bottom: $base-line-height; + padding-bottom: 1em; + border-bottom: 1px solid transparentize($comment-color, .9); + + .comment-image, + .comment-content { + display: table-cell; + vertical-align: $comment-image-vert-alignment; + } + + .comment-image { + padding-right: $comment-gutter; + + > img { + width: $comment-image-width; + height: auto; + border-radius: $base-border-radius; + padding: $comment-image-padding; + background: $comment-background; + display: block; + max-width: none; + } + + .comment-reverse-order & { + padding-right: 0; + padding-left: 10px; + } + } + + .comment-content { + width: 100%; + + h1 { + font-size: 1em; + margin-bottom: .5em; + } + + p { + margin-bottom: .5em; + } + + p.comment-detail { + font-style: italic; + font-size: .9em; + color: $comment-detail-color; + } + } +} + +header.navigation { + $navigation-background: $dark-gray; + $navigation-color: transparentize(white, 0.3); + $navigation-color-hover: white; + $navigation-height: 60px; + $navigation-nav-button-background: $base-accent-color; + $navigation-nav-button-background-hover: lighten($navigation-background, 10); + $navigation-nav-button-border: 1px solid lighten($navigation-nav-button-background, 20); + $navigation-search-background: lighten($navigation-background, 5); + $navigation-search-border: 1px solid darken($navigation-background, 5); + + background-color: $navigation-background; + border-bottom: 1px solid darken($navigation-background, 10); + font-family: $sans-serif; + height: $navigation-height; + width: 100%; + z-index: 999; + + .menu-wrapper { + @include outer-container; + position: relative; + z-index: 9999; + } + + .logo { + float: left; + max-height: $navigation-height; + padding-left: 1em; + padding-right: 2em; + + img { + max-height: $navigation-height; + padding: .8em 0; + } + } + + .navigation-menu-button { + color: $navigation-color; + cursor: pointer; + display: block; + float: right; + font-family: $sans-serif; + font-weight: 700; + line-height: $navigation-height; + margin: 0; + padding-right: 1em; + text-transform: uppercase; + + @include media ($large-screen) { + display: none; + } + + &:hover { + color: $navigation-color-hover; + } + } + + .nav { + @include media ($large-screen) { + float: left; + } + } + + ul#navigation-menu { + clear: both; + -webkit-transform-style: preserve-3d; // stop webkit flicker + display: none; + margin: 0 auto; + overflow: hidden; + padding: 0; + width: 100%; + z-index: 9999; + + @include media ($large-screen) { + display: inline; + margin: 0; + padding: 0; + } + } + + ul li { + background: $navigation-background; + display: block; + line-height: $navigation-height; + overflow: hidden; + padding-right: .8em; + text-align: right; + width: 100%; + z-index: 9999; + + @include media ($large-screen) { + background: transparent; + display: inline; + line-height: $navigation-height; + padding-right: 2em; + text-decoration: none; + width: auto; + } + + a { + font-weight: 400; + color: $navigation-color; + + &:hover { + color: $navigation-color-hover; + } + } + } + + .sign-up { + @include media ($large-screen) { + @include position(absolute, 0px 0px 0 0); + padding-right: 1em; + + a { + @include transition (all 0.2s ease-in-out); + background: $navigation-nav-button-background; + border-radius: $base-border-radius; + color: white; + font-size: .8em; + font-weight: 800; + padding: .6em 1em; + text-transform: uppercase; + + &:hover { + background: lighten($navigation-nav-button-background, 10); + } + } + } + } + + li.navigation-search-bar { + display: none; + + @include media($large-screen) { + @include position(absolute, 0px 76px 0 0); + display: inline-block; + line-height: 0 !important; + padding: 13px 30px; // this to get around Firefox/Opera line-height "bug" + } + } + + .search-bar { + $search-bar-border-color: $base-border-color; + $search-bar-border: 1px solid $search-bar-border-color; + $search-bar-background: lighten($search-bar-border-color, 10); + + width: 19em; + position: relative; + display: inline-block; + + input { + @include box-sizing(border-box); + display: block; + } + + .search-and-submit { + position: relative; + + input[type=search] { + background: $navigation-search-background; + border: $navigation-search-border; + padding: .6em .8em; + font-size: .9em; + font-style: italic; + color: $navigation-color; + border-radius: $base-border-radius * 2; + margin: 0; + } + + button[type=submit] { + @include button(simple, lighten($navigation-search-background, 10)); + @include position(absolute, 0.3em 0.3em 0.3em 0); + outline: none; + padding: 5px 15px; + + img { + height: 12px; + opacity: .7; + } + } + } + } +} diff --git a/app/views/homes/show.html.erb b/app/views/homes/show.html.erb index d44c9ea..70cf799 100644 --- a/app/views/homes/show.html.erb +++ b/app/views/homes/show.html.erb @@ -1,3 +1,4 @@ +<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %> -<% @profile.each do |image| %> - <%= link_to image_tag image.avatar.url %> - <% end %> \ No newline at end of file +
New Employee Registrations By Hour:
+<%= area_chart User.group_by_hour(:created_at).count %> +
<%= employee.name %>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio, aspernatur, quia modi minima debitis tempora ducimus quam vero impedit alias earum nemo error tenetur sed.
+Date or details about this post +