diff options
author | pdp8 <pdp8@pdp8.info> | 2024-07-28 09:44:00 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2024-07-28 09:44:00 +0200 |
commit | d987641d7b68fcfa8431b1835411bb1095a37961 (patch) | |
tree | 3fbc5e18a16ea0003adace63b1bdb0ea7521f1e7 /lib.rb | |
parent | d13dc919f9fe0e14e8b58ec2e6ce727a6bbc1621 (diff) |
image albums, flex layout
Diffstat (limited to 'lib.rb')
-rwxr-xr-x | lib.rb | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -7,14 +7,16 @@ SNIPPETS = File.join(File.dirname(__FILE__), 'html') def nav(cat) html = '<nav>' - html += "<a id='logo' href='/about.html'><img src='/pdp8.png' alt='pdp8'></a>" + html += "<a id='logo' href='/about.html'><img src='/pdp8.png' alt='pdp8 logo'></a>" + html += "<div class='menu'>" %w[music pictures videos climbing code contact].each do |c| - cl = c == cat ? 'item current' : 'item' - html += " <a class='#{cl}' href='/#{c}.html'>#{c}</a>" + html += '<a ' + html += "class='current' " if c == cat + html += "href='/#{c}.html'>#{c}</a>" end - html += " <a class='item' href='/social/create.html'>social</a>" - html += " <a class='item' href='/rss.xml'>rss</a>" - html += " <a id='menu' href='#' onclick='show_vertical_menu()'>≡</a>" + html += "<a #{cat == 'social' ? 'class="current"' : ''} href='/social/create.html'>social</a>" + html += "<a href='/rss.xml'>rss</a>" + html += '</div>' html += '</nav>' html end |