Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove javascript load_article() and permalinks so real urls can be u…

  • Loading branch information...
commit 97eedd413c709767b6f6855b5c50ff64db2ff640 1 parent b4cc466
@zzak zzak authored
Showing with 4 additions and 25 deletions.
  1. +4 −25 app.rb
View
29 app.rb
@@ -34,12 +34,12 @@
get '/p/:topic' do
pass if params[:topic] == '..'
- markdown :"#{params[:topic]}/README", :layout => !request.xhr?
+ markdown :"#{params[:topic]}/README"
end
get '/p/:topic/:article' do
pass if params[:topic] == '..'
- markdown :"#{params[:topic]}/#{params[:article]}", :layout => !request.xhr?
+ markdown :"#{params[:topic]}/#{params[:article]}"
end
get '/style.css' do
@@ -60,17 +60,6 @@
type='text/javascript'
src='https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'>
</script>
- <script type='text/javascript'>
- function load_article(url) {
- jQuery.ajax({
- url: url,
- success: function(response) {
- $('#post').html(response);
- $('#permalink').attr('href', url);
- }
- });
- }
- </script>
</head>
<body>
<a name='top' />
@@ -85,15 +74,13 @@
<ul>
<% @menu.each_key do |me| %>
<li>
- <a href='#<%= "#{me}" %>' onclick="load_article('/p/<%= "#{me}" %>');">
+ <a href='/p/<%= "#{me}" %>'>
<%= me %>
</a>
<ul>
<% @menu[me].each do |mi| %>
<li>
- <a
- href='#<%= "#{me}_#{mi}" %>'
- onclick="load_article('/p/<%= "#{me}/#{mi}" %>');">
+ <a href='/p/<%= "#{me}/#{mi}" %>'>
<%= mi.gsub('_', ' ').gsub('.md', '') %>
</a>
</li>
@@ -103,11 +90,6 @@
</ul>
</div>
<div id="content">
- <div id="perma">
- <a href="<%= request.url %>" id="permalink">
- Permalink
- </a>
- </div>
<div id="post">
<%= yield %>
</div>
@@ -174,9 +156,6 @@
float: right
width: 470px
-#perma
- text-align: right
-
#content pre
padding: 10px
max-width: 470px
Please sign in to comment.
Something went wrong with that request. Please try again.