Coder Social home page Coder Social logo

material-theme-nikola's Introduction

material-theme-nikola

A theme for nikola based on Bootstrap 3 which lets you use the new Google Material Design.

Based on bootstrap-material-design. Thank you!

demo site

See demo.

How use?

Simple. Copy dist/material-theme into the 'themes' folder into your project, and then you write 'material-theme' in theme option into your conf.py file.

That is all!

Customization

Navbar color schema

GLOBAL_CONTEXT = {                                                               
     'header_color': 'default'                                                    
}

Options available:

  • default or primary
  • success
  • info
  • warning
  • danger

headers examples

Social links in floating action button

GLOBAL_CONTEXT = {
    "social_links": [
    {
        'bgcolor': "#F44336",
        'icon': "<i class='fa fa-share-square-o'></i>"
    },
    {
        "url": "https://twitter.com/",
        "bgcolor": "#55ACEE",
        "color": "#fffff",
        "icon": "<i class='fa fa-twitter'></i>",
        "target": "_blank"
    },
    {
        "url": "https://github.com/",
        "bgcolor": "#666666",
        "color": "#fffff",
        "icon": "<i class='fa fa-github-square'></i>",
        "target": "_blank"
    },
    {
        "url": "https://www.facebook.com",
        "bgcolor": "#3B5998",
        "color": "#fffff",
        "icon": "<i class='fa fa-facebook'></i>",
        "target": "_blank"
    },
    ]
}

actions-links-gif

Set author's avatar in header post

GLOBAL_CONTEXT = {
    'author_avatar': '/images/avatar.jpg',
}

author's avatar

Show author's biography into the dialog of credits (or footer)

For convenience, first define a variable with the html biography.

BIOGRAPHY = """
<img class="img-circle" style="float:left;margin:10px 20px 10px 0px;max-height:200px;" src="/images/avatar.jpg">
<p>Nikola Tesla (Serbian Cyrillic: Никола Тесла; 10 July 1856 – 7 January 1943) was a Serbian American inventor, electrical engineer, mechanical engineer, physicist, and futurist best known for his contributions to the design of the modern alternating current (AC) electricity supply system.
</p>
"""

Then, add it to biography viariable into GLOBAL_CONTEXT

GLOBAL_CONTEXT = {
    "biography": BIOGRAPHY,
}

biography

Add Google Analytics script

Define a variable with javascript block:

ANALYTICS = """
< script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', 'XX-XXXXXXXXX-X', 'auto');
    ga('send', 'pageview');
< /script> 
"""

And add it to analytics variable into GLOBAL_CONTEXT:

GLOBAL_CONTEXT = {
    "analytics": ANALYTICS,
}

Enable use of pace.js

For enable use of PACE, add a variable into GLOBAL_CONTEXT:

GLOBAL_CONTEXT = {
    'use_pace': True,
}

material-theme-nikola's People

Contributors

mandarvaze avatar matuu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

material-theme-nikola's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.