Blogger uchun sintaksis yoritgich
Blogger da kod sintaksisini yoritish uchun ancha muncha uzun html kod yozishga to'g'ri keladi. Bu kichkina maqolada qanday qilib har xil dasturlash tillarini sintaksisini oson yoritishno o'rganamiz.
Bunda bizga SyntaxHighlighter JS dan foydalanamiz.
SyntaxHighlighter ni Blogger shabloniga o'rnatamiz
Kod yozish uchun
csharp ni boshqa tillarga o'zgartirishingiz mumkin. Namunani bloggerda sinab ko'rishingiz mumkin, shunda natija qanday bo'lganini ko'rasiz.
Bunda bizga SyntaxHighlighter JS dan foydalanamiz.
SyntaxHighlighter ni Blogger shabloniga o'rnatamiz
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'></script> <script language='javascript'> SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf'; SyntaxHighlighter.all(); </script>Kodni shablon redaktor qiladigan joyga o'tib <head> dan keyin yoki </head> oldin qo'yamiz va saqlaymiz tayyor.
Kod yozish uchun
<pre class="brush: csharp">// Comment public class Testing { public Testing() { } public void Method() { /* Another Comment on multiple lines */ int x = 9; } }
csharp ni boshqa tillarga o'zgartirishingiz mumkin. Namunani bloggerda sinab ko'rishingiz mumkin, shunda natija qanday bo'lganini ko'rasiz.
Нет комментариев