Skip to content

Instantly share code, notes, and snippets.

@koseki
Created November 13, 2009 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koseki/233804 to your computer and use it in GitHub Desktop.
Save koseki/233804 to your computer and use it in GitHub Desktop.
SmallCage menu activate sample 1
<html>
<head>
<style type="text/css">
.selected { font-weight: bold; color: red; background-color: yellow; }
</style>
</head>
<body>
<%= menu %>
<%= body %>
</body>
</html>
--- |
<h1>aaa</h1>
<p>This page is under /aaa/ directory.</p>
--- |
<h1>bbb</h1>
<p>This page is under /bbb/ directory.</p>
<!-- Usually, you should use absolute path to create menu. -->
<div>[
<a href="../aaa/index.html"><span class="<%= uri =~ %r{^/aaa/} ? "selected" : "" %>">aaa</span></a>
|
<a href="../bbb/index.html"><span class="<%= uri =~ %r{^/bbb/} ? "selected" : "" %>">bbb</span></a>
]</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment