Timeline is a jQuery plugin specialized in showing a chronological series of events. You can embed all kinds of media including tweets, videos and maps, and associate them with a date. With some design tweaks, this will make it perfect for a portfolio in which you showcase your work and interests.
The HTML
Timeline comes with a light colored theme by default. It is perfectly usable and in most cases would be exactly what you need. However, for our portfolio, a dark design would be a better fit, so we will customize it to our liking.
First, let’s look at the basic layout of the page:
index.html
Timeline Portfolio );
The init method takes single argument – the data source. It can either be a json file like above, or a Google spreadsheet (reminiscent of our Spredsheet Powered FAQ Tutorial).
For more information on the supported data sources, see the documentation on the plugin’s site, or browse the data.json file in the zip download for this tutorial.
The CSS
I used Firebug’s HTML Inspector to get the right selectors for the elements that we are about to customize. In the HTML tab, it is easy to see what rules have been applied to each element by timeline.css. To override them, I copied the same selectors to styles.css which is where our modifications will take place. On several occurrences, however, I have used the !important flag to make my work easier.
All the customizations you see below override only a handful of CSS styles. The rest are inherited by the default stylesheet. Let’s begin!
The first thing we will do in styles.css, after styling the page itself, is to change the backgrounds of the timeline:
#timeline background:none; /* The individual events in the slider */ .slider .slider-container-mask .slider-container background:none; /* Setting a custom background image */ #timeline div.navigation background: url('../img/timeline_bg.jpg') repeat; border-top:none;
To create the 3D effect of the timeline navigation, we will need to use additional elements. But the Timeline plugin doesn’t include such in its markup. An easy solution is to use :before / :after pseudo elements. The :after element is the darker top part and it uses a linear gradient to enhance the effect.
#timeline div.navigation:before position:absolute; content:''; height:40px; width:100%; left:0; top:-40px; background: url('../img/timeline_bg.jpg') repeat; #timeline div.navigation:after position:absolute; content:''; height:10px; width:100%; left:0; top:-40px; background:repeat-x; background-image: linear-gradient(bottom, #434446 0%, #363839 100%); background-image: -o-linear-gradient(bottom, #434446 0%, #363839 100%); background-image: -moz-linear-gradient(bottom, #434446 0%, #363839 100%); background-image: -webkit-linear-gradient(bottom, #434446 0%, #363839 100%); background-image: -ms-linear-gradient(bottom, #434446 0%, #363839 100%);
Then we add a dark background to the timeline navigation (the section with the small clickable tooltips that represent the events):
#timeline div.timenav-background background-color:rgba(0,0,0,0.4) !important; #timeline .navigation .timenav-background .timenav-interval-background background:none; #timeline .top-highlight background-color:transparent !important;
Later we style the zoom-in / zoom-out buttons and toolbar:
#timeline .toolbar border:none !important; background-color: #202222 !important; #timeline .toolbar div border:none !important;
The numeric scale at the bottom comes next:
#timeline .navigation .timenav .time .time-interval-minor .minor margin-left:-1px; #timeline .navigation .timenav .time .time-interval div color: #CCCCCC;
The previous and next arrows:
.slider .nav-previous .icon background: url("timeline.png") no-repeat scroll 0 -293px transparent; .slider .nav-previous,.slider .nav-next font-family:'Segoe UI',sans-serif; .slider .nav-next .icon background: url("timeline.png") no-repeat scroll 72px -221px transparent; width: 70px !important; .slider .nav-next:hover .icon position:relative; right:-5px; .slider .nav-previous:hover, .slider .nav-next:hover color: #666; cursor: pointer; #timeline .thumbnail border: medium none;
The loading screen:
#timeline .feedback background-color: #222222; box-shadow: 0 0 30px rgba(0, 0, 0, 0.2) inset; border:none; #timeline .feedback div color: #AAAAAA; font-size: 14px !important; font-weight: normal;
Then we move on to the slides:
#timeline .slider-item h2, #timeline .slider-item h3 font-family:'Antic Slab','Segoe UI',sans-serif; #timeline .slider-item h2 color:#fff; #timeline .slider-item p font-family:'Segoe UI',sans-serif; #timeline .slider-item img, #timeline .slider-item iframe border:none;
Finally, we will customize the appearance of the front page. I am using nth-child(1) to target only the first slider-item, which contains the name and description of the timeline which have been defined in the JSON data source.
/* Customizing the first slide - the cover */ #timeline .slider-item:nth-child(1) h2 font:normal 70px/1 'Antic Slab','Segoe UI',sans-serif; background:rgba(0,0,0,0.3); white-space: nowrap; padding:10px 5px 5px 20px; position:relative; right:-60px; z-index:10; #timeline .slider-item:nth-child(1) p i font:normal normal 40px 'Dancing Script','Segoe UI',sans-serif; background:rgba(0,0,0,0.3); white-space: nowrap; padding:5px 20px; position:relative; right:-60px; z-index:10; #timeline .slider-item:nth-child(1) p .c1 color:#1bdff0; #timeline .slider-item:nth-child(1) p .c2 color:#c92fe6; #timeline .slider-item:nth-child(1) .media-container left: -30px; position: relative; z-index: 1; #timeline .slider-item:nth-child(1) .credit text-align: center;
The only thing left is to open up timeline.psd that is bundled with the download of the plugin, and change the color of some of the icons in photoshop. I have included the necessary files in the zip download for this tutorial. With this our timeline portfolio is complete!
Done!
You can use this portfolio to display not only your recent projects, but also interests and important moments of your career. Share your thoughts and suggestions in the comment section.
|
This time we will be using the Timeline jQuery plugin as a dark themed portfolio in which you can showcase projects and important events in your career.}
Read more : Timeline Portfolio
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.