2017年6月21日星期三

Make Your Own JavaScript Codes Work on Blogger

As a blog platform, Blogger try to make blog writing as simple as paper writing. People do not need to draft the whole web-site from a very beginning. Without complicated HTML, CSS, JavaScript conceptions and understanding, we still can write articles to publish them with all kinds of variable Blog templates supplied by Blogger. Have to say, those templates work very well, which can make your blog looks quite professional. By the way, Blogger now call templates Theme.

Of course, there are some disadvantages of Blog Templates. One of them is that how to make your blog your style. The good news is, Blogger do allow you to go further to personalize your blog pages. There are many ways to achieve this target:

1. Blogger allow you to use some gadgets from Blogger and 3rd-party. In this way, you have a lot choices and no choice as well. It depends on your personal taste and interests. We do not need to focus on this one too much.


2. To modify the Theme. You can add JavaScript and CSS into your blog pages after modifying the Theme you are using. Surely enough, you need some HTML knowledge to light it. And this is the way we are heading.
d3js and underscore have been added into the Theme


Once you put the JavaScript codes , libs and CSS you want to use into the Theme, you are ready to rock. From now on, you are able to inject dynamic effects you love in your blog pages. I should mention, those JavaScript codes, libs and CSS should be able to be visited through Internet. Google Drive could be a nice place to hold them:)

For mobile version, we need to select "custom" to make the custom theme available for mobile devices.

One more thing you need to know, when you add some JavaScript codes into your blog page directly, Make sure your code are enclosed between CDATA section. Here is a example:

<script type="text/javascript">
// <![CDATA[
var demo = 1;
...
//]]>
</script>

I believe when some people read here, they will start to struggle: Oh, now what, need to learn how to program? I have no time for this and it is too difficult to me. 

I understand that it is difficult. But if you really like to write blog, why do not spend some time to learn more to make your writing life more fun, more fresh, more fascinate than ever before? Alpha Go has become God of Go and why human cannot know more about AI's world? We are God of AI, are we?

Let us stop here today. Please make your decision later and I need spend some time to think about my next blog title. Good night to you, if you are there.


没有评论:

发表评论