Skip to content

Commit c50365f

Browse files
committed
Fix the news_post layout (issue ruby#47).
1 parent 9673de7 commit c50365f

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

_layouts/news_post.html

+42-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,48 @@
11
---
2-
layout: news
2+
layout: default
33
---
44

5-
<div class="post">
6-
<h3>{{ page.title }}</h3>
5+
<div id="content-wrapper">
6+
<div id="head-wrapper-1">
7+
<div id="head-wrapper-2">
8+
<div id="head">
9+
<h1>{{ page.title }}</h1>
10+
</div>
11+
</div>
12+
</div>
713

8-
{{ content }}
14+
<div id="content">
15+
{{ content }}
16+
</div>
17+
<hr class="hidden-modern" />
18+
</div>
19+
20+
<div id="sidebar-wrapper">
21+
<div id="sidebar">
22+
<div class="navigation">
23+
{% if site.locales.news[page.lang] %}
24+
{% assign news = site.locales.news[page.lang] %}
25+
{% else %}
26+
{% assign news = site.locales.news['en'] %}
27+
{% endif %}
28+
29+
<h3><strong>{{ news.recent_news }}</strong></h3>
30+
31+
<ul class="menu">
32+
{% for post in site.categories[page.lang] limit:5 %}
33+
<li><a href="{{ post.url }}//">{{ post.title }}</a></li>
34+
{% endfor %}
35+
</ul>
36+
</div>
37+
38+
{% if site.locales.sidebar[page.lang] %}
39+
{% assign sidebar = site.locales.sidebar[page.lang] %}
40+
{% else %}
41+
{% assign sidebar = site.locales.sidebar['en'] %}
42+
{% endif %}
943

10-
{% if page.author and page.author != "" %}
11-
<p class="post-info">{{ page.author }} &ndash; {{ page.date | date_to_string }}</p>
12-
{% else %}
13-
<p class="post-info">{{ page.date | date_to_string }}</p>
14-
{% endif %}
44+
<h3>{{ sidebar.syndicate.text }}</h3>
45+
<p><a href="{{ sidebar.syndicate.recent_news.url }}">{{ sidebar.syndicate.recent_news.text }}</a></p>
46+
</div>
1547
</div>
48+
<hr class="hidden-modern" />

0 commit comments

Comments
 (0)