Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.typosphere.org/typo/trunk@1350 820eb932-12ee-0310-9ca8-eeb645f39767
- Loading branch information
1 parent
e247b6b
commit fb6baff
Showing
16 changed files
with
166 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
%div[article].atomentry | ||
%h2.title | ||
= (controller.action_name.include? 'permalink') ? article.title : link_to_permalink(article,article.title) | ||
= content_tag(:span, article.published_comments.size, :class => 'comment_count') if article.published_comments.size > 0 | ||
|
||
%p.author | ||
= preceed "Posted by " do | ||
%cite= author_link(article) | ||
%abbr.published{:title=>article.published_at.xmlschema}= js_distance_of_time_in_words_to_now article.published_at | ||
|
||
.content | ||
= html article, :body | ||
|
||
- if article.extended? | ||
.extended | ||
- if controller.action_name == 'index' | ||
%p= link_to_permalink article,"Continue reading..." | ||
- else | ||
= html article, :extended | ||
|
||
%ul.meta | ||
= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? | ||
= content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? | ||
%li Meta | ||
= trackbacks_link(article) << ',' if article.allow_pings? | ||
= comments_link(article) << ',' if article.allow_comments? | ||
= succeed "," do | ||
%a{:href=>article.permalink_url, :rel=>"bookmark"} permalink | ||
= succeed "," do | ||
%a{:href=>url_for(:controller=>'xml', :action=>'feed', :type=>'article', :format=>'rss', :id=>article)} rss | ||
%a{:href=>url_for(:controller=>'xml', :action=>'feed', :type=>'article', :format=>'atom', :id=>article)} atom |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%ol.comments#comments | ||
- if @article.published_comments.any? | ||
- for comment in @article.published_comments | ||
%li[comment] | ||
.author | ||
= content_tag(:div, gravatar_tag(comment.email)) if this_blog.use_gravatar and comment.email | ||
%cite= link_to_unless(comment.url.blank?, h(comment.author), comment.url) | ||
%abbr{:title=>comment.created_at.xmlschema} | ||
= succeed " later:" do | ||
= distance_of_time_in_words comment.article.published_at, comment.created_at | ||
.content | ||
= html comment | ||
- else | ||
%li.dummy_comment{:style=>"display: none"} No comments |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
= form_remote_tag :url => {:action => 'comment', :id => @article}, | | ||
:update => 'comments_div', | | ||
:loading => 'commentLoading()', | | ||
:complete => 'commentComplete()', | | ||
:html => {:id => 'commentform', :class => 'comments' } | | ||
|
||
#preview{:style=>"display: none"} | ||
|
||
%fieldset | ||
%legend Comments | ||
%p | ||
%label Name: | ||
%br/ | ||
= text_field "comment", "author" | ||
%small | ||
= surround "(", ")" do | ||
= link_to_function("leave url/email »", "Effect.toggle('extra_fields', 'blind', {duration: .3})") | ||
|
||
#extra_fields{:style=>"display: none"} | ||
%p | ||
%label | ||
= precede "Email: " do | ||
= content_tag('small', "(#{link_to('gravatar', 'http://gravatar.com')} enabled)") if this_blog.use_gravatar | ||
%br/ | ||
= text_field "comment", "email" | ||
%p | ||
%label Url: | ||
%br/ | ||
= text_field "comment", "url" | ||
|
||
%p | ||
%label | ||
Comments: | ||
= content_tag('small', link_to("Textile enabled", "http://hobix.com/textile/")) if this_blog.comment_text_filter.include? 'textile' | ||
= content_tag('small', link_to("Markdown enabled", "http://daringfireball.net/projects/markdown/")) if this_blog.comment_text_filter.include? 'markdown' | ||
%br/ | ||
= text_area 'comment', 'body' | ||
|
||
%p | ||
= submit_to_remote('preview', 'Preview!', | | ||
:update => 'preview', | | ||
:complete => "Element.show('preview')", | | ||
:url => { :action => 'comment_preview' }) | | ||
= submit_tag 'Submit', :onclick => "$('commentform').onsubmit();this.disabled=true;Element.hide('preview');return false;" | ||
= image_tag '/images/theme/spinner.gif', :id => 'spinner', :style => 'display:none' | ||
|
||
= end_form_tag |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.search#search | ||
- form_tag({ :controller => 'articles', :action => 'search' }, | | ||
{ :method => 'get', :id => 'sform' }) do | | ||
%p | ||
%input#q{:type=>"text", :name=>"q", :value=>""}/ | ||
|
||
.loading#loading{:style=>"display: none;"} Searching... | ||
.results#results | ||
= observe_field 'q', | | ||
:url => { :controller => 'live', :action => 'search' }, | | ||
:frequency => 1, | | ||
:loading => "Element.show('loading')", | | ||
:complete => "Element.hide('loading')", | | ||
:update => 'results', | | ||
:with => "'q=' + escape($F('q'))" | |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
%li[trackback] | ||
.author | ||
%a{:href=>trackback.url, :rel=>"nofollow"}= trackback.title | ||
%abbr | ||
= precede "From " do | ||
%cite= trackback.blog_name | ||
.content | ||
= trackback.excerpt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.comment.preview | ||
.author | ||
= content_tag(:div, gravatar_tag(@comment.email)) if this_blog.use_gravatar and @comment.email | ||
%cite= link_to_unless(@comment.url.blank?, h(@comment.author), @comment.url) | ||
%abbr is about to say | ||
.content | ||
= html @comment |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
= render :partial => 'article', :collection => @articles | ||
|
||
- unless @pages.item_count <= this_blog.limit_article_display | ||
%p.pagination | ||
= precede "Older posts: " do | ||
= pagination_links @pages, :params => { :action => @controller.action_name } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/ | ||
%rdf:RDF{ | | ||
:"xmlns:rdf"=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#", | | ||
:"xmlns:trackback"=>"http://madskills.com/public/xml/rss/module/trackback/", | | ||
:"xmlns:dc"=>"http://purl.org/dc/elements/1.1/"} | | ||
%rdf:Description{ | | ||
:"rdf:about"=>"", | | ||
:"trackback:ping"=>@article.trackback_url, | | ||
:"dc:title"=>h @article.title.gsub(/-+/, '-'), | | ||
:"dc:identifier"=>@article.permalink_url, | | ||
:"dc:description"=>h (@article.html.strip_html[0..255]).gsub(/-+/, '-'), | | ||
:"dc:creator"=>h @article.author, | | ||
:"dc:date"=>@article.updated_at.xmlschema}/ | | ||
= render :partial => 'article', :object => @article | ||
|
||
- if @article.allow_pings? | ||
%h5 | ||
%a{:name=>"trackbacks"} Trackbacks | ||
%p | ||
Use the following link to trackback from your own site: | ||
%br/ | ||
= @article.trackback_url | ||
|
||
- unless @article.published_trackbacks.blank? | ||
%ol.trackbacks#trackbacks | ||
= render(:partial => "trackback", :collection => @article.published_trackbacks) | ||
|
||
- if @article.allow_comments? or @article.published_comments.size > 0 | ||
%h5 | ||
%a{:name=>"comments"} Comments | ||
%p | ||
%a{:href=>"#commentform"} Leave a response | ||
|
||
#comments_div | ||
= render :partial => "comment" | ||
|
||
= render :partial => 'comment_form' if @article.allow_comments? |
This file was deleted.
Oops, something went wrong.