Martín Mulone avatar Martín Mulone committed 592c149

Adding plugins highlight. Removing unsed. New menu maker. Some documentation. Added responsive layout. Many fixes to layout.

Comments (0)

Files changed (54)

controllers/default.py

 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
+from highlight import PluginHighlight
+
+
 def index():
     """ Default Index """
 
-    return dict(message="")
+    response.flash = 'Well done!. You successfully read this important alert message.'
 
+    return dict()
 
-def basecss():
-    """ Remove this is to test things """
 
-    return dict(message="")
+def getting():
+    """This is the documentation"""
 
+    PluginHighlight().install()
 
-def components():
-    """ Remove this is to test things """
-
-    return dict(message="")
+    return dict()
 
 
 def user():
Add a comment to this file

databases/storage.sqlite

Binary file modified.

 'about': 'acerca de',
 'About application': 'Acerca de la aplicación',
 'Access Control': 'Access Control',
+'Actions': 'Actions',
 'additional code for your application': 'código adicional para su aplicación',
 'admin disabled because no admin password': ' por falta de contraseña',
 'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
 from gluon.tools import Crud
 from gluon.tools import Service
 from gluon.contrib.login_methods.rpx_account import use_janrain
-from bootstrap import authbar_bootstrap, PluginNavBar, MenuItem, SubMenuItem, MenuRootItem
+from bootstrap import authbar_bootstrap, BootstrapNavBar
 
 
 """
     """ Default web2py required this at the end """
 
     # web2py required to work properly
-    #app_response.files.insert(0, URL('static', 'js/jquery.js'))
-    response.scripts_ready.append('''jQuery('.flash').hide();
-        var flash = jQuery('.flash').html();
-        if(flash!='') {ShowFlash(flash,1);}''')
+    response.scripts_ready.append('''
+        var flash = jQuery('.flash');
+        var flash_content = jQuery('.flash-content');
+        flash.hide();
+        if(flash_content.html()) {ShowFlash(flash_content.html(),'default');}
+        ''')
     response.scripts_ready.append('''web2py_ajax_init();''')
     response.scripts_head.append('''
-            function ShowFlash(message,alertcode)
+            function ShowFlash(flash_content,alert_type)
             {
-            jQuery('.flash').html(message);
-            if(message) jQuery('.flash').slideDown();
+            jQuery('.flash-content').html(flash_content);
+            if(flash_content) jQuery('.flash').slideDown();
             };
         ''')
 
 #########################################################################
 
 def _menu():
-    response.menu = PluginNavBar()
-    response.menu.appenditem('Home', URL('default', 'index'))
-    response.menu.appenditem('Link 1', URL('default', 'link1'))
 
-    level1 = MenuRootItem(SubMenuItem('Bootstrap',  None, name='more'))
-    level1.appenditem('Base Css', URL('default', 'basecss'), name='basecss')
-    level1.appenditem('Components', URL('default', 'components'), name='components')
-    response.menu.append(level1)
+    skeleton = [
+        ('Home', URL('default', 'index')),
+        ('Get started', URL('default', 'getting')),
+        ('Bootstrap', '', [
+            ('Home', 'http://twitter.github.com/bootstrap/index.html'),
+            ('Getting started', 'http://twitter.github.com/bootstrap/getting-started.html'),
+            ('Scattfolding', 'http://twitter.github.com/bootstrap/scaffolding.html'),
+            ('Base Css', 'http://twitter.github.com/bootstrap/base-css.html'),
+            ('Components', 'http://twitter.github.com/bootstrap/components.html'),
+            ('Javascript', 'http://twitter.github.com/bootstrap/javascript.html')
+        ]),
+        ('Test', '', [
+            ('Multilevel', '',[
+                ('Multilevel Child', ''),
+                ('Multilevel Child II', '')
+            ])
+        ])
+    ]
 
-    level1 = MenuRootItem(SubMenuItem('Test',  None, name='more'))
-    level2 = MenuRootItem(SubMenuItem('SubTest',  None, name='more'))
-    level2.appenditem('Base Css', URL('default', 'basecss'), name='basecss')
-    level2.appenditem('Components', URL('default', 'components'), name='components')
-    level1.append(level2)
-    response.menu.append(level1)
+    response.menu = BootstrapNavBar(skeleton)
 
 _menu()  #Call to create menu
 
 
+

modules/bootstrap.py

 
 
 class PluginNavBar(PluginNavigation):
-    """ NavBar is for bootstrap nav bar used by Bootstrap """
+    """ NavBar is for bootstrap nav bar used by Bootstrap
+     Ex:
+    response.menu = PluginNavBar()
+    response.menu.appenditem('Home', URL('default', 'index'))
+    response.menu.appenditem('Link 1', URL('default', 'link1'))
+
+    level1 = MenuRootItem(SubMenuItem('Bootstrap',  None, name='more'))
+    level1.appenditem('Base Css', URL('default', 'basecss'), name='basecss')
+    level1.appenditem('Components', URL('default', 'components'), name='components')
+    response.menu.append(level1)
+
+    level1 = MenuRootItem(SubMenuItem('Test',  None, name='more'))
+    level2 = MenuRootItem(SubSubMenuItem('SubTest',  None, name='more'))
+    level2.appenditem('Base Css', URL('default', 'basecss'), name='basecss')
+    level2.appenditem('Components', URL('default', 'components'), name='components')
+    level1.append(level2)
+    response.menu.append(level1)
+    """
 
     def __init__(self, **attributes):
         """ Init """
         pass
 
 
+def BootstrapNavBar(skeleton):
+    """ Transform the skeleton to menu items """
+
+    menu = PluginNavBar()
+
+    for item in skeleton:
+        try:
+            submenu = item[2]
+        except IndexError:
+            menu.appenditem(item[0], item[1])
+        else:
+            menu.append(CreateRootItem(item, submenu))
+
+    return menu
+
+
+def CreateRootItem(item, submenu, level=2):
+    """ Sub menu items """
+
+    if level > 2:
+        root = MenuRootItem(SubSubMenuItem(item[0], item[1]))
+    else:
+        root = MenuRootItem(SubMenuItem(item[0], item[1]))
+
+    for sub in submenu:
+        try:
+            subsubmenu = sub[2]
+        except IndexError:
+            root.appenditem(sub[0], sub[1])
+        else:
+            root.append(CreateRootItem(sub, subsubmenu, level=level+1))
+
+    return root
+
+
 class SubMenuItem(MenuItem):
-    """ This is because bootstrap render different the menu items """
+    """ 2nd level of menu render different to root """
 
     def render(self, elements=''):
         """ Render """
         return LI(XML(sublink), elements, _class="dropdown")
 
 
+class SubSubMenuItem(MenuItem):
+    """ 3rd level of menu render different to 2nd """
+
+    def render(self, elements=''):
+        """ Render """
+
+        sublink = '''<a tabindex="-1" href="#">
+                       %(label)s
+                       </a>''' % {'label': self.label}
+        return LI(XML(sublink), elements, _class="dropdown-submenu")
+
+
 class MenuRootItem(MenuRoot):
 
     def __init__(self, fatheritem=None, **attributes):

modules/highlight.py

+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ Plugin Hihghlight
+ Copyright (c) 2012 Mulone, Pablo Martin (http://martin.tecnodoc.com.ar/)
+ License: BSD
+"""
+
+"""
+ http://softwaremaniacs.org/soft/highlight/en/
+"""
+
+from gluon import *
+
+
+class PluginHighlight(object):
+    """ http://softwaremaniacs.org/soft/highlight/en/    """
+
+    def __init__(self):
+
+        self.extra = {}
+        self.extra_blocks()
+
+    def extra_blocks(self):
+        """Extra blocks for markmin language"""
+
+        extra = self.extra
+        extra['code'] = lambda code: CODE(code, language=None).xml()
+        extra['python'] = lambda code: PRE(XML("<code class='python'>%s</code>" % code)).xml()
+        extra['javascript'] = lambda code: PRE(XML("<code class='javascript'>%s</code>" % code)).xml()
+        extra['css'] = lambda code: PRE(XML("<code class='css'>%s</code>" % code)).xml()
+        extra['html'] = lambda code: PRE(XML("<code class='html'>%s</code>" % code)).xml()
+
+    def install(self):
+        """ Install """
+
+        response = current.response
+        response.files.append(URL('static', 'plugins/highlight/highlight.pack.js'))
+        response.files.append(URL('static', 'plugins/highlight/styles/default.css'))
+        response.scripts_head.append("hljs.initHighlightingOnLoad();")
+
+        return self

static/css/bootstrap-responsive.css

+/*!
+ * Bootstrap Responsive v2.1.0
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+.clearfix {
+  *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.clearfix:after {
+  clear: both;
+}
+
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+.hidden {
+  display: none;
+  visibility: hidden;
+}
+
+.visible-phone {
+  display: none !important;
+}
+
+.visible-tablet {
+  display: none !important;
+}
+
+.hidden-desktop {
+  display: none !important;
+}
+
+.visible-desktop {
+  display: inherit !important;
+}
+
+@media (min-width: 768px) and (max-width: 979px) {
+  .hidden-desktop {
+    display: inherit !important;
+  }
+  .visible-desktop {
+    display: none !important ;
+  }
+  .visible-tablet {
+    display: inherit !important;
+  }
+  .hidden-tablet {
+    display: none !important;
+  }
+}
+
+@media (max-width: 767px) {
+  .hidden-desktop {
+    display: inherit !important;
+  }
+  .visible-desktop {
+    display: none !important;
+  }
+  .visible-phone {
+    display: inherit !important;
+  }
+  .hidden-phone {
+    display: none !important;
+  }
+}
+
+@media (min-width: 1200px) {
+  .row {
+    margin-left: -30px;
+    *zoom: 1;
+  }
+  .row:before,
+  .row:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+  .row:after {
+    clear: both;
+  }
+  [class*="span"] {
+    float: left;
+    margin-left: 30px;
+  }
+  .container,
+  .navbar-static-top .container,
+  .navbar-fixed-top .container,
+  .navbar-fixed-bottom .container {
+    width: 1170px;
+  }
+  .span12 {
+    width: 1170px;
+  }
+  .span11 {
+    width: 1070px;
+  }
+  .span10 {
+    width: 970px;
+  }
+  .span9 {
+    width: 870px;
+  }
+  .span8 {
+    width: 770px;
+  }
+  .span7 {
+    width: 670px;
+  }
+  .span6 {
+    width: 570px;
+  }
+  .span5 {
+    width: 470px;
+  }
+  .span4 {
+    width: 370px;
+  }
+  .span3 {
+    width: 270px;
+  }
+  .span2 {
+    width: 170px;
+  }
+  .span1 {
+    width: 70px;
+  }
+  .offset12 {
+    margin-left: 1230px;
+  }
+  .offset11 {
+    margin-left: 1130px;
+  }
+  .offset10 {
+    margin-left: 1030px;
+  }
+  .offset9 {
+    margin-left: 930px;
+  }
+  .offset8 {
+    margin-left: 830px;
+  }
+  .offset7 {
+    margin-left: 730px;
+  }
+  .offset6 {
+    margin-left: 630px;
+  }
+  .offset5 {
+    margin-left: 530px;
+  }
+  .offset4 {
+    margin-left: 430px;
+  }
+  .offset3 {
+    margin-left: 330px;
+  }
+  .offset2 {
+    margin-left: 230px;
+  }
+  .offset1 {
+    margin-left: 130px;
+  }
+  .row-fluid {
+    width: 100%;
+    *zoom: 1;
+  }
+  .row-fluid:before,
+  .row-fluid:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+  .row-fluid:after {
+    clear: both;
+  }
+  .row-fluid [class*="span"] {
+    display: block;
+    float: left;
+    width: 100%;
+    min-height: 30px;
+    margin-left: 2.564102564102564%;
+    *margin-left: 2.5109110747408616%;
+    -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+            box-sizing: border-box;
+  }
+  .row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+  }
+  .row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+  }
+  .row-fluid .span11 {
+    width: 91.45299145299145%;
+    *width: 91.39979996362975%;
+  }
+  .row-fluid .span10 {
+    width: 82.90598290598291%;
+    *width: 82.8527914166212%;
+  }
+  .row-fluid .span9 {
+    width: 74.35897435897436%;
+    *width: 74.30578286961266%;
+  }
+  .row-fluid .span8 {
+    width: 65.81196581196582%;
+    *width: 65.75877432260411%;
+  }
+  .row-fluid .span7 {
+    width: 57.26495726495726%;
+    *width: 57.21176577559556%;
+  }
+  .row-fluid .span6 {
+    width: 48.717948717948715%;
+    *width: 48.664757228587014%;
+  }
+  .row-fluid .span5 {
+    width: 40.17094017094017%;
+    *width: 40.11774868157847%;
+  }
+  .row-fluid .span4 {
+    width: 31.623931623931625%;
+    *width: 31.570740134569924%;
+  }
+  .row-fluid .span3 {
+    width: 23.076923076923077%;
+    *width: 23.023731587561375%;
+  }
+  .row-fluid .span2 {
+    width: 14.52991452991453%;
+    *width: 14.476723040552828%;
+  }
+  .row-fluid .span1 {
+    width: 5.982905982905983%;
+    *width: 5.929714493544281%;
+  }
+  .row-fluid .offset12 {
+    margin-left: 105.12820512820512%;
+    *margin-left: 105.02182214948171%;
+  }
+  .row-fluid .offset12:first-child {
+    margin-left: 102.56410256410257%;
+    *margin-left: 102.45771958537915%;
+  }
+  .row-fluid .offset11 {
+    margin-left: 96.58119658119658%;
+    *margin-left: 96.47481360247316%;
+  }
+  .row-fluid .offset11:first-child {
+    margin-left: 94.01709401709402%;
+    *margin-left: 93.91071103837061%;
+  }
+  .row-fluid .offset10 {
+    margin-left: 88.03418803418803%;
+    *margin-left: 87.92780505546462%;
+  }
+  .row-fluid .offset10:first-child {
+    margin-left: 85.47008547008548%;
+    *margin-left: 85.36370249136206%;
+  }
+  .row-fluid .offset9 {
+    margin-left: 79.48717948717949%;
+    *margin-left: 79.38079650845607%;
+  }
+  .row-fluid .offset9:first-child {
+    margin-left: 76.92307692307693%;
+    *margin-left: 76.81669394435352%;
+  }
+  .row-fluid .offset8 {
+    margin-left: 70.94017094017094%;
+    *margin-left: 70.83378796144753%;
+  }
+  .row-fluid .offset8:first-child {
+    margin-left: 68.37606837606839%;
+    *margin-left: 68.26968539734497%;
+  }
+  .row-fluid .offset7 {
+    margin-left: 62.393162393162385%;
+    *margin-left: 62.28677941443899%;
+  }
+  .row-fluid .offset7:first-child {
+    margin-left: 59.82905982905982%;
+    *margin-left: 59.72267685033642%;
+  }
+  .row-fluid .offset6 {
+    margin-left: 53.84615384615384%;
+    *margin-left: 53.739770867430444%;
+  }
+  .row-fluid .offset6:first-child {
+    margin-left: 51.28205128205128%;
+    *margin-left: 51.175668303327875%;
+  }
+  .row-fluid .offset5 {
+    margin-left: 45.299145299145295%;
+    *margin-left: 45.1927623204219%;
+  }
+  .row-fluid .offset5:first-child {
+    margin-left: 42.73504273504273%;
+    *margin-left: 42.62865975631933%;
+  }
+  .row-fluid .offset4 {
+    margin-left: 36.75213675213675%;
+    *margin-left: 36.645753773413354%;
+  }
+  .row-fluid .offset4:first-child {
+    margin-left: 34.18803418803419%;
+    *margin-left: 34.081651209310785%;
+  }
+  .row-fluid .offset3 {
+    margin-left: 28.205128205128204%;
+    *margin-left: 28.0987452264048%;
+  }
+  .row-fluid .offset3:first-child {
+    margin-left: 25.641025641025642%;
+    *margin-left: 25.53464266230224%;
+  }
+  .row-fluid .offset2 {
+    margin-left: 19.65811965811966%;
+    *margin-left: 19.551736679396257%;
+  }
+  .row-fluid .offset2:first-child {
+    margin-left: 17.094017094017094%;
+    *margin-left: 16.98763411529369%;
+  }
+  .row-fluid .offset1 {
+    margin-left: 11.11111111111111%;
+    *margin-left: 11.004728132387708%;
+  }
+  .row-fluid .offset1:first-child {
+    margin-left: 8.547008547008547%;
+    *margin-left: 8.440625568285142%;
+  }
+  input,
+  textarea,
+  .uneditable-input {
+    margin-left: 0;
+  }
+  .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 30px;
+  }
+  input.span12,
+  textarea.span12,
+  .uneditable-input.span12 {
+    width: 1156px;
+  }
+  input.span11,
+  textarea.span11,
+  .uneditable-input.span11 {
+    width: 1056px;
+  }
+  input.span10,
+  textarea.span10,
+  .uneditable-input.span10 {
+    width: 956px;
+  }
+  input.span9,
+  textarea.span9,
+  .uneditable-input.span9 {
+    width: 856px;
+  }
+  input.span8,
+  textarea.span8,
+  .uneditable-input.span8 {
+    width: 756px;
+  }
+  input.span7,
+  textarea.span7,
+  .uneditable-input.span7 {
+    width: 656px;
+  }
+  input.span6,
+  textarea.span6,
+  .uneditable-input.span6 {
+    width: 556px;
+  }
+  input.span5,
+  textarea.span5,
+  .uneditable-input.span5 {
+    width: 456px;
+  }
+  input.span4,
+  textarea.span4,
+  .uneditable-input.span4 {
+    width: 356px;
+  }
+  input.span3,
+  textarea.span3,
+  .uneditable-input.span3 {
+    width: 256px;
+  }
+  input.span2,
+  textarea.span2,
+  .uneditable-input.span2 {
+    width: 156px;
+  }
+  input.span1,
+  textarea.span1,
+  .uneditable-input.span1 {
+    width: 56px;
+  }
+  .thumbnails {
+    margin-left: -30px;
+  }
+  .thumbnails > li {
+    margin-left: 30px;
+  }
+  .row-fluid .thumbnails {
+    margin-left: 0;
+  }
+}
+
+@media (min-width: 768px) and (max-width: 979px) {
+  .row {
+    margin-left: -20px;
+    *zoom: 1;
+  }
+  .row:before,
+  .row:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+  .row:after {
+    clear: both;
+  }
+  [class*="span"] {
+    float: left;
+    margin-left: 20px;
+  }
+  .container,
+  .navbar-static-top .container,
+  .navbar-fixed-top .container,
+  .navbar-fixed-bottom .container {
+    width: 724px;
+  }
+  .span12 {
+    width: 724px;
+  }
+  .span11 {
+    width: 662px;
+  }
+  .span10 {
+    width: 600px;
+  }
+  .span9 {
+    width: 538px;
+  }
+  .span8 {
+    width: 476px;
+  }
+  .span7 {
+    width: 414px;
+  }
+  .span6 {
+    width: 352px;
+  }
+  .span5 {
+    width: 290px;
+  }
+  .span4 {
+    width: 228px;
+  }
+  .span3 {
+    width: 166px;
+  }
+  .span2 {
+    width: 104px;
+  }
+  .span1 {
+    width: 42px;
+  }
+  .offset12 {
+    margin-left: 764px;
+  }
+  .offset11 {
+    margin-left: 702px;
+  }
+  .offset10 {
+    margin-left: 640px;
+  }
+  .offset9 {
+    margin-left: 578px;
+  }
+  .offset8 {
+    margin-left: 516px;
+  }
+  .offset7 {
+    margin-left: 454px;
+  }
+  .offset6 {
+    margin-left: 392px;
+  }
+  .offset5 {
+    margin-left: 330px;
+  }
+  .offset4 {
+    margin-left: 268px;
+  }
+  .offset3 {
+    margin-left: 206px;
+  }
+  .offset2 {
+    margin-left: 144px;
+  }
+  .offset1 {
+    margin-left: 82px;
+  }
+  .row-fluid {
+    width: 100%;
+    *zoom: 1;
+  }
+  .row-fluid:before,
+  .row-fluid:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+  .row-fluid:after {
+    clear: both;
+  }
+  .row-fluid [class*="span"] {
+    display: block;
+    float: left;
+    width: 100%;
+    min-height: 30px;
+    margin-left: 2.7624309392265194%;
+    *margin-left: 2.709239449864817%;
+    -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+            box-sizing: border-box;
+  }
+  .row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+  }
+  .row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+  }
+  .row-fluid .span11 {
+    width: 91.43646408839778%;
+    *width: 91.38327259903608%;
+  }
+  .row-fluid .span10 {
+    width: 82.87292817679558%;
+    *width: 82.81973668743387%;
+  }
+  .row-fluid .span9 {
+    width: 74.30939226519337%;
+    *width: 74.25620077583166%;
+  }
+  .row-fluid .span8 {
+    width: 65.74585635359117%;
+    *width: 65.69266486422946%;
+  }
+  .row-fluid .span7 {
+    width: 57.18232044198895%;
+    *width: 57.12912895262725%;
+  }
+  .row-fluid .span6 {
+    width: 48.61878453038674%;
+    *width: 48.56559304102504%;
+  }
+  .row-fluid .span5 {
+    width: 40.05524861878453%;
+    *width: 40.00205712942283%;
+  }
+  .row-fluid .span4 {
+    width: 31.491712707182323%;
+    *width: 31.43852121782062%;
+  }
+  .row-fluid .span3 {
+    width: 22.92817679558011%;
+    *width: 22.87498530621841%;
+  }
+  .row-fluid .span2 {
+    width: 14.3646408839779%;
+    *width: 14.311449394616199%;
+  }
+  .row-fluid .span1 {
+    width: 5.801104972375691%;
+    *width: 5.747913483013988%;
+  }
+  .row-fluid .offset12 {
+    margin-left: 105.52486187845304%;
+    *margin-left: 105.41847889972962%;
+  }
+  .row-fluid .offset12:first-child {
+    margin-left: 102.76243093922652%;
+    *margin-left: 102.6560479605031%;
+  }
+  .row-fluid .offset11 {
+    margin-left: 96.96132596685082%;
+    *margin-left: 96.8549429881274%;
+  }
+  .row-fluid .offset11:first-child {
+    margin-left: 94.1988950276243%;
+    *margin-left: 94.09251204890089%;
+  }
+  .row-fluid .offset10 {
+    margin-left: 88.39779005524862%;
+    *margin-left: 88.2914070765252%;
+  }
+  .row-fluid .offset10:first-child {
+    margin-left: 85.6353591160221%;
+    *margin-left: 85.52897613729868%;
+  }
+  .row-fluid .offset9 {
+    margin-left: 79.8342541436464%;
+    *margin-left: 79.72787116492299%;
+  }
+  .row-fluid .offset9:first-child {
+    margin-left: 77.07182320441989%;
+    *margin-left: 76.96544022569647%;
+  }
+  .row-fluid .offset8 {
+    margin-left: 71.2707182320442%;
+    *margin-left: 71.16433525332079%;
+  }
+  .row-fluid .offset8:first-child {
+    margin-left: 68.50828729281768%;
+    *margin-left: 68.40190431409427%;
+  }
+  .row-fluid .offset7 {
+    margin-left: 62.70718232044199%;
+    *margin-left: 62.600799341718584%;
+  }
+  .row-fluid .offset7:first-child {
+    margin-left: 59.94475138121547%;
+    *margin-left: 59.838368402492065%;
+  }
+  .row-fluid .offset6 {
+    margin-left: 54.14364640883978%;
+    *margin-left: 54.037263430116376%;
+  }
+  .row-fluid .offset6:first-child {
+    margin-left: 51.38121546961326%;
+    *margin-left: 51.27483249088986%;
+  }
+  .row-fluid .offset5 {
+    margin-left: 45.58011049723757%;
+    *margin-left: 45.47372751851417%;
+  }
+  .row-fluid .offset5:first-child {
+    margin-left: 42.81767955801105%;
+    *margin-left: 42.71129657928765%;
+  }
+  .row-fluid .offset4 {
+    margin-left: 37.01657458563536%;
+    *margin-left: 36.91019160691196%;
+  }
+  .row-fluid .offset4:first-child {
+    margin-left: 34.25414364640884%;
+    *margin-left: 34.14776066768544%;
+  }
+  .row-fluid .offset3 {
+    margin-left: 28.45303867403315%;
+    *margin-left: 28.346655695309746%;
+  }
+  .row-fluid .offset3:first-child {
+    margin-left: 25.69060773480663%;
+    *margin-left: 25.584224756083227%;
+  }
+  .row-fluid .offset2 {
+    margin-left: 19.88950276243094%;
+    *margin-left: 19.783119783707537%;
+  }
+  .row-fluid .offset2:first-child {
+    margin-left: 17.12707182320442%;
+    *margin-left: 17.02068884448102%;
+  }
+  .row-fluid .offset1 {
+    margin-left: 11.32596685082873%;
+    *margin-left: 11.219583872105325%;
+  }
+  .row-fluid .offset1:first-child {
+    margin-left: 8.56353591160221%;
+    *margin-left: 8.457152932878806%;
+  }
+  input,
+  textarea,
+  .uneditable-input {
+    margin-left: 0;
+  }
+  .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 20px;
+  }
+  input.span12,
+  textarea.span12,
+  .uneditable-input.span12 {
+    width: 710px;
+  }
+  input.span11,
+  textarea.span11,
+  .uneditable-input.span11 {
+    width: 648px;
+  }
+  input.span10,
+  textarea.span10,
+  .uneditable-input.span10 {
+    width: 586px;
+  }
+  input.span9,
+  textarea.span9,
+  .uneditable-input.span9 {
+    width: 524px;
+  }
+  input.span8,
+  textarea.span8,
+  .uneditable-input.span8 {
+    width: 462px;
+  }
+  input.span7,
+  textarea.span7,
+  .uneditable-input.span7 {
+    width: 400px;
+  }
+  input.span6,
+  textarea.span6,
+  .uneditable-input.span6 {
+    width: 338px;
+  }
+  input.span5,
+  textarea.span5,
+  .uneditable-input.span5 {
+    width: 276px;
+  }
+  input.span4,
+  textarea.span4,
+  .uneditable-input.span4 {
+    width: 214px;
+  }
+  input.span3,
+  textarea.span3,
+  .uneditable-input.span3 {
+    width: 152px;
+  }
+  input.span2,
+  textarea.span2,
+  .uneditable-input.span2 {
+    width: 90px;
+  }
+  input.span1,
+  textarea.span1,
+  .uneditable-input.span1 {
+    width: 28px;
+  }
+}
+
+@media (max-width: 767px) {
+  body {
+    padding-right: 20px;
+    padding-left: 20px;
+  }
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    margin-right: -20px;
+    margin-left: -20px;
+  }
+  .container-fluid {
+    padding: 0;
+  }
+  .dl-horizontal dt {
+    float: none;
+    width: auto;
+    clear: none;
+    text-align: left;
+  }
+  .dl-horizontal dd {
+    margin-left: 0;
+  }
+  .container {
+    width: auto;
+  }
+  .row-fluid {
+    width: 100%;
+  }
+  .row,
+  .thumbnails {
+    margin-left: 0;
+  }
+  .thumbnails > li {
+    float: none;
+    margin-left: 0;
+  }
+  [class*="span"],
+  .row-fluid [class*="span"] {
+    display: block;
+    float: none;
+    width: auto;
+    margin-left: 0;
+  }
+  .span12,
+  .row-fluid .span12 {
+    width: 100%;
+    -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+            box-sizing: border-box;
+  }
+  .input-large,
+  .input-xlarge,
+  .input-xxlarge,
+  input[class*="span"],
+  select[class*="span"],
+  textarea[class*="span"],
+  .uneditable-input {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+            box-sizing: border-box;
+  }
+  .input-prepend input,
+  .input-append input,
+  .input-prepend input[class*="span"],
+  .input-append input[class*="span"] {
+    display: inline-block;
+    width: auto;
+  }
+  .modal {
+    position: fixed;
+    top: 20px;
+    right: 20px;
+    left: 20px;
+    width: auto;
+    margin: 0;
+  }
+  .modal.fade.in {
+    top: auto;
+  }
+}
+
+@media (max-width: 480px) {
+  .nav-collapse {
+    -webkit-transform: translate3d(0, 0, 0);
+  }
+  .page-header h1 small {
+    display: block;
+    line-height: 20px;
+  }
+  input[type="checkbox"],
+  input[type="radio"] {
+    border: 1px solid #ccc;
+  }
+  .form-horizontal .control-group > label {
+    float: none;
+    width: auto;
+    padding-top: 0;
+    text-align: left;
+  }
+  .form-horizontal .controls {
+    margin-left: 0;
+  }
+  .form-horizontal .control-list {
+    padding-top: 0;
+  }
+  .form-horizontal .form-actions {
+    padding-right: 10px;
+    padding-left: 10px;
+  }
+  .modal {
+    top: 10px;
+    right: 10px;
+    left: 10px;
+  }
+  .modal-header .close {
+    padding: 10px;
+    margin: -10px;
+  }
+  .carousel-caption {
+    position: static;
+  }
+}
+
+@media (max-width: 979px) {
+  body {
+    padding-top: 0;
+  }
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    position: static;
+  }
+  .navbar-fixed-top {
+    margin-bottom: 20px;
+  }
+  .navbar-fixed-bottom {
+    margin-top: 20px;
+  }
+  .navbar-fixed-top .navbar-inner,
+  .navbar-fixed-bottom .navbar-inner {
+    padding: 5px;
+  }
+  .navbar .container {
+    width: auto;
+    padding: 0;
+  }
+  .navbar .brand {
+    padding-right: 10px;
+    padding-left: 10px;
+    margin: 0 0 0 -5px;
+  }
+  .nav-collapse {
+    clear: both;
+  }
+  .nav-collapse .nav {
+    float: none;
+    margin: 0 0 10px;
+  }
+  .nav-collapse .nav > li {
+    float: none;
+  }
+  .nav-collapse .nav > li > a {
+    margin-bottom: 2px;
+  }
+  .nav-collapse .nav > .divider-vertical {
+    display: none;
+  }
+  .nav-collapse .nav .nav-header {
+    color: #555555;
+    text-shadow: none;
+  }
+  .nav-collapse .nav > li > a,
+  .nav-collapse .dropdown-menu a {
+    padding: 9px 15px;
+    font-weight: bold;
+    color: #555555;
+    -webkit-border-radius: 3px;
+       -moz-border-radius: 3px;
+            border-radius: 3px;
+  }
+  .nav-collapse .btn {
+    padding: 4px 10px 4px;
+    font-weight: normal;
+    -webkit-border-radius: 4px;
+       -moz-border-radius: 4px;
+            border-radius: 4px;
+  }
+  .nav-collapse .dropdown-menu li + li a {
+    margin-bottom: 2px;
+  }
+  .nav-collapse .nav > li > a:hover,
+  .nav-collapse .dropdown-menu a:hover {
+    background-color: #f2f2f2;
+  }
+  .navbar-inverse .nav-collapse .nav > li > a:hover,
+  .navbar-inverse .nav-collapse .dropdown-menu a:hover {
+    background-color: #111111;
+  }
+  .nav-collapse.in .btn-group {
+    padding: 0;
+    margin-top: 5px;
+  }
+  .nav-collapse .dropdown-menu {
+    position: static;
+    top: auto;
+    left: auto;
+    display: block;
+    float: none;
+    max-width: none;
+    padding: 0;
+    margin: 0 15px;
+    background-color: transparent;
+    border: none;
+    -webkit-border-radius: 0;
+       -moz-border-radius: 0;
+            border-radius: 0;
+    -webkit-box-shadow: none;
+       -moz-box-shadow: none;
+            box-shadow: none;
+  }
+  .nav-collapse .dropdown-menu:before,
+  .nav-collapse .dropdown-menu:after {
+    display: none;
+  }
+  .nav-collapse .dropdown-menu .divider {
+    display: none;
+  }
+  .nav-collapse .navbar-form,
+  .nav-collapse .navbar-search {
+    float: none;
+    padding: 10px 15px;
+    margin: 10px 0;
+    border-top: 1px solid #f2f2f2;
+    border-bottom: 1px solid #f2f2f2;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+  }
+  .navbar .nav-collapse .nav.pull-right {
+    float: none;
+    margin-left: 0;
+  }
+  .nav-collapse,
+  .nav-collapse.collapse {
+    height: 0;
+    overflow: hidden;
+  }
+  .navbar .btn-navbar {
+    display: block;
+  }
+  .navbar-static .navbar-inner {
+    padding-right: 10px;
+    padding-left: 10px;
+  }
+}
+
+@media (min-width: 980px) {
+  .nav-collapse.collapse {
+    height: auto !important;
+    overflow: visible !important;
+  }
+}

static/css/layout.css

 /*!
 Layout
  */
-
-
 /* Override some defaults */
-body {
-    padding-bottom: 40px;
-    padding-top: 60px;}
-html, body {
-    /*background-color: #eee;*/
-    color: #444;
-}
-.container > footer p {
-    text-align: center; /* center align it with the container */
-}
-.container {
-    /*width: 820px;*/ /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
-}
-.content {/*padding-top: 28px; */}
-/* Page header tweaks */
-.page-header {
-    background-color: #f5f5f5;
-    padding: 10px 10px 5px;
-    /*margin-top: 40px;*/
-    border-color: #d5d5d5;
-    border-width: 0 0 1px; /* drop the border on the fixed edges */
-    -webkit-border-radius: 0;
-    -moz-border-radius: 0;
-    border-radius: 0;
-    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-    -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-    box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */
-}
 
 /* Web2py */
-/*
-fieldset { padding: 16px; border-top: 1px #DEDEDE solid;}
-fieldset legend {text-transform:uppercase; font-weight: bold;
-    padding: 4px 16px 4px 16px; background: #f1f1f1;}
-*/
 td.w2p_fl, td.w2p_fw, td.w2p_fc { vertical-align:top; }
 td.w2p_fl { text-align:right; }
 td.w2p_fl,  td.w2p_fw {padding-right: 7px;}
 
 footer {padding-top: 10px; border-top: 1px solid #ddd; margin-bottom: 40px;}
-.flash{display: none; margin-top: 30px;}
-.mainmenu {margin-left: 100px; width: 570px; }
-.auth_separator{margin: 0px 5px 0px 5px; color: #BFBFBF;}
-.auth_navbar {
-    font-size: 12px;
-    /*color: #ccc;*/
-    /*top: 0px;*/
-    float: right;
-    padding: 12px 15px 4px 15px;
-}
-.auth_navbar a {
-    text-transform:capitalize;
-    text-decoration: none;
-    color: #BFBFBF;
-}
-.auth_navbar a:hover {
-    text-decoration: underline;
-}
-.navigationbar { /*margin-bottom: 10px; padding-bottom: 4px;
-    border-bottom: 1px solid #ddd;*/}
-div.error {
-    padding-left: 20px;
-    color: #ec6f5a;
-    text-transform:capitalize;
-    background: url('../images/error.png') 0 0 no-repeat;
-}
-
-/* Css Hack Multilevels Menu Bootstrap */
-
-.nav li.dropdown ul.dropdown-menu li:HOVER ul.dropdown-menu li:HOVER.dropdown > ul.dropdown-menu,
-.nav li.dropdown ul.dropdown-menu li:HOVER ul.dropdown-menu {
-    display:block;
-    position:absolute;
-    left:100%;
-    -webkit-border-radius: 3px;
-    -moz-border-radius: 3px;
-    border-radius: 3px;
-}
-.nav li.dropdown ul.dropdown-menu li:HOVER ul.dropdown-menu li.dropdown > ul.dropdown-menu,
-.nav li.dropdown ul.dropdown-menu ul.dropdown-menu {
+.flash {
     display: none;
-    float:right;
-    position: relative;
-    top: auto;
-    margin-top: -30px;
-}
-
-.nav li.dropdown ul.dropdown-menu .dropdown-menu::before {
-    content: '';
-    display: inline-block;
-    border-top: 7px solid transparent;
-    border-bottom: 7px solid transparent;
-    border-right:7px solid #CCC;
-    border-right-color: rgba(0, 0, 0, 0.2);
-    position: absolute;
-    top: 9px;
-    left: -14px;
-}
-
-.nav li.dropdown ul.dropdown-menu .dropdown-menu::after {
-    content: '';
-    display: inline-block;
-    border-top: 6px solid transparent;
-    border-bottom: 6px solid transparent;
-    border-right:6px solid white;
-    position: absolute;
-    top: 10px;
-    left: -12px;
-}
+    position: fixed;
+    right: 0;
+    left: 0;
+    z-index: 1030;
+    margin-top: -18px;}
+.flash.alert {margin-bottom: 10px !important;}
+div.error { color: #ec6f5a;}
Add a comment to this file

static/images/error.png

Removed
Old image

static/js/web2py.js

   // jQuery('input[type=submit]').click(function(){var t=jQuery(this);t.hide();t.after('<input class="submit_disabled" disabled="disabled" type="submit" name="'+t.attr("name")+'_dummy" value="'+t.val()+'">')});
   web2py_ajax_fields(target);
 };
-
+/*
 jQuery(function() {   
    var flash = jQuery('.flash');
+   var flash_content = jQuery('.flash-content');
    flash.hide();
-   if(flash.html()) flash.slideDown();
+   if(flash_content.html()) flash.slideDown();
    web2py_ajax_init(document);
 });
+*/
 function web2py_trap_form(action,target) {
    jQuery('#'+target+' form').each(function(i){
       var form=jQuery(this);
       if(!form.hasClass('no_trap'))
         form.submit(function(e){
-         jQuery('.flash').hide().html('');
+         jQuery('.flash').hide();
+         jQuery('.flash-content').html('');
          web2py_ajax_page('post',action,form.serialize(),target);
 	 e.preventDefault();
       });
     jQuery('#'+target+' a.w2p_trap').each(function(i){
 	    var link=jQuery(this);
 	    link.click(function(e) {
-		    jQuery('.flash').hide().html('');
+            jQuery('.flash').hide();
+            jQuery('.flash-content').html('');
 		    web2py_ajax_page('get',link.attr('href'),[],target);
 		    e.preventDefault();
 		});
       web2py_trap_link(target);
       web2py_ajax_init('#'+target);      
       if(command) eval(command);
-      if(flash) jQuery('.flash').html(flash).slideDown();
+      if(flash) {
+          jQuery('.flash-content').html(flash);
+          jQuery('.flash').slideDown();
+      }
       }
     });
 }

static/plugins/highlight/LICENSE

+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of highlight.js nor the names of its contributors 
+      may be used to endorse or promote products derived from this software 
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

static/plugins/highlight/README.md

+# Highlight.js
+
+Highlight.js highlights syntax in code examples on blogs, forums and,
+in fact, on any web page. It's very easy to use because it works
+automatically: finds blocks of code, detects a language, highlights it.
+
+Autodetection can be fine tuned when it fails by itself (see "Heuristics").
+
+
+## Basic usage
+
+Link the library and a stylesheet from your page and hook highlighting to
+the page load event:
+
+```html
+<link rel="stylesheet" href="styles/default.css">
+<script src="highlight.pack.js"></script>
+<script>hljs.initHighlightingOnLoad();</script>
+```
+
+This will highlight all code on the page marked up as `<pre><code> .. </code></pre>`.
+If you use different markup or need to apply highlighting dynamically, read
+"Custom initialization" below.
+
+- You can download your own customized version of "highlight.pack.js" or
+  use the hosted one as described on the download page:
+  <http://softwaremaniacs.org/soft/highlight/en/download/>
+
+- Style themes are available in the download package or as hosted files.
+  To create a custom style for your site see the class reference in the file
+  [classref.txt][cr] from the downloaded package.
+
+[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
+
+
+## node.js
+
+Highlight.js can be used under node.js. The package with all supported languages is
+installable from NPM:
+
+    npm install highlight.js
+
+Alternatively, you can build it from the source with only languages you need:
+
+    python tools/build.py -tnode lang1 lang2 ..
+
+Using the library:
+
+```javascript
+var hljs = require('highlight.js');
+
+// If you know the language
+hljs.highlight(lang, code).value;
+
+// Automatic language detection
+hljs.highlightAuto(code).value;
+```
+
+## Tab replacement
+
+You can replace TAB ('\x09') characters used for indentation in your code
+with some fixed number of spaces or with a `<span>` to give them special
+styling:
+
+```html
+<script type="text/javascript">
+  hljs.tabReplace = '    '; // 4 spaces
+  // ... or
+  hljs.tabReplace = '<span class="indent">\t</span>';
+
+  hljs.initHighlightingOnLoad();
+</script>
+```
+
+## Custom initialization
+
+If you use different markup for code blocks you can initialize them manually
+with `highlightBlock(code, tabReplace, useBR)` function. It takes a DOM element
+containing the code to highlight and optionally a string with which to replace
+TAB characters.
+
+Initialization using, for example, jQuery might look like this:
+
+```javascript
+$(document).ready(function() {
+  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+});
+```
+
+You can use `highlightBlock` to highlight blocks dynamically inserted into
+the page. Just make sure you don't do it twice for already highlighted
+blocks.
+
+If your code container relies on `<br>` tags instead of line breaks (i.e. if
+it's not `<pre>`) pass `true` into the third parameter of `highlightBlock`
+to make highlight.js use `<br>` in the output:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+
+## Heuristics
+
+Autodetection of a code's language is done using a simple heuristic:
+the program tries to highlight a fragment with all available languages and
+counts all syntactic structures that it finds along the way. The language
+with greatest count wins.
+
+This means that in short fragments the probability of an error is high
+(and it really happens sometimes). In this cases you can set the fragment's
+language explicitly by assigning a class to the `<code>` element:
+
+```html
+<pre><code class="html">...</code></pre>
+```
+
+You can use class names recommended in HTML5: "language-html",
+"language-php". Classes also can be assigned to the `<pre>` element.
+
+To disable highlighting of a fragment altogether use "no-highlight" class:
+
+```html
+<pre><code class="no-highlight">...</code></pre>
+```
+
+
+## Export
+
+File export.html contains a little program that allows you to paste in a code
+snippet and then copy and paste the resulting HTML code generated by the
+highlighter. This is useful in situations when you can't use the script itself
+on a site.
+
+
+## Meta
+
+- Version: 7.1
+- URL:     http://softwaremaniacs.org/soft/highlight/en/
+- Author:  Ivan Sagalaev (<maniac@softwaremaniacs.org>)
+
+For the license terms see LICENSE files.
+For the list of contributors see AUTHORS.en.txt file.

static/plugins/highlight/README.ru.md

+# Highlight.js
+
+Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах,
+форумах и вообще на любых веб-страницах. Пользоваться им очень просто,
+потому что работает он автоматически: сам находит блоки кода, сам
+определяет язык, сам подсвечивает.
+
+Автоопределением языка можно управлять, когда оно не справляется само (см.
+дальше "Эвристика").
+
+
+## Простое использование
+
+Подключите библиотеку и стиль на страницу и повесть вызов подсветки на
+загрузку страницы:
+
+```html
+<link rel="stylesheet" href="styles/default.css">
+<script src="highlight.pack.js"></script>
+<script>hljs.initHighlightingOnLoad();</script>
+```
+
+Весь код на странице, обрамлённый в теги `<pre><code> .. </code></pre>`
+будет автоматически подсвечен. Если вы используете другие теги или хотите
+подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже.
+
+- Вы можете скачать собственную версию "highlight.pack.js" или сослаться
+  на захостенный файл, как описано на странице загрузки:
+  <http://softwaremaniacs.org/soft/highlight/download/>
+
+- Стилевые темы можно найти в загруженном архиве или также использовать
+  захостенные. Чтобы сделать собственный стиль для своего сайта, вам
+  будет полезен справочник классов в файле [classref.txt][cr], который тоже
+  есть в архиве.
+
+[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
+
+
+## node.js
+
+Highlight.js можно использовать в node.js. Библиотеку со всеми возможными языками можно
+установить с NPM:
+
+    npm install highlight.js
+
+Также её можно собрать из исходников с только теми языками, которые нужны:
+
+    python tools/build.py -tnode lang1 lang2 ..
+
+Использование библиотеки:
+
+```javascript
+var hljs = require('highlight.js');
+
+// Если вы знаете язык
+hljs.highlight(lang, code).value;
+
+// Автоопределение языка
+hljs.highlightAuto(code).value;
+```
+
+
+## Замена TABов
+
+Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на
+фиксированное количество пробелов или на отдельный `<span>`, чтобы задать ему
+какой-нибудь специальный стиль:
+
+```html
+<script type="text/javascript">
+  hljs.tabReplace = '    '; // 4 spaces
+  // ... or
+  hljs.tabReplace = '<span class="indent">\t</span>';
+
+  hljs.initHighlightingOnLoad();
+</script>
+```
+
+
+## Инициализация вручную
+
+Если вы используете другие теги для блоков кода, вы можете инициализировать их
+явно с помощью функции `highlightBlock(code, tabReplace, useBR)`. Она принимает
+DOM-элемент с текстом расцвечиваемого кода и опционально - строчку для замены
+символов TAB.
+
+Например с использованием jQuery код инициализации может выглядеть так:
+
+```javascript
+$(document).ready(function() {
+  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+});
+```
+
+`highlightBlock` можно также использовать, чтобы подсветить блоки кода,
+добавленные на страницу динамически. Только убедитесь, что вы не делаете этого
+повторно для уже раскрашенных блоков.
+
+Если ваш блок кода использует `<br>` вместо переводов строки (т.е. если это не
+`<pre>`), передайте `true` третьим параметром в `highlightBlock`:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+
+## Эвристика
+
+Определение языка, на котором написан фрагмент, делается с помощью
+довольно простой эвристики: программа пытается расцветить фрагмент всеми
+языками подряд, и для каждого языка считает количество подошедших
+синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
+тот и выбирается.
+
+Это означает, что в коротких фрагментах высока вероятность ошибки, что
+периодически и случается. Чтобы указать язык фрагмента явно, надо написать
+его название в виде класса к элементу `<code>`:
+
+```html
+<pre><code class="html">...</code></pre>
+```
+
+Можно использовать рекомендованные в HTML5 названия классов:
+"language-html", "language-php". Также можно назначать классы на элемент
+`<pre>`.
+
+Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
+
+```html
+<pre><code class="no-highlight">...</code></pre>
+```
+
+
+## Экспорт
+
+В файле export.html находится небольшая программка, которая показывает и дает
+скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода.
+Это может понадобится например на сайте, на котором нельзя подключить сам скрипт
+highlight.js.
+
+
+## Координаты
+
+- Версия: 7.1
+- URL:    http://softwaremaniacs.org/soft/highlight/
+- Автор:  Иван Сагалаев (<maniac@softwaremaniacs.org>)
+
+Лицензионное соглашение читайте в файле LICENSE.
+Список соавторов читайте в файле AUTHORS.ru.txt

static/plugins/highlight/classref.txt

+This is a full list of available classes corresponding to languages'
+syntactic structures. The parentheses after language name contain identifiers
+used as class names in `<code>` element.
+
+Python ("python"):
+
+  keyword          keyword
+  built_in         built-in objects (None, False, True and Ellipsis)
+  number           number
+  string           string (of any type)
+  comment          comment
+  decorator        @-decorator for functions
+  function         function header "def some_name(...):"
+  class            class header "class SomeName(...):"
+  title            name of a function or a class inside a header
+  params           everything inside parentheses in a function's or class' header
+
+Python profiler results ("profile"):
+
+  number           number
+  string           string
+  builtin          builtin function entry
+  filename         filename in an entry
+  summary          profiling summary
+  header           header of table of results
+  keyword          column header
+  function         function name in an entry (including parentheses)
+  title            actual name of a function in an entry (excluding parentheses)
+
+Ruby ("ruby"):
+
+  keyword          keyword
+  string           string
+  subst            in-string substitution (#{...})
+  comment          comment
+  yardoctag        YARD tag
+  function         function header "def some_name(...):"
+  class            class header "class SomeName(...):"
+  title            name of a function or a class inside a header
+  parent           name of a parent class
+  symbol           symbol
+
+Perl ("perl"):
+
+  keyword          keyword
+  comment          comment
+  number           number
+  string           string
+  regexp           regular expression
+  sub              subroutine header (from "sub" till "{")
+  variable         variable starting with "$", "%", "@"
+  operator         operator
+  pod              plain old doc
+
+PHP ("php"):
+
+  keyword          keyword
+  number           number
+  string           string (of any type)
+  comment          comment
+  phpdoc           phpdoc params in comments
+  variable         variable starting with "$"
+  preprocessor     preprocessor marks: "<?php" and "?>"
+
+Scala ("scala"):
+
+  keyword          keyword
+  number           number
+  string           string
+  comment          comment
+  annotaion        annotation
+  javadoc          javadoc comment
+  javadoctag       @-tag in javadoc
+  class            class header
+  title            class name inside a header
+  params           everything in parentheses inside a class header
+  inheritance      keywords "extends" and "with" inside class header
+
+Go language ("go"):
+  comment          comment
+  string           string constant
+  number           number
+  keyword          language keywords
+  constant         true false nil iota
+  typename         built-in plain types (int, string etc.)
+  built_in         built-in functions
+
+XML ("xml"):
+
+  tag              any tag from "<" till ">"
+  comment          comment
+  pi               processing instruction (<? ... ?>)
+  cdata            CDATA section
+  attribute        attribute
+  value            attribute's value
+
+HTML ("html"):
+
+  keyword          HTML tag
+  tag              any tag from "<" till ">"
+  comment          comment
+  doctype          <!DOCTYPE ... > declaration
+  attribute        tag's attribute with or without value
+  value            attribute's value
+
+CSS ("css"):
+
+  tag              HTML tag in selectors
+  id               #some_name in selectors
+  class            .some_name in selectors
+  at_rule          @-rule till first "{" or ";"
+  attr_selector    attribute selector (square brackets in a[href^=http://])
+  pseudo           pseudo classes and elemens (:after, ::after etc.)
+  comment          comment
+  rules            everything from "{" till "}"
+  property         property name inside a rule
+  value            property value inside a rule, from ":" till ";" or
+                   till the end of rule block
+  number           number within a value
+  string           string within a value
+  hexcolor         hex color (#FFFFFF) within a value
+  function         CSS function within a value
+  params           everything between "(" and ")" within a function
+  important        "!important" symbol
+
+Markdown ("markdown"):
+
+  header            header
+  bullet            list bullet
+  emphasis          emphasis
+  strong            strong emphasis
+  blockquote        blockquote
+  code              code
+  horizontal_rule   horizontal rule
+  link_label        link label
+  link_url          link url
+
+Django ("django"):
+
+  keyword          HTML tag in HTML, default tags and default filters in templates
+  tag              any tag from "<" till ">"
+  comment          comment
+  doctype          <!DOCTYPE ... > declaration
+  attribute        tag's attribute with or withou value
+  value            attribute's value
+  template_tag     template tag {% .. %}
+  variable         template variable {{ .. }}
+  template_comment template comment, both {# .. #} and {% comment %}
+  filter           filter from "|" till the next filter or the end of tag
+  argument         filter argument
+
+JSON ("json"):
+
+  number           number
+  literal          "true", "false" and "null"
+  string           string value
+  attribute        name of an object property
+  value            value of an object property
+
+JavaScript ("javascript"):
+
+  keyword          keyword
+  comment          comment
+  number           number
+  literal          special literal: "true", "false" and "null"
+  string           string
+  regexp           regular expression
+  function         header of a function
+  title            name of a function inside a header
+  params           parentheses and everything inside them in a function's header
+
+CoffeeScript ("coffeescript"):
+
+  keyword          keyword
+  comment          comment
+  number           number
+  literal          special literal: "true", "false" and "null"
+  string           string
+  regexp           regular expression
+  function         header of a function
+  title            name of a function variable inside a header
+  params           parentheses and everything inside them in a function's header
+
+ActionScript ("actionscript"):
+
+  comment          comment
+  string           string
+  number           number
+  keyword          keywords
+  literal          literal
+  reserved         reserved keyword
+  title            name of declaration (package, class or function)
+  preprocessor     preprocessor directive (import, include)
+  type             type of returned value (for functions)
+  package          package (named or not)
+  class            class/interface
+  function         function
+  param            params of function
+  rest_arg         rest argument of function
+
+VBScript ("vbscript"):
+
+  keyword          keyword
+  number           number
+  string           string
+  comment          comment
+  built_in         built-in function
+
+HTTP ("http"):
+
+  request          first line of a request
+  status           first line of a response
+  attribute        header name
+  string           header value or query string in a request line
+  number           status code
+
+Lua ("lua"):
+
+  keyword          keyword
+  number           number
+  string           string
+  comment          comment
+  built_in         built-in operator
+  function         header of a function
+  title            name of a function inside a header
+  params           everything inside parentheses in a function's header
+  long_brackets    multiline string in [=[ .. ]=]
+
+Delphi ("delphi"):
+
+  keyword          keyword
+  comment          comment (of any type)
+  number           number
+  string           string
+  function         header of a function, procedure, constructor and destructor
+  title            name of a function, procedure, constructor or destructor
+                   inside a header
+  params           everything inside parentheses in a function's header
+  class            class' body from "= class" till "end;"
+
+Java ("java"):
+
+  keyword          keyword
+  number           number
+  string           string
+  comment          commment
+  annotaion        annotation
+  javadoc          javadoc comment
+  class            class header from "class" till "{"
+  title            class name inside a header
+  params           everything in parentheses inside a class header
+  inheritance      keywords "extends" and "implements" inside class header
+
+C++ ("cpp"):
+
+  keyword          keyword
+  number           number
+  string           string and character
+  comment          comment
+  preprocessor     preprocessor directive
+  stl_container    instantiation of STL containers ("vector<...>")
+
+Objective C ("objectivec"):
+  keyword          keyword
+  built_in         Cocoa/Cocoa Touch constants and classes
+  number           number
+  string           string
+  comment          comment
+  preprocessor     preprocessor directive
+  class            interface/implementation, protocol and forward class declaration
+  variable         properties and struct accesors
+
+Vala ("vala"):
+
+  keyword          keyword
+  number           number
+  string           string
+  comment          comment
+  class            class definitions
+  title            in class definition
+  constant         ALL_UPPER_CASE
+
+C# ("cs"):
+
+  keyword          keyword
+  number           number
+  string           string
+  comment          commment
+  xmlDocTag        xmldoc tag ("///", "<!--", "-->", "<..>")
+
+D language ("d"):
+
+  comment          comment
+  string           string constant
+  number           number
+  keyword          language keywords (including @attributes)
+  constant         true false null
+  built_in         built-in plain types (int, string etc.)
+
+RenderMan RSL ("rsl"):
+
+  keyword          keyword
+  number           number
+  string           string (including @"..")
+  comment          comment
+  preprocessor     preprocessor directive
+  shader           sahder keywords