Memaparkan catatan dengan label tutorial. Papar semua catatan
Memaparkan catatan dengan label tutorial. Papar semua catatan

Ahad, 21 April 2013

Inset and outset text/elements on web design

Hello there, i just want to update a mini post :D. So i was wondering about 3D, i don't know how to make a 3D, i tried to use shadow, or gradient or the others, but now i got it, i got the trick suddenly sended to my brain xD. Maybe this post's not very important for a web designer, but i just want to share for people who don't know about this.

Outset/3D

The 3D actually is just an illusion, but this is my theory, the light is normally come from above, so if the element is 3D its must has a brighter color on top of the element. Then with logic, the color of the main element must be darker than the top, and but must be brighter than bottom. The bottom must be darker than background, element color, and the top light. So like this image:

Inset

The inset is easy, you just need to exchange the light and the dark border/shadow place. Just like this:

So just like that, i made the image with photoshop xD (sorry if it's not good).

Apply it with CSS

With css you just need to copy a code xD.

Demo: inset text & outset/3D text
INSET

OUTSET
Demo: inset & outset/3D element

INSET

OUTSET


Got it?, so that is, i'll update later :D

Ahad, 24 Mac 2013

New blogger XHTML, post first image (thumbnail)

When i edit my blog template, i found a code that i never seen before. That code is post  first image. The code it's like an old blogspot code data:post.thumbnail, but the old code resolution is 72px, but this new code's resolution is like the src image resolution. So this is very good for a template post thumbnail.

The code

I will no give a tutorial, i just tell you the code
<data:post.firstImageUrl/>
That code will only work in the 'blog post' widget.

Sabtu, 12 Januari 2013

CSS text effects collection tutorial

Now i'll share about CSS text effect. It's many code for css text effect, i mean text effect is not a property or value, but it's an effect in css for text. What i share is some of text property that i used, and i think that effect is important to modify your site. Maybe an article like this has already shared in some blog, but because my blog is not up to date, now i just want to share to someone that doesn't know about all of this text effect. So here is the effects.

Text Shadow

Text shadow is a text effect with a shadow. But you can create a creative shadow with this property. If you're creative, you can make like 3D effect, a glowing text effect, a text looks like created by photoshop and many others. The rule is like this: text-shadow: 1px 1px 5px #000;. The red color is the text shadow property, the blue color is the x-offset or the position of the shadow horizontally, the green color is the y-offset or the position of shadow vertically, the pink color is the blur radius of the shadow, the yellow color is the color of the shadow.
Try it yourself!
text-shadow: 0 0 5px #ff0000

Example:
click this link: http://damzaky.blogspot.com/2012/12/css3-text-shadow.html


Text Transform

Text Transform is just an automatic transformation for text, with this property, if you had write something in a div without caps, but you want that text is caps or uppercase, you can use this property.

Example:
capitalize
text-transform: capitalize
uppercase
text-transform: uppercase
lowercase
text-transform: lowercase

Font Variant

Font Variant is not very famous, but this property is very pretty, i like this property. With this property, you can make a small-caps font. Small caps is just like, the first letter of the text is uppercase, but the lowercase will be uppercased with a different size. Confused?, look this example below....

Example:
Small-caps
font-variant:small-caps

Letter spacing

Letter spacing is not a text effect, but you should know this, because if you want to make a beautiful text maybe you need this. Letter spacing is just a space size between the letter.

Example:
Letter spacing 1px
letter-spacing: 1px;

Letter spacing 2px
letter-spacing: 2px;

Letter spacing 3px
letter-spacing: 3px;

Letter spacing 4px
letter-spacing: 4px;

Letter spacing 5px
letter-spacing: 5px;

Text decoration

Text decoration is just a standard CSS value that always used in any site. But i just want to tell you.

Example:
Text decoration: underline
text-decoration: underline

Text decoration: overline
text-decoration: overline

Text decoration: line-through
text-decoration: line-through

Another text effects that i don't want to explain, just copy the code XD.


Font-weight: bold
font-weight: bold;

Font-style: italic
font-style: italic;

line-height: 30px
line-height: 30px

Maybe i forget to share some property, so i'm so sorry, and sorry for not explain the last property.

Jumaat, 11 Januari 2013

Blogspot tld country redirect affecting SEO

Huuh, i'm a blogger but rare to posting XD. Okay to the topic, blogspot top level domain country redirect affecting SEO, what is tld country redirect?, and why it's affecting SEO?, tld is top level domain, in country and, top level domain in country redirect means, like this: if you try opening your blog with domain blogspot, it's like http://ourblog.blogspot.com, but if you're in india, or in some specific country, the domain wil redirected to http://ourblog.blogspot.in . In domain is a top level domain in India. This things can affecting seo because, your URL will be changed in specific country, and it means, your blog have unique URL and visitor, just like google, Google in some country has a specific domain, and check in alexa ranking, the rank is unique, in alexa you'll found your blog with unique domain. So this thing is very annoying, because your blog SEO will be bad, and other thing is internal and external linking, if you use a script for disable country redirect, your blog is .com, but the blogger XHTML will still .in, .be, .co.uk, so that is very affecting, and also for google pagerank. So conclusion buy a top level domain! XD. Just joke, the only one thing for save your blog SEO is use script for disable country redirect, but it will affecting to internal and external linking on your blog. If you want the script, just place this script after code <head> on your blog html.

The script

Copy this code, and paste after <head> tag on your blog HTML, don't forget to backup your template, for safety.

<script type='text/javascript'>
var blog = document.location.hostname;
var slug = document.location.pathname;
var ctld = blog.substr(blog.lastIndexOf(&quot;.&quot;));
if (ctld != &quot;.com&quot;) {
var ncr = &quot;http://&quot; + blog.substr(0, blog.indexOf(&quot;.&quot;));
ncr += &quot;.blogspot.com/ncr&quot; + slug;
window.location.replace(ncr);
}
</script>

Khamis, 10 Januari 2013

List of dofollow site high pagerank 2013

Dofollow is a blog who gives a backlink to a an external link of that site. Now i share the dofollow list and still working untill now. But attention, spamming is not good for your site reputation. Dofollow blog can give you backlink, and can make your blog have a high pagerank. Ok now for the list....

The list....

http://links.org.au/
http://blog.greens.org.nz/
http://filipinolibrarian.blogspot.com/
http://www.currybet.net/
http://newcritics.com/
http://blog.mofuse.com/
http://socialtimes.com/
http://eartheasy.com/blog/
http://weblogtoolscollection.com/
http://justintadlock.com/
http://blog.lendingclub.com/
http://www.grokdotcom.com/
http://www.educause.edu/blog
http://dig.csail.mit.edu/breadcrumbs/blog/4
http://pressblog.uchicago.edu/
http://blogs.nyu.edu/fas/dri/aidwatch/
http://delong.typepad.com/
http://www.communityspark.com/
http://focusorganic.com/
http://www.layercake.net/
http://www.hobo-web.co.uk/seo-blog/
http://justaddwater.dk/
http://www.krisbuytaert.be/blog/
http://blog.dmbcllc.com/
http://therenegadewriter.com/
http://www.iayork.com/MysteryRays/
http://www.lifeinthefastlane.ca/
http://elleeseymour.com/
http://profitsfinancesite.com/
http://newcritics.com/blog1/
http://www.uncommonphotographers.net/
http://links.org.au/
http://www.knrn.org/
http://blogs.cetis.ac.uk/asimong/
http://www.seobythesea.com/
http://www.oilman.ca/
http://andybeard.eu/

Khamis, 27 Disember 2012

Make a responsive website

To make a responsive web is not very easy, but if you know the problem that thing could be easy XD. The main principle of responsive website is only matching any element on a site to the main screen. The first thing is the element width, you need to change the width value to auto, the content wrapper must use value auto on css width. Then if the wrapper is disarranged in computer or in a big screen, you need to set max-width on the content wrapper. Then try to use font value with percent. Don't use pixel in css value. But if you need to use PX, you can use css media queries, for a responsive.

Media queries

@media screen and (max-width:1030px) { #outer-wrapper { width:100%; } }
That CSS mean: "this css will applied if the screen maximal width is 1030px". You can change it to max-width: 600px, or min-width: 600px;.

CSS3 text shadow

CSS3 text shadow is very good for web designing. With CSS3 text shadow, you can make a cool text like using photoshop!. The important thing before using text shadow, is know the rule, the rule is like this: text-shadow: 1px 1px 5px #000;. The red color is the text shadow property, the blue color is the x-offset or the position of the shadow horizontally, the green color is the y-offset or the position of shadow vertically, the pink color is the blur radius of the shadow, the yellow color is the color of the shadow. For example, i have many creation of mine, just copy the CSS to your element.

My CSS3 text shadow creation

3 Dimension

text-shadow: 0px 0px 0 rgb(-28,-28,-28),1px 1px 0 rgb(-57,-57,-57),2px 2px 0 rgb(-85,-85,-85),3px 3px 0 rgb(-113,-113,-113),4px 4px 0 rgb(-142,-142,-142),5px 5px 0 rgb(-170,-170,-170),6px 6px 0 rgb(-198,-198,-198),7px 7px 0 rgb(-227,-227,-227),8px 8px 0 rgb(-255,-255,-255), 9px 9px 0 rgb(-283,-283,-283),10px 10px 9px rgba(0,0,0,0),10px 10px 1px rgba(0,0,0,0.5),0px 0px 9px rgba(0,0,0,.2);

Brushed

text-shadow: 0px 2px 4px #000, 0px 4px 4px #000 /*1*/, 0px -2px 4px #000, 0px -4px 4px #000/*2*/, 2px 0px 4px #000, 4px 0px 4px #000/*3*/, -2px 0px 4px #000, -4px 0px 4px #000/*4*/, 2px 2px 4px #000, 4px 4px 4px #000/*11*/, -2px -2px 4px #000, -4px -4px 4px #000/*22*/, -2px 2px 4px #000, -4px 4px 4px #000/*33*/, 2px -2px 4px #000, 4px -4px 4px #000/*44*/; color: transparent;

Outlined

text-shadow: 0px 2px 2px #000, 0px 4px 2px #000 /*1*/, 0px -2px 2px #000, 0px -4px 2px #000/*2*/, 2px 0px 2px #000, 4px 0px 2px #000/*3*/, -2px 0px 2px #000, -4px 0px 2px #000/*4*/, 2px 2px 2px #000, 4px 4px 2px #000/*11*/, -2px -2px 2px #000, -4px -4px 2px #000/*22*/, -2px 2px 2px #000, -4px 4px 2px #000/*33*/, 2px -2px 2px #000, 4px -4px 2px #000/*44*/;

Double

text-shadow: 0px 40px 4px #000;

Blur

color: transparent; text-shadow: 0 0 10px #333;

Multipe Glow

text-shadow: 0 0 10px #fff, 3px 3px 10px #fff, -3px 3px 10px #fff, 3px -3px 10px #fff, -3px -3px 10px #fff, 10px 10px 30px #61cde8, 0 -1px #fff, 1px 0 #fff, 0 1px #fff, -1px 0 #fff, -10px 10px 30px #61cde8, 10px -10px 30px #61cde8, -10px -10px 30px #61cde8; color: black;

Convex

color: transparent; text-shadow: 5px 5px 5px #fff, 5px 5px 10px #333, 0 0 2px #000, -5px -5px 10px #333, -5px 5px 10px #333, 5px -5px 10px #333;

GLOW

color: white; text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #2e4585, 0 0 70px #2e4585, 0 0 80px #2e4585, 0 0 100px #2e4585, 0 0 150px #2e4585;

Multiple

text-shadow: 3px 3px 0 #52ffff,12px 12px 0 #ff383f, 22px 22px 0 #52ffff, 32px 32px 0 #ff383f;

Colorful

color: transparent; text-shadow: 5px 5px 10px #0044ff, -5px 5px 10px #ff1f1f, 5px -5px 10px #33ff1c, -5px -5px 10px #ffff00;

Color glow

color: #fff; text-shadow: 0px 0px 5px #fff, 5px 5px 10px #0044ff, -5px 5px 10px #ff1f1f, 5px -5px 10px #33ff1c, -5px -5px 10px #ffff00;

Rainbow

color: white; text-shadow: 1px 1px 1px #ff0000, 2px 2px 1px #ff0000, 3px 3px 1px #ff8800, 4px 4px 1px #fff700, 5px 5px 1px #fff700, 6px 6px 1px #22ff00, 7px 7px 1px #22ff00, 8px 8px 1px #00ffee, 9px 9px 1px #0011ff, 10px 10px 1px #0011ff;
ALL OF THIS TEXT SHADOW ARE CREATED BY DAMAR ZAKY

Khamis, 8 November 2012

How to reenable highlighting text in browser

If you want to copy an article in some blog, but that blog is using an anti-copy or disable highlighting fonction,  just follow this tutorial, but this tutorial is not for bad use. REMEMBER only for share not for real. Ok it's easy, because the code for disable highlighting text is using Javascript, it's simply just disable your browser javascript for a while. For how to do that, how to disable javascript, you can using this following link:

Disable highlighting text script blogger

This article it's just about how to disable highlighting script for blogger. Because sometimes blogger doesn't like its article is plagiated. And the advantage of this script, your textarea, input, scroll will not effected. But the disadvantage is just if you have a blog with about coding, maybe the visitor will can't be highlight or copying your code. Ok this is easy....

Tutorial

Just add this code to a widget, or open blogger.com, select blog, click layout tab, add widget text/HTML, paste this code and save.

<script type="text/javascript">

/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script>
Ok just that, you are finish

Khamis, 1 November 2012

Social share button without javascript

Hmm... everyday visitor come, and some visitor want all my blog secret is shared. Ok if that all you want, i'll share... The trick is very simple, it's just a link with sharer by a plugin of social network. Now i'll share only for facebook, twitter and google+.

How to add it on blogger

The system is simply, you just need to add a link to your blog.

  1. Open and login to blogger.com, select your blog
  2. Click template tab in left sidebar, backup your template
  3. Click edit HTML and proceed
  4. Now expand widget HTML
  5. Search (CTRL+F) this code <data:post.body/>
  6. If you have found that code, below that code add this code:
    <a expr:href='&quot;http://www.facebook.com/sharer.php?u=&quot; + data:post.url' style=' line-height: 20px; color: #fff; background: #3b5998; text-decoration: none; border: 1px solid #313c7d; padding: 3px;  font-family: arial, verdana, sans-serif; font-size: 12px; font-variant: normal; font-weight: bold;'>Share</a> <a expr:href='&quot;http://twitter.com/share?url=&quot; + data:post.url' style='color: #fff; background: #4099FF; text-decoration: none; border: 1px solid #3a8be8; padding: 3px; border-radius: 3px; font-family: arial, verdana, sans-serif; font-size: 13px; line-height: 20px;'>Tweet</a> <a expr:href='&quot;https://plus.google.com/share?url=&quot; + data:post.url' style='color: #fff; background: #c0361a; text-decoration: none; border: 1px solid #9c2c15; padding: 3px; border-radius: 3px;font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 20px;'>Share</a>
  7. Then save your template
  8. Check your blog
Ok now finish, i'll update later....

Blogspot image host secret

Blogspot image secret is only a URL secret not the image. And actually the image is not secret but the Image url. The secret is only the resolution of image, we can change it like we want. This secret maybe you already know, but i share just for people who don't know.

How to change blogspot image resolution

So it's very easy, look at this image below:
The URL of that image is https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGZXeKn20q1BaJWZ09C5jelpgGWPJVa3nazBF3kmwDGXnDfWNwnXv9SUOJLqWWjZqNgJwdubw8rkzhopeDl3QXh7cEfoappMJ18SwoDRH18d7CCCKLmoZDNwygBd4Q-EDik7MHzZjWRHe9/s320/400955_2375618285276_2146237091_n.jpg, then just change the s320 red code, with another resolution, but maximal resolution is s1600.

Rabu, 31 Oktober 2012

Pure CSS tooltip without javascript

Pure CSS tooltip is a tooltip or a more info about anything that hovered. Tooltip is very useful for more information about a link or anything that is hovered. Maybe in HTML there are already a tooltip, but that tooltip can't be customized. Now i'll share about how to make a tooltip with pure CSS and without javascript or Jquery.

How to create tooltip with CSS without javascript

It's simply, i just put a pseudo :after to a link element.

  1. Open and login to blogger.com, select your blog
  2. Click template tab in left sidebar, then backup your template
  3. Edit HTML proceed, then search (CTRL+F) for this code: ]]></b:skin>
  4. If you have found that code, before that code, paste this code:

    a.tltp{position: relative;}a.tltp:after{content:attr(alt);display:none;margin-left:10px;color:#000;background: #fff;border:1px solid #ccc; border-radius: 3px;padding:3px;width:300px;position:absolute;font-family:'Arial',sans-serif;line-height:1.5;letter-spacing:1px;text-transform: lowercase;font-weight: normal;font-size:13px;font-variant:normal;text-align: justify; font-style:normal;}/*CSS tooltip by Damar Zaky http://damzaky.blogspot.com*/a.tltp:hover:after{display:inline;}
  5. Then save template

How to make the link with tooltip

For make a tooltip, in any link just put class='tltp' and alt='THE CONTENT OF TOOLTIP' or like this:
<a href='http://blablablac.com' class='tltp' alt='THE CONTENT OF TOOLTIP'>Link</a>

Demo

Link
Just that!

Selasa, 30 Oktober 2012

About Dofollow blog

What is Dofollow blog?, dofollow blog is a normal blog who gives a free backlink to the reader. This blog is not a dofollow blog, because this blog haven't comment form XD, Dofollow blog usually knowed by comment form in the blog. But using blog dofollow, there are an advantage and disadvantage.

How to make your blog be a dofollow blog

To make your blog transformed to dofollow it's very easy, you just need to show backlink on the comment on the blog. For tutorial, follow this

  1. Open and login to blogger.com, select your blog.
  2. In the left panel, click settings then post and comment.
  3. In the Who can comment? section, select anyone.
  4. In the Show Backlinks section, select Show.
  5. Then save.
  6. Now your blog is a dofollow blog

The advantage of dofollow blog

The advantage is, your blog will get and visited by many visitor. Your blog pageviews per day will increased. Your blog will not forever alone XD, because maybe many visitor will comment to your blog

The disadvantage of dofollow blog

The disadvantage is, too many backlink to external links, too many comments, too many Out Of topic comment, get penalty from google panda or pinguin (i don't know about this), and maybe your blog can be deleted by blogger.com because, your blog looks like a blog with only spam inside.

Isnin, 29 Oktober 2012

How to designing blogger mobile template

Every day i'm sharing about blogger tutorial, hmm... i'm so tired for creating post. But i must do that because i'm a blogger, and time is money. So now i'll sharing about how to designing blogger mobile template and the explaination about template structure of mobile template. Ok without many word, i'll share now.

How to activate your own mobile template

For activating is easy, just follow this tutorial

  1. Open and login to blogger.com, select your blog then click the Template tab.
  2. In template tab, there are a mobile preview, then click the button below that preview.
  3. Then check the  and select the mobile template to custom (if you want to design your own mobile template)
  4. And then save, then backup your template, then edit HTML then proceed.
  5. Now search (CTRL+F) this code:  <body>
  6. Replace that code with this code:
    <body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
  7. Then save template
  8. For temporarily your mobile template is activated, but maybe it's still disordered and not customized

Explaination

For call the mobile selector in blogger you need to make a like this:
.mobile .class {property: value;}
or
.mobile #id {property: value;}
for mobile conditional tag is like this:
<b:if cond='data:blog.pageType == "data:blog.isMobile"'>


How to make your layout is responsive

For design you need to know CSS of course, and you need to know your template structure.
For responsive style, i'll tell you some basic for responsive design.
If you want to make your wrapper is responsive, the first important thing is the #outer-wrapper. Then for make #outer-wrapper is responsive, you can use like this: 
.mobile #outer-wrapper {max-width: 630px; width: auto;}
or
.mobile #outer-wrapper, .mobile #main-wrapper, .mobile #sidebar-wrapper {float: none; width: auto;}

How to edit mobile HTML post layout

The mobile HTML post layout is in post widget, if you want to edit the layout, just edit like this:

Mobile HTML homepage:
<b:includable id='mobile-index-post' var='post'>

Mobile HTML item page (post):
<b:includable id='mobile-post' var='post'>

How to display widget in mobile

For displaying ONLY in mobile, in the
<b:widget> tag, just add this attribute:
mobile='only'

For displaying widget in desktop and in mobile, in the
<b:widget> tag, just add this attribute:
mobile='yes'


Ok that is the basic, maybe i'll update the advanced tutorial.... special thanks to Mas Sugeng for idea and inspiration, without him, i'll never know about mobile template in blogger

Ahad, 28 Oktober 2012

How to make blog super simple and blank

Hahahaha this post is very-very not important, why?, because it's very crazy to make a blogspot page only a blank page. This tutorial will tell you about the simplest blogger template. It's very easy because this blank page is just an empty template. So now for tutorial, trust me it's very easy.

Tutorial

  1. Open and login to blogger.com then create a dummy blog with the simple template for first and DON'T use the dynamic views template.
  2. Click Template tab and edit HTML
  3. Block all HTML code (ctrl+a) and delete all code
  4. And then paste this code in the empty HTML

  5. <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html>
    <html>
    <head>
    <title>Bloqcoba</title>
    <b:skin><![CDATA[ ]]></b:skin>
    </head><body>&lt;!--<b:section id='by damar zaky http://damzaky.blogspot.com'/>--&gt;</body></html>
  6. And then save template

Explaination

This all code will make a blank page, if you want to make a simple text in one full page of that blog, paste a text below the <body> tag, like this:
<body>
<div style='color: #ff0000; font-size: 100px; font-family: arial, verdana, sans-serif;'>
HELLO WORLD!
</div>
</body>
you are finish, check your blog.

How to create unique or custom post in blogger

What is unique or custom post in blogger?, it's the different post than other post, every page have a different style. This time i will share about how to create that unique or custom post. This tutorial is easy for newbie, but i recommend to use this tutorial if you're understand about CSS. For example of unique post, you can see this blog: http://cyberqpale.blogspot.com, and if you want another demo, search in google with keyword "Blogaziner".  Have you see that?, ok if you want follow this tutorial.

The formula

  1. Open blogger.com and login, and then create a blank post
  2. Write anything in that post (whatever you want)
  3. Then in post you'll see Compose tab and HTML tab, click the HTML tab
  4. You found your text with html, then just put this code in the last line:
    <style type='text/css'>
    Put your CSS here
    </style>
  5. Then that is the formula, just fill the CSS in that area
  6. Still don't understand?
  7. Ok, now i'll tell you if you're newbie in HTML

Template structure

Your template structure maybe have:
  • #outer-wrapper
  • #content-wrapper
  • #main-wrapper
  • #sidebar-wrapper
  • #footer-wrapper
  • #header-wrapper
  • .post
  • .post-body
If you want to make a page without a sidebar in the #content-wrapper, or if you want your page is only post and without sidebar, just do this.

below the <style type=text/css'>, paste this:
#sidebar-wrapper {
display: none;
}
#main-wrapper {
float: none;
width: 100%;
}

So just play the CSS, if you want to remove the header, footer, comments, just do this
#header-wrapper {
display: none;
}
#comments, .comments {
display: none;
}
#footer-wrapper {
display: none;
}
if you want to make a different style like change a background color of post or the blog background color, follow this tutorial and also you can change it with image
.post {
background: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbLj0OqYNiXS1GnIGeqbx-w3n0pGiMeHFfX8F3DJBWaZxkyWZ42S4EFaWuaQG8NBESim2aG2QP2WbXI-WCL35dERJLP5GBas7Sw9JnK7fDPjE2ONIdQZ8nRugMKfaPsU0nRzMi6mhiym0/s1600/wrapper.png") repeat-x scroll 0 0 transparent;
}
body {
background: #ccc;
}
Ok just that, happy playing CSS!

Sabtu, 27 Oktober 2012

About blogger conditional tag further

Blogger conditional tag is very important in blogger, because this fonction can make every blogger page different style, not only style CSS but you can put anything. In internet has already many tutorial about this, but it's only a basic tutorial, this tutorial is not basic but advanced, not only page but it can be used for any condition. Ok now for the article....
Maybe you already know about index, homepage, item page, maybe you think there are not another ways about conditional tag, but i create an experiment in my dummy blog with conditional tag and i found many other of conditional tag. So the formula is easy
<b:if cond='data:blog.pageType == "index"'>
The green color is a general code of conditional tag.
The blue code is a layout data tag. And the dark blue is the data of the blue tag. The explaination is --if the blog page type is index, (content of that if)--
So we can modify by logic with this explaination, we can replace the data:blog.pageType with data:post.author and then replace the index with the author name or example Damar Zaky. So the explaination is changed to --if the post author name is Damar Zaky, (content of that if)--. Then the code is maybe like this:
<b:if cond='data:post.author == "Damar Zaky"'>
<style>
CSS code
</style>
</b:if>

Page type conditional

This is the list for conditional page type
Index page, homepage, search page
<b:if cond='data:blog.pageType == "index"'>

Item page, a post page
<b:if cond='data:blog.pageType == "item"'>

Static page, for the static page or http://yourblog.blogspot.com/p/static.html
<b:if cond='data:blog.pageType == "static_page"'>

Archive page, for archive page page like http://damzaky.blogspot.com/2012_10_01_archive.html
<b:if cond='data:blog.pageType == "archive"'>

Home page, your home page
<b:if cond='data:blog.url == data:blog.homepageUrl'>

Specific URL, a specific url
<b:if cond='data:blog.pageType == "PUT YOUR URL HERE"'>

Post and static page, post and static
<b:if cond='data:blog.pageType == "data:post.url"'>

The first post, not a page but for custom the column of the latest post
<b:if cond='data:blog.pageType == "data:post.isFirstPost"'>

Error or 404 page, error or 404 page
<b:if cond='data:blog.pageType == "error_page"'>

Mobile page, not a page but for mobile conditional tag, if CSS put .mobile .class
<b:if cond='data:blog.pageType == "data:blog.isMobile"'>

Search label page, search label page or label page like: http://damzaky.blogspot.com/search/label
<b:if cond='data:blog.pageType == "data:blog.searchLabel"'>

Search with query, search label page or label page like: http://damzaky.blogspot.com/search?q=
<b:if cond='data:blog.pageType == "data:blog.searchQuery"'>

Search with query with specific query, search page with keyword like: http://damzaky.blogspot.com/search?q=css
<b:if cond='data:blog.searchQuery == &quot;The search keyword&quot;'>

Search label with specific label, search page with keyword like: http://damzaky.blogspot.com/search/label/NAME OF LABEL
<b:if cond='data:blog.searchLabel == &quot;NAME OF LABEL&quot;'>


Explaination

if you want to make except conditional change the == with !=  . Then this is special and unique tag, if you doesn't understand about layout data tag, you can see in this post http://damzaky.blogspot.com/2012/10/the-blogger-layout-data-tag-master-code_12.html. Then the special is like this, if you use data:post.author == name, you need to put that code in the blog post widget, why?, if you put that code in head, it will not working because data:post.author the red code meaning where the data dictionnary is placed, it means that word/code is placed in post widget, so if you want to put that code, you must put that code in below the <b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'> code.

But how to use data:post.author?, this code will be used by a blog who haves author more than one. So the code like this maybe, different author not only marked with text but now we can change it with different author picture, like this:
<b:if cond='data:post.author == "Damar Zaky"'>
<img src='photo of author is photo of damar zaky'/>
<style>
.post {
background-color: #94eaff;
}
</style>
<b:if>
<b:if cond='data:post.author == "Ykaz Ramad"'>
<img src='photo of author is photo of ykaz ramad'/>

<style>
.post {
background-color: #e9ffb5;
}
</style>

<b:if>


If you want different label, different style, you can use this code:

<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name == &quot;NAME OF LABEL&quot;'>
<style>
.post {
background-color: #f7e3ff;
}
</style>
</b:if>
</b:loop>
But be careful with the label, because it's very sensitive, if the label name is Blogger and if you change the NAME OF LABEL with blogger, it will not working, you must change with Blogger.

Ahad, 21 Oktober 2012

How to remove blogger widget javascript

If before i've posting about how to remove the blogger CSS reset, now i'll posting about how to remove the blogger widget javascript in before body tag. But i don't know the fonction about this script so maybe there are a risk if removing this code. But many of my friends yesterday asking about how to remove this, so now i'll share it. But remember this tutorial is ADVANCED tutorial not recommended for newbie coder.

How to remove <script type="text/javascript" src="//www.blogger.com/static/v1/widgets/1708301263-widgets.js"></script> in blogger?

WARNING!
Removing this code maybe can make your template destroyed, if you use official widget from blogger, the fonction can be totally changed. If you're don't understand about this code, don't do this. This tutorial is ADVANCED tutorial, not recommended for newbie or intermediate coder.

Explanation

This tutorial is simple, just like my post before, i just add a HTML comments before </body> tag and the javascript of HTML will converted to HTML comments, so browser will ignore them. This tutorial will be effected to Gtmetrix.

Ok now for tutorial.

Tutorial

  1. Open blogger, edit HTML, and backup your template for safety.
  2. Edit HTML, proceed, then CTRL+F this code: </body>
  3. Replace that code with:
    &lt;!--<div id='by Damar Zaky http://damzaky.blogspot.com do not remove this text if you are a real blogger'/></body>--&gt;&lt;/body&gt;
  4. Then save template.
  5. You're finish!

Checking

Open your blog, then CTRL+U,  if you found the <script type="text/javascript" src="//www.blogger.com/static/v1/widgets/1708301263-widgets.js"></script> turning to green and below that code all are green, that means you're succes.

Or you can open http://www.gtmetrix.com then type your blog in the form, if the site finish checking, you may found the tab 'Minify JavaScript', if you click, and you not found this code http://www.blogger.com/static/v1/widgets/1708301263-widgets.js , it means you're succes.....

Ok i'll update later, if you have any question or problem, you can ask in comments.

Sabtu, 20 Oktober 2012

How to remove blogger CSS reset stylesheet (widget bundle)

I will share now, share what?, the trick for remove the CSS reset stylesheet in blogger. Maybe if you don't know about this code, you may not so like this article, but if you're understand many blogger code, you may think this article is very-very helpful. But why many peoples want to remove this code from HTML?, because, this is a CSS reset code of blogger, and if you're template designer, you may hate this code, because it's make multiple CSS and crashing CSS code. If you're not understand about blogger code, don't follow this tutorial!.


How to remove <link type='text/css' rel='stylesheet' href='//www.blogger.com/static/v1/widgets/1937454905-widget_css_bundle.css' /> in blogger?

How to remove <link type='text/css' rel='stylesheet' href='//www.blogger.com/static/v1/widgets/4219271310-widget_css_2_bundle.css' /> in blogger?


WARNING!
Removing this code maybe can make your template destroyed, if you use official widget from blogger, the style can be totally changed. If you're don't understand about this code, don't do this. This tutorial is ADVANCED tutorial, not recommended for newbie or intermediate coder.


Explanation

This tutorial is not real removing the code, but this tutorial is make that code is ignored by browser and not make blog CSS code replaced. It's simply this tutorial is just converting that code to HTML comments, why HTML comments?, HTML comments is ignored by browser, because that i just converting but not removing, and this tutorial can effecting page speed score in Gtmetrix.....

Ok now for tutorial.

Tutorial

  1. Open blogger, edit HTML, and backup your template for safety.
  2. Edit HTML, proceed, then CTRL+F this code: <b:skin><![CDATA[
  3. If you have found that code, in below that code you may found your CSS (of course XD), now block from below that code to before ]]></b:skin>, or block all your CSS and CTRL+X, paste in notepad.
  4. Then the remaining code is <b:skin><![CDATA[    ]]></b:skin>
  5. Block that code and replace it with this code:
    &lt;style type=&quot;text/css&quot;&gt;
    &lt;!-- /*<b:skin><![CDATA[*/]]></b:skin>
  6. Then below the replaced code, place this code:
    <style type='text/css'>

    YOUR CSS FROM NOTEPAD

    </style>
  7. Then below the <style type='text/css'> that you placed below the ]]></b:skin>, paste your all CSS from notepad.
  8. Then save template.
  9. You're finish!

Checking

Open your blog, then CTRL+U,  if you found code like this:
<style type="text/css">
<!-- /*<link type='text/css' rel='stylesheet' href='//www.blogger.com/static/v1/widgets/1937454905-widget_css_bundle.css' />
<style id='page-skin-1' type='text/css'><!--
*/
--></style>
If you found that code in page source and all the color of that is black, it means the stylesheet link is ignored by browser and you're succes.

Or you can open http://www.gtmetrix.com then type your blog in the form, if the site finish checking, you may found the tab 'remove unused CSS', if you click, and you not found this code <link type='text/css' rel='stylesheet' href='//www.blogger.com/static/v1/widgets/1937454905-widget_css_bundle.css' /> , it means you're succes.....

That's all, special thanks to google group. I'll update later, if you have any question, send it with comments below....

Jumaat, 12 Oktober 2012

Understanding the general blogger code

Blogger is not only for blogging, or creating post, but we can use blogger for design, what design?, design of the template with HTML of course. But coding in blogger is not easy; you need to understand the XHTML code of blogger, and you need to understand, where you can place the code. In blogger XHTML is many of a code, maybe you're already know some code like, CSS, ]]></b:skin>, <b:widget>, <b:includable>, <head>, <body> and many others. But the question is, did you know does this code meaning?, or where is the code placed?, what is the rule for placing code?, so here we are, i'll share the explication of the code.


Layouts Data Tags

The layout data tags is the most important code in blogger XHTML. The format of code is: <data:name1.name2/>. It's started with <data: then the name is like: post, and name 2 is the name code subbed by code name 1. The example is <data:post.body/>, post is the widget, and body of post is inside the post widget. So if we translate it, data of post's body. Data meaning the text or anything that is not certainly, or it can be from the machine, that is XHTML, in blogger edit HTML section if you see: <data:post.body/> but if you open your blog and view page source, you'll not found the <data:post.body/>, but that code will be changed to the post contents, view page source it's mean not view the source from the HTML we edited, but the browser is take a source from converted version from blogger, so the conclusion is: if we edit the blogger HTML and save, it's not saved directly to your blogger HTML, but it sended to blogger machine, and blogger is converting the XHTML to HTML for browser.

For the complete list of Layout data tags, you can see it in here: http://damzaky.blogspot.com/2012/10/the-blogger-layout-data-tag-master-code.html

Blogger XHTML structure

The Blogger XHTML structure is the very important code in HTML. The structure is easy, like the normal HTML, but in blogger have a rules for realese the XHTML. The simples structure of blogger HTML is:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<b:skin><![CDATA[

YOU PLACE THE CSS IN HERE

]]></b:skin>
</head>
<body>
<b:section id='test'/>
</body>
</html>
Red : The red code is the key of HTML/XHTML, if you delete this code, when you save HTML, blogger won't save it.
White : I don't know about this code, but i think this is the most important code.
Blue : The blue code is the basic structural of HTML and the most important tag in HTML.
Green : The green code is the important code in blogger, but the ID is not only test, it can be another id because without this, code won't save the HTML.
Black : The black code is the place for CSS is not so important, but without CSS, blogger can be designed.
Dark blue : The dark blue is most important code in blogger, you can't delete it (maybe), but it's needed for replacing <style> tag in blogger.

Definition:
<html> is used for the key of HTML/XHTML.
<head> is used for placing the code that not showing in the display, like javascript, CSS.
<body> is used for placing the code that is showing in your monitor.
<b:section> is code for the place of widget in blogger.
<b:skin> is used for placing the CSS code.

And that is the basic XHTML, but in blogger there are a general XHTML, that is used by many blogger.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<title>Blog title</title>
<b:include data='blog' name='all-head-content'/>
<b:skin><![CDATA[
a {
color: #fff;
}
]]></b:skin>
</head>
<body>
<div id='outer-wrapper'>
<div id='content-wrapper'>
<div id='main-wrapper'>
<b:section id='main'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>
<div id='sidebar-wrapper'>
<b:section id='sidebar'>
<b:widget id='Label1' locked='false' title='Labels' type='Label'/>
</b:section>
</div>
</div>
<div id='footer-wrapper'>
<b:section id='footer'>
<b:widget id='Text1' locked='false' title='Footer text' type='text'/>
</b:section>
</div>
</div>
<b:section id='test'/>
</body></html>
<b:include data='blog' name='all-head-content'/> : meaning the all content of head tag like: meta, link, script
<b:widget : meaning some widget in the blog

And this is the HTML that is converted and ready to readed in browser

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<title>Blog title</title>
<meta content='ur-blog ur-blog' name='Description'/>
<meta content='ur-blog ur-blog' name='keywords'/>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<script type="text/javascript">(function() { var a=window,b="jstiming",d="tick";var e=function(c){this.t={};this.tick=function(c,p,h){h=void 0!=h?h:(new Date).getTime();this.t[c]=[h,p]};this[d]("start",null,c)},f=new e;a.jstiming={Timer:e,load:f};if(a.performance&&a.performance.timing){var g=a.performance.timing,j=a[b].load,k=g.navigationStart,l=g.responseStart;0<k&&l>=k&&(j[d]("_wtsrt",void 0,k),j[d]("wtsrt_","_wtsrt",l),j[d]("tbsd_","wtsrt_"))}
try{var m=null;a.chrome&&a.chrome.csi&&(m=Math.floor(a.chrome.csi().pageT),j&&0<k&&(j[d]("_tbnd",void 0,a.chrome.csi().startE),j[d]("tbnd_","_tbnd",k)));null==m&&a.gtbExternal&&(m=a.gtbExternal.pageT());null==m&&a.external&&(m=a.external.pageT,j&&0<k&&(j[d]("_tbnd",void 0,a.external.startE),j[d]("tbnd_","_tbnd",k)));m&&(a[b].pt=m)}catch(n){};a.tickAboveFold=function(c){var i=0;if(c.offsetParent){do i+=c.offsetTop;while(c=c.offsetParent)}c=i;750>=c&&a[b].load[d]("aft")};var q=!1;function r(){q||(q=!0,a[b].load[d]("firstScrollTime"))}a.addEventListener?a.addEventListener("scroll",r,!1):a.attachEvent("onscroll",r);
 })();</script>
<meta content='true' name='MSSmartTagsPreventParsing'/>
<meta content='blogger' name='generator'/>
<link href='http://ur-blog.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link href='http://ur-blog.blogspot.com/' rel='canonical'/>
<link rel="alternate" type="application/atom+xml" title="ur-blog - Atom" href="http://ur-blog.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="ur-blog - RSS" href="http://ur-blog.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="ur-blog - Atom" href="http://www.blogger.com/feeds/3522685956630332245/posts/default" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID=3522685956630332245" />
<link rel="openid.server" href="http://www.blogger.com/openid-server.g" />
<link rel="openid.delegate" href="http://ur-blog.blogspot.com/" />
<meta content='ur-blog ur-blog ur-blog' name='description'/>
<meta content='index,follow' name='robots'/>
<link type='text/css' rel='stylesheet' href='//www.blogger.com/static/v1/widgets/1937454905-widget_css_bundle.css' />
<style>
a {
color: #fff;
}
</style>
</head>
<body>
<div id='outer-wrapper'>
<div id='content-wrapper'>
<div id='main-wrapper'>

<div class='main section' id='main'><div class='widget Blog' id='Blog1'>
<div class='blog-posts hfeed'>

Blog post content

</div>
</div>
</div>

</div>
<div id='sidebar-wrapper'>

<div class='widget Label' id='Label1'>
<div class='widget-content cloud-label-widget-content'>

Widget content

</div>
</div>

</div>
</div>
<div id='footer-wrapper'>

<div class='widget Text' id='Text1'>
<div class='widget-content text-widget-content'>

Widget content

</div>
</div>

</div>
</div>

<script type="text/javascript">
if (window.jstiming) window.jstiming.load.tick('widgetJsBefore');
</script><script type="text/javascript" src="//www.blogger.com/static/v1/widgets/130042055-widgets.js"></script>
<script type='text/javascript'>
if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = "templatesV1";window['blogger_blog_id'] = 'bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla ;
</script>

</body></html>
<link type='text/css' rel='stylesheet' href='//www.blogger.com/static/v1/widgets/1937454905-widget_css_bundle.css' /> : this code is reset code of CSS, i want to delete it, but it's impossible, but some people says that code can be deleted by using HTML comments.


<script type="text/javascript">
if (window.jstiming) window.jstiming.load.tick('widgetJsBefore');
</script><script type="text/javascript" src="//www.blogger.com/static/v1/widgets/130042055-widgets.js"></script> : for this code also i don't understand the fonction, but i think is the reset code for widget, and it can't be deleted.



<script type="text/javascript">(function() { var a=window,b="jstiming",d="tick";var e=function(c){this.t={};this.tick=function(c,p,h){h=void 0!=h?h:(new Date).getTime();this.t[c]=[h,p]};this[d]("start",null,c)},f=new e;a.jstiming={Timer:e,load:f};if(a.performance&&a.performance.timing){var g=a.performance.timing,j=a[b].load,k=g.navigationStart,l=g.responseStart;0<k&&l>=k&&(j[d]("_wtsrt",void 0,k),j[d]("wtsrt_","_wtsrt",l),j[d]("tbsd_","wtsrt_"))}
try{var m=null;a.chrome&&a.chrome.csi&&(m=Math.floor(a.chrome.csi().pageT),j&&0<k&&(j[d]("_tbnd",void 0,a.chrome.csi().startE),j[d]("tbnd_","_tbnd",k)));null==m&&a.gtbExternal&&(m=a.gtbExternal.pageT());null==m&&a.external&&(m=a.external.pageT,j&&0<k&&(j[d]("_tbnd",void 0,a.external.startE),j[d]("tbnd_","_tbnd",k)));m&&(a[b].pt=m)}catch(n){};a.tickAboveFold=function(c){var i=0;if(c.offsetParent){do i+=c.offsetTop;while(c=c.offsetParent)}c=i;750>=c&&a[b].load[d]("aft")};var q=!1;function r(){q||(q=!0,a[b].load[d]("firstScrollTime"))}a.addEventListener?a.addEventListener("scroll",r,!1):a.attachEvent("onscroll",r);
 })();</script> : this code in XHTML is placed inside the <b:include data='blog' name='all-head-content'/>



Maybe that's the basic, i'll update this article later, because i haven't more time now.....