Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding a license to sputnik-luausers and a fix to enable a full-two tier

menu.
  • Loading branch information...
commit ef9ca5a919f314482d63682f639357f8ec9408fd 1 parent 13bb686
Yuri authored
Showing with 37 additions and 10 deletions.
  1. +24 −0 sputnik-luausers/LICENSE.txt
  2. +13 −10 sputnik/lua/sputnik/actions/wiki.lua
View
24 sputnik-luausers/LICENSE.txt
@@ -0,0 +1,24 @@
+Copyright (c) 2008 Jérôme Vuarand (Lua-Users templates for Sputnik)
+Copyright (c) 2008 John Belmonte (original Lua-Users design)
+Copyright (c) 2008 Yuri Takhteyev (markup code and conversion scripts)
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
23 sputnik/lua/sputnik/actions/wiki.lua
@@ -35,6 +35,16 @@ function get_nav_bar (node, sputnik)
end
end
+ local do_subsections = function(section)
+ for i, subsection in ipairs(section or {}) do
+ cosmo.yield {
+ class = util.choose(subsection.is_active, "front", "back"),
+ link = sputnik:make_link(subsection.id),
+ label = subsection.title
+ }
+ end
+ end
+
return cosmo.f(node.templates.NAV_BAR){
do_sections = function()
for i, section in ipairs(nav) do
@@ -42,19 +52,12 @@ function get_nav_bar (node, sputnik)
class = util.choose(section.is_active, "front", "back"),
id = section.id,
link = sputnik:make_link(section.id),
- label = section.title
- }
- end
- end,
- do_subsections = function()
- for i, subsection in ipairs(nav.current_section or {}) do
- cosmo.yield {
- class = util.choose(subsection.is_active, "front", "back"),
- link = sputnik:make_link(subsection.id),
- label = subsection.title
+ label = section.title,
+ do_subsections = function() return do_subsections(section) end
}
end
end,
+ do_subsections = function() return do_subsections(nav.current_section) end
}
end
Please sign in to comment.
Something went wrong with that request. Please try again.