aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general/blog.rhtml
blob: 07d6d2f14b367b8062bf5370027968baa0e9a6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<% @title = _("{{site_name}} blog and tweets", :site_name => site_name) %>

<% if !@twitter_user.empty? %>
<div id="right_column">
  <div class="act_link">
    <h2><%= _("Stay up to date") %></h2>
    <img src="/images/twitter-16.png" alt="twitter icon"  class="twitter-icon"> <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %></a><br/><br/>
    <img src="/images/feed-16.png" alt="RSS icon" valign="middle"> <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %></a>
  </div>
  <% if Configuration::twitter_widget_id %>
  <div id="twitter">
    <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= Configuration::twitter_username %>" data-widget-id="<%= Configuration::twitter_widget_id %>">Tweets by @<%= Configuration::twitter_username %></a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  </div>
  <% end %>
</div>
<% end %>

<div id="left_column">
  <h1><%=@title %></h1>

  <div id="blog">
    <% for item in @blog_items: %>
      <div class="blog_post">
          <h2 id="<%= Time.parse(item['pubDate'][0]).to_i %>"><a href="<%=item['link']%>"><%=h item['title'] %></a></h2>
          <p class="subtitle"><%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %></p>
          <div>
            <% if item['encoded'] %>
              <%= raw item['encoded'] %>
            <% elsif item['description'] %>
              <%= raw item['description'] %>
            <% end %>
          </div>
          <p><em>
            <% if item['comments'] %>
              <a href="<%=item['comments'][0]%>"><%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %></a>
            <% end %>
          </em>
          </p>
      </div>
    <% end   %>
  </div>
</div>