mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Embeddable Discourse comments, now with simple-rss instead of feedzirra
This commit is contained in:
30
app/views/embed/best.html.erb
Normal file
30
app/views/embed/best.html.erb
Normal file
@@ -0,0 +1,30 @@
|
||||
<header>
|
||||
<%- if @topic_view.posts.present? %>
|
||||
<%= link_to(I18n.t('embed.title'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||
<%- else %>
|
||||
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||
<%- end if %>
|
||||
|
||||
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url) %>
|
||||
</header>
|
||||
|
||||
<%- if @topic_view.posts.present? %>
|
||||
<%- @topic_view.posts.each do |post| %>
|
||||
<article class='post'>
|
||||
<%= link_to post.created_at.strftime("%e %b %Y"), post.url, class: 'post-date', target: "_blank" %>
|
||||
<div class='author'>
|
||||
<img src='<%= post.user.small_avatar_url %>'>
|
||||
<h3><%= post.user.username %></h3>
|
||||
</div>
|
||||
<div class='cooked'><%= raw post.cooked %></div>
|
||||
<div style='clear: both'></div>
|
||||
</article>
|
||||
<%- end %>
|
||||
|
||||
<footer>
|
||||
<%= link_to(I18n.t('embed.continue'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url) %>
|
||||
</footer>
|
||||
|
||||
<% end %>
|
||||
|
||||
12
app/views/embed/loading.html.erb
Normal file
12
app/views/embed/loading.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<header>
|
||||
<%= t 'embed.loading' %>
|
||||
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url) %>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
setTimeout(function() {
|
||||
document.location.reload();
|
||||
}, 30000);
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user