Friday, December 4, 2015
Some answer for Front-end-developer-interview-questions
Start to reading Front-end-developer-interview-questions and make some answer, you can take it as reference.
Will add more over time.
Monday, February 16, 2015
Add SyntaxHighlighter to Blog Post in One Minute
1. Edit your blog template.
2. Find the
3. Paste the fragment below before the tag you found above
(NOTE: this is my custom helper and will load js from my github cdn,
you can modify it to create your own as needed)
4. Save template
Done
(It seems there is an autoloader feature but that page not works well so
I wrote my own.)
References:
My testing files
SyntaxHighlighter-themes
SyntaxHighlighter-configuration
2. Find the
</body>tag.
3. Paste the fragment below before the tag you found above
(NOTE: this is my custom helper and will load js from my github cdn,
you can modify it to create your own as needed)
<script type='text/javascript'> syntaxHighlighterConfig = { config: { // required for blog bloggerMode: true }, defaults: { // optional, collapse code block // collapse: true }, themes: { // optional, use other themes // 'dark' can be any string // 'shThemeRDark.css' should be the file name 'dark': 'shThemeRDark.css' } }; </script> <script src='//cdn.rawgit.com/benbai123/HTML_CSS_Javascript_practice/2da59146af1a73f8700c33f3562e09c0b2c31ef8/libs_tools/SyntaxHighlighter/helper/shHelper.js' type='text/javascript'></script>
4. Save template
Done
(It seems there is an autoloader feature but that page not works well so
I wrote my own.)
References:
My testing files
SyntaxHighlighter-themes
SyntaxHighlighter-configuration
Friday, February 13, 2015
Use SyntaxHighlighter with Custom Helper
Simple Note
Use a helper js file to load required js/css files for you.
Samples
testHelper.html
shHelper.js
Use a helper js file to load required js/css files for you.
Samples
testHelper.html
shHelper.js
Thursday, February 12, 2015
Use SyntaxHighlighter to Highlight Code
Simple Note:
Test File:
test.html
Result:
Reference:
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html
Test File:
test.html
Result:
Reference:
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html
Subscribe to:
Posts (Atom)