mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-14 03:18:02 +00:00
More tweaks to the archive pages
This commit is contained in:
parent
3c58d08cea
commit
f1252cb2a4
8 changed files with 34 additions and 30 deletions
|
@ -1 +1,3 @@
|
||||||
<ul class="aricles"></ul>
|
<ul class="articles">
|
||||||
|
<li>Loading…</li>
|
||||||
|
</ul>
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
<ul class="aricles"></ul>
|
<ul class="articles">
|
||||||
|
<li>Loading…</li>
|
||||||
|
</ul>
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
<ul class="aricles"></ul>
|
<ul class="articles">
|
||||||
|
<li>Loading…</li>
|
||||||
|
</ul>
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
</abbr>
|
</abbr>
|
||||||
<p>
|
<p>
|
||||||
<strong><a href="<%= @article.reps.first.path %>"><%= @article[:title] %></a></strong>
|
<strong><a href="<%= @article.reps.first.path %>"><%= @article[:title] %></a></strong>
|
||||||
A one sentence summary of this post would go here this one is longer then the other one.
|
<%= @item[:summary] %>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<%= render 'head_common' %>
|
<%= render 'head_common' %>
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="/js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<% if @item.identifier =~ %r{/page/$} %>
|
<% if @item.identifier =~ %r{/page/$} %>
|
||||||
<script src="/js/jquery.ba-bbq.min.js" type="text/javascript" charset="utf-8"></script>
|
<script src="/js/jquery.ba-bbq.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<script src="/js/mojo.js" type="text/javascript" charset="utf-8"></script>
|
<script src="/js/mojo.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
@ -10,17 +11,16 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
// pagination and search require javascript, so reveal them with javascript
|
show_javascript_widgets();
|
||||||
$('.pagination').show();
|
webkit_search_tweak();
|
||||||
$('#search').show();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %>
|
||||||
</head>
|
</head>
|
||||||
<body class="articles">
|
<body class="articles">
|
||||||
<%= render 'header' %>
|
<%= render 'header' %>
|
||||||
|
<h1>Archives</h1>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<h1>Archives</h1>
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
menu = [
|
menu = [
|
||||||
|
@ -33,8 +33,9 @@
|
||||||
<% menu.each do |menu_item|
|
<% menu.each do |menu_item|
|
||||||
label, count = menu_item
|
label, count = menu_item
|
||||||
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
|
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
|
||||||
|
active = (@item.identifier.sub(%r{page/$}, '') == path)
|
||||||
%>
|
%>
|
||||||
<li><a href="<%= path %>"<%= %Q{class="active"} if @item.identifier == path %>><%= label %></a> (<%= count %>)</li>
|
<li><a href="<%= path %>"<%= %Q{class="active"} if active %>><%= label %></a> (<%= count %>)</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li id="search">
|
<li id="search">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
@ -51,9 +52,9 @@
|
||||||
|
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<% pagepath = @item.identifier; pagepath += 'page/' if pagepath !~ %r{/page/$} %>
|
<% pagepath = @item.identifier; pagepath += 'page/' if pagepath !~ %r{/page/$} %>
|
||||||
<a href="<%= pagepath %>" class="older">« Older</a>
|
<a href="<%= pagepath %>#2" class="newer">« Newer</a>
|
||||||
|
|
|
|
||||||
<a href="<%= pagepath %>#2" class="newer">Newer »</a>
|
<a href="<%= pagepath %>" class="older">Older »</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= render 'footer' %>
|
<%= render 'footer' %>
|
||||||
|
|
|
@ -3,14 +3,14 @@ body {
|
||||||
font-size: 62.5%;
|
font-size: 62.5%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #223;
|
color: #223;
|
||||||
/* padding: 2em;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p,li {
|
p,li,div {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
p,li {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin: 0 0 1em 0;
|
margin: 0 0 1em 0;
|
||||||
}
|
}
|
||||||
|
@ -109,21 +109,13 @@ pre {
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#menu {
|
ul#menu {
|
||||||
/* list-style: none;*/
|
|
||||||
float: right;
|
float: right;
|
||||||
/* margin: 0;*/
|
|
||||||
padding-right: 0.25em;
|
padding-right: 0.25em;
|
||||||
}
|
}
|
||||||
ul#menu li {
|
ul#menu li {
|
||||||
/* display: inline;*/
|
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*body.article h1 {
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
clear: both;
|
clear: both;
|
||||||
|
@ -143,7 +135,7 @@ body.articles #content {
|
||||||
}
|
}
|
||||||
#footer .copyright {
|
#footer .copyright {
|
||||||
font-family: "Helvetica Neue", Helvetica, "Liberation Sans", "Bitstream Vera Sans", Tahoma, Geneva, Arial, sans-serif;
|
font-family: "Helvetica Neue", Helvetica, "Liberation Sans", "Bitstream Vera Sans", Tahoma, Geneva, Arial, sans-serif;
|
||||||
font-size: 1.4em;
|
font-size: 14px;
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
display: block;
|
display: block;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
|
|
|
@ -70,13 +70,8 @@
|
||||||
// Since the event is only triggered when the hash changes, we need to trigger
|
// Since the event is only triggered when the hash changes, we need to trigger
|
||||||
// the event now, to handle the hash the page may have loaded with.
|
// the event now, to handle the hash the page may have loaded with.
|
||||||
$(window).trigger('hashchange');
|
$(window).trigger('hashchange');
|
||||||
$('.pagination').show();
|
show_javascript_widgets();
|
||||||
$('#search').show();
|
webkit_search_tweak();
|
||||||
|
|
||||||
if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) {
|
|
||||||
// WebKit browser
|
|
||||||
$('#search input').css('paddingTop', 0);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
10
output/js/common.js
Normal file
10
output/js/common.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
function show_javascript_widgets() {
|
||||||
|
$('.pagination').show();
|
||||||
|
$('#search').show();
|
||||||
|
};
|
||||||
|
|
||||||
|
function webkit_search_tweak() {
|
||||||
|
if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) {
|
||||||
|
$('#search input').css('paddingTop', 0);
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in a new issue