Changes to Blog Layout


As you may have noticed, I updated the layout of the blog and added some features.
I really like Blogger, the fact that I can do all of that is really pretty nice. Of course, I had to learn how they handled their variables, and I'd never worked with XML on the web before, but that was no big deal.

The way Blogger handles the layouts is very interesting. It's incredibly object-orientated so you don't have to go into the code to change the layout basically, like changing the color of the fonts, and everything else you can do through the web panel.

Of course, what I wanted to do (which, by the way, I pretty much completely stole from Shamus Young's site) wasn't possible with the standard editor. Luckily Blogger makes it pretty darn easy to edit the templates.

Here's an example of some of the code I added:


<b:loop values='data:post.labels' var='label'>
				<b:if cond='data:label.name == "sleep"'>
					<a expr:href='data:label.url'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZdIw-XqfvQXodztBYdeR-7CfQdgtmM8FG8EBOvuVoB5hY0ejzcxn53D0COhhgVZvUG569Apw4IzMrQv8thRlMWrII-7qYQ6xCzghmT0m2ma2iZVYADR1JydF43vKfa_Ja-a3yUMfaYYk/' align='left' width='160' height='100' style='margin-right:10px;' border='1px'/></a>
				<b:else/>
					<b:if cond='data:label.name == "programming"'>
						<a expr:href='data:label.url'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe10FmdrxGGQHCu2yAMlJjR5jTp8TYYpGbMlUTN_P48xmpltVDl6vxxbJNYf72WTq5CqUtK1GRtgqxXenucA0NHALCUFoUVtijJyp0OyxFWzFG9M08jeDOGmH-L-8Dx35mQrtBfJV2c1s/' align='left' width='160' height='100' style='margin-right:10px;' border='1px'/></a>
					</b:if>
				</b:if>	
			</b:loop>



Personally, I've never seen anything like it before, but it's pretty simple, and some Googling got me the majority of the answers I needed.

The more I learn about Blogger the more I really like it. When I first started using it, I didn't like a lot of the stuff about the layout, especially the little 'share' buttons on the bottom of each post to send the post to Facebook, twitter, GMail, etc. It really drove me crazy, but a few days later I figured out that you could actually disable that, along with change a whole lot of other settings.

If there's one thing that I don't like about Blogger, it's that it doesn't explain it self well. I didn't know those options existed until I found them on my own by poking around the design options. That's not a good way to have a blog run, everything should be explained more easily. Of course, there could have been a tutorial that I just skipped over, as I tend to do these days. If that's the case, then I'm just an idiot.

0 comments:

Post a Comment