GithubHelp home page GithubHelp logo

mastina's Introduction

Mastina

MPL

Mastina is a beautiful, Ayu-based, and modern theme for the Nikola static site generator and is the official theme used on the Unscripted website. Mastina is responsive, respectful to your system's theme preferences (via prefers-color-scheme), and includes syntax highlighting via highlight.js and the Ayu color scheme.

Mastina Screenshot

Getting Started

To install this theme, clone this directory into the themes folder of your Nikola project:

git clone https://github.com/UnscriptedVN/mastina site/themes/mastina

In conf.py for your website, set the theme to "mastina":

# Name of the theme to use.
THEME = "mastina"

Configuration

Templates

There are two main template files (tmpl) that can be customized:

  • logo.tmpl controls the logo in the navigation bar.
  • index_helper.tmpl controls the front page, ranging from the jumbotron at the top to the main content below it.

Below is an example for each. You may want to copy the code to modify it to your liking in your own templates folder:

# index_helper.tmpl
{% import 'base_helper.tmpl' as base with context %}
{{ set_locale(lang) }}

{% macro title() %}{{ blog_description }}{% endmacro %}
{% macro description() %}
This is a sample description to demo the main page's content. This should be changed in <code>index_helper.tmpl</code> to better text.
{% endmacro %}
{% macro call_to_action() %}
{% endmacro %}
{% macro hero() %}
<div>
    <img class="ms-shadowed strong" src="/assets/img/hero.png" />
</div>
{% endmacro %}
# logo.tmpl
{% import 'base_helper.tmpl' as base with context %}

{% macro logo() %}
<img src="/assets/img/logomark.svg" alt="{{ blog_title }}"/>
{% endmacro %}

Navigation Links

The navigations links are pulled directly from your site's conf.py and can be configured normally. The links in the navigation bar use the default navigation links, and the links in the footer use the alternate navigation links.

License

The primary Mastina project is licensed under the Mozilla Public License. Some dependencies are available under different licenses:

  • Feather icons: MIT License
  • Highlight.js: BSD-3-Clause
  • Moment.js: MIT License
  • Ayu color scheme: MIT License

mastina's People

Contributors

alicerunsonfedora avatar

Stargazers

Cody Crawford avatar Nicolás Guarín-Zapata avatar

Watchers

James Cloos avatar Andy Kurnia avatar  avatar

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.