%meta{:charset => "UTF-8"} %title=h title %link{:href => "https://unpkg.com/sakura.css/css/sakura.css", :media => "screen", :rel => "stylesheet", :type => "text/css"} %meta{:name => "viewport", :content => "width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"} %link{:href => '/feed', :rel => 'alternate', :title => 'feed', :type => "application/rss+xml"} %script{:src => "https://code.jquery.com/jquery-3.4.1.min.js"} %script{:src => "/search.coffee"} %link{rel: "author", href: "http://www.hatena.ne.jp/ssig33/"} %div#all ~@page.html(request) %hr %h4 Site Search %div %input#search #search_area -if Page.where(name: @page.name).order('id desc').count > 1 %h4 Update History of this content %div %ul -Page.where(name: @page.name).order('id desc').each_with_index do |p,i| %li.history - if i == 0 -if @page.id == p.id %a{href: "/#{URI.encode(@page.name)}"} %b #{p.created_at.gmtime} (Latest) -else %a{href: "/#{URI.encode(@page.name)}"} #{p.created_at.gmtime} (Latest) - else -if @page.id == p.id %a{href: "/#{URI.encode(@page.name)}?history_id=#{p.id}"} %b=p.created_at.gmtime -else %a{href: "/#{URI.encode(@page.name)}?history_id=#{p.id}"}=p.created_at.gmtime :javascript if($('.history').length > 3){$('.history').slice(3).hide();$('.history').last().after($('