Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better-looking dates on presentations page

  • Loading branch information...
commit 0b331cc398d80253c25ab8d55e4d72c8b9a3a164 1 parent 7f80a88
@croaky croaky authored
View
2  app/views/presentations/_date.html.erb
@@ -1,5 +1,5 @@
<li id="<%= date.to_s -%>">
- <h2><%= date %></h2>
+ <h2><%= date.to_time.to_s(:date) %></h2>
<ul class="presentations">
<%= render @presentations[date] %>
</ul>
View
13 config/initializers/time_formats.rb
@@ -1,6 +1,7 @@
-# {
-# :short_date => "%x", # 04/13/10
-# :long_date => "%a, %b %d, %Y" # Tue, Apr 13, 2010
-# }.each do |format_name, format_string|
-# Time::DATE_FORMATS[format_name] = format_string
-# end
+{
+ :short_date => "%x", # 04/13/10
+ :long_date => "%a, %b %d, %Y", # Tue, Apr 13, 2010
+ :date => '%B %e, %Y' # April 22, 2011
+}.each do |format_name, format_string|
+ Time::DATE_FORMATS[format_name] = format_string
+end
View
4 public/stylesheets/sass/screen.scss
@@ -164,6 +164,10 @@ input[type=submit]:hover {
}
ul.dates {
margin: 0;
+ h2 {
+ left: -140px;
+ width: 120px;
+ }
}
ul.presentations {
margin: 0;
View
3  public/stylesheets/screen.css
@@ -301,6 +301,9 @@ input[type=submit]:hover {
content: ""; }
.presentations-index ul.dates {
margin: 0; }
+ .presentations-index ul.dates h2 {
+ left: -140px;
+ width: 120px; }
.presentations-index ul.presentations {
margin: 0;
padding: 0; }
Please sign in to comment.
Something went wrong with that request. Please try again.