1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added styling

This commit is contained in:
Jacob Cody Wimer
2013-12-26 14:39:20 -05:00
parent 6a38c8388b
commit 5b6a127549
17 changed files with 262 additions and 13 deletions

View File

@@ -38,6 +38,12 @@ group :doc do
gem 'sdoc', require: false
end
#MY GEMS
gem 'devise'
gem 'cancan'
gem 'bootstrap-sass', '2.3.2.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

View File

@@ -27,7 +27,11 @@ GEM
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
bootstrap-sass (2.3.2.0)
sass (~> 3.2)
builder (3.1.4)
cancan (1.6.10)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@@ -35,6 +39,12 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.3)
devise (3.2.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0)
execjs (2.0.2)
hike (1.2.3)
@@ -52,6 +62,7 @@ GEM
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.2)
orm_adapter (0.5.0)
pg (0.15.1)
polyglot (0.3.3)
rack (1.5.2)
@@ -104,12 +115,17 @@ GEM
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
bootstrap-sass (= 2.3.2.0)
cancan
coffee-rails (~> 4.0.0)
devise
jbuilder (~> 1.2)
jquery-rails
pg (= 0.15.1)

View File

@@ -14,3 +14,4 @@
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require bootstrap

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -0,0 +1,13 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/

View File

@@ -0,0 +1,151 @@
@import "bootstrap";
/* mixins, variables, etc. */
$grayMediumLight: #eaeaea;
$lightGray: #999;
$grayLight: #999;
$grayDarker: #2F4F4F;
$grayLighter: #A8A8A8;
$blue: #0000FF;
@mixin box_sizing {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* universal */
html {
overflow-y: scroll;
}
body {
padding-top: 60px;
}
section {
overflow: auto;
}
textarea {
resize: vertical;
}
.center {
text-align: center;
h1 {
margin-bottom: 10px;
}
}
/* typography */
h1, h2, h3, h4, h5, h6 {
line-height: 1;
}
h1 {
font-size: 3em;
letter-spacing: -2px;
margin-bottom: 30px;
text-align: center;
}
h2 {
font-size: 1.2em;
letter-spacing: -1px;
margin-bottom: 30px;
text-align: center;
font-weight: normal;
color: $grayLight;
}
p {
font-size: 1.1em;
line-height: 1.7em;
}
/* header */
#logo {
float: left;
margin-right: 10px;
font-size: 1.7em;
color: white;
text-transform: uppercase;
letter-spacing: -1px;
padding-top: 9px;
font-weight: bold;
line-height: 1;
&:hover {
color: white;
text-decoration: none;
}
}
/* footer */
footer {
margin-top: 45px;
padding-top: 5px;
border-top: 1px solid $grayMediumLight;
color: $grayLight;
a {
color: $gray;
&:hover {
color: $grayDarker;
}
}
small {
float: left;
}
ul {
float: right;
list-style: none;
li {
float: left;
margin-left: 10px;
}
}
}
/* miscellaneous */
.debug_dump {
clear: both;
float: left;
width: 100%;
margin-top: 45px;
@include box_sizing;
}
/* forms */
input, textarea, select, .uneditable-input {
border: 1px solid #bbb;
width: 100%;
margin-bottom: 15px;
@include box_sizing;
}
input {
height: auto !important;
}
#error_explanation {
color: #f00;
ul {
list-style: none;
margin: 0 0 18px 0;
}
}
.field_with_errors {
@extend .control-group;
@extend .error;
}

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the StaticPages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -0,0 +1,6 @@
class StaticPagesController < ApplicationController
def index
end
end

View File

@@ -0,0 +1,2 @@
module StaticPagesHelper
end

View File

@@ -0,0 +1,12 @@
<footer class="footer">
<small>
App made by Cody Wimer
</small>
<nav>
<ul>
<li><%= link_to "About", '#' %></li>
<li><%= link_to "Contact", '#' %></li>
<li><a href="http://news.railstutorial.org/">News</a></li>
</ul>
</nav>
</footer>

View File

@@ -0,0 +1,13 @@
<header class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container">
<%= link_to "CCHS Wrestling", root_path, id: "logo" %>
<nav>
<ul class="nav pull-right">
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "Help", '#' %></li>
</ul>
</nav>
</div>
</div>
</header>

View File

@@ -0,0 +1,3 @@
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

View File

@@ -1,14 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Wrestling</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
<head>
<title>Comet Wrestling</title>
<%= stylesheet_link_tag "application", media: "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<% flash.each do |key, value| %>
<div class="alert alert-<%= key %>"><%= value %></div>
<% end %>
<%= yield %>
<%= render 'layouts/footer' %>
<%= debug(params) if Rails.env.development? %>
</div>
</body>
</html>

View File

@@ -0,0 +1,2 @@
<h1>CCHS Wrestling</h1>
<h3>1st Annual Comet Classic</h3>

View File

@@ -3,7 +3,7 @@ Wrestling::Application.routes.draw do
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
root 'static_pages#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'

View File

@@ -0,0 +1,7 @@
require 'test_helper'
class StaticPagesControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end

View File

@@ -0,0 +1,4 @@
require 'test_helper'
class StaticPagesHelperTest < ActionView::TestCase
end