Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Campaign css #4

Merged
merged 2 commits into from

1 participant

Aaron Harnly
Aaron Harnly
Owner

Basic (very basic!) CSS for the campaign page and navbar.

Campaign view page looks like this:

screen shot 2013-06-09 at 5 15 12 pm

Aaron Harnly aaronharnly merged commit 773b34e into from
Aaron Harnly aaronharnly deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 9, 2013
  1. rails: basic app CSS -- navbar and background color

    Aaron Harnly authored
  2. rails: basic campaign page CSS

    Aaron Harnly authored
This page is out of date. Refresh to see the latest.
52 nycpublic_rails/app/assets/stylesheets/nycpublic.css.scss
View
@@ -0,0 +1,52 @@
+/* Basics */
+body {
+ font-family: Arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+ background-color: #eee;
+ color: #222;
+}
+
+.content {
+ background-color: white;
+}
+
+/* Navigation */
+.navbar-inner {
+ background-color: #11aac5;
+ background-image: none;
+ background-repeat: no-repeat;
+ filter: none;
+ background-image: -webkit-linear-gradient(top, #11aac5, #21bad5);
+}
+
+.navbar .brand, .navbar .nav > li > a {
+ text-shadow: none;
+}
+
+/* Campaigns */
+.campaign h1, h2 {
+ font-weight: normal;
+}
+.campaign h1.name {
+ color: black;
+ font-size: 3em;
+}
+
+.campaign h2 {
+ color: #666;
+ font-size: 1.5em;
+}
+
+.campaign.box h2 {
+ background-color: #ddd;
+ padding-left: 1em;
+}
+
+div.campaign.photo {
+ width: 100%;
+ background-color: #ddd;
+ height: 200px;
+ text-align: center;
+}
+
8 nycpublic_rails/app/assets/stylesheets/scaffolds.css.scss
View
@@ -1,11 +1,3 @@
-body {
- background-color: #fff;
- color: #333;
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-
p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
58 nycpublic_rails/app/views/campaigns/show.html.erb
View
@@ -1,25 +1,45 @@
-<p id="notice"><%= notice %></p>
+<div class="campaign page row">
+ <div class="campaign frame span12">
+ <div class="campaign inner row">
+ <div class="campaign span9">
+ <h1 class="campaign name"><%= @campaign.name %></h1>
-<p>
- <b>Name:</b>
- <%= @campaign.name %>
-</p>
+ <div class="campaign dates">
+ <%= @campaign.start_date.to_s(:friendly) %> - <%= @campaign.start_date.to_s(:friendly) %>
+ </div>
-<p>
- <b>Description:</b>
- <%= @campaign.description %>
-</p>
+ <div class="campaign marquee">
+ <div class="campaign photo">
+ <!-- placeholder for now -->
+ PHOTO PLACEHOLDER
+ </div>
+ <div class="campaign buttons">
+ </div>
+ </div>
-<p>
- <b>Start date:</b>
- <%= @campaign.start_date %>
-</p>
+ <p id="notice"><%= notice %></p>
-<p>
- <b>End date:</b>
- <%= @campaign.end_date %>
-</p>
+ <div class="campaign description">
+ <h2>About Us</h2>
+ <%= @campaign.description %>
+ </div>
+ <hr />
+ </div>
+ <div class="campaign sidebar span3">
+ <div class="campaign box location">
+ <h2>Location</h2>
+ </div>
+ <div class="campaign box stats">
+ <h2>Stats</h2>
+ </div>
+ <div class="campaign box organizer">
+ <h2>Organizer</h2>
+ </div>
+ </div><!-- end sidebar -->
+ </div>
+ </div>
+</div>
-<%= link_to 'Edit', edit_campaign_path(@campaign) %> |
-<%= link_to 'Back', campaigns_path %>
+
+<%= link_to 'Edit', edit_campaign_path(@campaign) %>
2  nycpublic_rails/app/views/layouts/_navigation.html.erb
View
@@ -1,4 +1,4 @@
-<%= link_to "Nycpublic Rails", root_path, :class => 'brand' %>
+<%= link_to "NYCPublic.org", root_path, :class => 'brand' %>
<ul class="nav">
<li><%= link_to 'Find Campaign', campaigns_path %></li>
<% if user_signed_in? %>
3  nycpublic_rails/config/initializers/date_formats.rb
View
@@ -0,0 +1,3 @@
+Date::DATE_FORMATS.merge!({
+ :friendly => lambda {|date| date.strftime("%B #{date.day.ordinalize}, %Y")}
+})
Something went wrong with that request. Please try again.