Archive for tag 'templates'

“This is me” template updated to v1.1

As described in the post from yesterday, the This is me and This is me (dark) templates have been updated to support multiple image gallery sections, with internal navigation links between the sections. In terms of code modifications, it is a minor update. But a very useful one, as I have seen that the two “This is me” templates are used by several professional photographers who would most certainly want to show more than eight images on their site.

A tutorial on how to update existing websites built with v1.0 with this new feature, can be found here.

"This is me" v1.1, now supporting multiple image gallery sections

How to add multiple image sections to “This is me” v1.0

To add support for more than one gallery section in the “This is me” and “This is me (dark)” templates, there are a few things that need to be done in the HTML and CSS code. The following step-by-step tutorial works for both the light and the dark version of the “This is me” template.

Please note that the changes described below has been included in v1.1 of the templates, so this tutorial is only interesting to those of you who have already built (or started building) websites with version 1.0 of the two templates.

1. Locate the unsorted list (ul) that lists the image thumbnails

The ul element should look like this:

[html] <ul id="pics">
[/html]

…and replace the id=”pics” with class=”poptroxactive” to make it look like this:

[html] <ul class="poptroxactive">
[/html]

2. Copy and paste the portfolio section code

Copy all code for the entire list item (li) that contains the gallery/portfolio, starting with:

[html] <li id="portfolio" class="section">
[/html]

…and ending with:

[html] </li>
[/html]

Then paste the copied code directly after the closing of the list item, below the section that you just copied. Rename the ID of the second gallery/portfolio section from id=”portfolio” to id=”portfolio2″. ID:s must be unique, unlike classes which can be re-used. This is the reason why id=”pics” was replaced by class=”poptroxactive” earlier.

3. Replace the JavaScript

Then scroll down to the bottom of the HTML code and locate the code that triggers the Poptrox javascript. It should look like this:

[html] <script type="text/javascript">
$(‘#pics’).poptrox();
</script>
[/html]

…and replace those three lines with the code below:

[html] <script type="text/javascript">
$(‘.poptroxactive’).each(function() {
$(this).poptrox();
});
</script>
[/html]

This is what enables the Poptrox jQuery plugin to work on more than one gallery section. Instead of triggering Poptrox for the ul with id=”pics” (which again could only be used once, and therefore only one gallery page can be used in v1.0 of the template), the script is now triggered by the class=”poptroxactive” which you added to both ul elements earlier. That class can be used on any number of gallery thumbnail lists, but in this example I am only adding a second one.

4. Create the internal navigation links

Add a text paragraph in each of the sections, directly below the ending of the ul element that contains the thumbnails. In the first section, the paragraph should look like this:

[html] <p class="portfoliomore">
<a href="#portfolio2">Next page</a>
</p>
[/html]

…and in the second section it should look like this:

[html] <p class="portfoliomore">
<a href="#portfolio">Previous page</a>
</p>
[/html]

This creates links between the sections, so that visitors on the site can navigate to the second gallery page and then back to the first one. Of course, link texts can be whatever you think works best. Just make sure that the link href matches the ID of the section you want the link to lead to. The class .portfoliomore can be styled in the CSS if you want to change the way that the links look, or their positions.

5. Edit the CSS (this-is-me.css or this-is-me-dark.css)

Since the thumbnail gallery layout styles were written for the id=”pics”, they need to be changed so that the styles are triggered by the class=”poptroxactive” instead. To do this, simply replace all occurances of “#pics” in the stylesheet into “.poptroxactive”, like this:

[css] .poptroxactive{list-style:none;margin:0 auto;padding:0;width:100%;}
.poptroxactive li{float:left;height:110px;margin:0 30px 8px 0;}
.poptroxactive li img{border:3px solid #fff;box-shadow:1px 1px 0px #aaa;cursor:pointer;width:100px;}
[/css]

In the dark version, you also need to add;

[css] body.inverted .poptroxactive li img {border:3px solid #111;box-shadow:0px 0px 2px #000;}
[/css]

6. Add more images

Finally, add more images in the second gallery section (the one with id=”portfolio2″) – and then save the document to preview the result in your web browser! If you have followed this tutorial step-by-step, the gallery/portfolio section should now look the same as the new version 1.1 of the template.

If something would not work, or if you have ideas or requests for further modifications, post a comment to this post.

Adding more gallery pages to the “This is me” template

The new This is me and This is me (dark) templates have got great feedback, and there are already a number of websites based on the templates running live on the web. After reviewing the feedback from users of the two templates, I am now working on updates based on your comments, ideas and requests.

One of the most common questions has been how to add more images to the image gallery in the portfolio section of the templates. Today, I have been rewriting the image gallery a bit to allow more images to be added. In short, the code that activates the Poptrox image gallery script has been modified to make it work on a class rather than on the id=”pics”, which means that an unlimited number of gallery pages can be added. Along with this modification, I will also add internal navigation between those gallery pages. Version 1.1 of the two templates will be published tomorrow, along with a short tutorial on how to update websites built with the first version of the templates to support this new feature. I will also post links to some of the sites that have been built with the templates. If you have have a site that I should include, please post a comment to this article and let me know!

New template: Inland

The Inland HTML/CSS template

A new free CSS template has been released, and this one is a highlight. It is called “Inland”, and it is a multi-layout design with lots of options that are there if you need them – while still remaining very simple and easy to work with. Inland features a jQuery image slider, multiple layout widths (both fixed and fluid widths) and content layouts for one, two or three columns with combinations of two different content layout options on the same page possible.

The Inland template is written using valid and optimized HTML and CSS code, and it is tested to work with all modern browsers – including on mobile devices.

Download Inland directly: inland.zip (966 Kb)

To read more about the template and see screenshots or a live demo, see the Inland template page.

“This is me” (dark version) released!

Here it is, the “This is me” template with inverted colors based on the tutorial posted a few days ago. Beside refreshing the colors, I have also refreshed the menu icons to make them fit with the dark background, as well as adding a set of sample photos to give you a better idea of what the gallery can look like.

Download the template directly from here: this-is-me-dark.zip (1.25 Mb, .zip) or read more about the template on the This is me (dark) page. A live demo is also available.