Skip to content

Instantly share code, notes, and snippets.

@valachi
Created April 1, 2013 15:22
Show Gist options
  • Save valachi/5285540 to your computer and use it in GitHub Desktop.
Save valachi/5285540 to your computer and use it in GitHub Desktop.
- content_for :title do
- if params[:user_id]
Hungry Shark - ресурс для молодых и предприимчивых | Материалы от автора #{params[:user_id]}
- else
Hungry Shark - ресурс для молодых и предприимчивых
- content_for :events_block do
- unless Article.actual_events.size == 0
.events_block.regular_block
.rubric
= link_to "События", category_articles_path(Category.where(name: 'события').first)
- Article.actual_events.each_with_index do |article, index|
%article
.text_block
%h2.red.date
= l article.event_date, format: :event_date
= link_to article.title, article, class: 'title'
= link_to image_tag(article.thumb.url(:sidebar_thumb), width: 132), article, class: "image_link"
- if index < Article.actual_events.size - 1
.border_bottom_article
.border_bottom
- content_for :side_tags do
- unless ActsAsTaggableOn::Tag.where(on_sidebar: true).empty?
.tags_block.regular_block
.rubric
= link_to 'ТЭГИ', alltags_path
.tags_body
- ActsAsTaggableOn::Tag.where(on_sidebar: true).each do |tag|
= link_to tag, tag_articles_path(tag)
.tags_link
= link_to 'Все тэги', alltags_path
- content_for :get_quotes do
%section.side-quotes#quotes-carousel
- quote = @quote = Quote.first(order: 'RAND()')
%article
%figure= image_tag quote.author_photo.url(:thumb)
%h2= quote.author_name
%blockquote
= link_to_if quote.article, quote.text, quote.article do
= quote.text
%section.get-articles
= render partial: 'article', collection: @articles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment