diff --git a/assets/styles/drake.scss b/assets/styles/drake.scss index 1a3b4ec..720d585 100644 --- a/assets/styles/drake.scss +++ b/assets/styles/drake.scss @@ -21,6 +21,10 @@ hr{ margin-bottom: 20px; } +#main-wrapper{ + max-width: 1120px; +} + #main-nav{ position: fixed; top: 0; diff --git a/lib/helpers.rb b/lib/helpers.rb index 3e21a8d..9f9f137 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -10,7 +10,7 @@ helpers do def date_format(date) dt = date.to_datetime - return dt.strftime('%B %d, %Y @ %I:%M:%S %p %Z') + return dt.strftime('%B %d, %Y, %I:%M:%S %p') end def date_format_input(date) diff --git a/lib/routes/channel.rb b/lib/routes/channel.rb index 7a4fd83..818fbb5 100644 --- a/lib/routes/channel.rb +++ b/lib/routes/channel.rb @@ -31,10 +31,11 @@ namespace '/channel' do get '/:channel_id' do channel = Channel.where(id: params[:channel_id]).first() - puts "#{channel.name}" + channel_videos = channel.videos_dataset.reverse(:updated_at).limit(10).all() erb :'channel/view', :locals => { :title => channel.name, - :channel => channel + :channel => channel, + :channel_videos => channel_videos } end diff --git a/views/channel/view.erb b/views/channel/view.erb index f6c6c05..67060bd 100644 --- a/views/channel/view.erb +++ b/views/channel/view.erb @@ -30,7 +30,7 @@
Video name | Video serial | Video description | +Last updated | - <% channel.videos.each do |v| %> + <% channel_videos.each do |v| %>
---|---|---|---|
<%= v.name %> | <%= serialize(v.serial) %> | <%= v.description %> | +<%= date_format(v.updated_at) %> |