Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sorry

  • Loading branch information...
commit 7c77eccb93e920d80692c5a8439622e5a7e96243 1 parent 4ed4d92
Derick Hitchcock authored
View
4 Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '3.2.10'
+gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -11,6 +11,7 @@ gem 'mysql2'
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
+ gem 'compass-rails'
gem 'coffee-rails', '~> 3.2.1'
gem 'bootstrap-sass'
@@ -68,3 +69,4 @@ gem 'omniauth-github'
gem 'thin'
gem 'activerecord-postgresql-adapter'
+gem "font-awesome-rails"
View
62 Gemfile.lock
@@ -1,12 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (3.2.10)
- actionpack (= 3.2.10)
+ actionmailer (3.2.11)
+ actionpack (= 3.2.11)
mail (~> 2.4.4)
- actionpack (3.2.10)
- activemodel (= 3.2.10)
- activesupport (= 3.2.10)
+ actionpack (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
@@ -14,20 +14,20 @@ GEM
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
- activemodel (3.2.10)
- activesupport (= 3.2.10)
+ activemodel (3.2.11)
+ activesupport (= 3.2.11)
builder (~> 3.0.0)
- activerecord (3.2.10)
- activemodel (= 3.2.10)
- activesupport (= 3.2.10)
+ activerecord (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activerecord-postgresql-adapter (0.0.1)
pg
- activeresource (3.2.10)
- activemodel (= 3.2.10)
- activesupport (= 3.2.10)
- activesupport (3.2.10)
+ activeresource (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
+ activesupport (3.2.11)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.3.2)
@@ -48,6 +48,7 @@ GEM
ffi (~> 1.0, >= 1.0.6)
choice (0.1.6)
chronic (0.9.0)
+ chunky_png (1.2.7)
coderay (1.0.8)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
@@ -58,6 +59,12 @@ GEM
coffee-script-source (1.4.0)
colorize (0.5.8)
columnize (0.3.6)
+ compass (0.12.2)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ compass-rails (1.0.3)
+ compass (>= 0.12.2, < 0.14)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
@@ -98,6 +105,9 @@ GEM
faraday (0.8.4)
multipart-post (~> 1.1)
ffi (1.3.1)
+ font-awesome-rails (3.0.1.0)
+ railties (>= 3.1)
+ fssm (0.2.9)
gherkin (2.11.5)
json (>= 1.4.6)
guard (1.6.1)
@@ -197,22 +207,22 @@ GEM
rack
rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.10)
- actionmailer (= 3.2.10)
- actionpack (= 3.2.10)
- activerecord (= 3.2.10)
- activeresource (= 3.2.10)
- activesupport (= 3.2.10)
+ rails (3.2.11)
+ actionmailer (= 3.2.11)
+ actionpack (= 3.2.11)
+ activerecord (= 3.2.11)
+ activeresource (= 3.2.11)
+ activesupport (= 3.2.11)
bundler (~> 1.0)
- railties (= 3.2.10)
+ railties (= 3.2.11)
rails-erd (1.1.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
choice (~> 0.1.6)
ruby-graphviz (~> 1.0.4)
- railties (3.2.10)
- actionpack (= 3.2.10)
- activesupport (= 3.2.10)
+ railties (3.2.11)
+ actionpack (= 3.2.11)
+ activesupport (= 3.2.11)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -294,11 +304,13 @@ DEPENDENCIES
activerecord-postgresql-adapter
bootstrap-sass
coffee-rails (~> 3.2.1)
+ compass-rails
cucumber-rails
debugger
devise
factory_girl_rails
faker
+ font-awesome-rails
guard
guard-coffeescript
guard-cucumber
@@ -312,7 +324,7 @@ DEPENDENCIES
omniauth
omniauth-github
pry-rails
- rails (= 3.2.10)
+ rails (= 3.2.11)
rails-erd
rb-fsevent
rspec-rails (~> 2.0)
View
BIN  app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/retina_wood_@2X.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3  app/assets/javascripts/application.js
@@ -13,4 +13,5 @@
//= require jquery
//= require jquery_ujs
//= require bootstrap
-//= require_tree .
+//= require_tree .
+//= require 'jquery.backstretch.js'
View
361 app/assets/javascripts/jquery.backstretch.js
@@ -0,0 +1,361 @@
+/*
+ * Backstretch
+ * http://srobbin.com/jquery-plugins/backstretch/
+ *
+ * Copyright (c) 2012 Scott Robbin
+ * Licensed under the MIT license.
+ */
+
+;(function ($, window, undefined) {
+ 'use strict';
+
+ /* PLUGIN DEFINITION
+ * ========================= */
+
+ $.fn.backstretch = function (images, options) {
+ // We need at least one image
+ if (images === undefined || images.length === 0) {
+ $.error("No images were supplied for Backstretch");
+ }
+
+ /*
+ * Scroll the page one pixel to get the right window height on iOS
+ * Pretty harmless for everyone else
+ */
+ if ($(window).scrollTop() === 0 ) {
+ window.scrollTo(0, 0);
+ }
+
+ return this.each(function () {
+ var $this = $(this)
+ , obj = $this.data('backstretch');
+
+ // If we've already attached Backstretch to this element, remove the old instance.
+ if (obj) {
+ // Merge the old options with the new
+ options = $.extend(obj.options, options);
+
+ // Remove the old instance
+ obj.destroy(true);
+ }
+
+ obj = new Backstretch(this, images, options);
+ $this.data('backstretch', obj);
+ });
+ };
+
+ // If no element is supplied, we'll attach to body
+ $.backstretch = function (images, options) {
+ // Return the instance
+ return $('body')
+ .backstretch(images, options)
+ .data('backstretch');
+ };
+
+ // Custom selector
+ $.expr[':'].backstretch = function(elem) {
+ return $(elem).data('backstretch') !== undefined;
+ };
+
+ /* DEFAULTS
+ * ========================= */
+
+ $.fn.backstretch.defaults = {
+ centeredX: true // Should we center the image on the X axis?
+ , centeredY: true // Should we center the image on the Y axis?
+ , duration: 5000 // Amount of time in between slides (if slideshow)
+ , fade: 0 // Speed of fade transition between slides
+ };
+
+ /* STYLES
+ *
+ * Baked-in styles that we'll apply to our elements.
+ * In an effort to keep the plugin simple, these are not exposed as options.
+ * That said, anyone can override these in their own stylesheet.
+ * ========================= */
+ var styles = {
+ wrap: {
+ left: 0
+ , top: 0
+ , overflow: 'hidden'
+ , margin: 0
+ , padding: 0
+ , height: '100%'
+ , width: '100%'
+ , zIndex: -999999
+ }
+ , img: {
+ position: 'absolute'
+ , display: 'none'
+ , margin: 0
+ , padding: 0
+ , border: 'none'
+ , width: 'auto'
+ , height: 'auto'
+ , maxWidth: 'none'
+ , zIndex: -999999
+ }
+ };
+
+ /* CLASS DEFINITION
+ * ========================= */
+ var Backstretch = function (container, images, options) {
+ this.options = $.extend({}, $.fn.backstretch.defaults, options || {});
+
+ /* In its simplest form, we allow Backstretch to be called on an image path.
+ * e.g. $.backstretch('/path/to/image.jpg')
+ * So, we need to turn this back into an array.
+ */
+ this.images = $.isArray(images) ? images : [images];
+
+ // Preload images
+ $.each(this.images, function () {
+ $('<img />')[0].src = this;
+ });
+
+ // Convenience reference to know if the container is body.
+ this.isBody = container === document.body;
+
+ /* We're keeping track of a few different elements
+ *
+ * Container: the element that Backstretch was called on.
+ * Wrap: a DIV that we place the image into, so we can hide the overflow.
+ * Root: Convenience reference to help calculate the correct height.
+ */
+ this.$container = $(container);
+ this.$wrap = $('<div class="backstretch"></div>').css(styles.wrap).appendTo(this.$container);
+ this.$root = this.isBody ? supportsFixedPosition ? $(window) : $(document) : this.$container;
+
+ // Non-body elements need some style adjustments
+ if (!this.isBody) {
+ // If the container is statically positioned, we need to make it relative,
+ // and if no zIndex is defined, we should set it to zero.
+ var position = this.$container.css('position')
+ , zIndex = this.$container.css('zIndex');
+
+ this.$container.css({
+ position: position === 'static' ? 'relative' : position
+ , zIndex: zIndex === 'auto' ? 0 : zIndex
+ , background: 'none'
+ });
+
+ // Needs a higher z-index
+ this.$wrap.css({zIndex: -999998});
+ }
+
+ // Fixed or absolute positioning?
+ this.$wrap.css({
+ position: this.isBody && supportsFixedPosition ? 'fixed' : 'absolute'
+ });
+
+ // Set the first image
+ this.index = 0;
+ this.show(this.index);
+
+ // Listen for resize
+ $(window).on('resize.backstretch', $.proxy(this.resize, this))
+ .on('orientationchange.backstretch', $.proxy(function () {
+ // Need to do this in order to get the right window height
+ if (this.isBody && window.pageYOffset === 0) {
+ window.scrollTo(0, 1);
+ this.resize();
+ }
+ }, this));
+ };
+
+ /* PUBLIC METHODS
+ * ========================= */
+ Backstretch.prototype = {
+ resize: function () {
+ try {
+ var bgCSS = {left: 0, top: 0}
+ , rootWidth = this.isBody ? this.$root.width() : this.$root.innerWidth()
+ , bgWidth = rootWidth
+ , rootHeight = this.isBody ? ( window.innerHeight ? window.innerHeight : this.$root.height() ) : this.$root.innerHeight()
+ , bgHeight = bgWidth / this.$img.data('ratio')
+ , bgOffset;
+
+ // Make adjustments based on image ratio
+ if (bgHeight >= rootHeight) {
+ bgOffset = (bgHeight - rootHeight) / 2;
+ if(this.options.centeredY) {
+ bgCSS.top = '-' + bgOffset + 'px';
+ }
+ } else {
+ bgHeight = rootHeight;
+ bgWidth = bgHeight * this.$img.data('ratio');
+ bgOffset = (bgWidth - rootWidth) / 2;
+ if(this.options.centeredX) {
+ bgCSS.left = '-' + bgOffset + 'px';
+ }
+ }
+
+ this.$wrap.css({width: rootWidth, height: rootHeight})
+ .find('img:not(.deleteable)').css({width: bgWidth, height: bgHeight}).css(bgCSS);
+ } catch(err) {
+ // IE7 seems to trigger resize before the image is loaded.
+ // This try/catch block is a hack to let it fail gracefully.
+ }
+
+ return this;
+ }
+
+ // Show the slide at a certain position
+ , show: function (index) {
+ // Validate index
+ if (Math.abs(index) > this.images.length - 1) {
+ return;
+ } else {
+ this.index = index;
+ }
+
+ // Vars
+ var self = this
+ , oldImage = self.$wrap.find('img').addClass('deleteable')
+ , evt = $.Event('backstretch.show', {
+ relatedTarget: self.$container[0]
+ });
+
+ // Pause the slideshow
+ clearInterval(self.interval);
+
+ // New image
+ self.$img = $('<img />')
+ .css(styles.img)
+ .bind('load', function (e) {
+ var imgWidth = this.width || $(e.target).width()
+ , imgHeight = this.height || $(e.target).height();
+
+ // Save the ratio
+ $(this).data('ratio', imgWidth / imgHeight);
+
+ // Show the image, then delete the old one
+ // "speed" option has been deprecated, but we want backwards compatibilty
+ $(this).fadeIn(self.options.speed || self.options.fade, function () {
+ oldImage.remove();
+
+ // Resume the slideshow
+ if (!self.paused) {
+ self.cycle();
+ }
+
+ // Trigger the event
+ self.$container.trigger(evt, self);
+ });
+
+ // Resize
+ self.resize();
+ })
+ .appendTo(self.$wrap);
+
+ // Hack for IE img onload event
+ self.$img.attr('src', self.images[index]);
+ return self;
+ }
+
+ , next: function () {
+ // Next slide
+ return this.show(this.index < this.images.length - 1 ? this.index + 1 : 0);
+ }
+
+ , prev: function () {
+ // Previous slide
+ return this.show(this.index === 0 ? this.images.length - 1 : this.index - 1);
+ }
+
+ , pause: function () {
+ // Pause the slideshow
+ this.paused = true;
+ return this;
+ }
+
+ , resume: function () {
+ // Resume the slideshow
+ this.paused = false;
+ this.next();
+ return this;
+ }
+
+ , cycle: function () {
+ // Start/resume the slideshow
+ if(this.images.length > 1) {
+ // Clear the interval, just in case
+ clearInterval(this.interval);
+
+ this.interval = setInterval($.proxy(function () {
+ // Check for paused slideshow
+ if (!this.paused) {
+ this.next();
+ }
+ }, this), this.options.duration);
+ }
+ return this;
+ }
+
+ , destroy: function (preserveBackground) {
+ // Stop the resize events
+ $(window).off('resize.backstretch orientationchange.backstretch');
+
+ // Clear the interval
+ clearInterval(this.interval);
+
+ // Remove Backstretch
+ if(!preserveBackground) {
+ this.$wrap.remove();
+ }
+ this.$container.removeData('backstretch');
+ }
+ };
+
+ /* SUPPORTS FIXED POSITION?
+ *
+ * Based on code from jQuery Mobile 1.1.0
+ * http://jquerymobile.com/
+ *
+ * In a nutshell, we need to figure out if fixed positioning is supported.
+ * Unfortunately, this is very difficult to do on iOS, and usually involves
+ * injecting content, scrolling the page, etc.. It's ugly.
+ * jQuery Mobile uses this workaround. It's not ideal, but works.
+ *
+ * Modified to detect IE6
+ * ========================= */
+
+ var supportsFixedPosition = (function () {
+ var ua = navigator.userAgent
+ , platform = navigator.platform
+ // Rendering engine is Webkit, and capture major version
+ , wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ )
+ , wkversion = !!wkmatch && wkmatch[ 1 ]
+ , ffmatch = ua.match( /Fennec\/([0-9]+)/ )
+ , ffversion = !!ffmatch && ffmatch[ 1 ]
+ , operammobilematch = ua.match( /Opera Mobi\/([0-9]+)/ )
+ , omversion = !!operammobilematch && operammobilematch[ 1 ]
+ , iematch = ua.match( /MSIE ([0-9]+)/ )
+ , ieversion = !!iematch && iematch[ 1 ];
+
+ return !(
+ // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
+ ((platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534) ||
+
+ // Opera Mini
+ (window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]") ||
+ (operammobilematch && omversion < 7458) ||
+
+ //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
+ (ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533) ||
+
+ // Firefox Mobile before 6.0 -
+ (ffversion && ffversion < 6) ||
+
+ // WebOS less than 3
+ ("palmGetResource" in window && wkversion && wkversion < 534) ||
+
+ // MeeGo
+ (ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1) ||
+
+ // IE6
+ (ieversion && ieversion <= 6)
+ );
+ }());
+
+}(jQuery, window));
View
4 app/assets/javascripts/temptd.js.coffee.erb
@@ -0,0 +1,4 @@
+$ ->
+ $.backstretch("<%= asset_path('rails.png') %>")
+
+
View
9 app/assets/stylesheets/application.css.scss
@@ -9,9 +9,11 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
- *= require_tree .
+ //= require 'bootstrap_and_overrides'
*/
-//= require 'events'
+
+ @import "font-awesome";
+ @import "custom_application";
.content {
background-color: #eee;
@@ -23,4 +25,5 @@
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
box-shadow: 0 1px 2px rgba(0,0,0,.15);
-}
+}
+
View
3  app/assets/stylesheets/bootstrap_and_overrides.css.scss
@@ -1,3 +1,4 @@
@import "bootstrap";
body { padding-top: 60px; }
-@import "bootstrap-responsive";
+@import "bootstrap-responsive";
+
View
16 app/assets/stylesheets/custom_application.css.scss
@@ -0,0 +1,16 @@
+h1, h2, h3, h4, h5, h6 {
+ font-family: "HelveticaNeue-CondensedBold", "HelveticaNeue", Helvetica, Arial, "sans-serif";
+}
+p, div {
+ font-family: "HelveticaNeue-CondensedBold", "HelveticaNeue", Helvetica, Arial, "sans-serif";
+}
+
+a {
+ text-decoration: none !important;
+}
+
+
+.btn i {
+ margin-right: 8px;
+}
+
View
7 app/views/events/_form.html.erb
@@ -12,6 +12,9 @@
<% end %>
<div class="actions">
- <%= f.submit %>
- </div>
+ <%= content_tag :button, :type => :submit, :class => "btn" do %>
+ <i class="icon-plus-sign-alt"></i>
+ Create Event
+ <% end %>
+
<% end %>
View
5 app/views/events/new.html.erb
@@ -2,4 +2,7 @@
<%= render 'form' %>
-<%= link_to 'Back', events_path %>
+<button class="btn">
+ <i class="icon-caret-left"></i>
+ <%= link_to 'Back', events_path %>
+</button>
View
10 app/views/layouts/_navigation.html.erb
@@ -5,7 +5,13 @@
<button class="btn"><%= link_to current_user, edit_user_registration_path %></button>
<button class="btn"><%= link_to('Logout', destroy_user_session_path, :method=>'delete') %></button>
<% else %>
- <button class="btn"><%= link_to "Sign in with Github", user_omniauth_authorize_path(:github) %></button>
- <button class="btn"><%= link_to('Sign up', new_user_registration_path) %></button>
+ <button class="btn">
+ <i class="icon-github-alt"></i>
+ <%= link_to "Sign in with Github", user_omniauth_authorize_path(:github) %>
+ </button>
+ <button class="btn">
+ <i class="icon-plus-sign-alt"></i>
+ <%= link_to('Sign up', new_user_registration_path) %>
+ </button>
<% end %>
</nav>
View
4 app/views/layouts/application.html.erb
@@ -8,6 +8,8 @@
<meta name="description" content="">
<meta name="author" content="">
<%= stylesheet_link_tag "application", :media => "all" %>
+ <link href="http://fonts.googleapis.com/css?family=Arvo" rel="stylesheet" type="text/css">
+ <link href="http://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet" type="text/css">
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<%= yield(:head) %>
@@ -26,7 +28,7 @@
<div class="row">
<div class="span12">
<%= render 'layouts/messages' %>
- <%= yield %>
+ <%= yield %>
</div>
</div>
<footer>
View
67 db/schema.rb
@@ -11,71 +11,6 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20121221174637) do
-
- create_table "event_preferences", :force => true do |t|
- t.integer "event_type_id"
- t.string "category"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "event_types", :force => true do |t|
- t.string "name"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "events", :force => true do |t|
- t.integer "event_type_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "timeslots", :force => true do |t|
- t.integer "event_id"
- t.datetime "starts_at"
- t.datetime "ends_at"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "user_event_preferences", :force => true do |t|
- t.integer "user_id"
- t.integer "event_preference_id"
- t.string "value"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :default => "", :null => false
- t.string "username"
- t.string "nickname"
- t.string "reset_password_token"
- t.datetime "reset_password_sent_at"
- t.datetime "remember_created_at"
- t.integer "sign_in_count", :default => 0
- t.datetime "current_sign_in_at"
- t.datetime "last_sign_in_at"
- t.string "current_sign_in_ip"
- t.string "last_sign_in_ip"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.string "provider"
- t.string "uid"
- end
-
- add_index "users", ["email"], :name => "index_users_on_email", :unique => true
- add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
-
- create_table "votes", :force => true do |t|
- t.integer "user_id"
- t.integer "event_id"
- t.integer "timeslot_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
+ActiveRecord::Schema.define(:version => 0) do
end
Please sign in to comment.
Something went wrong with that request. Please try again.