aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general/blog.rhtml
blob: a80f167d8f5254d9e11f700c04c66919361f941e (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<% @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>
  <div id="twitter">
  <script src="http://widgets.twimg.com/j/2/widget.js"></script>
  <script type="text/javascript">
  new TWTR.Widget({
    version: 2,
    type: 'profile',
    rpp: 15,
    interval: 6000,
    width: 'auto',
    height: 500,
    theme: {
      shell: {
        background: '#eaeaea',
        color: '#000000'
      },
      tweets: {
        background: '#ffffff',
        color: '#000000',
        links: '#0b004a'
      }
    },
    features: {
      scrollbar: false,
      loop: false,
      live: false,
      hashtags: true,
      timestamp: true,
      avatars: true,
      behavior: 'all'
    }
  }).render().setUser('<%=@twitter_user %>').start();
  </script>
  </div>
</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><%= item['encoded'] %></div>
          <p><em>
              <a href="<%=item['comments'][0]%>"><%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %></a>
          </em>
          </p>
      </div>
    <% end   %>
  </div>
</div>