Skip to main content


Showing posts from April, 2018

Decorate the Blogspot Item Page TOC with Font Awesome Icons

In one of my Blogger post Blogspot Single Post TOC (zh-hans), I've shared how one put a Table of Content DIV ahead of an Blogger main text. Here shows the way that we decorate the TOC anchors with Font Awesome Icons. Belows are how: Install Item Page TOC Javascript Edit HTML of your Blogger template. Copy this block of javascript code below, and paste them before / devant the html tag /body to your blogger theme: <script> //<![CDATA[ /* Generate TOC * * :param classname: Class to which all TOC items belong. * :param tocID: ID of the TOC element, should be <div></div>. */ function gen_toc(classname, tocID) { var alltags = document.getElementsByClassName(classname); // all TOC items var toc_content = "<h3>Table of Contents</h3><ol>"; // inner HTML content of TOC element var toc_link = ' <a href="#' + tocID + '" class="tooltip" data-toggle="tooltip" data-placement="left"