diff --git a/lib/gollum/frontend/public/css/editbar.css b/lib/gollum/frontend/public/css/editbar.css index 1696d48e..45b78143 100644 --- a/lib/gollum/frontend/public/css/editbar.css +++ b/lib/gollum/frontend/public/css/editbar.css @@ -3,12 +3,18 @@ border-top: 1px solid #888; border-right: 1px solid #888; width: 100%; - background: white; - background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#EBF1FF)); - background: -moz-linear-gradient(top, #fff, #EBF1FF); overflow: hidden; + font-family: sans-serif; + font-size: 13px; } + #editbar .menu { + overflow: hidden; + background: white; + background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#EBF1FF)); + background: -moz-linear-gradient(top, #fff, #EBF1FF); + } + #editbar .group { float: left; height: 26px; @@ -59,8 +65,6 @@ #editbar .tab { float: left; display: block; - font-family: sans-serif; - font-size: 13px; } #editbar .tab a { @@ -89,4 +93,74 @@ #editbar .tab a:hover { text-decoration: underline; - } \ No newline at end of file + } + + #editbar .sections { + clear: both; + float: left; + width: 100%; + overflow: visible; + border-top: 1px solid #888; + height: 1750px; + } + + #editbar .sections .toc { + float: left; + width: 20%; + overflow: auto; + } + + #editbar .sections .toc div { + cursor: pointer; + padding: 4px 4px 4px 6px; + background-color: #E0EEF7; + color: blue; + } + + #editbar .sections .toc div.current { + cursor: default; + background-color: white; + color: #333; + } + + #editbar .sections .pages { + overflow: auto; + background-color: white; + float: right; + width: 80%; + height: 1750px; + } + + #editbar .sections .page { + display: none; + } + + #editbar .sections .page.current { + display: block; + } + + #editbar .sections .pages th { + color: #999; + font-weight: bold; + padding: 5px; + text-align: left; + } + + #editbar .sections .pages td { + color: black; + padding: 5px; + border-top: 1px solid #eee; + } + + #editbar .sections .pages span.invisible { + color: #bbb; + padding-left: 1px; + } + + #editbar .sections .pages .shortcodes th { + text-align: center; + } + + #editbar .sections .pages .shortcodes ul { + list-style-type: none; + } \ No newline at end of file diff --git a/lib/gollum/frontend/public/css/screen.css b/lib/gollum/frontend/public/css/screen.css index dd9dd232..bd174078 100644 --- a/lib/gollum/frontend/public/css/screen.css +++ b/lib/gollum/frontend/public/css/screen.css @@ -342,4 +342,29 @@ html {overflow-y: scroll;} .wikistyle pre.console span.command { color: yellow !important; - } \ No newline at end of file + } + +/* Special markup considerations */ + +/* asciidoc */ + +.wikistyle .ulist p, +.wikistyle .olist p { + margin: 0 !important; +} + +.wikistyle .loweralpha { + list-style-type: lower-alpha; +} + +.wikistyle .lowerroman { + list-style-type: lower-roman; +} + +.wikistyle .upperalpha { + list-style-type: upper-alpha; +} + +.wikistyle .upperroman { + list-style-type: upper-roman; +} \ No newline at end of file diff --git a/lib/gollum/frontend/public/images/example.png b/lib/gollum/frontend/public/images/example.png new file mode 100644 index 00000000..a3853683 Binary files /dev/null and b/lib/gollum/frontend/public/images/example.png differ diff --git a/lib/gollum/frontend/public/javascript/gollum.js b/lib/gollum/frontend/public/javascript/gollum.js index 61d68211..56636586 100644 --- a/lib/gollum/frontend/public/javascript/gollum.js +++ b/lib/gollum/frontend/public/javascript/gollum.js @@ -75,7 +75,7 @@ Gollum.Formats = { org: { bold: Gollum.encloseStrategy('*', 'bold text', '*'), italic: Gollum.encloseStrategy('/', 'italic text', '/'), - ul: Gollum.prefixStrategy('* ', 'Bullet list item', true), + ul: Gollum.prefixStrategy('- ', 'Bullet list item', true), ol: Gollum.prefixStrategy('1. ', 'Numbered list item', true) }, pod: { @@ -156,4 +156,26 @@ $(function(){ $(this).addClass("open") } }) + + $('#guides .write select[name=format]').change(function() { + var target = $('#editbar .sections .toc div.current').get(0) + sectionItemClick.call(target) + }) + + var sectionItemClick = function() { + $('#editbar .sections .toc div').removeClass('current') + $(this).addClass('current') + $('#editbar .sections .page').removeClass('current') + var classes = $(this).attr('class').split(' ') + var name = classes[0] + var format = $('#guides .write select[name=format] option:selected').attr('value') + if (classes.indexOf('gollum') == -1) { + $('#editbar .sections .page.' + name + '.' + format).addClass('current') + } else { + $('#editbar .sections .page.' + name).addClass('current') + } + return false; + } + + $('#editbar .sections .toc div').click(sectionItemClick) }) diff --git a/lib/gollum/frontend/templates/edit.mustache b/lib/gollum/frontend/templates/edit.mustache index bf56ad6a..126816d0 100644 --- a/lib/gollum/frontend/templates/edit.mustache +++ b/lib/gollum/frontend/templates/edit.mustache @@ -12,31 +12,7 @@