Initial commit

develop
Sven Slootweg 11 years ago
commit e1498b3649

1
.gitignore vendored

@ -0,0 +1 @@
config.json

@ -0,0 +1,31 @@
{
"database": {
"driver": "mysql",
"hostname": "localhost",
"username": "root",
"password": "",
"database": "todo"
},
"locale": {
"path": "locales",
"extension": "lng",
"default_locale": "english",
"default_timezone": "Europe/Amsterdam"
},
"memcache": {
"enabled": true,
"compressed": true,
"hostname": "localhost",
"port": 11211
},
"class_map": {
"user": "User",
"item": "Item"
},
"components": [
"router",
"errorhandler"
],
"autoloader": true,
"salt": "abcdef"
}

@ -0,0 +1,49 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
class Item extends CPHPDatabaseRecordClass
{
public $table_name = "items";
public $fill_query = "SELECT * FROM items WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM items WHERE `Id` = :Id";
public $prototype = array(
'string' => array(
'Text' => "Text"
),
'numeric' => array(
"UserId" => "UserId"
),
'boolean' => array(
"Completed" => "Completed",
"Must" => "Must"
),
'timestamp' => array(
"CreationDate" => "CreationDate",
"CompletionDate" => "CompletionDate",
"Deadline" => "Deadline"
),
'user' => array(
"User" => "UserId"
)
);
public function MarkDone()
{
$this->uCompletionDate = time();
$this->uCompleted = true;
$this->InsertIntoDatabase();
}
}

@ -0,0 +1,166 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
class User extends CPHPDatabaseRecordClass
{
public $table_name = "users";
public $fill_query = "SELECT * FROM users WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM users WHERE `Id` = :Id";
public $prototype = array(
'string' => array(
'Username' => "Username",
'Hash' => "Hash",
'Salt' => "Salt"
),
'numeric' => array(
"CurrentItemId" => "CurrentItemId"
),
'boolean' => array(
'IsAdmin' => "Admin",
'IsBanned' => "Banned",
'IsGuest' => "Guest"
),
'timestamp' => array(
"RegistrationDate" => "RegistrationDate",
"LastSeen" => "LastSeen"
),
'item' => array(
"CurrentItem" => "CurrentItemId"
)
);
public function GenerateSalt()
{
$this->uSalt = random_string(10);
}
public function GenerateHash()
{
if(!empty($this->uSalt))
{
if(!empty($this->uPassword))
{
$this->uHash = $this->CreateHash($this->uPassword);
}
else
{
throw new Exception("User object is missing a password.");
}
}
else
{
throw new Exception("User object is missing a salt.");
}
}
public function CreateHash($input)
{
global $cphp_config;
$hash = crypt($input, "$5\$rounds=50000\${$this->uSalt}{$cphp_config->salt}$");
$parts = explode("$", $hash);
return $parts[4];
}
public function VerifyPassword($password)
{
if($this->CreateHash($password) == $this->sHash)
{
return true;
}
else
{
return false;
}
}
public function Authenticate()
{
$_SESSION['user_id'] = $this->sId;
$_SESSION['logout_key'] = random_string(32);
$_SESSION['is_admin'] = $this->sIsAdmin;
$this->SetGlobalVariables();
}
public function Deauthenticate()
{
unset($_SESSION['user_id']);
unset($_SESSION['is_admin']);
}
public function SetGlobalVariables()
{
NewTemplater::SetGlobalVariable("my-username", $this->sUsername);
NewTemplater::SetGlobalVariable("logout-key", $_SESSION['logout_key']);
}
public static function CheckIfUsernameExists($username)
{
try
{
$result = User::FindByUsername($username);
return true;
}
catch (NotFoundException $e)
{
return false;
}
}
public static function FindByUsername($username)
{
return self::CreateFromQuery("SELECT * FROM users WHERE `Username` = :Username", array(':Username' => $username), 0, true);
}
public function MarkCurrentItemDone()
{
$this->sCurrentItem->MarkDone();
$this->PickNewItem(!$this->sCurrentItem->sMust);
}
public function SkipCurrentItem()
{
$this->PickNewItem(!$this->sCurrentItem->sMust);
}
public function PickNewItem($must)
{
try
{
$sNewItem = Item::CreateFromQuery("SELECT * FROM items WHERE `UserId` = :UserId AND `Completed` = 0 AND `Must` = :Must ORDER BY RAND() LIMIT 1",
array(":UserId" => $this->sId, ":Must" => $must), 0, true);
}
catch (NotFoundException $e)
{
/* If no item of the desired sort exists, then maybe there's an item of a different type? */
try
{
$sNewItem = Item::CreateFromQuery("SELECT * FROM items WHERE `UserId` = :UserId AND `Completed` = 0 ORDER BY RAND() LIMIT 1",
array(":UserId" => $this->sId), 0, true);
}
catch (NotFoundException $e)
{
/* Give up. */
$this->uCurrentItemId = 0;
$this->InsertIntoDatabase();
return;
}
}
$this->uCurrentItemId = $sNewItem->sId;
$this->InsertIntoDatabase();
}
}

@ -0,0 +1 @@
../../cphp/

@ -0,0 +1,48 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
$_CPHP_CONFIG = "../config.json";
$_CPHP = true;
require("cphp/base.php");
if(isset($_SESSION['user_id']))
{
try
{
$sCurrentUser = new User($_SESSION['user_id']);
}
catch (NotFoundException $e)
{
/* pass */
}
}
if(empty($sCurrentUser))
{
/* Guest, create new session */
$sCurrentUser = new User();
$sCurrentUser->uIsGuest = true;
$sCurrentUser->uIsAdmin = false;
$sCurrentUser->uIsBanned = false;
$sCurrentUser->InsertIntoDatabase();
$sCurrentUser->Authenticate();
}
NewTemplater::SetGlobalVariable("logged-in", ($sCurrentUser->sIsGuest === false));
$sCurrentUser->uLastSeen = time();
$sCurrentUser->InsertIntoDatabase();
$sCurrentUser->SetGlobalVariables();

@ -0,0 +1,24 @@
_locale; en_US.UTF-8,en_US
_datetime_short; %d/%m/%Y %H:%M:%S
_datetime_long; %A %B %d, %Y %H:%M:%S
_date_short; %d/%m/%Y
_date_long; %A %B %d, %Y
_time; %H:%M:%S
event-now; just now
event-future; in the future
event-past; in the past
event-1second-ago; 1 second ago
event-seconds-ago; %1$d seconds ago
event-1minute-ago; 1 minute ago
event-minutes-ago; %1$d minutes ago
event-1hour-ago; 1 hour ago
event-hours-ago; %1$d hours ago
event-1day-ago; 1 day ago
event-days-ago; %1$d days ago
event-1week-ago; 1 week ago
event-weeks-ago; %1$d weeks ago
event-1month-ago; 1 month ago
event-months-ago; %1$d months ago
event-1year-ago; 1 year ago
event-years-ago; %1$d years ago

@ -0,0 +1,32 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
if(!empty($_POST['description']) && isset($_POST['type']))
{
$sNewItem = new Item();
$sNewItem->uUserId = $sCurrentUser->sId;
$sNewItem->uText = $_POST['description'];
$sNewItem->uMust = ($_POST['type'] == "must");
$sNewItem->uCreationDate = time();
$sNewItem->InsertIntoDatabase();
if($sCurrentUser->sCurrentItemId == 0)
{
/* Pick a new item... */
$sCurrentUser->PickNewItem(true);
}
}
redirect("/list");

@ -0,0 +1,17 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
$sCurrentUser->MarkCurrentItemDone();
redirect("/list");

@ -0,0 +1,51 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
try
{
$result = Item::CreateFromQuery("SELECT * FROM items WHERE `UserId` = :UserId AND `Completed` = 0 AND `Id` != :CurrentId", array(":UserId" => $sCurrentUser->sId, ":CurrentId" => $sCurrentUser->sCurrentItemId));
}
catch (NotFoundException $e)
{
$result = array();
}
$sItems = array();
foreach($result as $sItem)
{
$sItems[] = array(
"description" => $sItem->sText,
"must" => $sItem->sMust
);
}
try
{
$sCurrentMust = $sCurrentUser->sCurrentItem->sMust;
$sCurrentDescription = $sCurrentUser->sCurrentItem->sText;
}
catch (NotFoundException $e)
{
$sCurrentMust = false;
$sCurrentDescription = "";
}
echo(NewTemplater::Render("list", $locale->strings, array(
"items" => $sItems,
"current-task-must" => $sCurrentMust,
"current-task-description" => $sCurrentDescription,
"can-skip"
)));

@ -0,0 +1,36 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
if(!empty($_POST['username']) && !empty($_POST['password']))
{
try
{
$sUser = User::FindByUsername($_POST['username']);
}
catch (NotFoundException $e)
{
die("Invalid login details.");
}
if($sUser->VerifyPassword($_POST['password']) === false)
{
die("Invalid login details.");
}
$sUser->Authenticate();
$sCurrentUser = $sUser;
}
redirect("/list");

@ -0,0 +1,21 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
if(!empty($_GET['key']) && $_GET['key'] == $_SESSION['logout_key'])
{
$sCurrentUser->Deauthenticate();
}
redirect("/list");

@ -0,0 +1,42 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
if(!empty($_POST['username']) && !empty($_POST['password']) && !empty($_POST['password2']))
{
if(strlen($_POST['username']) > 48)
{
die("Username too long.");
}
if($_POST['password'] !== $_POST['password2'])
{
die("Passwords do not match.");
}
if(strlen($_POST['password']) < 6)
{
die("Password must be at least 6 characters.");
}
$sCurrentUser->uUsername = $_POST['username'];
$sCurrentUser->uPassword = $_POST['password'];
$sCurrentUser->uRegistrationDate = time();
$sCurrentUser->uIsGuest = false;
$sCurrentUser->GenerateSalt();
$sCurrentUser->GenerateHash();
$sCurrentUser->InsertIntoDatabase();
}
redirect("/list");

@ -0,0 +1,21 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
if($sCurrentUser->sCurrentItem->sMust == false)
{
$sCurrentUser->PickNewItem(false);
}
redirect("/list");

@ -0,0 +1,39 @@
<?php
/*
* Todo is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
$_APP = true;
require("includes/base.php");
$router = new CPHPRouter();
$router->ignore_query = true;
$router->allow_slash = true;
$router->routes = array(
0 => array(
"^/list$" => "modules/list.php",
"^/register$" => "modules/register.php",
"^/login$" => "modules/login.php",
"^/logout$" => "modules/logout.php",
"^/add$" => "modules/add.php",
"^/done$" => array(
"target" => "modules/done.php",
"methods" => "post"
),
"^/skip$" => array(
"target" => "modules/skip.php",
"methods" => "post"
)
)
);
$router->RouteRequest();

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,249 @@
/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
.fancybox-wrap,
.fancybox-skin,
.fancybox-outer,
.fancybox-inner,
.fancybox-image,
.fancybox-wrap iframe,
.fancybox-wrap object,
.fancybox-nav,
.fancybox-nav span,
.fancybox-tmp
{
padding: 0;
margin: 0;
border: 0;
outline: none;
vertical-align: top;
}
.fancybox-wrap {
position: absolute;
top: 0;
left: 0;
z-index: 8020;
}
.fancybox-skin {
position: relative;
background: #f9f9f9;
color: #444;
text-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.fancybox-opened {
z-index: 8030;
}
.fancybox-opened .fancybox-skin {
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.fancybox-outer, .fancybox-inner {
position: relative;
}
.fancybox-inner {
overflow: hidden;
}
.fancybox-type-iframe .fancybox-inner {
-webkit-overflow-scrolling: touch;
}
.fancybox-error {
color: #444;
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
margin: 0;
padding: 15px;
white-space: nowrap;
}
.fancybox-image, .fancybox-iframe {
display: block;
width: 100%;
height: 100%;
}
.fancybox-image {
max-width: 100%;
max-height: 100%;
}
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('fancybox_sprite.png');
}
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
margin-top: -22px;
margin-left: -22px;
background-position: 0 -108px;
opacity: 0.8;
cursor: pointer;
z-index: 8060;
}
#fancybox-loading div {
width: 44px;
height: 44px;
background: url('fancybox_loading.gif') center center no-repeat;
}
.fancybox-close {
position: absolute;
top: -18px;
right: -18px;
width: 36px;
height: 36px;
cursor: pointer;
z-index: 8040;
}
.fancybox-nav {
position: absolute;
top: 0;
width: 40%;
height: 100%;
cursor: pointer;
text-decoration: none;
background: transparent url('blank.gif'); /* helps IE */
-webkit-tap-highlight-color: rgba(0,0,0,0);
z-index: 8040;
}
.fancybox-prev {
left: 0;
}
.fancybox-next {
right: 0;
}
.fancybox-nav span {
position: absolute;
top: 50%;
width: 36px;
height: 34px;
margin-top: -18px;
cursor: pointer;
z-index: 8040;
visibility: hidden;
}
.fancybox-prev span {
left: 10px;
background-position: 0 -36px;
}
.fancybox-next span {
right: 10px;
background-position: 0 -72px;
}
.fancybox-nav:hover span {
visibility: visible;
}
.fancybox-tmp {
position: absolute;
top: -99999px;
left: -99999px;
visibility: hidden;
max-width: 99999px;
max-height: 99999px;
overflow: visible !important;
}
/* Overlay helper */
.fancybox-lock {
overflow: hidden;
}
.fancybox-overlay {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
display: none;
z-index: 8010;
background: url('fancybox_overlay.png');
}
.fancybox-overlay-fixed {
position: fixed;
bottom: 0;
right: 0;
}
.fancybox-lock .fancybox-overlay {
overflow: auto;
overflow-y: scroll;
}
/* Title helper */
.fancybox-title {
visibility: hidden;
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
position: relative;
text-shadow: none;
z-index: 8050;
}
.fancybox-opened .fancybox-title {
visibility: visible;
}
.fancybox-title-float-wrap {
position: absolute;
bottom: 0;
right: 50%;
margin-bottom: -35px;
z-index: 8050;
text-align: center;
}
.fancybox-title-float-wrap .child {
display: inline-block;
margin-right: -100%;
padding: 2px 20px;
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
background: rgba(0, 0, 0, 0.8);
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
text-shadow: 0 1px 2px #222;
color: #FFF;
font-weight: bold;
line-height: 24px;
white-space: nowrap;
}
.fancybox-title-outside-wrap {
position: relative;
margin-top: 10px;
color: #fff;
}
.fancybox-title-inside-wrap {
padding-top: 10px;
}
.fancybox-title-over-wrap {
position: absolute;
bottom: 0;
left: 0;
color: #fff;
padding: 10px;
background: #000;
background: rgba(0, 0, 0, .8);
}

@ -0,0 +1,45 @@
/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.4",defaults:{padding:15,margin:20,width:800,
height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",
34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
(H?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
c.metadata())):k=c);g=d.href||k.href||(p(c)?c:null);h=d.title!==r?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));p(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":p(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":c,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(p(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},
prev:function(a){var d=b.current;d&&(p(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},
e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(w),w=null);b.isOpen&&!w&&(w=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),w=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),
b.trigger("onUpdate")),b.update())},hideLoading:function(){n.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");n.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||
!1,d={x:q.scrollLeft(),y:q.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&C.innerWidth?C.innerWidth:q.width(),d.h=s&&C.innerHeight?C.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=
e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==r)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&
"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,
e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&
(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=
!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady");
if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=
this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,
(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=
b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();
e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,
v=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,p=l(y[1]+y[3]),r=l(y[0]+y[2]),z,A,t,D,B,G,C,E,w;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=l(k.outerWidth(!0)-k.width());z=l(k.outerHeight(!0)-k.height());A=p+y;t=r+z;D=F(c)?(a.w-A)*l(c)/100:c;B=F(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(w=h.content,h.autoHeight&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(g.width(D).height(9999),G=w.contents().find("body"),q&&G.css("overflow-x",
"hidden"),B=G.height())}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=l(D);j=l(B);E=D/B;m=l(F(m)?l(m,"w")-A:m);n=l(F(n)?l(n,"w")-A:n);u=l(F(u)?l(u,"h")-t:u);v=l(F(v)?l(v,"h")-t:v);G=n;C=v;h.fitToView&&(n=Math.min(a.w-A,n),v=Math.min(a.h-t,v));A=a.w-p;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/E)),j>v&&(j=v,c=l(j*E)),c<m&&(c=m,j=l(c/E)),j<u&&
(j=u,c=l(j*E))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,v)));if(h.fitToView)if(g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height(),h.aspectRatio)for(;(a>A||p>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(v,j-10)),c=l(j*E),c<m&&(c=m,j=l(c/E)),c>n&&(c=n,j=l(c/E)),g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height();else c=Math.max(m,Math.min(c,c-(a-A))),j=Math.max(u,Math.min(j,j-(p-r)));q&&("auto"===s&&j<B&&c+y+
q<A)&&(c+=q);g.width(c).height(j);e.width(c+y);a=e.width();p=e.height();e=(a>A||p>r)&&c>m&&j>u;c=h.aspectRatio?c<G&&j<C&&c<D&&j<B:(c<G||j<C)&&(c<D||j<B);f.extend(h,{dim:{width:x(a),height:x(p)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:z,wrapSpace:p-k.outerHeight(!0),skinSpace:k.height()-j});!w&&(h.autoHeight&&j>u&&j<v&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",
top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&
(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-j*a.leftRatio),width:x(f+j),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(l(e[g])-200),c[g]="+=200px"):(e[g]=x(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo("body");
this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},
close:function(){f(".fancybox-overlay").remove();q.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");H?(b=Math.max(z.documentElement.offsetWidth,z.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>q.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,
!0);this.overlay||(this.margin=n.height()>q.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=z.all&&!z.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",l(this.margin)+b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||
this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),
H&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+
'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),
b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);

@ -0,0 +1,785 @@
/* from YUICSS buttons-core.css */
.pure-button {
/* Structure */
display: inline-block;
*display: inline; /*IE 6/7*/
zoom: 1;
line-height: normal;
white-space: nowrap;
vertical-align: baseline;
text-align: center;
cursor: pointer;
-webkit-user-drag: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
/* Firefox: Get rid of the inner focus border */
.pure-button::-moz-focus-inner{
padding: 0;
border: 0;
}
a:focus {
outline: none;
}
/* end from YUICSS buttons-core.css */
/* from YUICSS buttons.css */
.pure-button {
font-size: 100%;
*font-size: 90%; /*IE 6/7 - To reduce IE's oversized button text*/
*overflow: visible; /*IE 6/7 - Because of IE's overly large left/right padding on buttons */
padding: 0.5em 1.5em 0.5em;
color: #2e2e2e; /* rgba not supported (IE 8) */
/* color: rgba(0, 0, 0, 0.80); rgba supported */
/* *color: #444; IE 6 & 7 */
border: 1px solid #cfcfcf; /*IE 6/7/8*/
border: none rgba(0, 0, 0, 0); /*IE9 + everything else*/
background-color: #dedede;
border-radius: 2px;
text-decoration: none;
-webkit-font-smoothing: antialiased;
/* Transitions */
-webkit-transition: 0.1s linear -webkit-box-shadow;
-moz-transition: 0.1s linear -moz-box-shadow;
-ms-transition: 0.1s linear box-shadow;
-o-transition: 0.1s linear box-shadow;
transition: 0.1s linear box-shadow;
}
.pure-button-hover,
.pure-button:hover {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#00000000', GradientType=0);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(40%, rgba(0,0,0, 0.05)), to(rgba(0,0,0, 0.05)));
background-image: -webkit-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.15));
background-image: -moz-linear-gradient(top, rgba(0,0,0, 0.05) 0%, rgba(0,0,0, 0.05));
background-image: -ms-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.15));
background-image: -o-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.05));
background-image: linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.05));
}
.pure-button-active,
.pure-button:active {
-webkit-box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset;
-moz-box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset;
box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset;
}
.pure-button[disabled],
.pure-button-disabled,
.pure-button-disabled:hover,
.pure-button-disabled:active {
border: none;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
filter: alpha(opacity=40);
-khtml-opacity: 0.40;
-moz-opacity: 0.40;
opacity: 0.40;
cursor: not-allowed;
box-shadow: none;
}
.pure-button-hidden {
display:none;
}
/* Firefox: Get rid of the inner focus border */
.pure-button::-moz-focus-inner{
padding: 0;
border: 0;
}
.pure-button-primary,
.pure-button-selected,
a.pure-button-primary,
a.pure-button-selected {
background-color: #d2d1d2;
color: #030303;
}
.pure-button:-moz-focusring {
outline-color: rgba(0, 0, 0, 0.85);
}
/*! Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
/* This page lists core form styles adopted from Normalize.css. */
/*! Copyright (c) Nicolas Gallagher and Jonathan Neal */
/*! normalize.css v1.1.0 | MIT License | git.io/normalize */
/* This page has Normalize.css form-specific style rules applied to a .yui3-form context */
/* ==========
Forms Core
=========*/
/*
* Corrects margin displayed oddly in IE 6/7.
*/
.pure-skin-mine .pure-form {
margin: 0;
}
/* Define consistent border, margin, and padding.*/
.pure-skin-mine .pure-form fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE 6/7/8/9.
* 2. Corrects text not wrapping in Firefox 3.
* 3. Corrects alignment displayed oddly in IE 6/7.
*/
.pure-skin-mine .pure-form legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/*
* 1. Corrects font size not being inherited in all browsers.
* 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5,
* and Chrome.
* 3. Improves appearance and consistency in all browsers.
*/
.pure-skin-mine .pure-form button,
.pure-skin-mine .pure-form input,
.pure-skin-mine .pure-form select,
.pure-skin-mine .pure-form textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/*
* Addresses Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
.pure-skin-mine .pure-form button,
.pure-skin-mine .pure-form input {
line-height: normal;
}
/*
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
* 4. Removes inner spacing in IE 7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE 6.
*/
.pure-skin-mine .pure-form button,
.pure-skin-mine .pure-form input[type="button"], /* 1 */
.pure-skin-mine .pure-form input[type="reset"],
.pure-skin-mine .pure-form input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
}
/*
* Re-set default cursor for disabled elements.
*/
.pure-skin-mine .pure-form button[disabled],
.pure-skin-mine .pure-form input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to content-box in IE 8/9.
* 2. Removes excess padding in IE 8/9.
* 3. Removes excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
.pure-skin-mine .pure-form input[type="checkbox"],
.pure-skin-mine .pure-form input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
.pure-skin-mine .pure-form input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/*
* Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
.pure-skin-mine .pure-form input[type="search"]::-webkit-search-cancel-button,
.pure-skin-mine .pure-form input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
* Removes inner padding and border in Firefox 3+.
*/
.pure-skin-mine .pure-form button::-moz-focus-inner,
.pure-skin-mine .pure-form input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE 6/7/8/9.
* 2. Improves readability and alignment in all browsers.
*/
.pure-skin-mine .pure-form textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* =============== forms-responsive.css ================
=========================================================*/
@media only screen and (max-width : 480px) {
.pure-skin-mine .pure-form button[type='submit'] {
margin: 0.7em 0 0;
}
.pure-skin-mine .pure-form input[type='text'], .pure-skin-mine .pure-form button, .pure-skin-mine .pure-form label {
margin-bottom: 0.3em;
display: block;
}
.yui3-group input[type='text'] {
margin-bottom: 0;
}
.pure-skin-mine .pure-form-aligned .pure-control-group label {
margin-bottom: 0.3em;
text-align: left;
display: block;
width: 100%;
}
.pure-skin-mine .pure-form-aligned .pure-controls {
margin: 1.5em 0 0 0;
}
.pure-skin-mine .pure-form .pure-help-inline {
display: block;
font-size: 80%;
padding: 0.2em 0 0.8em; /* increased bottom padding to make it group with its related input element */
}
}
/* =============== forms.css ================
=========================================================*/
.pure-skin-mine .pure-form input,
.pure-skin-mine .pure-form select {
padding: 0.5em 0.6em;
display: inline-block;
border: 1px solid #e6e6e6;
font-size: 0.8em;
box-shadow: inset 0 1px 3px #e6e6e6;
border-radius: 4px;
-webkit-transition: 0.3s linear border;
-moz-transition: 0.3s linear border;
-ms-transition: 0.3s linear border;
-o-transition: 0.3s linear border;
transition: 0.3s linear border;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
.pure-skin-mine .pure-form input:focus,
.pure-skin-mine .pure-form select:focus {
outline: 0;
outline: thin dotted \9; /* IE6-9 */
border-color: #129FEA;
}
.pure-skin-mine .pure-form .pure-checkbox,
.pure-skin-mine .pure-form .pure-radio {
margin: 0.5em 0;
display: block;
}
.pure-skin-mine .pure-form input[disabled],
.pure-skin-mine .pure-form select[disabled],
.pure-skin-mine .pure-form textarea[disabled],
.pure-skin-mine .pure-form input[readonly],
.pure-skin-mine .pure-form select[readonly],
.pure-skin-mine .pure-form textarea[readonly] {
cursor: not-allowed;
box-shadow: inset 0 1px 10px #ededed;
background-color: #fff;
color: #adadad;
border-color: #e6e6e6;
}
.pure-skin-mine .pure-form input:focus:invalid,
.pure-skin-mine .pure-form textarea:focus:invalid,
.pure-skin-mine .pure-form select:focus:invalid {
color: #b94a48;
border: 1px solid #ee5f5b;
}
.pure-skin-mine .pure-form input:focus:invalid:focus,
.pure-skin-mine .pure-form textarea:focus:invalid:focus,
.pure-skin-mine .pure-form select:focus:invalid:focus {
border-color: #e9322d;
}
.pure-skin-mine .pure-form select {
border: 1px solid #e6e6e6;
background-color: white;
}
.pure-skin-mine .pure-form select[multiple] {
height: auto;
}
.pure-skin-mine .pure-form label {
margin: 0.5em 0 0.2em;
color: #4f4f4f;
font-size:90%;
}
.pure-skin-mine .pure-form fieldset {
margin: 0;
padding: 0.35em 0 0.75em;
border: 0;
}
.pure-skin-mine .pure-form legend {
display: block;
width: 100%;
padding: 0.3em 0;
margin-bottom: 0.3em;
font-size: 125%;
color: #262626;
border-bottom: 1px solid #ededed;
}
.pure-skin-mine .pure-form.pure-form-stacked input[type='text'],
.pure-skin-mine .pure-form.pure-form-stacked select,
.pure-skin-mine .pure-form.pure-form-stacked label {
display: block;
}
.pure-skin-mine .pure-form-aligned input,
.pure-skin-mine .pure-form-aligned textarea,
.pure-skin-mine .pure-form-aligned select,
.pure-skin-mine .pure-form-aligned .pure-help-inline {
display: inline-block;
*display: inline; /* IE7 inline-block hack */
*zoom: 1;
vertical-align: middle;
}
/* aligned Forms */
.pure-skin-mine .pure-form-aligned .pure-control-group {
margin-bottom: 0.5em;
}
.pure-skin-mine .pure-form-aligned .pure-control-group label {
text-align: right;
display: inline-block;
vertical-align: middle;
width: 10em;
margin: 0 1em 0 0;
}
.pure-skin-mine .pure-form-aligned .pure-controls {
margin: 1.5em 0 0 10em;
}
/* Rounded Inputs */
.pure-skin-mine .pure-form .pure-input-rounded {
border-radius: 30px;
padding-left: 1em;
}
/* Grouped Inputs */
.pure-skin-mine .pure-form .pure-group fieldset {
margin-bottom: 10px;
}
.pure-skin-mine .pure-form .pure-group input {
display: block;
padding: 0.5em 0.6em;
margin: 0;
border-radius: 0;
position: relative;
top: -1px;
}
.pure-skin-mine .pure-form .pure-group input:focus {
z-index: 2;
}
.pure-skin-mine .pure-form .pure-group input:first-child {
top: 1px;
border-radius: 4px 4px 0px 0px;
}
.pure-skin-mine .pure-form .pure-group input:last-child {
top: -2px;
border-radius: 0px 0px 4px 4px;
}
.pure-skin-mine .pure-form .pure-group button {
margin: 0.35em 0;
}
.pure-skin-mine .pure-form .pure-input-1 {
width: 100%;
}
.pure-skin-mine .pure-form .pure-input-2-3 {
width: 66%;
}
.pure-skin-mine .pure-form .pure-input-1-2 {
width: 50%;
}
.pure-skin-mine .pure-form .pure-input-1-3 {
width: 33%;
}
.pure-skin-mine .pure-form .pure-input-1-4 {
width: 25%;
}
/* Inline help for forms */
.pure-skin-mine .pure-form .pure-help-inline {
display: inline-block;
padding-left: 0.3em;
color: #adadad;
font-size:90%;
vertical-align: middle;
}
/* foundational CSS */
.pure-skin-mine .pure-table {
/* Remove spacing between table cells (from Normalize.css) */
border-collapse: separate;
border-spacing: 0;
empty-cells: show;
border: 1px solid #ededed;
}
.pure-skin-mine .pure-table caption {
color: #adadad;
font: italic 85%/1 arial, sans-serif;
padding: 1em 0;
text-align: center;
}
.pure-skin-mine .pure-table td,
.pure-skin-mine .pure-table th {
border-left: 1px solid #ededed;/* inner column border */
border-width: 0 0 0 1px;
font-size: inherit;
margin: 0;
overflow: visible; /*to make ths where the title is really long work*/
padding: 0.3em 0.6em; /* cell padding */
}
.pure-skin-mine .pure-table td:first-child,
.pure-skin-mine .pure-table th:first-child {
border-left-width: 0;
}
.pure-skin-mine .pure-table thead {
background-color: #ededed;
color: #404040;
text-align: left;
vertical-align: bottom;
white-space: nowrap;
}
/*
striping:
even - #fff (white)
odd - #edf5ff (light blue)
*/
.pure-skin-mine .pure-table td {
background-color: #fafafa;
color: #4f4f4f;
}
.pure-skin-mine .pure-table-odd td {
background-color: #ededed;
color: #2e2e2e;
}
/* BORDERED TABLES */
.pure-skin-mine .pure-table-bordered td {
border-bottom:1px solid #ededed;
}
.pure-skin-mine .pure-table-bordered tbody > tr:last-child td,
.pure-skin-mine .pure-table-horizontal tbody > tr:last-child td {
border-bottom-width: 0;
}
/* HORIZONTAL BORDERED TABLES */
.pure-skin-mine .pure-table-horizontal td,
.pure-skin-mine .pure-table-horizontal th {
border-width: 0 0 1px 0;
border-bottom:1px solid #ededed;
}
.pure-skin-mine .pure-table-horizontal tbody > tr:last-child td {
border-bottom-width: 0;
}
/* from YUICSS list-core.css */
.pure-skin-mine .pure-menu ul {
position: absolute;
visibility: hidden;
}
.pure-skin-mine .pure-menu.pure-menu-open {
visibility: visible;
z-index: 2;
width: 100%;
}
.pure-skin-mine .pure-menu ul {
left: -10000px;
list-style: none;
margin: 0;
padding: 0;
top: -10000px;
z-index: 1;
}
.pure-skin-mine .pure-menu > ul { position: relative; }
.pure-skin-mine .pure-menu-open > ul {
left: 0;
top: 0;
visibility: visible;
}
.pure-skin-mine .pure-menu li { position: relative; }
.pure-skin-mine .pure-menu a, .pure-skin-mine .pure-menu .pure-menu-heading {
display: block;
color: inherit;
line-height: 1.5em;
padding: 0.35em 1.4em;
text-decoration: none;
white-space: nowrap;
}
.pure-skin-mine .pure-menu.pure-menu-horizontal > .pure-menu-heading {
display: inline-block;
margin: 0;
zoom: 1;
*display: inline;
vertical-align: middle;
}
.pure-skin-mine .pure-menu.pure-menu-horizontal > ul {
display: inline-block;
zoom: 1;
*display: inline;
vertical-align: middle;
}
.pure-skin-mine .pure-menu li a { 0.35em 1.4em; }
.pure-skin-mine .pure-menu-can-have-children > .pure-menu-label:after {
content: '\25B8';
float: right;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', sans-serif; /* These specific fonts have the Unicode char we need. */
margin-right: -20px;
margin-top: -1px;
}
.pure-skin-mine .pure-menu-can-have-children > .pure-menu-label {
padding-right:30px;
}
.pure-skin-mine .pure-menu-separator {
background-color: #e6e6e6;
display: block;
height: 1px;
font-size: 0;
margin: 7px 2px;
overflow: hidden;
}
.pure-skin-mine .pure-menu-hidden { display: none; }
/* FIXED MENU */
.pure-skin-mine .pure-menu-fixed {
position: fixed;
top:0;
left:0;
width: 100%;
}
/* HORIZONTAL MENU CODE */
/* Initial menus should be inline-block so that they are horizontal */
.pure-skin-mine .pure-menu-horizontal li {
display: inline-block;
zoom: 1;
*display: inline;
vertical-align: middle;
}
/* Submenus should still be display:block; */
.pure-skin-mine .pure-menu-horizontal li li {
display: block;
}
/* Content after should be down arrow */
.pure-skin-mine .pure-menu-horizontal > .pure-menu-children > .pure-menu-can-have-children > .pure-menu-label:after {
content: "\25BE";
}
/*Add extra padding to elements that have the arrow so that the hover looks nice */
.pure-skin-mine .pure-menu-horizontal > .pure-menu-children > .pure-menu-can-have-children > .pure-menu-label {
padding-right:30px;
}/* end from yuicss/list-core.css *******************************************/
/* from yuicss list-paginator.css */
.pure-skin-mine .pure-paginator {
list-style: none;
margin: 0;
padding: 0;
}
.pure-skin-mine .pure-paginator li {
display: inline-block;
*display: inline;
/* IE 7 inline-block hack */
*zoom: 1;
margin: 0 -0.35em 0 0;
}
.pure-skin-mine .pure-paginator .pure-button {
border-radius: 0;
padding: 0.8em 1.4em;
vertical-align: top;
height: 1.1em;
}
.pure-skin-mine .pure-paginator .pure-button:focus {
outline-style: none;
}
.pure-skin-mine .pure-paginator .prev, .pure-skin-mine .pure-paginator .next {
/*color: #C0C1C3; allow yui3-button to color text*/
}
.pure-skin-mine .pure-paginator .prev {
border-radius: 4px 0px 0px 4px;
}
.pure-skin-mine .pure-paginator .next {
border-radius: 0px 4px 4px 0px;
}
/* end from YUICSS list-paginator.css ******************************/
/* from YUICSS list.css *******************************************/
/* MAIN MENU STYLING */
.pure-skin-mine .pure-menu.pure-menu-open,
.pure-skin-mine .pure-menu.pure-menu-horizontal li .pure-menu-children {
background: #fafafa; /* Old browsers */
border-radius: {{borderRadius}};
border: 1px solid #ededed;
}
/* remove borders for horizontal menus */
.pure-skin-mine .pure-menu.pure-menu-horizontal {
border: none;
}
/* LINK STYLES */
.pure-skin-mine .pure-menu a {
border: 1px solid transparent;
border-left: none;
border-right: none;
}
.pure-skin-mine .pure-menu a,
.pure-skin-mine .pure-menu .pure-menu-can-have-children > li:after {
color: #4f4f4f;
}
.pure-skin-mine .pure-menu .pure-menu-can-have-children > li:hover:after {
color: #2e2e2e;
}
/* HOVER STATES */
.pure-skin-mine .pure-menu li a:hover {
background: #dedede;
}
/* DISABLED STATES */
.pure-skin-mine .pure-menu li.pure-menu-disabled a:hover {
background: #fafafa;
color: #adadad;
}
.pure-skin-mine .pure-menu .pure-menu-disabled > a {
background-image: none;
border-color: transparent;
cursor: default;
}
.pure-skin-mine .pure-menu .pure-menu-disabled > a,
.pure-skin-mine .pure-menu .pure-menu-can-have-children.pure-menu-disabled > a:after {
color: #adadad;
}
/* HEADINGS */
.pure-skin-mine .pure-menu .pure-menu-heading {
color: #262626;
text-transform: uppercase;
font-size:90%;
margin-top:0.5em;
}
/* SELECTED MENU ITEM */
.pure-skin-mine .pure-menu li.pure-menu-selected a {
background-color: #d2d1d2;
color: #1f1e1f;
}
/* FIXED MENU */
.pure-skin-mine .pure-menu.pure-menu-open.pure-menu-fixed {
border: none;
border-bottom: 1px solid #ededed;
}
/* end from YUICSS list.css ***********************************/
/* from YUICSS list-responsive.css ****************************/
/* RESPONSIVE */
@media (max-width: 480px) {
.pure-skin-mine .pure-menu-horizontal {
width:100%;
}
.pure-skin-mine .pure-menu-children li {
display: block;
border-bottom:1px solid block;
}
}
/* end from list-responsive.css ******************/

@ -0,0 +1,3 @@
$(document).ready(function() {
$(".fancybox").fancybox();
});

@ -0,0 +1,165 @@
.wrapper
{
max-width: 960px;
margin: 0px auto;
}
.stuff
{
padding: 14px 22px;
}
.header
{
position: relative;
background-color: #DEDEDE;
color: #8C8C8C;
letter-spacing: -.20em;
}
.header h1
{
margin-bottom: 0px;
}
.header .dashboard
{
position: absolute;
right: 16px;
bottom: 20px;
letter-spacing: normal;
}
.header .dashboard a
{
font-size: 95%;
margin-left: 8px;
}
.header .dashboard .register
{
box-shadow: 0px 0px 6px 1px #f5cb70;
-webkit-box-shadow: 0px 0px 6px 1px #f5cb70;
-moz-box-shadow: 0px 0px 6px 1px #f5cb70;
-o-box-shadow: 0px 0px 6px 1px #f5cb70;
-ms-box-shadow: 0px 0px 6px 1px #f5cb70;
}
.current
{
background-color: #E7E7E7;
}
.current h2
{
color: #5E5E5E;
}
.current-task
{
color: black;
margin-left: 8px;
}
ul.tasks
{
padding: 0px;
}
ul.tasks li
{
list-style-type: none;
margin-bottom: 5px;
}
ul.tasks li.create
{
margin-bottom: 10px;
}
ul.tasks .task .type, select.type-input, button.add-button, input.description-input, .type-marker
{
float: left;
border-radius: 3px;
padding: 3px 4px;
font-size: 60%;
font-weight: 700;
margin-right: 6px;
text-transform: uppercase;
text-align: center;
width: 41px;
}
.type-marker
{
font-size: 75%;
padding: 3px 15px;
float: none;
margin-right: 8px;
margin-left: 5px;
position: relative;
top: -2px;
}
select.type-input, button.add-button, input.description-input
{
float: none;
}
select.type-input
{
width: 64px;
}
button.add-button
{
width: 72px;
padding: 5px 4px;
}
input.description-input
{
width: 250px;
padding: 2px 6px;
text-align: left;
text-transform: none;
font-size: 80%;
font-weight: normal;
margin-top: 1px;
position: relative;
top: 1px;
}
ul.tasks .task .type.want, .type-marker.want
{
background-color: #CCE6B6;
}
ul.tasks .task .type.must, .type-marker.must
{
background-color: #E8CDBA;
}
.non-button
{
color: #8E8E8E;
margin-left: 12px;
font-weight: bold;
}
.inline-form
{
display: inline;
}
.modal
{
display: none;
width: 400px;
color: #2F2F2F;
}
/* From HTML Kickstart */
.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}
.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}
* html .clearfix, *:first-child+html .clearfix{zoom:1}

@ -0,0 +1,130 @@
<!doctype html>
<html>
<head>
<title>todo.</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.1.0/pure-min.css">
<link rel="stylesheet" href="/static/pure-custom.css">
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/fancybox/jquery.fancybox.css">
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="/static/fancybox/jquery.fancybox.pack.js"></script>
<script src="/static/script.js"></script>
</head>
<body>
<div class="pure-g-r wrapper">
<div class="pure-u-1 header">
<div class="stuff">
<h1>todo.</h1>
<div class="dashboard">
{%if logged-in == true}
<a href="/logout/?key={%?logout-key}" class="pure-button pure-button-primary">logout</a>
{%else}
<a href="#modal_login" class="fancybox pure-button pure-button-primary">login</a>
<a href="#modal_register" class="fancybox pure-button pure-button-primary register">register &amp; save</a>
{%/if}
</div>
</div>
</div>
<div class="pure-u-1 current">
<div class="stuff clearfix">
{%if isempty|current-task-description == true}
<h2>Your current task: <span class="current-task">None.</span></h2>
{%else}
<h2>Your current task: <span class="current-task">
{%if current-task-must == true}
<span class="type-marker must">Must</span>
{%else}
<span class="type-marker want">Want</span>
{%/if}
{%?current-task-description}
</span></h2>
<div class="actions">
<form method="post" action="/done" class="inline-form">
<button class="pure-button">I'm done with that.</button>
</form>
{%if current-task-must == false}
<form method="post" action="/skip" class="inline-form">
<button class="pure-button">I want to do something else!</button>
</form>
{%else}
<span class="non-button">You can't skip a <em>MUST</em>!</span>
{%/if}
</div>
{%/if}
</div>
</div>
<div class="pure-u-1">
<div class="stuff">
<h2>Your other tasks...</h2>
<ul class="tasks">
<li class="create">
<form class="pure-form" method="post" action="/add">
<select name="type" class="type-input">
<option value="must">Must</option>
<option value="want">Want</option>
</select>
<input name="description" type="text" class="description-input">
<button name="submit" type="submit" class="pure-button add-button">add task</button>
</form>
</li>
{%if isempty|items == false}
{%foreach task in items}
<li class="task clearfix">
{%if task[must] == true}
<div class="type must">Must</div>
{%else}
<div class="type want">Want</div>
{%/if}
<span class="description">{%?task[description]}</span>
</li>
{%/foreach}
{%/if}
</ul>
</div>
</div>
</div>
<div id="modal_login" class="modal">
<form class="pure-form pure-form-aligned" method="post" action="/login">
<div class="pure-control-group">
<label for="input_login_username">Username</label>
<input type="text" id="input_login_username" name="username">
</div>
<div class="pure-control-group">
<label for="input_login_password">Password</label>
<input type="password" id="input_login_password" name="password">
</div>
<div class="pure-controls">
<button class="pure-button" type="submit">Login</button>
</div>
</form>
</div>
<div id="modal_register" class="modal">
<form class="pure-form pure-form-aligned" method="post" action="/register">
<div class="pure-control-group">
<label for="input_register_username">Username</label>
<input type="text" id="input_register_username" name="username">
</div>
<div class="pure-control-group">
<label for="input_register_password">Password</label>
<input type="password" id="input_register_password" name="password">
</div>
<div class="pure-control-group">
<label for="input_register_password2">Confirm password</label>
<input type="password" id="input_register_password2" name="password2">
</div>
<div class="pure-controls">
<button class="pure-button" type="submit">Register and save</button>
</div>
</form>
</div>
</body>
</html>
Loading…
Cancel
Save