diff --git a/server/documents/collections/menu.html.eco b/server/documents/collections/menu.html.eco
index 6071d1fca..2f54884de 100755
--- a/server/documents/collections/menu.html.eco
+++ b/server/documents/collections/menu.html.eco
@@ -1,6 +1,7 @@
---
layout : 'default'
css : 'menu'
+standalone : true
element : 'menu'
elementType : 'collection'
@@ -24,6 +25,9 @@ themes : ['Default', 'GitHub']
A menu
diff --git a/server/files/javascript/docs.js b/server/files/javascript/docs.js
index 111b9ffb0..439132d07 100755
--- a/server/files/javascript/docs.js
+++ b/server/files/javascript/docs.js
@@ -95,9 +95,14 @@ semantic.ready = function() {
createIcon: function() {
$example
.each(function(){
+ var
+ $insertPoint = $(this).is('.another')
+ ? $(this).children().eq(0)
+ : $(this).children().eq(1)
+ ;
$('')
.addClass('icon code')
- .insertAfter( $(this).children(':first-child') )
+ .insertBefore( $insertPoint )
;
})
;
@@ -597,9 +602,14 @@ semantic.ready = function() {
? lines[1]
: lines[0],
spacesPerIndent = 2,
- leadingSpaces = firstLine.length - firstLine.replace(/^\s*/g, '').length,
+ leadingSpaces = (firstLine !== undefined)
+ ? firstLine.length - firstLine.replace(/^\s*/g, '').length
+ : false,
indent
;
+ if(!leadingSpaces) {
+ return 4;
+ }
if(leadingSpaces !== 0) {
indent = leadingSpaces;
}
diff --git a/server/files/javascript/menu.js b/server/files/javascript/menu.js
index b2127b948..7d9dfe285 100755
--- a/server/files/javascript/menu.js
+++ b/server/files/javascript/menu.js
@@ -5,8 +5,9 @@ semantic.menu.ready = function() {
// selector cache
var
- $menuItem = $('.menu a.item, .menu .link.item'),
- $dropdown = $('.main.container .menu .dropdown'),
+ $dropdownItem = $('.main.container .menu .dropdown .item'),
+ $menuItem = $('.main.container .menu a.item, .menu .link.item').not($dropdownItem),
+ $dropdown = $('.main.container .menu .dropdown'),
// alias
handler = {
diff --git a/server/files/stylesheets/docs.css b/server/files/stylesheets/docs.css
index ffb30b16f..b9562010c 100755
--- a/server/files/stylesheets/docs.css
+++ b/server/files/stylesheets/docs.css
@@ -757,13 +757,15 @@ body#example {
padding-top: 0px;
border-top: none;
}
-#example .another.example i.code,
#example .example:first-child i.code,
#example h2 + .example i.code,
#example h3 + .example i.code,
#example h4 + .example i.code {
top: 0.4em;
}
+#example .another.example i.code {
+ top: 1em;
+}
/* Spaced */
#example .spaced.example .buttons,