#!/usr/bin/perl use strict; use IWL::Page; use IWL::Container; use IWL::Image; use IWL::Anchor; use IWL::Break; use IWL::P2JS; my $page = IWL::Page->new->setTitle('Б Л О К А'); my $container = IWL::Container->new(id => 'main_container', style => {visibility => 'hidden'}); my $anchor = IWL::Anchor->new->setHref('http://code.google.com/p/iwl'); my $logo = IWL::Image->new(id => 'logo')->set('/skin/images/logo.jpg'); my $description = IWL::Container->new(id => 'description', inline => 1); my @images = ( IWL::Image->new(class => 'description', id => 'perl', src => '/skin/images/perl.jpg'), IWL::Image->new(class => 'description', id => 'widget', src => '/skin/images/widget.jpg'), IWL::Image->new(class => 'description', id => 'library', src => '/skin/images/library.jpg'), IWL::Image->new(class => 'description', id => 'for', src => '/skin/images/for.jpg'), IWL::Image->new(class => 'description', id => 'the', src => '/skin/images/the.jpg'), IWL::Image->new(class => 'description', id => 'web', src => '/skin/images/web.jpg'), ); my ($script, $tracker) = (IWL::Script->new, IWL::Script->new); $page->appendHeader(IWL::Page::Link->newLinkToCSS('/skin/bloka.css')); $page->appendChild($container); $description->appendChild(@images); $anchor->appendChild($logo, IWL::Break->new, $description); $container->appendChild($anchor, $tracker, $script); $script->setScript(sub { my $path = '/skin/images/'; $container->setStyle(visibility => 'visible', display => 'none'); $container->positionAtCenter->appear({duration => 4}); foreach (['perl', 61], ['widget', 66], ['library', 69], ['for', 44], ['the', 34], ['web', 52]) { S($_->[0])->signalConnect(mouseover => (sub { my ($args) = @_; $this->{downEffect}->cancel if $this->{downEffect}; $this->{upEffect} = Effect::Morph->new($this, {style => {width => $args->[1] * 2 . 'px', height =>'74px'}, duration => 0.2, beforeStart => $this->{writeAttribute}->bind($this, {src => "${path}$args->[0]2.jpg"})}) })->bind(S($_->[0]), $_))->signalConnect(mouseout => (sub { my ($args) = @_; $this->{upEffect}->cancel if $this->{upEffect}; $this->{downEffect} = Effect::Morph->new($this, {style => {width => $args->[1] . 'px', height => '37px'}, duration => 0.2, afterFinish => $this->{writeAttribute}->bind($this, {src => "${path}$args->[0].jpg"})}) })->bind(S($_->[0]), $_)); } my $pageTracker = _gat::_getTracker('UA-2846284-2'); $pageTracker->_initData; $pageTracker->_trackPageview; }); $tracker->setSrc('http://www.google-analytics.com/ga.js'); $page->send(type => 'html', static => 1);