Skip to content

Commit

Permalink
Customize bootstrap 3 variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Gehani committed Nov 2, 2013
1 parent 8de63ea commit 334ae06
Show file tree
Hide file tree
Showing 10 changed files with 209 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ gem 'coffee-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Add Bootstrap
gem 'bootstrap-sass', '~> 2.3.2.2'
gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass', branch: '3'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '1.1.1'
Expand Down
12 changes: 9 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
GIT
remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
revision: 9c6c07f74ff515cf38380b014cfede14a4f0eae4
branch: 3
specs:
bootstrap-sass (3.0.0.0)
sass (~> 3.2)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -33,8 +41,6 @@ GEM
nokogiri (< 1.6.0)
uuidtools (~> 2.1)
bcrypt-ruby (3.1.2)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
bootstrap-will_paginate (0.0.10)
will_paginate
builder (3.1.4)
Expand Down Expand Up @@ -153,7 +159,7 @@ PLATFORMS
DEPENDENCIES
acts_as_follower
aws-sdk
bootstrap-sass (~> 2.3.2.2)
bootstrap-sass!
bootstrap-will_paginate
coffee-rails (~> 4.0.0)
devise
Expand Down
56 changes: 56 additions & 0 deletions To Do List.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
To Do List
Neil's Models and relationships:

USER
has_many :created_invitations (:event)
has_many :hosted_invitations (:event)
has_many :guest_invitations (:event)
has_many :rsvps
has_many :attended_events (:event_attendance)
fields >> [:first_name, :last_name, :email, :password_stuff]

EVENT
belongs_to :creator (:user)
has_many :hosts (:user)
has_many :invited_guests (:user)
has_many :rsvps
belongs_to :location
fields >> [:start_date, :end_date, :start_time, :end_time, :location_id ]

RSVP
belongs_to :user
belongs_to :event
:yes/no/maybe

LOCATION
has_many :events
fields >> [:city, :state, :zip, :address, :lat, :lng]

EVENT_ATTENDANCE 1. who needs to be related to this? 2. How many of each thing can each side have?
belongs_to :user
belong_to :event

:id :user_id :event_id
1 1 1
2 1 3
3 1 4
...


-----------------------
Join tables

INVITATIONHOSTING << "join table"
belongs_to :host (:user)
belongs_to :hosted_invitation (:invitation)
invitation_id user_id
1 1
1 2
1 5
2 1
2 5

GUESTINVITING
belongs_to :invited_guest (:user)
belongs_to :invitation

57 changes: 57 additions & 0 deletions To Do List.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
To Do List
Neil's Models and relationships:

USER
has_many :created_invitations (:event)
has_many :hosted_invitations (:event)
has_many :guest_invitations (:event)
has_many :rsvps
has_many :attended_events (:event_attendance)
fields >> [:first_name, :last_name, :email, :password_stuff]

EVENT
belongs_to :creator (:user)
has_many :hosts (:user)
has_many :invited_guests (:user)
has_many :rsvps
belongs_to :location
fields >> [:start_date, :end_date, :start_time, :end_time, :location_id ]

RSVP
belongs_to :user
belongs_to :event
:yes/no/maybe

LOCATION
has_many :events
fields >> [:city, :state, :zip, :address, :lat, :lng]

EVENT_ATTENDANCE 1. who needs to be related to this? 2. How many of each thing can each side have?
belongs_to :user
belong_to :event

:id :user_id :event_id
1 1 1
2 1 3
3 1 4
...


-----------------------
Join tables

INVITATIONHOSTING << "join table"
belongs_to :host (:user)
belongs_to :hosted_invitation (:invitation)
invitation_id user_id
1 1
1 2
1 5
2 1
2 5

GUESTINVITING
belongs_to :invited_guest (:user)
belongs_to :invitation


44 changes: 44 additions & 0 deletions app/assets/stylesheets/bootstrap_and_customization.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
Import Font Families
*/
$baseFontFamily: Oxygen;
@import url(http://fonts.googleapis.com/css?family=Oxygen);

$body-bg: #ecf0f1;
$navbar-height: 45px;
$navbar-default-bg: white;
$navbar-default-brand-color: #2980b9;
$brand-primary: #2980b9;
$jumbotron-bg: white;
$grayLight: #bdc3c7;

@import 'bootstrap';
body{
padding-top: 1px;
}

.navbar-brand {
font-weight: bold;
}

.btn-primary {
color: white;
background-color: #2980b9;
border-color: #2980b9;
}


.navbar-inner{
@include box-shadow(none !important);
border: 0;
}

.footer{
margin-top: 50px;
color: $grayLight;
a{
color: $gray;
}
}
37 changes: 4 additions & 33 deletions app/assets/stylesheets/styles.css.scss
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
/*
Import Font Families
*/
$baseFontFamily: Oxygen;
@import url(http://fonts.googleapis.com/css?family=Oxygen);

/* Change button Color */
$btnPrimaryBackground: #00BFFF;
$navbarBackgroundHighlight: white;
$navbarBackground: white;

@import 'bootstrap';
body{
padding-top: 60px;
}

@import 'bootstrap-responsive';

.navbar-inner{
@include box-shadow(none !important);
border: 0;
}

.footer{
margin-top: 50px;
color: $grayLight;
a{
color: $gray;
}
}

/* Required for jQuery Masonry */
/* anything beginning with a . is a class and used in views as class = "blah" */

Expand All @@ -57,3 +24,7 @@ body{
.description {
margin: 10px 0 5px;
}

#view_paginate {
visibility: hidden;
}
64 changes: 31 additions & 33 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">

<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>

<%= link_to "Social Butterfly", root_path, class: "brand" %>

<div class="nav-collapse">
<ul class="nav">
<li>
<%= link_to 'Home', root_path %>
</li>
<li>
<%= link_to 'About', about_path %>
</li>
</ul>
<ul class="nav pull-right">
<% if user_signed_in? %>
<li><%= link_to "Add +", new_pin_path %></li>
<li><%= link_to "Edit Profile", edit_user_registration_path %></li>
<li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
<% else %>
<li><%= link_to 'Login', new_user_session_path %></li>
<% end %>
</ul>
</div>
</div>
<nav class="navbar navbar-static-top navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand"
<%= link_to "Social Butterfly", root_path, class: "navbar-brand" %>
</a>
</div>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "About", about_path %></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<% if user_signed_in? %>
<li><%= link_to "Add +", new_pin_path %></li>
<li><%= link_to "Edit Profile", edit_user_registration_path %></li>
<li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
<% else %>
<li><%= link_to 'Login', new_user_session_path %></li>
<% end %>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- .container -->
</nav>
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<%= render 'layouts/header' %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/pages/_home.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<% unless user_signed_in? %>
<div class="hero-unit">
<div class="jumbotron">
<h1>Social Butterfly</h1>
<p>
Who's going to be THE Social Butterfly?
</p>
<p>
<%= link_to "Sign Up Now!", new_user_registration_path, class: "btn btn-primary btn-large" %>
<%= link_to "Sign In", new_user_session_path, class: "btn btn-primary btn-large" %>
<%= link_to "Sign Up Now!", new_user_registration_path, class: "btn btn-primary btn-lg" %>
<%= link_to "Log In", new_user_session_path, class: "btn btn-default btn-lg" %>
</p>
</div>
<% end %>
Expand Down
4 changes: 3 additions & 1 deletion app/views/pins/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
<%= render @pins %>
</div>

<%= will_paginate @pins %>
<div id="view_paginate">
<%= will_paginate @pins %>
</div>

0 comments on commit 334ae06

Please sign in to comment.