Education must also train one for quick, resolute and effective thinking.

John
Written by John on
Education must also train one for quick, resolute and effective thinking.

Prism highlighter is a very powerful thing. In this article I'm going to show you what you can actually do with it, some tricks and tips while editing your post. Tocs is also enabled as you can see in summary.

Summary

Memoirs theme has Prism highlighter integrated. I will show you in this post a few examples of how it looks if you are a developer planning to add pieces of code on your website.

HTML

<li class="ml-1 mr-1">
    <a target="_blank" href="#">
    <i class="fab fa-twitter"></i>
    </a>
</li>

CSS

.highlight .c {
    color: #999988;
    font-style: italic; 
}
.highlight .err {
    color: #a61717;
    background-color: #e3d2d2; 
}

JS

// alertbar later
$(document).scroll(function () {
    var y = $(this).scrollTop();
    if (y > 280) {
        $('.alertbar').fadeIn();
    } else {
        $('.alertbar').fadeOut();
    }
});

Python

print("Hello World")

Ruby

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

C

printf("Hello World");
John

John

Write a short description of the author here. You are currently previewing Memoirs demo, a Jekyll template compatible with Github pages.

Comments

comments powered by Disqus