Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gderosa committed Sep 27, 2010
1 parent 68c220d commit e0c2a43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
7 changes: 7 additions & 0 deletions css/hmenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
.hmenu ul { /* padding-left: 1em; margin-left: 0; */ }
.hmenu-item { }
.hmenu-submenu { }

.hmenu-bullet, .hmenu-bullet-nochildren {
float: left;
width: 1.3em;
text-align: center;
border: 1px gray dotted;
}

li span.hmenu-content {
border: 1px yellow solid;
}

.hmenu-bullet {cursor: pointer;}
14 changes: 5 additions & 9 deletions lib/hmenu/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,14 @@ def to_html_ul(&block)

if o
hmenu_content_class << ' ' << o[:extra_class] if o[:extra_class]
s << "<span class=\"#{hmenu_content_class}\" title=\"" << (o[:desc] || '') << '">'
if o[:href]
s <<
"<a class=\"#{hmenu_content_class}\" " <<
"title=\"#{o[:desc]}\" " <<
"href=\"#{o[:href]}\">#{o[:name]}" <<
"</a>"
s <<
"<a href=\"#{o[:href]}\">#{o[:name]}</a>"
elsif o[:name]
s <<
"<span class=\"#{hmenu_content_class}\" title=\"" << (o[:desc] || '') << '">' <<
(o[:name] || '') <<
'</span>'
s << (o[:name] || '')
end
s << '</span>'
else
s << "<span class=\"#{hmenu_content_class}\"" << name.capitalize << '</span>'
end
Expand Down

0 comments on commit e0c2a43

Please sign in to comment.