Commits

Sepehr Taghdisian committed 54e12c1

fixed some css bugs, updated README

  • Participants
  • Parent commits 5c7331c
  • Branches 1.2

Comments (0)

Files changed (3)

     - **$(TITLE)**: Title of the wiki
     - **$(FOOTNOTE)**: User footnote for the footer
     - **$(LOGO)**: Can be a relative path to an image for the wiki 
-    - **$(TOC)**: Table of contents (auto generated) will go there.
 
 - **config.json**: This is settings JSON file for the theme, includes common variables for theme compiler. _mdwiki_ will read this file and fillup some template tags:  
     - **title**: will set _$(TITLE)_ value upon HTML generation (see above)
     - **logo**: will set _$(LOGO)_
 
 **Note** that the program only reads all _(png, jpg, css, js, gif)_ files under theme root path (not recursive) and copy them to ouput HTML path or upload them to ftp, so don't bloat the main directory for the theme with unnecessary files.
+**Table of contents (TOC): ** To Embed TOC in your theme, there is a jquery plugin available inside the package, 
+that you should integrate it inside your _tmpl.html_, here's how:  
+Add _main.css_ to theme styles:
+```
+<link rel='stylesheet' href='$(PREFIX)css/main.css'>
+```
+Create a div somewhere in HTML, (likely in the sidebar area):  
+```
+<div id='toc'>
+</div>
+```
+At the end of the page, add _jquery.js_ and _toc.js_ included with the package and initialize toc plugin:  
+```
+<script src='$(PREFIX)js/jquery-1.9.1.min.js'></script>
+<script src='$(PREFIX)js/toc.js'></script>
+<script>
+    $('#toc').mdwikiTOC();
+</script>
+```
 
 ### License
 License for source code and redistribution is [BSD 2-Clause](http://opensource.org/licenses/BSD-2-Clause)
 ul.TOC {
     list-style-type: none;
-    line-height: 1.5em;
     list-style-position: inside;
     font-weight: bold;
     font-size: 14px;
 
 ul.TOC > li > ul {
     list-style-type: disc;
-    line-height: 1em;
     font-size: 13px;
     font-weight: 100;
+    margin: 0.3em;
 }
 
 ul.TOC > li > ul > li > ul {
     list-style-type: circle;
-    line-height: 1em;
     font-size: 13px;
     font-weight: 100;
+    margin: 0.3em;
 }
 
 ul.TOC > li > ul > li {
     margin-left: -2.5em;
-    margin-top: -0.5em;
 }
 
 ul.TOC > li > ul > li > ul > li {
     margin-left: -2em;
-    margin-top: -0.5em;
 }
 
 ul.TOC > li > a {
 ul.TOC > li > ul > li > ul > li > a {
     text-decoration: none;
 }
+
+::-webkit-scrollbar {
+    width: 12px;
+}
+ 
+::-webkit-scrollbar-track {
+    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
+}
+ 
+::-webkit-scrollbar-thumb {
+    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
+}

src/themes/darkhammer/theme.css

 
 a:hover {
     color: white;
+    -webkit-transition: none;
+    -moz-transition: none;
+    -o-transition: none;
+    -ms-transition: none;
+    transition: none;
 }
 
 html {