summaryrefslogtreecommitdiff
path: root/lib.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2024-07-28 09:44:00 +0200
committerpdp8 <pdp8@pdp8.info>2024-07-28 09:44:00 +0200
commitd987641d7b68fcfa8431b1835411bb1095a37961 (patch)
tree3fbc5e18a16ea0003adace63b1bdb0ea7521f1e7 /lib.rb
parentd13dc919f9fe0e14e8b58ec2e6ce727a6bbc1621 (diff)
image albums, flex layout
Diffstat (limited to 'lib.rb')
-rwxr-xr-xlib.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib.rb b/lib.rb
index 3a94d39..b3dbc73 100755
--- a/lib.rb
+++ b/lib.rb
@@ -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 += "&nbsp;<a class='#{cl}' href='/#{c}.html'>#{c}</a>"
+ html += '<a '
+ html += "class='current' " if c == cat
+ html += "href='/#{c}.html'>#{c}</a>"
end
- html += "&nbsp;<a class='item' href='/social/create.html'>social</a>"
- html += "&nbsp;<a class='item' href='/rss.xml'>rss</a>"
- html += "&nbsp;<a id='menu' href='#' onclick='show_vertical_menu()'>&equiv;</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