Skip to content

Commit

Permalink
Fixed styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ogom committed Sep 21, 2014
1 parent 19c626b commit c33f051
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/draw_uml/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Default
DIAGRAM_EXTENSION = 'uml'.freeze
DIAGRAM_PATH = 'doc/diagrams'.freeze
STATIC_PATH = 'public'.freeze
IMAGE_PATH = '/images/draw_uml'.freeze
IMAGE_PATH = '/images/draw-uml'.freeze

class << self
def options
Expand Down
4 changes: 3 additions & 1 deletion lib/draw_uml/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def render_branch(node)
end
end
raw += "<ul>" + arr.map do |entry|
"<li><a href=#{request.script_name}#{entry.id}>#{entry.name}</a></li>"
raw = "<li"
raw += " class='active'"if entry.id == request.path_info
raw += "><a href=#{request.script_name}#{entry.id}>#{entry.name}</a></li>"
end.join("\n")
raw += "</ul></div></div>\n"
raw
Expand Down
2 changes: 1 addition & 1 deletion lib/draw_uml/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module DrawUml
VERSION = '0.1.1'
VERSION = '0.1.2'
end
17 changes: 13 additions & 4 deletions lib/templates/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,25 @@
white-space: pre-wrap;
}

a { color: #000; }
a:visited { color: #666; }
a:hover { color: #fff; background-color:#000; }
a {
color: #000;
text-decoration: none;
padding-left: 4px;
padding-right: 10px;
}
a:visited { color: #000; }
a:hover { color: #000; background-color:#fff; }

h2 { padding-left: 10px; }
h3 { padding-left: 10px; }

li.active { background-color: #666; }
li.active > a { color: #fff; }
li.active > a:hover { color: #fff; background-color:#666; }

div.diagrams {
float:left;
padding-right: 30px;
padding-right: 10px;
padding-bottom: 10px;
border-right: solid #eee;
}
Expand Down

0 comments on commit c33f051

Please sign in to comment.