Side Border code box | Wizard Point

side border code box

I call this side border code box because this kind of design is similar to other code boxes. Yet it's not the same as you think, where I've fully customized it.

Previously I mention it also capable of supporting the syntax highlighter.

My favorite part of this code box is it can give a beautiful look to your website well in the post. So you might think how "it is just a simple code box" but here is the twist you can add the color of your own choice.

how to add a Side Border code box in blogger

Before jump into this make sure to back up your theme. Also, Read this How to Backup your Blogger Template.

1. Login into your blogger Dashboard.
2. Then on the left-hand side go to the Theme.














3. On the Customize button, click the Down arrow.

4. Then select the Edit HTML.
5. Now press "Ctrl + F " to search and find <head> tag.

 <!-- code provide by wizard point start -->
 <link href='https://use.fontawesome.com/releases/v5.0.13/css/all.css' rel='stylesheet' type='text/css'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js'/>
<script>$(function() {
  
    $(&#39;pre code&#39;).each(function(i, block) {
        hljs.highlightBlock(block);
    });
});
</script>
<!-- wizard point -->
<!-- code provide by wizard point end --> 

6. After you have found it just past the code below <head> tag.

7. Type and search for "]]></b:skin>" tag.
8. Just above the "]]></b:skin>" add this CSS code.

 <!-- code provide by wizard point start -->
 <link href='https://use.fontawesome.com/releases/v5.0.13/css/all.css' rel='stylesheet' type='text/css'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js'/>
<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js'/>
<script>$(function() {
  
    $(&#39;pre code&#39;).each(function(i, block) {
        hljs.highlightBlock(block);
    });
});
</script>
<!-- code provide by wizard point end -->

9. In the last step find the </body> tag.
10. Just above the </body> tag past the code.

  <!--  script By https://wizardpoint.blogspot.com end-->
        <script>function showTooltip(elem){$(&quot;<span id='clpmsg'>Copied</span>&quot;).prependTo(elem),$(elem).children().first().delay(1e3).fadeOut(1e3,function(){$(this).remove()})}$(&quot;<button class='clpbrd' data-clipboard-action='copy' data-clipboard-target='pre code'><i class='far fa-clone'/></button>&quot;).insertBefore(&quot;pre code&quot;);var clipboard=new ClipboardJS(&quot;.clpbrd&quot;,{target:function(trigger){return trigger.nextElementSibling}});clipboard.on(&quot;success&quot;,function(e){e.clearSelection(),showTooltip(e.trigger)});var TopOffset=parseInt($(&quot;.clpbrd&quot;).css(&quot;top&quot;));$(&quot;pre&quot;).scroll(function(){$(&quot;.clpbrd&quot;).css({top:$(this).scrollTop()+TopOffset})});</script>
<!--  script By https://wizardpoint.blogspot.com end-->


Now to Implement this code

First, you need to convert your code you want to implement.
1. Go to HTML entity encoder/decoder. And convert your code.
2. Now, Go to your post where you want to add Code and just select the "Html view option" and insert the code as mention below.
 <pre><code>
Your code goes here..........
</code></pre>
3. The above code is the proper format to implement Your code in your blog post.


Happy coding!

Post a Comment

Previous Post Next Post