Labels: Basic, Blog Design
Postingan awal lebaran saya buat yang agak simpel bahkan sangat simpel yaitu Auto Block Pada Tag Code biasanya setiap kode diselubungi oleh tag pre
namun untuk setiap kode pendek biasanya cukup ditandai dengan <code>...script...</code>
.
Pemasangan Auto Block Tag Code pada blog:
Masuk ke edit template kemudian tambahkan CSS dan letakkan diatas kode ]]></b:skin>
CSS
Css disini meliputi: font, background, border dll dan dapat divariasi sesuka hati
code {
font:normal 12px/14px Monaco,Monospace;
background:rgba(255,255,255,.4);;
border:1px solid #eee;
padding:1px;
cursor:default;
border-radius:2px;
-moz-border-radius:2px;
-webkit-border-radius:2px;
}
Javascript
Letakkan script dibawah ini diatas kode </head>
<script type='text/javascript'>
Kemudian Simpan.
$(function() {
$('code').click(function() {
var refNode = $(this)[0];
if($.browser.msie) {
var range = document.body.createTextRange();
range.moveToElementText(refNode);
range.select();
} else if($.browser.mozilla || $.browser.opera) {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(refNode);
selection.removeAllRanges();
selection.addRange(range);
} else if($.browser.safari) {
var selection = window.getSelection();
selection.setBaseAndExtent(refNode, 0, refNode, 1);
}
});
});
</script>
Penerapan pada posting
Tambahkan pada setiap kode pendek yang akan di block dengan script <code>...isi...</code>
Tutorial ini hanya untuk newbe semata jika ada mastah yang kurang berkenan mohon maaf, karena saya disini masih belajar :D
Sumber refrensi: Taufik Nurrahman
23 Komentar:
Beben Koben said on August 21, 2012 at 2:11 PM
muridnya master Taufiq nih...xixixixi
Muhammad Irham said on August 21, 2012 at 6:29 PM
@Beben Koben hehe ya gan, maklum masih nubi
Unknown said on August 23, 2012 at 12:14 AM
Mangstab jg nih. . .
said onKunjungan perdana... :)Mantap2 postingannya...
sakit tenggorokan said on February 25, 2013 at 3:32 PM
terimakasih banyak, ini yang saya cari
pasca stroke said on February 25, 2013 at 3:35 PM
langsung saja ijin TKP
cara jadi agen said on February 25, 2013 at 3:37 PM
selamat sore n salam kenal
cara mengobati sinusitis said on February 25, 2013 at 3:39 PM
salam kenal, ane newbe
jelly gamat said on February 25, 2013 at 3:41 PM
nice to post
ace maxs said on February 25, 2013 at 3:44 PM
langsung mau ke tkp saja ni sob
murah said on February 25, 2013 at 3:45 PM
nice to blog
jantung bengkak said on February 25, 2013 at 3:47 PM
selamat istirahat
kanker paru paru said on February 25, 2013 at 3:48 PM
solusi bila terkena kanker paru paru
jus said on February 25, 2013 at 3:49 PM
khasiat dari jus multikhasiat
Cirebon-Cyber4rt said on July 4, 2013 at 12:41 PM
manteeb gan :D
KOLOM BERITA said on August 3, 2013 at 6:00 AM
Ijin nyimak deh
Web Developers Delhi said on January 5, 2015 at 3:57 PM
This is the precise weblog for anybody who needs to seek out out about this topic. You notice so much its almost arduous to argue with you. You positively put a brand new spin on a subject that's been written about for years. Nice stuff, simply nice!
sri said on January 12, 2022 at 2:14 PM
Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
certified scrum master certification
agile scrum master certification
sri said on January 12, 2022 at 2:15 PM
Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
Scrum master certification online
csm certification online
sri said on January 12, 2022 at 2:17 PM
Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
csm training online
csm online training
sri said on January 12, 2022 at 2:17 PM
Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
certified scrum master
Scrum master
sri said on January 12, 2022 at 2:19 PM
Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
csm certification
csm certification cost
kajal said on March 15, 2024 at 2:07 PM
Nice post. for more information visit us on Top Digital Marketing Institutes in Solapur
Post a Comment