Corrected some HTML bugs, works without article
This commit is contained in:
parent
a40b33d18d
commit
3cb64cda76
12 changed files with 183 additions and 86 deletions
|
@ -32,18 +32,11 @@ Last <%= number_of_articles %> Articles
|
|||
</div>
|
||||
|
||||
<% last_articles.each do |a| %>
|
||||
<h1>
|
||||
<article>
|
||||
<%= calendar_for( a[:created_at], language ) %>
|
||||
<%= link_to(a[:title]+%{ <span class="nicer">»</span>}, a) %>
|
||||
</h1>
|
||||
<h1> <%= link_to(a[:title]+%{ <span class="nicer">»</span>}, a) %> </h1>
|
||||
|
||||
<div class="corps">
|
||||
|
||||
<%
|
||||
puts "%%%"
|
||||
puts excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume})
|
||||
puts "%%%"
|
||||
%>
|
||||
<div class="content">
|
||||
<%= repair_html ( excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume} ) ) %>
|
||||
|
||||
<div class="flush"></div>
|
||||
|
@ -54,6 +47,8 @@ Last <%= number_of_articles %> Articles
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
<hr/>
|
||||
<% end %>
|
||||
|
||||
<div class="corps">
|
||||
|
|
18
content/html/en/blog/2011-05-02-First-post.md
Normal file
18
content/html/en/blog/2011-05-02-First-post.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
-----
|
||||
isHidden: false
|
||||
menupriority: 1
|
||||
kind: article
|
||||
created_at: 2011-05-02T14:56:25+02:00
|
||||
title: First post
|
||||
author_name: Yann Esposito
|
||||
author_uri: yannesposito.com
|
||||
# tags:
|
||||
-----
|
||||
begindiv(intro)
|
||||
|
||||
<%= tldr %> This is a first post.
|
||||
|
||||
|
||||
enddiv
|
||||
|
||||
Hello guys. This is a first post test.
|
|
@ -32,18 +32,11 @@ Les <%= number_of_articles %> derniers articles
|
|||
</div>
|
||||
|
||||
<% last_articles.each do |a| %>
|
||||
<h1>
|
||||
<article>
|
||||
<%= calendar_for( a[:created_at], language ) %>
|
||||
<%= link_to(a[:title]+%{ <span class="nicer">»</span>}, a) %>
|
||||
</h1>
|
||||
<h1> <%= link_to(a[:title]+%{ <span class="nicer">»</span>}, a) %> </h1>
|
||||
|
||||
<div class="corps">
|
||||
|
||||
<%
|
||||
puts "%%%"
|
||||
puts excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume})
|
||||
puts "%%%"
|
||||
%>
|
||||
<div class="content">
|
||||
<%= repair_html ( excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume} ) ) %>
|
||||
|
||||
<div class="flush"></div>
|
||||
|
@ -54,6 +47,8 @@ Les <%= number_of_articles %> derniers articles
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
<hr/>
|
||||
<% end %>
|
||||
|
||||
<div class="corps">
|
||||
|
|
18
content/html/fr/blog/2011-05-02-First-post.md
Normal file
18
content/html/fr/blog/2011-05-02-First-post.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
-----
|
||||
isHidden: false
|
||||
menupriority: 1
|
||||
kind: article
|
||||
created_at: 2011-05-02T14:56:25+02:00
|
||||
title: First post
|
||||
author_name: Yann Esposito
|
||||
author_uri: yannesposito.com
|
||||
# tags:
|
||||
-----
|
||||
begindiv(intro)
|
||||
|
||||
|
||||
<%= tlal %> C'est une premier post.
|
||||
|
||||
enddiv
|
||||
|
||||
Salut ! C'est le premier article pour tester `nanoc`.
|
|
@ -1 +1 @@
|
|||
./multi/blog/2011-04-20-Now-hosted-on-github.md
|
||||
./multi/blog/2011-05-02-First-post.md
|
|
@ -3,15 +3,19 @@
|
|||
<%
|
||||
language=@item_rep.path.sub(%r{#{@config[:webprefix]}/},'').sub(/\/.*$/,'')
|
||||
number_of_char_for_resume=800
|
||||
larts = articles.select { |a| a.reps[0].path =~ /\/#{language}\// }
|
||||
if larts.length>0
|
||||
%><%=
|
||||
# atom_feed( {
|
||||
# :articles => articles.select { |a| a.reps[0].path =~ /\/#{language}\// },
|
||||
# :content_proc =>lambda { |a|
|
||||
# repair_html(
|
||||
# excerptize(
|
||||
# a.compiled_content(:snapshot => :pre),
|
||||
# {:length => number_of_char_for_resume} ))
|
||||
# },
|
||||
# :limit => 40
|
||||
# })
|
||||
atom_feed( {
|
||||
:articles => larts,
|
||||
:content_proc =>lambda { |a|
|
||||
repair_html(
|
||||
excerptize(
|
||||
a.compiled_content(:snapshot => :pre),
|
||||
{:length => number_of_char_for_resume} ))
|
||||
},
|
||||
:limit => 40
|
||||
})
|
||||
%><%
|
||||
end
|
||||
%>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<div id="container">
|
||||
|
||||
<div id="main" role="main">
|
||||
<hgoup>
|
||||
<hgroup>
|
||||
<h1><%= @item[:content_for_title].nil? ? @item[:title] : @item[:content_for_title] %></h1>
|
||||
<% unless @item[:subtitle].nil? and @item[:content_for_subtitle].nil? %>
|
||||
<h2>
|
||||
|
|
|
@ -26,7 +26,7 @@ def repair_html( html, debug=false )
|
|||
end
|
||||
else
|
||||
depth-=1
|
||||
if (not debug) and (depth <0)
|
||||
if debug and (depth <0)
|
||||
puts 'ERROR repair_html: '
|
||||
puts 'HTML: ' + html
|
||||
puts '---'
|
||||
|
@ -40,7 +40,7 @@ def repair_html( html, debug=false )
|
|||
end
|
||||
res=html.sub(/<[^>]*$/m,'')
|
||||
depth -= 1
|
||||
if (depth < 0)
|
||||
if debug and (depth < 0)
|
||||
parents=[]
|
||||
depth=0
|
||||
html.scan( %r{<(/?)(\w*)[^>]*(/?)>} ).each do |m|
|
||||
|
|
|
@ -36,18 +36,11 @@ fr: Les <%= number_of_articles %> derniers articles
|
|||
</div>
|
||||
|
||||
<% last_articles.each do |a| %>
|
||||
<h1>
|
||||
<article>
|
||||
<%= calendar_for( a[:created_at], language ) %>
|
||||
<%= link_to(a[:title]+%{ <span class="nicer">»</span>}, a) %>
|
||||
</h1>
|
||||
<h1> <%= link_to(a[:title]+%{ <span class="nicer">»</span>}, a) %> </h1>
|
||||
|
||||
<div class="corps">
|
||||
|
||||
<%
|
||||
puts "%%%"
|
||||
puts excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume})
|
||||
puts "%%%"
|
||||
%>
|
||||
<div class="content">
|
||||
<%= repair_html ( excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume} ) ) %>
|
||||
|
||||
<div class="flush"></div>
|
||||
|
@ -59,6 +52,8 @@ en: <%= link_to(%{Read more <span class="nicer">»</span>}, a) %>
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
<hr/>
|
||||
<% end %>
|
||||
|
||||
<div class="corps">
|
||||
|
|
21
multi/blog/2011-05-02-First-post.md
Normal file
21
multi/blog/2011-05-02-First-post.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
-----
|
||||
isHidden: false
|
||||
menupriority: 1
|
||||
kind: article
|
||||
created_at: 2011-05-02T14:56:25+02:00
|
||||
fr: title: First post
|
||||
en: title: First post
|
||||
author_name: Yann Esposito
|
||||
author_uri: yannesposito.com
|
||||
# tags:
|
||||
-----
|
||||
begindiv(intro)
|
||||
|
||||
en: <%= tldr %> This is a first post.
|
||||
|
||||
fr: <%= tlal %> C'est une premier post.
|
||||
|
||||
enddiv
|
||||
|
||||
en: Hello guys. This is a first post test.
|
||||
fr: Salut ! C'est le premier article pour tester `nanoc`.
|
|
@ -50,18 +50,22 @@ body > footer {
|
|||
-o-box-shadow: #888888 0px 1px 5px 0;
|
||||
box-shadow: #888888 0px 1px 5px 0;
|
||||
}
|
||||
/* line 68, ../src/main.scss */
|
||||
body > footer a {
|
||||
color: #2c5490;
|
||||
}
|
||||
|
||||
/* line 72, ../src/main.scss */
|
||||
/* line 75, ../src/main.scss */
|
||||
nav {
|
||||
border-bottom: solid 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* line 75, ../src/main.scss */
|
||||
/* line 78, ../src/main.scss */
|
||||
nav ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/* line 78, ../src/main.scss */
|
||||
/* line 81, ../src/main.scss */
|
||||
nav ul li {
|
||||
display: inline-block;
|
||||
height: 50px;
|
||||
|
@ -72,7 +76,7 @@ nav ul li {
|
|||
border-right: solid 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* line 87, ../src/main.scss */
|
||||
/* line 90, ../src/main.scss */
|
||||
nav ul li * {
|
||||
display: block;
|
||||
margin-right: 0px;
|
||||
|
@ -82,23 +86,23 @@ nav ul li * {
|
|||
text-shadow: -1px -1px rgba(0, 0, 0, 0.2), 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* line 95, ../src/main.scss */
|
||||
/* line 98, ../src/main.scss */
|
||||
nav ul li span.active {
|
||||
background-color: #002233;
|
||||
}
|
||||
|
||||
/* line 98, ../src/main.scss */
|
||||
/* line 101, ../src/main.scss */
|
||||
nav ul li a {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
/* line 101, ../src/main.scss */
|
||||
/* line 104, ../src/main.scss */
|
||||
nav ul li a:hover {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* line 106, ../src/main.scss */
|
||||
/* line 109, ../src/main.scss */
|
||||
header #choixrss, header #choixlang {
|
||||
display: block;
|
||||
margin-right: 0px;
|
||||
|
@ -112,7 +116,7 @@ header #choixrss, header #choixlang {
|
|||
border-right: solid 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* line 118, ../src/main.scss */
|
||||
/* line 121, ../src/main.scss */
|
||||
header #choixrss a, header #choixlang a {
|
||||
color: #bcd0ee;
|
||||
display: block;
|
||||
|
@ -122,23 +126,23 @@ header #choixrss a, header #choixlang a {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
/* line 126, ../src/main.scss */
|
||||
/* line 129, ../src/main.scss */
|
||||
header #choixrss a:hover, header #choixlang a:hover {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* line 131, ../src/main.scss */
|
||||
/* line 134, ../src/main.scss */
|
||||
#main {
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
/* line 134, ../src/main.scss */
|
||||
/* line 137, ../src/main.scss */
|
||||
#container {
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
/* line 138, ../src/main.scss */
|
||||
/* line 141, ../src/main.scss */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Expletus Sans',Futura,sans-serif;
|
||||
text-shadow: 0px -1px 0px #2233aa, 0px 1px 0px white;
|
||||
|
@ -147,7 +151,33 @@ h1, h2, h3, h4, h5, h6 {
|
|||
margin: 48px 0;
|
||||
}
|
||||
|
||||
/* line 147, ../src/main.scss */
|
||||
/* line 149, ../src/main.scss */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-align: center;
|
||||
}
|
||||
/* line 151, ../src/main.scss */
|
||||
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
|
||||
text-shadow: 0px -1px 0px #441111, 0px 1px 0px white;
|
||||
}
|
||||
|
||||
/* line 156, ../src/main.scss */
|
||||
article article .date {
|
||||
float: right;
|
||||
}
|
||||
/* line 157, ../src/main.scss */
|
||||
article article h1, article article h2, article article h3, article article h4, article article h5, article article h6 {
|
||||
text-align: left;
|
||||
font-size: 25px;
|
||||
line-height: 30px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* line 166, ../src/main.scss */
|
||||
.intro {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
/* line 169, ../src/main.scss */
|
||||
.sc {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,9 @@ body > footer {
|
|||
font-size: .9em;
|
||||
text-shadow: 1px 1px #fff;
|
||||
@include box-shadow(#888);
|
||||
a {
|
||||
color: $dark;
|
||||
}
|
||||
}
|
||||
|
||||
$menuItemWidth: 6em;
|
||||
|
@ -144,7 +147,25 @@ h1, h2, h3, h4, h5, h6 {
|
|||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-align: center;
|
||||
a:hover {
|
||||
text-shadow: 0px -1px 0px $hoverColorShadow, 0px 1px 0px #FFF;
|
||||
}
|
||||
}
|
||||
article article {
|
||||
.date { float: right; }
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-align: left;
|
||||
font-size: 25px;
|
||||
line-height: 30px;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.sc {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue