This commit is contained in:
Diego Najar 2015-03-08 14:02:59 -03:00
parent 04cd68561b
commit 29d06b62a3
192 changed files with 21259 additions and 0 deletions

BIN
content/.DS_Store vendored Normal file

Binary file not shown.

BIN
content/databases/.DS_Store vendored Normal file

Binary file not shown.

123
content/databases/pages.php Normal file
View File

@ -0,0 +1,123 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"autoincrement": 1,
"pages": {
"content\/how-to-make-a-page": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": "content"
},
"content\/how-to-make-a-post": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": "content"
},
"error": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": ""
},
"getting-started\/installation-guide": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": "getting-started"
},
"getting-started\/requirements": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": "getting-started"
},
"index": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": ""
},
"themes\/variables": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": "themes"
},
"troubleshooting": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425608797,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": ""
},
"content\/variables-for-posts-and-pages": {
"title": "",
"content": "",
"username": "",
"status": "published",
"author": "",
"unixstamp": 1425770059,
"date": "",
"timeago": "",
"slug": "",
"permalink": "",
"parent": "content"
}
}
}

BIN
content/databases/plugins/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"title": "",
"description": ""
}

View File

@ -0,0 +1,50 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"autoincrement": 1,
"posts": {
"lorem-text": {
"allow_comments": true,
"unixstamp": 1425343829,
"description": "111111",
"hash": "asdasd23r32r23rqwda",
"status": "published",
"related_post": [
"loremTest"
],
"tags": [
"lorem",
"impusm",
"lala"
],
"username": "admin"
},
"lorem\u6307\u51fa": {
"allow_comments": true,
"unixstamp": 1422836401,
"description": "2222222",
"hash": "asdasd23r32r23rqwda",
"status": "published",
"related_post": [],
"tags": [
"lorem",
"impusm",
"lala"
],
"username": "diego"
},
"loremTest": {
"allow_comments": true,
"unixstamp": 1422836401,
"description": "2222222",
"hash": "asdasd23r32r23rqwda",
"status": "published",
"related_post": [],
"tags": [
"lorem",
"impusm",
"lala"
],
"username": "diego"
}
}
}

View File

@ -0,0 +1,20 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"title": "Bludit CMS",
"slogan": "Another content management system",
"footer": "Copyright lala",
"language": "en",
"locale": "en_EN",
"timezone": "America\/Argentina\/Buenos_Aires",
"theme": "pure",
"homepage": "index",
"metaTags": {
"title": "",
"description": ""
},
"urlFilters": {
"post": "\/post\/",
"tag": "\/tag\/",
"page": "\/cms\/other\/"
}
}

View File

@ -0,0 +1,24 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"autoincrement": 1,
"users": {
"admin": {
"first_name": "Admin",
"last_name": "User",
"twitter": "",
"role": "admin",
"password": "3r3fasfasf",
"salt": "adr32t",
"email": ""
},
"diego": {
"first_name": "Diego",
"last_name": "Najar",
"twitter": "",
"role": "editor",
"password": "3r3fasfasf",
"salt": "adr32t",
"email": ""
}
}
}

BIN
content/pages/.DS_Store vendored Normal file

Binary file not shown.

BIN
content/pages/content/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,20 @@
title: How to make a new page
content:
## Advance mode
You can make new page editing the filesystem.
- Create a directory on /content/pages/
- The directory name is the uri for the new page
- Create a new file called index.txt inside of the new directory
- Edit the file index.txt
- Add two variables, Tite: and Content:
### Example
- Create the directory /content/pages/test
- Create the file index.txt on /content/pages/test/index.txt
- Edit the file index.txt
- Add the variables
```
Title: My new page
Content:
This is an example of a new page, hello world!
```

View File

@ -0,0 +1,30 @@
title: How to make post
content:
There are two method to make a post. The easy mode with graphic interfaces and the advanced mode, if you choose the second option check the [variables for posts and pages](../../content/variables-for-posts-and-pages).
---
## Easy mode
Admin area / GUI.
---
## Advanced mode
You can make new post editing the filesystem.
- Create a directory on /content/posts/
- The directory name is the uri for the new post
- Create a new file called index.txt inside of the new directory
- Edit the file index.txt
- Add two variables, Tite: and Content:
### Example
- Create the directory /content/posts/test
- Create the file index.txt on /content/posts/test/index.txt
- Edit the file index.txt
- Add the variables
```
Title: New post test
Content:
This is an example of a new post, hello world!
```

View File

@ -0,0 +1,31 @@
title: Variables for post
content:
There are many fields/variables to make a post. Each field ends on two dots(:).
The last field needs to be Content:.
- Title: the title for the post.
- Status: with this field you can change bettewen published and draft.
- Unixstamp: you can define the publish time/date in unix time stamp, this need to be in UTF-0.
- Username: the owner username. Needs to be a valid username.
- Author: the author's name.
- Content: the content for the post, support HTML and Markdown code.
### Post example
```
Title: New post test
Status: published
Unixstamp: 1425340270
Username: diego
Author: Diego Najar
Content:
# HTML and Markdown code support
## Some Markdown code
**Black Lorem** Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
## Some HTML code
<strong>It is a long established</strong> fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
```

4
content/pages/error/index.txt Executable file
View File

@ -0,0 +1,4 @@
Title: Error
Content
The page has not been found.

BIN
content/pages/getting-started/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,43 @@
Title: Installation guide
Content:
You only need upload the files to the server.
1. Download the latest version from http://www.bludit.com
2. Extract the zip file into a directory like `bludit`.
3. Upload the directory `bludit` on your hosting.
4. Done!
---
## Installation on GNU/Linux
If you have a local webserver with GNU/Linux or you have a Hosting with SSH enabled, you can install with this simples commands.
```
$ wget http://www.bludit.com/bludit_latest.zip
$ unzip bludit_latest.zip
$ mv bludit /WEBSERVER_DIRECTORY/
```
If you dont have the command wget, you can try with the command curl.
```
$ curl --remote-name http://www.bludit.com/bludit_latest.zip
```
I recommend you check which user are running your webserver, because you need to set read/write permissions to the directory `content`. For example if you are running Apache you can do this:
```
$ sudo ps axo user | egrep '(apache|httpd)' | uniq
```
Now you can set the username to the directory `content`. And fix some permissions to the files and directories.
```
$ cd /WEBSERVER_DIRECTORY/bludit
$ sudo chown -R USERNAME:USERNAME content
$ sudo find . -type f | xargs chmod 664
$ sudo find . -type d | xargs chmod 775
```
Other way, but I dont recommend it, is setting the permissions for all read/write/execute (777).
```
$ cd /WEBSERVER_DIRECTORY/bludit
$ sudo find content -type d | xargs chmod 777
```

View File

@ -0,0 +1,9 @@
Title: Requirements
Content:
You only need a Webserver with PHP support.
- PHP 5.3 or higher.
- PHP module [mbstring](http://php.net/manual/en/book.mbstring.php) for UTF-8 full support.
- Webserver:
* Apache with module [mod_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html)
* Ngnix with module [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html)

View File

@ -0,0 +1,27 @@
Title: Homepage
Content:
Getting started
- [Requirements](../../getting-started/requirements)
- [Installation guide](../../getting-started/installation-guide)
- [Update guide](../../)
- [Backup guide](../../)
Content
- [How to make a post](../../content/how-to-make-a-post)
- [How to make a page](../../content/how-to-make-a-page)
Themes
- [Making a basic theme](./content/how-to-make-a-post)
- [Constants and Variables](./content/how-to-make-a-post)
- [Objects for themes](./content/how-to-make-a-post)
Plugins
- [Making a basic theme](./content/how-to-make-a-post)
- [Constants and Variables](./content/how-to-make-a-post)
- [Objects for themes](./content/how-to-make-a-post)
General
- [Databases](./content/how-to-make-a-post)
- [Filesystem and structure](./content/how-to-make-a-post)
- [Troubleshooting](../../troubleshooting)

BIN
content/pages/themes/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,58 @@
Title: Variables for themes
Content:
## Object $Site
The object $Site have all the information from the database /content/databases/site.php.
Print the site title
<pre><code data-language="php">echo $Site->title();</code></pre>
Print the site slogan
<pre><code data-language="php">echo $Site->slogan();</code></pre>
## Object $Page
Print the page title
<pre><code data-language="php">echo $Page->title();</code></pre>
Print the page content
<pre><code data-language="php">echo $Page->content();</code></pre>
Print the page username
<pre><code data-language="php">echo $Page->username();</code></pre>
Get the date in unix timestamp
<pre><code data-language="php">$time = $Page->unixstamp();
// Format time
echo date('Y-m-d', $time);
</code></pre>
Print the page date, according to locale settings and format settings.
<pre><code data-language="php">echo $Page->date();</code></pre>
Print the page date with a different format.
<pre><code data-language="php">$format = 'Y-m-d';
echo $Page->date($format);
</code></pre>
Time ago
<pre><code data-language="php">echo $Page->timeago();</code></pre>
Get the slug url.
<pre><code data-language="php">$slug = $Page->slug();</code></pre>
Get the page permalink.
<pre><code data-language="php">$permalink = $Page->permalink();</code></pre>
Get the page status, this method returns TRUE if the page is published, FALSE otherwise.
<pre><code data-language="php">if( $Page->published() )
{
echo 'Page published';
}
else
{
echo 'Page draft';
}</code></pre>

View File

@ -0,0 +1,16 @@
Title: Troubleshooting
Content:
### Setup permissions
Nibbleblog uses as database flat files, they are stored in the “content” directory which needs permissions to write by the webserver. Nibbleblog try to assign these permissions automatically, but if it fails in the process will alert the user to make the changes manually.
#### Change permissions with Filezilla and FTP
1. Connect to the server via ftp.
2. Right click on content directory.
3. Select file permissions.
4. Set the number 755 if dosen't work try with the number 777.
#### Change permissions from GNU/Linux terminal
```
$ chmod -R 777 content
```

BIN
content/posts/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
Title: Lorem text
Username: admin
Content:
This is an interactive demo of Parsedown.
Here's how it works:
1. Type some Markdown text on the left
2. Hit *Parse*
3. See your text parsed to on the right
Tip: when scrolling hold `⇧` to sync scroll position.

View File

@ -0,0 +1,7 @@
Title: Lorem titulo
Content:
## Subtitle 1
Faucibus sed lobortis aliquam lorem blandit. Lorem eu nunc metus col. Commodo id in arcu ante lorem ipsum sed accumsan erat praesent faucibus commodo ac mi lacus. Adipiscing mi ac commodo. Vis aliquet tortor ultricies non ante erat nunc integer eu ante ornare amet commetus vestibulum blandit integer in curae ac faucibus integer non. Adipiscing cubilia elementum.
## Subtitle 2
Faucibus sed lobortis aliquam lorem blandit. Lorem eu nunc metus col. Commodo id in arcu ante lorem ipsum sed accumsan erat praesent faucibus commodo ac mi lacus. Adipiscing mi ac commodo. Vis aliquet tortor ultricies non ante erat nunc integer eu ante ornare amet commetus vestibulum blandit integer in curae ac faucibus integer non. Adipiscing cubilia elementum.

View File

@ -0,0 +1,6 @@
Title: Lorem China Clone指出
Content:
Faucibus sed lobortis aliquam lorem blandit. Lorem eu nunc metus col. Commodo id in arcu ante lorem ipsum sed accumsan erat praesent faucibus commodo ac mi lacus. Adipiscing mi ac commodo. Vis aliquet tortor ultricies non ante erat nunc integer eu ante ornare amet commetus vestibulum blandit integer in curae ac faucibus integer non. Adipiscing cubilia elementum.
Faucibus sed lobortis aliquam lorem blandit. Lorem eu nunc metus col. Commodo id in arcu ante lorem ipsum sed accumsan erat praesent faucibus commodo ac mi lacus. Adipiscing mi ac commodo. Vis aliquet tortor ultricies non ante erat nunc integer eu ante ornare amet commetus vestibulum blandit integer in curae ac faucibus integer non. Adipiscing cubilia elementum.

37
contributors.txt Normal file
View File

@ -0,0 +1,37 @@
Diego Najar
—————————
Implementar
- Links a Google+, Facebook y Twitter
- Plugins
- Comentarios
- Notificaciones
- Dashboard, parecido a Nibbleblog, me gusta.
- iPhone app
- Bludit
- Case sensitive en la URL ?
—————————
Habilitar rewriterules en el server, httpd.conf
<Directory /var/www/html>
AllowOverride All
————
Objetos tipo estáticos, que empiecen con la letra h o la palabra helper.
hText::
hUrl::
helperText::
helperUrl::
find . -type f -name "*.php" -print0 | xargs -0 sed -i 's/Text/helperText/g'
find . -type f -name "*.php" -print0 | xargs -0 sed -i 's/Url/helperUrl/g'
—————————
Editando a mano
Si editas el slug(directorio), luego de llamar a generator(), el post se pone en draft, toma la fecha actual y no vuelve a modificarse. Se puede forzar a publicado indicando el status: published

44
index.php Normal file
View File

@ -0,0 +1,44 @@
<?php
// DEBUG:
$loadTime = microtime(true);
// SECURITY CONSTANT
define('BLUDIT', true);
// PHP PATHS
define('PATH_ROOT', __DIR__.'/');
define('PATH_LANGUAGES', PATH_ROOT.'languages/');
define('PATH_THEMES', PATH_ROOT.'themes/');
define('PATH_PLUGINS', PATH_ROOT.'plugins/');
define('PATH_KERNEL', PATH_ROOT.'kernel/');
define('PATH_ABSTRACT', PATH_ROOT.'kernel/abstract/');
define('PATH_BOOT', PATH_ROOT.'kernel/boot/');
define('PATH_RULES', PATH_ROOT.'kernel/boot/rules/');
define('PATH_HELPERS', PATH_ROOT.'kernel/helpers/');
define('PATH_CONTENT', PATH_ROOT.'content/');
define('PATH_POSTS', PATH_CONTENT.'posts/');
define('PATH_PAGES', PATH_CONTENT.'pages/');
define('PATH_DATABASES', PATH_CONTENT.'databases/');
define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases/plugins/');
// BOOT
require(PATH_BOOT.'site.php');
// Theme init.php
if(file_exists(PATH_THEMES.$Site->theme().'/init.php'))
include(PATH_THEMES.$Site->theme().'/init.php');
// Theme HTML
include(PATH_THEMES.$Site->theme().'/index.php');
// DEBUG: Estas funciones llamarlas despues que el usuario se logueo, en la parte de administracion.
$dbPosts->regenerate();
$dbPages->regenerate();
// DEBUG:
echo "Load time: ".(microtime(true) - $loadTime);
?>

167
install.php Normal file
View File

@ -0,0 +1,167 @@
<?php
// SECURITY CONSTANT
define('BLUDIT', true);
// PHP PATHS
define('PATH_ROOT', __DIR__.'/');
define('PATH_KERNEL', PATH_ROOT.'kernel/');
define('PATH_LANGUAGES', PATH_ROOT.'languages/');
define('PATH_ABSTRACT', PATH_ROOT.'kernel/abstract/');
define('PATH_BOOT', PATH_ROOT.'kernel/boot/');
define('PATH_RULES', PATH_ROOT.'kernel/boot/rules/');
define('PATH_CONTENT', PATH_ROOT.'content/');
define('PATH_POSTS', PATH_ROOT.'content/posts/');
define('PATH_PAGES', PATH_ROOT.'content/pages/');
define('PATH_DATABASES', PATH_ROOT.'content/databases/');
define('PATH_PLUGINS_DATABASES', PATH_ROOT.'content/databases/plugins/');
define('PATH_HELPERS', PATH_ROOT.'kernel/helpers/');
define('PATH_THEMES', PATH_ROOT.'themes/');
define('PATH_PLUGINS', PATH_ROOT.'plugins/');
// BOOT
require(PATH_BOOT.'site.php');
unset($db);
$db = new DB_SERIALIZE(PATH_DATABASES.'posts.php');
$data = array();
$data['lorem-text'] =
array(
'allow_comments'=>true,
'unixstamp'=>Date::unixstamp(),
'description'=>'111111',
'hash'=>'asdasd23r32r23rqwda',
'status'=>'published',
'related_post'=>array('loremTest'),
'tags'=>array('lorem','impusm','lala'),
'username'=>'admin'
);
$data['lorem指出'] =
array(
'allow_comments'=>true,
'unixstamp'=>1422836401,
'description'=>'2222222',
'hash'=>'asdasd23r32r23rqwda',
'status'=>'published',
'related_post'=>array(),
'tags'=>array('lorem','impusm','lala'),
'username'=>'diego'
);
$data['loremTest'] =
array(
'allow_comments'=>true,
'unixstamp'=>1422836401,
'description'=>'2222222',
'hash'=>'asdasd23r32r23rqwda',
'status'=>'published',
'related_post'=>array(),
'tags'=>array('lorem','impusm','lala'),
'username'=>'diego'
);
$db->setDb(array(
'autoincrement'=>1,
'posts'=>$data
));
unset($db);
$db = new DB_SERIALIZE(PATH_DATABASES.'pages.php');
$data = array();
$data['error'] =
array(
'unixstamp'=>Date::unixstamp(),
'description'=>'Error page',
'hash'=>'asdasd23r32r23rqwda',
'status'=>'published',
'tags'=>array('lorem','impusm','lala'),
'username'=>'diego'
);
$data['about'] =
array(
'unixstamp'=>Date::unixstamp(),
'description'=>'About page',
'hash'=>'asdasd23r32r23rqwda',
'status'=>'published',
'tags'=>array('lorem','impusm','lala'),
'username'=>'diego'
);
$data['contact'] =
array(
'unixstamp'=>Date::unixstamp(),
'description'=>'Contact page',
'hash'=>'asdasd23r32r23rqwda',
'status'=>'published',
'tags'=>array('lorem','impusm','lala'),
'username'=>'diego'
);
$db->setDb(array(
'autoincrement'=>1,
'pages'=>$data
));
unset($db);
$db = new DB_SERIALIZE(PATH_DATABASES.'users.php');
$data = array();
$data['admin'] =
array(
'first_name'=>'Admin',
'last_name'=>'User',
'twitter'=>'',
'role'=>'admin',
'password'=>'3r3fasfasf',
'salt'=>'adr32t',
'email'=>''
);
$data['diego'] =
array(
'first_name'=>'Diego',
'last_name'=>'Najar',
'twitter'=>'',
'role'=>'editor',
'password'=>'3r3fasfasf',
'salt'=>'adr32t',
'email'=>''
);
$db->setDb(array(
'autoincrement'=>1,
'users'=>$data
));
unset($db);
$db = new DB_SERIALIZE(PATH_DATABASES.'site.php');
$data = array();
$data = array(
'title'=>'Bludit CMS',
'slogan'=>'Another content management system',
'footer'=>'Copyright lala',
'language'=>'en',
'locale'=>'en_EN',
'timezone'=>'America/Argentina/Buenos_Aires',
'theme'=>'pure',
'homepage'=>'about',
'metaTags'=>array(
'title'=>'',
'description'=>''
),
'urlFilters'=>array(
'post'=>'/post/',
'tag'=>'/tag/',
'page'=>HTML_PATH_ROOT
)
);
$db->setDb($data);
?>

BIN
kernel/.DS_Store vendored Normal file

Binary file not shown.

BIN
kernel/abstract/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
<?php
class Content
{
public $vars;
public $path;
function __construct($slug)
{
if($this->build($slug)===false)
$this->vars = false;
}
// Return true if valid post
public function valid()
{
return($this->vars!==false);
}
public function get_field($field)
{
if(isset($this->vars[$field]))
return $this->vars[$field];
return false;
}
// $notoverwrite true if you don't want to replace the value if are set previusly
public function setField($field, $value, $overwrite=true)
{
if($overwrite || empty($this->vars[$field]))
{
$this->vars[$field] = $value;
return true;
}
return true;
}
// DEBUG, se puede borrar
public function show()
{
print_r($this->vars);
}
private function build($slug)
{
// Check if directory exists for the slug
/*$path = glob($this->path.$slug, GLOB_ONLYDIR);
if(empty($path))
return false;
// Get the first element from the directories array
//$path = $path[0];
*/
$path = $this->path.$slug;
if(!is_dir($path))
return false;
// Path
$this->setField('path', $path);
// Slug
$this->setField('slug', $slug);
// Check if file exists
$file = $path.'/index.txt';
if(!file_exists($file))
return false;
$tmp = 0;
$lines = file($file);
foreach($lines as $lineNumber=>$line)
{
$parts = array_map('trim', explode(':', $line, 2));
// Lowercase variable
$parts[0] = helperText::lowercase($parts[0]);
if($parts[0]==='content')
{
$tmp = $lineNumber;
break;
}
if( !empty($parts[0]) && !empty($parts[1]) )
$this->vars[$parts[0]] = $parts[1];
}
// Content
if($tmp!=0)
{
$tmp++; // Next line after Content:
$output = array_slice($lines, $tmp); // Lines after Content
$this->vars['content'] = implode($output);
}
//
}
}
?>

View File

@ -0,0 +1,78 @@
<?php
// Database serialize
class DB_SERIALIZE
{
public $vars;
public $file;
public $firstLine;
function __construct($file, $firstLine=true)
{
$this->file = $file;
$lines = file($file);
$this->firstLine = $firstLine;
if($firstLine)
{
// Remove the first line.
unset($lines[0]);
}
$implode = implode($lines);
$this->vars = $this->unserialize($implode);
}
public function save()
{
if($this->firstLine)
$data = "<?php defined('BLUDIT') or die('Bludit CMS.'); ?>".PHP_EOL;
else
$data = '';
$data .= $this->serialize($this->vars);
// LOCK_EX flag to prevent anyone else writing to the file at the same time.
return file_put_contents($this->file, $data, LOCK_EX);
}
// DEBUG, ver si sirve para la instalacion, sino borrar
public function setDb($db)
{
$this->vars = $db;
return $this->save();
}
private function serialize($data)
{
// DEBUG: La idea es siempre serializar en json, habria que ver si siempre esta cargado json_enconde y decode
if(JSON)
return json_encode($data, JSON_PRETTY_PRINT);
return serialize($data);
}
private function unserialize($data)
{
// DEBUG: La idea es siempre serializar en json, habria que ver si siempre esta cargado json_enconde y decode
if(JSON)
return json_decode($data, true);
return unserialize($data);
}
// DEBUG, se puede borrar
function show()
{
var_dump($this->vars);
}
}
?>

View File

@ -0,0 +1,126 @@
<?php
class Plugin {
// (string) Plugin's directory
public $directoryName;
// (string) Database path and filename
public $fileDb;
// (array) Database
public $db;
// (array) Database fields, only for initialize.
public $dbFields;
public $className;
function __construct()
{
$reflector = new ReflectionClass(get_class($this));
// Directory name
$this->directoryName = basename(dirname($reflector->getFileName()));
// Class Name
$this->className = $reflector->getName();
// Init empty database
$this->db = array();
$this->fileDb = PATH_PLUGINS_DATABASES.$this->directoryName.'/db.php';
// If the plugin installed then get the database.
if($this->installed())
{
$Tmp = new DB_SERIALIZE($this->fileDb);
$this->db = $Tmp->vars;
}
}
// Return TRUE if the installation success, otherwise FALSE.
public function install()
{
if($this->installed())
return false;
// Create plugin directory for databases and others files.
if( !mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, 0755, true) )
return false;
if( !empty($this->dbFields) )
{
$Tmp = new DB_SERIALIZE($this->fileDb);
$Tmp->setDb($this->dbFields);
}
return true;
}
public function uninstall()
{
}
public function installed()
{
return file_exists($this->fileDb);
}
public function init()
{
}
// DEBUG: Ver si se usa
public function showdb()
{
print_r( $this->db );
}
// EVENTS
// Before the posts load.
public function beforePostsLoad()
{
return false;
}
// After the posts load.
public function afterPostsLoad()
{
return false;
}
// Before the pages load.
public function beforePagesLoad()
{
return false;
}
// After the pages load.
public function afterPagesLoad()
{
return false;
}
public function onSiteHead()
{
return false;
}
public function onSiteBody()
{
return false;
}
public function onSidebar()
{
return false;
}
}
?>

BIN
kernel/boot/.DS_Store vendored Normal file

Binary file not shown.

BIN
kernel/boot/rules/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,107 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
$pages = array();
function build_page($slug)
{
global $dbPages;
global $dbUsers;
global $Parsedown;
if( !$dbPages->validPage($slug) )
return false;
$Page = new Page($slug);
if( !$Page->valid() )
return false;
// Get post's database
$db = $dbPages->getDb($slug);
foreach($db as $key=>$value)
{
if($key=='unixstamp')
{
// Not overwrite
$Page->setField('unixstamp', $value, false);
$Page->setField('date', Date::format($value, '%d %B'), false);
$Page->setField('timeago', Date::timeago($value), false);
}
else
{
// Not overwrite
$Page->setField($key, $value, false);
}
}
// Parse the content
$content = $Parsedown->text( $Page->content() );
$Page->setField('content', $content, true);
if( $dbUsers->validUsername( $Page->username() ) )
{
$user = $dbUsers->get( $Page->username() );
$Page->setField('author', $user['first_name'].', '.$user['last_name']);
}
return $Page;
}
function build_all_pages()
{
global $pages;
global $dbPages;
$list = $dbPages->getAll();
unset($list['error']);
foreach($list as $slug=>$db)
{
$Page = build_page($slug);
if($Page!==false)
{
if( $Page->published() )
array_push($pages, $Page);
}
}
}
// Filter by page, then build it
if( ($Url->whereAmI()==='page') && ($Url->notFound()===false) )
{
$Page = build_page( $Url->slug() );
if($Page===false)
{
$Url->setNotFound(true);
unset($Page);
}
elseif( !$Page->published() )
{
$Url->setNotFound(true);
unset($Page);
}
}
// Default homepage
if($Url->notFound()===false)
{
if( ($Site->homepage()!=='home') && ($Url->whereAmI()==='home') )
{
$Url->setWhereAmI('page');
$Page = build_page( $Site->homepage() );
if($Page===false)
{
$Url->setWhereAmI('home');
}
}
}
// Build all pages
build_all_pages();
?>

View File

@ -0,0 +1,100 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
$posts = array();
function build_post($slug)
{
global $dbPosts;
global $dbUsers;
global $Parsedown;
if( !$dbPosts->validPost($slug) )
return false;
$Post = new Post($slug);
if( !$Post->valid() )
return false;
// Get post's database
$db = $dbPosts->getDb($slug);
foreach($db as $key=>$value)
{
if($key=='unixstamp')
{
// Not overwrite
$Post->setField('unixstamp', $value, false);
$Post->setField('date', Date::format($value, '%d %B'), false);
$Post->setField('timeago', Date::timeago($value), false);
}
else
{
// Not overwrite
$Post->setField($key, $value, false);
}
}
// Parse the content
$content = $Parsedown->text( $Post->content() );
$Post->setField('content', $content, true);
// User / Author
if( $dbUsers->validUsername( $Post->username() ) )
{
$user = $dbUsers->get( $Post->username() );
$Post->setField('author', $user['first_name'].', '.$user['last_name'], false);
}
return $Post;
}
function build_posts_per_page()
{
global $dbPosts;
global $posts;
$list = $dbPosts->getPage(0, 5);
foreach($list as $slug=>$db)
{
$Post = build_post($slug);
if($Post!==false)
{
array_push($posts, $Post);
}
}
}
// Filter by post, then build it
if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
{
$Post = build_post( $Url->slug() );
if($Post===false)
{
$Url->setNotFound(true);
unset($Post);
}
elseif( !$Post->published() )
{
$Url->setNotFound(true);
unset($Post);
}
else
{
$posts[0] = $Post;
}
}
// Build post per page
else
{
build_posts_per_page();
}
?>

View File

@ -0,0 +1,43 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
$plugins = array(
'onSiteHead'=>array(),
'onSiteBody'=>array(),
'onSidebar'=>array()
);
function build_plugins()
{
global $plugins;
// List plugins directories
$list = helperFilesystem::listDirectories(PATH_PLUGINS);
// Get declared clasess before load plugins clasess
$currentDeclaredClasess = get_declared_classes();
// Load each clasess
foreach($list as $pluginPath)
include($pluginPath.'/plugin.php');
// Get plugins clasess loaded
$pluginsDeclaredClasess = array_diff(get_declared_classes(), $currentDeclaredClasess);
foreach($pluginsDeclaredClasess as $pluginClass)
{
$Plugin = new $pluginClass;
if($Plugin->onSiteHead()!==false)
array_push($plugins['onSiteHead'], $Plugin);
if($Plugin->onSiteBody()!==false)
array_push($plugins['onSiteBody'], $Plugin);
if($Plugin->onSidebar()!==false)
array_push($plugins['onSidebar'], $Plugin);
}
}
build_plugins();
?>

81
kernel/boot/site.php Normal file
View File

@ -0,0 +1,81 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Multibyte string / UTF-8
define('MB_STRING', extension_loaded('mbstring'));
// Check if JSON encode and decode are enabled.
define('JSON', function_exists('json_encode'));
// TRUE if new posts hand-made set published, or FALSE for draft.
define('HANDMADE_PUBLISHED', true);
if(MB_STRING)
{
// Tell PHP that we're using UTF-8 strings until the end of the script.
mb_internal_encoding('UTF-8');
// Tell PHP that we'll be outputting UTF-8 to the browser.
mb_http_output('UTF-8');
}
// Abstract Classes
include(PATH_ABSTRACT.'db_serialize.class.php');
include(PATH_ABSTRACT.'db_content.class.php');
include(PATH_ABSTRACT.'plugin.class.php');
include(PATH_KERNEL.'db_posts.class.php');
include(PATH_KERNEL.'db_pages.class.php');
include(PATH_KERNEL.'db_users.class.php');
include(PATH_KERNEL.'post.class.php');
include(PATH_KERNEL.'page.class.php');
include(PATH_KERNEL.'site.class.php');
include(PATH_KERNEL.'url.class.php');
include(PATH_KERNEL.'language.class.php');
include(PATH_KERNEL.'parsedown.class.php');
// Helpers Classes
include(PATH_HELPERS.'text.class.php');
//include(PATH_HELPERS.'url.class.php');
include(PATH_HELPERS.'date.class.php');
include(PATH_HELPERS.'theme.class.php');
include(PATH_HELPERS.'filesystem.class.php');
// Objects
$dbPosts = new dbPosts();
$dbPages = new dbPages();
$dbUsers = new dbUsers();
$Site = new Site();
$Url = new Url();
$Parsedown = new Parsedown();
$Language = new Language( $Site->locale() );
$Url->init( $Site->urlFilters() );
// Objects shortcuts
$L = $Language;
// HTML PATHs
$tmp = dirname(getenv('SCRIPT_NAME'));
if($tmp!='/')
define('HTML_PATH_ROOT', $tmp.'/');
else
define('HTML_PATH_ROOT', $tmp);
define('HTML_PATH_THEMES', HTML_PATH_ROOT.'themes/');
define('HTML_PATH_THEME', HTML_PATH_ROOT.'themes/'.$Site->theme().'/');
// Boot rules
include(PATH_RULES.'70.build_posts.php');
include(PATH_RULES.'70.build_pages.php');
include(PATH_RULES.'80.plugins.php');
// Page not found 404
if($Url->notFound())
{
header('HTTP/1.0 404 Not Found');
$Page = new Page('error');
}
?>

92
kernel/db_pages.class.php Normal file
View File

@ -0,0 +1,92 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class dbPages extends DB_SERIALIZE
{
function __construct()
{
parent::__construct(PATH_DATABASES.'pages.php');
}
// Return an array with the database for a page
public function getDb($slug)
{
return $this->vars['pages'][$slug];
}
// Return TRUE if the page exists, FALSE otherwise.
public function validPage($slug)
{
return isset($this->vars['pages'][$slug]);
}
// Return an array with all page's databases.
public function getAll()
{
return $this->vars['pages'];
}
public function regenerate()
{
$db = $this->vars['pages'];
$paths = array();
$fields = array(
'title'=>'',
'content'=>'',
'username'=>'',
'status'=>'draft',
'author'=>'',
'unixstamp'=>Date::unixstamp(),
'date'=>'',
'timeago'=>'',
'slug'=>'',
'permalink'=>'',
'parent'=>''
);
if(HANDMADE_PUBLISHED)
$fields['status']='published';
// Recovery pages from the first level of directories
$tmpPaths = glob(PATH_PAGES.'*', GLOB_ONLYDIR);
foreach($tmpPaths as $directory)
{
$key = basename($directory);
if(file_exists($directory.'/index.txt'))
// The key is the directory name
$paths[$key] = true;
// Recovery pages from subdirectories
$subPaths = glob($directory.'/*', GLOB_ONLYDIR);
foreach($subPaths as $subDirectory)
{
$subKey = basename($subDirectory);
if(file_exists($subDirectory.'/index.txt'))
// The key is composed by the directory/subdirectory
$paths[$key.'/'.$subKey] = true;
}
}
// Remove old posts from db
foreach( array_diff_key($db, $paths) as $slug=>$data )
unset($this->vars['pages'][$slug]);
// Insert new posts to db
foreach( array_diff_key($paths, $db) as $slug=>$data )
{
$this->vars['pages'][$slug] = $fields;
// Get the parent if exists
$explode = explode('/', $slug);
if(!empty($explode[1]))
$this->vars['pages'][$slug]['parent'] = $explode[0];
}
$this->save();
}
}
?>

121
kernel/db_posts.class.php Normal file
View File

@ -0,0 +1,121 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class dbPosts extends DB_SERIALIZE
{
function __construct()
{
parent::__construct(PATH_DATABASES.'posts.php');
}
// Return an array with the database for a post.
public function getDb($slug)
{
return $this->vars['posts'][$slug];
}
// Return TRUE if the post exists, FALSE otherwise.
public function validPost($slug)
{
return isset($this->vars['posts'][$slug]);
}
public function regenerate()
{
$db = $this->vars['posts'];
$paths = array();
$fields = array(
'title'=>'',
'content'=>'',
'username'=>'',
'status'=>'draft',
'author'=>'',
'unixstamp'=>Date::unixstamp(),
'date'=>'',
'timeago'=>'',
'slug'=>'',
'permalink'=>''
);
if(HANDMADE_PUBLISHED)
$fields['status']='published';
// Scan all directories from /content/post/
$tmpPaths = glob(PATH_POSTS.'*', GLOB_ONLYDIR);
foreach($tmpPaths as $directory)
{
// Each directory is a post
if(file_exists($directory.'/index.txt')) {
$key = basename($directory);
$paths[$key] = true;
}
}
// Remove old posts from db
foreach( array_diff_key($db, $paths) as $slug=>$data )
unset($this->vars['posts'][$slug]);
// Insert new posts to db
foreach( array_diff_key($paths, $db) as $slug=>$data )
$this->vars['posts'][$slug] = $fields;
$this->save();
}
public function getPage($pageNumber, $postPerPage)
{
$init = (int) $postPerPage * $pageNumber;
$end = (int) min( ($init + $postPerPage - 1), count($this->vars['posts']) - 1 );
$outrange = $init<0 ? true : $init > $end;
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
$this->removeUnpublished();
$tmp = $this->sortByDate();
if(!$outrange)
return array_slice($tmp, $init, $end+1, true);
return array();
}
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
private function removeUnpublished()
{
$tmp = array();
foreach($this->vars['posts'] as $key=>$value)
{
if($value['status']==='published')
$tmp[$key]=$value;
}
$this->vars['posts'] = $tmp;
}
private function sortByDate($low_to_high=false)
{
// high to low
function high_to_low($a, $b) {
return $a['unixstamp']<$b['unixstamp'];
}
// low to high
function low_to_high($a, $b) {
return $a['unixstamp']>$b['unixstamp'];
}
$tmp = $this->vars['posts'];
if($low_to_high)
uasort($tmp, 'low_to_high');
else
uasort($tmp, 'high_to_low');
return $tmp;
}
}
?>

24
kernel/db_users.class.php Normal file
View File

@ -0,0 +1,24 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class dbUsers extends DB_SERIALIZE
{
function __construct()
{
parent::__construct(PATH_DATABASES.'users.php');
}
// Return an array with the username databases
function get($username)
{
return $this->vars['users'][$username];
}
// Return TRUE if the post exists, FALSE otherwise.
public function validUsername($username)
{
return isset($this->vars['users'][$username]);
}
}
?>

View File

@ -0,0 +1,30 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Category {
public static function id()
{
global $category;
return $category['id'];
}
public static function name()
{
global $category;
return $category['name'];
}
}
?>

View File

@ -0,0 +1,36 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Cookie {
public static function get($name)
{
if(isset($_COOKIE[$name]))
{
return($_COOKIE[$name]);
}
return(false);
}
public static function add($name, $value, $expire = 525600)
{
setcookie($name, $value, time() + ($expire * 60));
}
public static function is_set($name)
{
return(isset($_COOKIE[$name]));
}
}
?>

View File

@ -0,0 +1,52 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Crypt {
// return string
public static function encrypt($string, $key)
{
if(function_exists('get_loaded_extensions'))
{
if( in_array('mcrypt', get_loaded_extensions()) )
{
$string = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5($key) ) );
return $string;
}
}
return('---');
}
// return string
public static function decrypt($string, $key)
{
if(function_exists('get_loaded_extensions'))
{
if( in_array('mcrypt', get_loaded_extensions()) )
{
$string = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5($key) ), "\0" );
return $string;
}
}
return('---');
}
public static function get_hash($string, $salt = '$#!')
{
$sha1 = sha1($string.$salt);
return($sha1);
}
}
?>

View File

@ -0,0 +1,104 @@
<?php
class Date {
// Return current Unix timestamp, GMT+0
public static function unixstamp()
{
return time();
}
// Format a local time/date according to locale settings
public static function format($time, $format)
{
$date = strftime($format, $time);
return $date;
}
public static function timeago($time)
{
$time = time() - $time;
$tokens = array (
31536000 => 'year',
2592000 => 'month',
604800 => 'week',
86400 => 'day',
3600 => 'hour',
60 => 'minute',
1 => 'second'
);
foreach ($tokens as $unit => $text) {
if ($time < $unit) continue;
$numberOfUnits = floor($time / $unit);
return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');
}
}
// Old
public static function set_locale($string)
{
if(setlocale(LC_ALL,$string.'.UTF-8')!==false)
return true;
if(setlocale(LC_ALL,$string.'.UTF8')!==false)
return true;
return setlocale(LC_ALL,$string);
}
public static function set_timezone($string)
{
return(date_default_timezone_set($string));
}
// Return array('Africa/Abidjan'=>'Africa/Abidjan (GMT+0)', ..., 'Pacific/Wallis'=>'Pacific/Wallis (GMT+12)');
// PHP supported list. http://php.net/manual/en/timezones.php
public static function get_timezones()
{
$tmp = array();
$timezone_identifiers_list = timezone_identifiers_list();
foreach($timezone_identifiers_list as $timezone_identifier)
{
$date_time_zone = new DateTimeZone($timezone_identifier);
$date_time = new DateTime('now', $date_time_zone);
$hours = floor($date_time_zone->getOffset($date_time) / 3600);
$mins = floor(($date_time_zone->getOffset($date_time) - ($hours*3600)) / 60);
$hours = 'GMT' . ($hours < 0 ? $hours : '+'.$hours);
$mins = ($mins > 0 ? $mins : '0'.$mins);
$text = str_replace("_"," ",$timezone_identifier);
$tmp[$timezone_identifier]=$text.' ('.$hours.':'.$mins.')';
}
return($tmp);
}
// Format a GMT/UTC+0 date/time
public static function format_gmt($time, $format)
{
$date = gmdate($format, $time);
return( $date );
}
public static function atom($time)
{
$date = date(DATE_ATOM, $time);
return( $date );
}
}
?>

View File

@ -0,0 +1,38 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Email {
public static function send($args)
{
$headers = 'MIME-Version: 1.0'."\r\n";
$headers .= 'Content-type: text/html; charset=utf-8'."\r\n";
$headers .= 'To: '.$args['to']."\r\n";
$headers .= 'From: '.$args['from']."\r\n";
$message = '<html>
<head>
<title>Nibbleblog</title>
</head>
<body>
<div style="margin: 0px auto; border: 1px solid #F1F1F1; padding: 10px;">
<div style="font-size: 26px; padding: 10px; background-color: #F1F1F1;">Nibbleblog</div>
'.$args['message'].'
</div>
</body>
</html>';
return mail($args['to'], $args['subject'], $message, $headers);
}
}
?>

View File

@ -0,0 +1,59 @@
<?php
class helperFilesystem {
// NEW
public static function listDirectories($path, $regex='*')
{
return glob($path.$regex, GLOB_ONLYDIR);
}
// OLD
public static function get_images($regex)
{
return self::ls(PATH_UPLOAD, $regex, '*', false, false, false);
}
// Devuelve un arreglo con el listado de archivos
// $path con una barra al final, ej: /home/
// $file_expression : *.0.*.*.*.*.*.*.*.*
// $ext : xml
// $flag_dir : si quiero listar directorios
// $sort_asc_numeric : ordeno ascedente numerico
// $sort_desc_numeric : ordeno descendente numerico
public static function ls($path, $file_expression = NULL, $ext, $flag_dir = false, $sort_asc_numeric = false, $sort_desc_numeric = true)
{
if($flag_dir)
{
$files = glob($path . $file_expression, GLOB_ONLYDIR);
}
else
{
$files = glob($path . $file_expression . '.' . $ext);
}
if( ($files==false) || (empty($files)) )
{
$files = array();
}
foreach($files as $key=>$file)
{
$files[$key] = basename($file);
}
// Sort
if($sort_asc_numeric)
{
sort($files, SORT_NUMERIC);
}
elseif($sort_desc_numeric)
{
rsort($files, SORT_NUMERIC);
}
return $files;
}
}
?>

View File

@ -0,0 +1,251 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Html {
private static function get_attributes($array = array())
{
unset($array['content']);
$attributes = '';
if(isset($array['hidden']) && $array['hidden'])
{
$attributes .= 'style="display:none" ';
}
unset($array['hidden']);
foreach( $array as $key=>$value )
{
$attributes .= $key.'="'.$value.'" ';
}
return($attributes);
}
public static function h1($array = array())
{
$attributes = self::get_attributes($array);
return( '<h1 '.$attributes.'>'.$array['content'].'</h1>' );
}
public static function h2($array = array())
{
$attributes = self::get_attributes($array);
return( '<h2 '.$attributes.'>'.$array['content'].'</h2>' );
}
public static function h3($array = array())
{
$attributes = self::get_attributes($array);
return( '<h3 '.$attributes.'>'.$array['content'].'</h3>' );
}
public static function h4($array = array())
{
$attributes = self::get_attributes($array);
return( '<h4 '.$attributes.'>'.$array['content'].'</h4>' );
}
public static function blockquote($array = array())
{
$attributes = self::get_attributes($array);
return( '<blockquote '.$attributes.'>'.$array['content'].'</blockquote>' );
}
public static function p($array = array())
{
$attributes = self::get_attributes($array);
return( '<p '.$attributes.'>'.$array['content'].'</p>' );
}
public static function separator($array = array(), $top=false, $hidden=false)
{
if(isset($array['class']))
{
$array['class'] = 'separator '.$array['class'];
}
else
{
$array['class'] = 'separator';
}
if($hidden)
$hidden = 'style="display:none"';
else
$hidden = '';
$attributes = self::get_attributes($array);
return( '<header '.$hidden.' class="'.($top?'separator_top':'separator').'"><div '.$attributes.'>'.$array['content'].'</div></header>' );
}
public static function form_open($array = array())
{
$attributes = self::get_attributes($array);
return( '<form '.$attributes.' >' );
}
public static function form_close()
{
return( '</form>' );
}
public static function input($array = array())
{
$attributes = self::get_attributes($array);
return( '<input '.$attributes.'/>' );
}
public static function checkbox($array = array(), $checked = false)
{
$attributes = self::get_attributes($array);
if( $checked )
return( '<input type="checkbox" '.$attributes.' checked="checked" value="1" />' );
else
return( '<input type="checkbox" '.$attributes.' value="1"/>' );
}
public static function radio($array = array(), $checked = false)
{
$attributes = self::get_attributes($array);
if( $checked )
return( '<input type="radio" '.$attributes.' checked="checked" />' );
else
return( '<input type="radio" '.$attributes.'/>' );
}
public static function textarea($array = array())
{
$attributes = self::get_attributes($array);
return( '<textarea '.$attributes.'>'.$array['content'].'</textarea>' );
}
public static function label($array = array())
{
$attributes = self::get_attributes($array);
return( '<label '.$attributes.'>'.$array['content'].'</label>' );
}
public static function select($array = array(), $options = array(), $selected)
{
$attributes = self::get_attributes($array);
$tmp = '<select '.$attributes.'>';
foreach( $options as $key=>$value )
{
if( $key == $selected)
$attr = 'selected="selected"';
else
$attr = '';
$tmp .= '<option value="'.$key.'" '.$attr.'>'.$value.'</option>';
}
$tmp .= '</select>';
return( $tmp );
}
public static function div($array = array())
{
$attributes = self::get_attributes($array);
return( '<div '.$attributes.'>'.$array['content'].'</div>' );
}
public static function div_open($array = array())
{
$attributes = self::get_attributes($array);
return( '<div '.$attributes.'>' );
}
public static function div_close()
{
return( '</div>' );
}
public static function article_open($array = array())
{
$attributes = self::get_attributes($array);
return( '<article '.$attributes.'>' );
}
public static function article_close()
{
return( '</article>' );
}
public static function header_open($array = array())
{
$attributes = self::get_attributes($array);
return( '<header '.$attributes.'>' );
}
public static function header_close()
{
return( '</header>' );
}
public static function link($array = array())
{
$attributes = self::get_attributes($array);
return( '<a '.$attributes.'>'.$array['content'].'</a>' );
}
public static function span($array = array())
{
$attributes = self::get_attributes($array);
return( '<span '.$attributes.'>'.$array['content'].'</span>' );
}
public static function img($array = array())
{
$attributes = self::get_attributes($array);
return( '<img '.$attributes.'/>' );
}
public static function ul($array = array())
{
$attributes = self::get_attributes($array);
return( '<ul '.$attributes.'>'.$array['content'].'</ul>' );
}
public static function banner($msg, $success, $error)
{
if( $success )
return('<div class="notification_success">'.$msg.'</div>');
elseif( $error )
return('<div class="notification_error">'.$msg.'</div>');
}
}
?>

View File

@ -0,0 +1,35 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Image {
/**
* Get either a Gravatar URL or complete image tag for a specified email address.
*
* @param string $email The email address
* @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ]
* @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]
* @param string $r Maximum rating (inclusive) [ g | pg | r | x ]
* @return String containing either just a URL
* @source http://gravatar.com/site/implement/images/php/
*/
public static function get_gravatar($email, $s = 80, $d = 'mm', $r = 'g')
{
$url = 'http://www.gravatar.com/avatar/';
$url .= md5( strtolower( trim( $email ) ) );
$url .= "?s=$s&d=$d&r=$r";
return $url;
}
}
?>

View File

@ -0,0 +1,45 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Language {
private $lang = array();
public function get($key)
{
$key = strtoupper($key);
$key = str_replace(' ','_',$key);
if(isset($this->lang[$key]))
return $this->lang[$key];
return '';
}
public function set($array)
{
// Set an array with all keys from array uppercased
$this->lang = array_change_key_case($array, CASE_UPPER);
return true;
}
public function add($array)
{
$this->lang = array_merge($this->lang, $array);
return true;
}
}
?>

View File

@ -0,0 +1,58 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Net {
public static function get_user_ip()
{
if(getenv('HTTP_X_FORWARDED_FOR'))
$ip = getenv('HTTP_X_FORWARDED_FOR');
elseif(getenv('HTTP_CLIENT_IP'))
$ip = getenv('HTTP_CLIENT_IP');
else
$ip = getenv('REMOTE_ADDR');
if(filter_var($ip, FILTER_VALIDATE_IP))
return $ip;
return getenv('REMOTE_ADDR');
}
public static function get_user_agent()
{
return getenv('HTTP_USER_AGENT');
}
public static function check_http_code($url, $code)
{
if(in_array('curl', get_loaded_extensions()))
{
$curl = curl_init();
curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER=>true, CURLOPT_URL=>$url));
curl_exec($curl);
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close( $curl );
return($http_code==$code);
}
// If curl is not installed, use get_headers
$headers = get_headers($url);
if(strpos($headers[0], (string)$code) == false)
return false;
return true;
}
}
?>

View File

@ -0,0 +1,20 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Number {
public static function random_number($min, $max)
{
return( rand($min, $max) );
}
}
?>

View File

@ -0,0 +1,57 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Page {
public static function title()
{
global $page;
return $page['title'];
}
public static function permalink($absolute=false)
{
global $page;
return helperUrl::page($page,$absolute);
}
public static function published($format=false)
{
global $page;
global $settings;
$format = $format===false?$settings['timestamp_format']:$format;
return Date::format($page['pub_date_unix'], $format);
}
public static function modified($format=false)
{
global $page;
global $settings;
$format = $format===false?$settings['timestamp_format']:$format;
return Date::format($page['mod_date_unix'], $format);
}
public static function content()
{
global $page;
return $page['content'];
}
}
?>

View File

@ -0,0 +1,107 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Pager {
public static function href_newer()
{
global $pager;
return $pager['href_newer'];
}
public static function href_older()
{
global $pager;
return $pager['href_older'];
}
public static function num_posts()
{
global $pager;
return $pager['num_posts'];
}
public static function num_pages()
{
global $pager;
return $pager['num_pages'];
}
public static function current()
{
global $pager;
return $pager['current'];
}
public static function next()
{
global $pager;
return $pager['next'];
}
public static function prev()
{
global $pager;
return $pager['prev'];
}
public static function next_link($text=NULL)
{
global $pager;
global $Language;
if(!$pager['show_newer'])
return false;
$text = isset($text)?$text:$Language->get('NEWER_POSTS').' →';
$html = '<a class="next-page" href="'.$pager['href_newer'].'">'.$text.'</a>';
return $html;
}
public static function prev_link($text=NULL)
{
global $pager;
global $Language;
if(!$pager['show_older'])
return false;
$text = isset($text)?$text:'← '.$Language->get('OLDER_POSTS');
$html = '<a class="prev-page" href="'.$pager['href_older'].'">'.$text.'</a>';
return $html;
}
public static function home_link($text=NULL)
{
global $pager;
global $Language;
$text = isset($text)?$text:$Language->get('HOME');
$html = '<a class="home-page" href="'.HTML_PATH_ROOT.'">'.$text.'</a>';
return $html;
}
}
?>

View File

@ -0,0 +1,23 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Plugin {
public static function title()
{
global $page;
return $page['title'];
}
}
?>

View File

@ -0,0 +1,243 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Post {
public static function title()
{
global $post;
return $post['title'];
}
public static function description()
{
global $post;
return $post['description'];
}
public static function comments()
{
global $post;
global $_DB_COMMENTS;
$comments = $_DB_COMMENTS->get_list_by_post( array('id_post'=>$post['id']) );
return $comments;
}
public static function num_comments()
{
global $post;
return count($post['comments']);
}
public static function category($field=false)
{
global $post;
global $_DB_CATEGORIES;
$category = $_DB_CATEGORIES->get( array('id'=>$post['id_cat']) );
if($field=='id')
return $category['id'];
if($field=='slug')
return $category['slug'];
if($field=='permalink')
return helperUrl::category($category['slug']);
return $category['name'];
}
public static function read_more()
{
global $post;
return $post['read_more'];
}
public static function allow_comments()
{
global $post;
return $post['allow_comments'];
}
public static function permalink($absolute=false)
{
global $post;
return helperUrl::post($post,$absolute);
}
public static function tags($return2array=false)
{
global $post;
global $_DB_TAGS;
$tags = $_DB_TAGS->get_by_idpost( array('id_post'=>$post['id']) );
if($return2array)
return $tags;
$html = '<ul>';
foreach($tags as $tag)
$html .= '<li><a class="tag" href="'.helperUrl::tag($tag['name']).'">'.$tag['name_human'].'</a></li>';
$html .= '</ul>';
return $html;
}
public static function comment_count_link()
{
global $post;
global $theme;
global $Language;
global $Comment;
if(!$post['allow_comments'])
return false;
if( $Comment->disqus_enabled() )
{
$url = helperUrl::post($post, true);
return '<a href="'.$url.'#disqus_thread">'.$Language->get('COMMENTS').'</a>';
}
elseif( $Comment->facebook_enabled() )
{
$url = helperUrl::post($post, true);
return '<a href="'.$post['permalink'].'#comment_form">'.$Language->get('COMMENTS').' (<fb:comments-count href="'.$url.'"></fb:comments-count>)</a>';
}
else
{
return '<a href="'.$post['permalink'].'#comment_form">'.$Language->get('COMMENTS').' ('.count($post['comments']).')</a>';
}
}
// DEPRECATED
// Last version available 4.0.3
public static function tweet_link()
{
global $post;
$url = helperUrl::post($post, true);
return 'https://twitter.com/share?url='.urlencode($url);
}
public static function twitter($text=false)
{
global $post;
$text = $text===false?'':$text;
$url = helperUrl::post($post, true);
return 'http://twitter.com/home?status='.urlencode($text.' '.$url);
}
public static function facebook($text=false)
{
global $post;
$text = $text===false?'':$text;
$url = helperUrl::post($post, true);
return 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($text.' '.$url);
}
public static function linkedin($title=false, $text=false)
{
global $post;
$title = $title===false?'':$title;
$text = $text===false?'':$text;
$url = helperUrl::post($post, true);
return 'http://www.linkedin.com/shareArticle?mini=true&url='.urlencode($url).'&title='.urlencode($title).'&summary='.urlencode($text);
}
public static function googleplus($text=false)
{
global $post;
$text = $text===false?'':$text;
$url = helperUrl::post($post, true);
return 'https://plus.google.com/share?url='.urlencode($text.' '.$url);
}
public static function mailto($text=false)
{
global $post;
$text = $text===false?'':$text;
$url = helperUrl::post($post, true);
return 'mailto:?subject='.rawurlencode(Blog::name().' - '.$text).'&amp;body='.urlencode($url);
}
public static function published($format=false)
{
global $post;
global $settings;
$format = $format===false?$settings['timestamp_format']:$format;
return Date::format($post['pub_date_unix'], $format);
}
public static function modified($format=false)
{
global $post;
global $settings;
$format = $format===false?$settings['timestamp_format']:$format;
return Date::format($post['mod_date_unix'], $format);
}
public static function content($full=false)
{
global $post;
global $theme;
if($post['type']=='quote')
{
$html = '<blockquote>'.$post['quote'].'</blockquote>';
}
elseif($post['type']=='video')
{
$video_width = !isset($theme['video_width'])?640:$theme['video_width'];
$video_height = !isset($theme['video_height'])?320:$theme['video_height'];
$video_info = Video::video_get_info($post['video'], $video_width, $video_height);
$html = '<div class="video-embed">';
$html .= $video_info['embed'];
$html .= '</div>';
}
else
{
if($full)
$html = $post['content'][0];
else
$html = $post['content'][1];
}
return $html;
}
}
?>

View File

@ -0,0 +1,38 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Redirect {
public static function url($html_location)
{
if(!headers_sent())
{
header("Location:".$html_location, TRUE, 302);
exit;
}
exit('<meta http-equiv="refresh" content="0; url='.$html_location.'" />');
}
public static function controller($base, $controller, $action, $parameters = array())
{
$url = '';
foreach( $parameters as $key=>$value )
{
$url .= '&'.$key.'='.$value;
}
self::url(HTML_PATH_ROOT.$base.'.php?controller='.$controller.'&action='.$action.$url);
}
}
?>

View File

@ -0,0 +1,244 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Resize {
// *** Class variables
private $image;
private $width;
private $height;
private $imageResized;
public function setImage($fileName, $newWidth, $newHeight, $option="auto")
{
// *** Open up the file
$this->image = $this->openImage($fileName);
// *** Get width and height
$this->width = imagesx($this->image);
$this->height = imagesy($this->image);
$this->resizeImage($newWidth, $newHeight, $option);
}
public function saveImage($savePath, $imageQuality="100", $force_jpg=false)
{
$extension = strtolower(pathinfo($savePath, PATHINFO_EXTENSION));
// Remove the extension
$filename = substr($savePath, 0,strrpos($savePath,'.'));
$path_complete = $filename.'.'.$extension;
if($force_jpg)
{
imagejpeg($this->imageResized, $filename.'.jpg', $imageQuality);
}
else
{
switch($extension)
{
case 'jpg':
case 'jpeg':
if (imagetypes() & IMG_JPG) {
imagejpeg($this->imageResized, $path_complete, $imageQuality);
}
break;
case 'gif':
if (imagetypes() & IMG_GIF) {
imagegif($this->imageResized, $path_complete);
}
break;
case 'png':
// *** Scale quality from 0-100 to 0-9
$scaleQuality = round(($imageQuality/100) * 9);
// *** Invert quality setting as 0 is best, not 9
$invertScaleQuality = 9 - $scaleQuality;
if (imagetypes() & IMG_PNG) {
imagepng($this->imageResized, $path_complete, $invertScaleQuality);
}
break;
default:
// *** No extension - No save.
break;
}
}
imagedestroy($this->imageResized);
}
private function openImage($file)
{
// *** Get extension
$extension = strtolower(strrchr($file, '.'));
switch($extension)
{
case '.jpg':
case '.jpeg':
$img = imagecreatefromjpeg($file);
break;
case '.gif':
$img = imagecreatefromgif($file);
break;
case '.png':
$img = imagecreatefrompng($file);
break;
default:
$img = false;
break;
}
return $img;
}
private function resizeImage($newWidth, $newHeight, $option)
{
// *** Get optimal width and height - based on $option
$optionArray = $this->getDimensions($newWidth, $newHeight, $option);
$optimalWidth = $optionArray['optimalWidth'];
$optimalHeight = $optionArray['optimalHeight'];
// *** Resample - create image canvas of x, y size
$this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight);
imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height);
// *** if option is 'crop', then crop too
if ($option == 'crop') {
$this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight);
}
}
private function getDimensions($newWidth, $newHeight, $option)
{
if( ($this->width < $newWidth) and ($this->height < $newHeight) )
{
return array('optimalWidth' => $this->width, 'optimalHeight' => $this->height);
}
switch ($option)
{
case 'exact':
$optimalWidth = $newWidth;
$optimalHeight= $newHeight;
break;
case 'portrait':
$optimalWidth = $this->getSizeByFixedHeight($newHeight);
$optimalHeight= $newHeight;
break;
case 'landscape':
$optimalWidth = $newWidth;
$optimalHeight= $this->getSizeByFixedWidth($newWidth);
break;
case 'auto':
$optionArray = $this->getSizeByAuto($newWidth, $newHeight);
$optimalWidth = $optionArray['optimalWidth'];
$optimalHeight = $optionArray['optimalHeight'];
break;
case 'crop':
$optionArray = $this->getOptimalCrop($newWidth, $newHeight);
$optimalWidth = $optionArray['optimalWidth'];
$optimalHeight = $optionArray['optimalHeight'];
break;
}
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
}
private function getSizeByFixedHeight($newHeight)
{
$ratio = $this->width / $this->height;
$newWidth = $newHeight * $ratio;
return $newWidth;
}
private function getSizeByFixedWidth($newWidth)
{
$ratio = $this->height / $this->width;
$newHeight = $newWidth * $ratio;
return $newHeight;
}
private function getSizeByAuto($newWidth, $newHeight)
{
if ($this->height < $this->width)
// *** Image to be resized is wider (landscape)
{
$optimalWidth = $newWidth;
$optimalHeight= $this->getSizeByFixedWidth($newWidth);
}
elseif ($this->height > $this->width)
// *** Image to be resized is taller (portrait)
{
$optimalWidth = $this->getSizeByFixedHeight($newHeight);
$optimalHeight= $newHeight;
}
else
// *** Image to be resizerd is a square
{
if ($newHeight < $newWidth) {
$optimalWidth = $newWidth;
$optimalHeight= $this->getSizeByFixedWidth($newWidth);
} else if ($newHeight > $newWidth) {
$optimalWidth = $this->getSizeByFixedHeight($newHeight);
$optimalHeight= $newHeight;
} else {
// *** Sqaure being resized to a square
$optimalWidth = $newWidth;
$optimalHeight= $newHeight;
}
}
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
}
private function getOptimalCrop($newWidth, $newHeight)
{
$heightRatio = $this->height / $newHeight;
$widthRatio = $this->width / $newWidth;
if ($heightRatio < $widthRatio) {
$optimalRatio = $heightRatio;
} else {
$optimalRatio = $widthRatio;
}
$optimalHeight = $this->height / $optimalRatio;
$optimalWidth = $this->width / $optimalRatio;
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
}
private function crop($optimalWidth, $optimalHeight, $newWidth, $newHeight)
{
// *** Find center - this will be used for the crop
$cropStartX = ( $optimalWidth / 2) - ( $newWidth /2 );
$cropStartY = ( $optimalHeight/ 2) - ( $newHeight/2 );
$crop = $this->imageResized;
//imagedestroy($this->imageResized);
// *** Now crop from center to exact requested size
$this->imageResized = imagecreatetruecolor($newWidth , $newHeight);
imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight);
}
}
?>

View File

@ -0,0 +1,125 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Session {
public static function init()
{
$_SESSION['nibbleblog'] = array(
'error'=>false,
'alert'=>'',
'last_comment_at'=>0,
'last_session_at'=>0,
'fail_session'=>0
);
}
public static function get($name)
{
if(isset($_SESSION['nibbleblog'][$name]))
return $_SESSION['nibbleblog'][$name];
else
return false;
}
public static function set($key, $value)
{
$_SESSION['nibbleblog'][$key] = $value;
}
public static function get_error()
{
if(isset($_SESSION['nibbleblog']['error']))
{
return($_SESSION['nibbleblog']['error']);
}
return false;
}
public static function get_last_comment_at()
{
if(isset($_SESSION['nibbleblog']['last_comment_at']))
{
return($_SESSION['nibbleblog']['last_comment_at']);
}
return false;
}
public static function get_last_session_at()
{
if(isset($_SESSION['nibbleblog']['last_session_at']))
{
return($_SESSION['nibbleblog']['last_session_at']);
}
return false;
}
public static function get_fail_session()
{
if(isset($_SESSION['nibbleblog']['fail_session']))
{
return($_SESSION['nibbleblog']['fail_session']);
}
return false;
}
public static function get_comment($field)
{
if(isset($_SESSION['nibbleblog']['comment'][$field]))
return $_SESSION['nibbleblog']['comment'][$field];
return false;
}
public static function set_comment($field, $data)
{
$_SESSION['nibbleblog']['comment'][$field] = $data;
}
public static function get_alert()
{
self::set_error(false);
return($_SESSION['nibbleblog']['alert']);
}
public static function set_error($boolean = true)
{
$_SESSION['nibbleblog']['error'] = $boolean;
}
public static function set_last_comment_at($time)
{
$_SESSION['nibbleblog']['last_comment_at'] = $time;
}
public static function set_last_session_at($time)
{
$_SESSION['nibbleblog']['last_session_at'] = $time;
}
public static function set_fail_session($amount)
{
$_SESSION['nibbleblog']['fail_session'] = $amount;
}
public static function set_alert($text = '')
{
self::set_error(true);
$_SESSION['nibbleblog']['alert'] = $text;
}
}
?>

View File

@ -0,0 +1,19 @@
<?php
class Site
{
private static $content;
public static function init()
{
self::$content = '';
}
public static function content()
{
return self::$content;
}
}
?>

View File

@ -0,0 +1,42 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Social {
public static function twitter_share($args = array())
{
// HTML Code
$code = '<a href="https://twitter.com/share" class="twitter-share-button" data-url="'.$args['url'].'" data-text="'.$args['text'].'">Tweet</a>';
$code .= '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
return $code;
}
public static function facebook_share($args = array())
{
// HTML Code
$code = '<fb:share-button type="button" href="'.$args['url'].'" />';
$code .= '<script type="text/javascript" src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"></script>';
return $code;
}
public static function facebook_like($args = array())
{
// HTML Code
$code = '<iframe src="https://www.facebook.com/plugins/like.php?href='.$args['url'].'&amp;layout=button_count" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;"></iframe>';
return $code;
}
}
?>

View File

@ -0,0 +1,204 @@
<?php
class helperText {
// New
// Replace all occurrences of the search string with the replacement string.
public static function replace($search, $replace, $string)
{
return str_replace($search,$replace,$string);
}
// String to lowercase
public static function lowercase($string)
{
if(MB_STRING)
return mb_strtolower($string, 'UTF-8');
return strtolower($string);
}
// Find position of first occurrence of substring in a string
public static function strpos($string, $substring)
{
if(MB_STRING)
return mb_strpos($string, $substring, 0, 'UTF-8');
return strpos($string, $substring);
}
// Return part of string
public static function cut($string, $start, $end)
{
if(MB_STRING)
return mb_substr($string, $start, $end, 'UTF-8');
return substr($string, $start, $end);
}
// Return string length
public static function length($string)
{
if(MB_STRING)
return mb_strlen($string, 'UTF-8');
return strlen($string);
}
// Old
public static function unserialize($string)
{
parse_str($string, $data);
// Clean magic quotes if this enabled
if(get_magic_quotes_gpc())
{
$data = self::clean_magic_quotes($data);
}
return($data);
}
public static function ajax_header($tmp)
{
$xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
$xml .= '<ajax>';
$xml .= $tmp;
$xml .= '</ajax>';
return( $xml );
}
// Clean magic quotes
public static function clean_magic_quotes($args)
{
$tmp_array = array();
foreach($args as $key => $arg)
{
$tmp_array[$key] = stripslashes($arg);
}
return($tmp_array);
}
public static function cut_text($text, $maxlength)
{
return( substr($text,0,strrpos(substr($text,0,$maxlength)," ")) );
}
public static function cut_words($text, $count)
{
$explode = explode(" ", $text);
if(count($explode) > $count)
{
array_splice($explode, $count);
$text = implode(' ', $explode);
}
return($text);
}
// Strip spaces
// Strip spaces
public static function strip_spaces($string)
{
return( str_replace(' ','',$string) );
}
// Strip quotes ' and "
public static function strip_quotes($text)
{
$text = str_replace('\'', '', $text);
$text = str_replace('"', '', $text);
return( $text );
}
function clean_non_alphanumeric($string)
{
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
return $string;
}
// RETURN
// TRUE - si contiene el substring
// FALSE - caso contrario
public static function is_substring($string, $substring)
{
return( strpos($string, $substring) !== false );
}
// RETURN
// TRUE - is not empty
// FALSE - is empty
public static function not_empty($string)
{
return( !self::is_empty($string) );
}
public static function is_empty($string)
{
$string = self::strip_spaces($string);
return( empty($string) );
}
// Compara 2 cadenas
// Retorna TRUE si son iguales, FALSE caso contrario
public static function compare($value1, $value2)
{
return( strcmp($value1, $value2) == 0 );
}
// Clean text for URL
public static function clean_url($text, $spaces='-', $translit=false)
{
// Delete characters
$text = str_replace(array("", "", "!", "*", "&#039;", "&quot;", "(", ")", ";", ":", "@", "&amp", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]", "|"),'',$text);
$text = preg_replace('![^\\pL\d]+!u', '-', $text);
// Translit
if($translit!=false)
{
$text = str_replace(array_keys($translit),array_values($translit),$text);
}
if (function_exists('iconv'))
{
$ret = iconv('utf-8', 'us-ascii//TRANSLIT//IGNORE', $text);
if ($ret!==false){ //iconv might return false on error
$text = $ret;
}
}
// Replace spaces by $spaces
$text = str_replace(' ',$spaces,$text);
//remove any additional characters that might appear after translit
$text = preg_replace('![^-\w]+!', '', $text);
// Replace multiple dashes
$text = preg_replace('/-{2,}/', '-', $text);
// Make a string lowercase
$text = self::str2lower($text);
return $text;
}
public static function random_text($length)
{
$characteres = "1234567890abcdefghijklmnopqrstuvwxyz!@#%^&*";
$text = '';
for($i=0; $i<$length; $i++)
{
$text .= $characteres{rand(0,41)};
}
return $text;
}
public static function replace_assoc(array $replace, $text)
{
return str_replace(array_keys($replace), array_values($replace), $text);
}
}

View File

@ -0,0 +1,146 @@
<?php
class Theme {
public static function plugins($type)
{
global $plugins;
foreach($plugins[$type] as $plugin)
{
echo call_user_func(array($plugin, $type));
}
}
// OLD
public static function url($relative = true)
{
if($relative)
return HTML_PATH_ROOT;
else
return BLOG_URL;
}
public static function css($files, $path=HTML_THEME_CSS)
{
if(!is_array($files))
$files = array($files);
$tmp = '';
foreach($files as $file)
$tmp .= '<link rel="stylesheet" type="text/css" href="'.$path.$file.'">'.PHP_EOL;
return $tmp;
}
public static function javascript($files, $path=HTML_THEME_JS)
{
if(!is_array($files))
$files = array($files);
$tmp = '';
foreach($files as $file)
$tmp .= '<script src="'.$path.$file.'"></script>'.PHP_EOL;
return $tmp;
}
public static function jquery($path=JS_JQUERY)
{
$tmp = '<script src="'.$path.'"></script>'.PHP_EOL;
return $tmp;
}
public static function favicon()
{
return '<link rel="shortcut icon" href="'.HTML_THEME_CSS.'img/favicon.ico" type="image/x-icon">'.PHP_EOL;
}
public static function name()
{
global $settings;
return $settings['name'];
}
public static function slogan()
{
global $settings;
return $settings['slogan'];
}
public static function footer()
{
global $settings;
return $settings['footer'];
}
public static function language()
{
global $settings;
$lang = explode("_",$settings['locale']);
return $lang[0];
}
public static function locale()
{
global $settings;
return $settings['locale'];
}
public static function meta_tags()
{
global $layout;
global $seo;
// The validator W3C doesn't support???
//$meta = '<meta charset="UTF-8">'.PHP_EOL;
$meta = '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'.PHP_EOL;
if(!empty($layout['title']))
$meta .= '<title>'.$layout['title'].'</title>'.PHP_EOL;
if(!empty($layout['description']))
$meta .= '<meta name="description" content="'.$layout['description'].'">'.PHP_EOL;
if(!empty($layout['generator']))
$meta .= '<meta name="generator" content="'.$layout['generator'].'">'.PHP_EOL;
if(!empty($layout['keywords']))
$meta .= '<meta name="keywords" content="'.$layout['keywords'].'">'.PHP_EOL;
if(!empty($layout['author']))
{
if(filter_var($layout['author'], FILTER_VALIDATE_URL))
$meta .= '<link rel="author" href="'.$layout['author'].'">'.PHP_EOL;
else
$meta .= '<meta name="author" content="'.$layout['author'].'">'.PHP_EOL;
}
if(!empty($layout['canonical']))
$meta .= '<link rel="canonical" href="'.$layout['canonical'].'">'.PHP_EOL;
if(!empty($layout['robots']))
$meta .= '<meta name="robots" content="'.$layout['robots'].'">'.PHP_EOL;
if(!empty($seo['google_code']))
$meta .= '<meta name="google-site-verification" content="'.$seo['google_code'].'">'.PHP_EOL;
if(!empty($seo['bing_code']))
$meta .= '<meta name="msvalidate.01" content="'.$seo['bing_code'].'">'.PHP_EOL;
$meta .= '<link rel="alternate" type="application/atom+xml" title="ATOM Feed" href="'.$layout['feed'].'">'.PHP_EOL;
return $meta;
}
}
?>

View File

@ -0,0 +1,140 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class helperUrl
{
private static $uri;
private static $uri_strlen;
private static $whereAmI;
private static $slug;
private static $filters; // Filters for the URI
private static $notFound;
// Filters may be changed for different languages
// Ex (Spanish): Array('post'=>'/publicacion/', 'tag'=>'/etiqueta/', ....)
// Ex (English): Array('post'=>'/post/', 'tag'=>'/tag/', ....)
public static function init($filters)
{
// Decodes any %## encoding in the given string. Plus symbols ('+') are decoded to a space character.
self::$uri = urldecode($_SERVER['REQUEST_URI']);
// URI Lowercase
//self::$uri = helperText::lowercase(self::$uri);
self::$uri_strlen = helperText::length(self::$uri);
self::$whereAmI = 'home';
self::$notFound = false;
self::$slug = false;
self::$filters = $filters;
// Check if filtering by post
// Primero verifico que no haya ningun slug filtrado, asi no lo piso.
if(self::$slug===false)
self::is_post($filters['post']);
// Check if filtering by tag
// Primero verifico que no haya ningun slug filtrado, asi no lo piso.
if(self::$slug===false)
self::is_tag($filters['tag']);
// Check if filtering by page
// Primero verifico que no haya ningun slug filtrado, asi no lo piso.
if(self::$slug===false)
self::is_page($filters['page']);
}
public static function slug()
{
return self::$slug;
}
public static function uri()
{
return self::$uri;
}
// Return the filter used
public static function filters($type)
{
return self::$filters[$type];
}
// Return: home, tag, post
public static function whereAmI()
{
return self::$whereAmI;
}
public static function setWhereAmI($where)
{
self::$whereAmI = $where;
}
public static function notFound()
{
return self::$notFound;
}
public static function setNotFound($error = true)
{
self::$whereAmI = 'page';
self::$notFound = $error;
}
public static function is_tag($filter)
{
if(self::filter_slug($filter)===false)
return false;
self::$whereAmI = 'tag';
return true;
}
public static function is_post($filter)
{
if(self::filter_slug($filter)===false)
return false;
self::$whereAmI = 'post';
return true;
}
public static function is_page($filter)
{
if(self::filter_slug($filter)===false)
return false;
self::$whereAmI = 'page';
return true;
}
// Return the slug after the $filter
// ex: http://domain.com/cms/$filter/slug123 => slug123
private static function filter_slug($filter)
{
$position = helperText::strpos(self::$uri, $filter);
if($position===false)
return false;
$start = $position + helperText::length($filter);
$end = self::$uri_strlen;
self::$slug = helperText::cut(self::$uri, $start, $end);
if(empty(self::$slug))
return false;
return self::$slug;
}
}
?>

View File

@ -0,0 +1,69 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Validation {
public static function ip($ip)
{
return filter_var($ip, FILTER_VALIDATE_IP);
}
public static function mail($mail)
{
return filter_var($mail, FILTER_VALIDATE_EMAIL);
}
public static function int($int)
{
if($int === 0)
return( true );
elseif (filter_var($int, FILTER_VALIDATE_INT) === false )
return( false );
else
return( true );
}
// Remove all characters except digits
public static function sanitize_float($value)
{
return( filter_var($value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND) );
}
// Valid an integer positive
public static function sanitize_int($value)
{
$value = (int)$value;
if($value>=0)
return $value;
else
return 0;
}
public static function sanitize_email($value)
{
return( filter_var($value, FILTER_SANITIZE_EMAIL) );
}
public static function sanitize_url($value)
{
return( filter_var($value, FILTER_SANITIZE_URL) );
}
// Convert all applicable characters to HTML entities incluye acentos
public static function sanitize_html($text)
{
return(htmlspecialchars($text, ENT_QUOTES, 'UTF-8'));
}
}
?>

View File

@ -0,0 +1,89 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Video {
// Get video info on array
// If the video does not exist or is invalid, returns false
public static function video_get_info($url, $width = 640, $height = 360)
{
if( helperText::is_substring($url, 'youtube.com') )
{
return( self::video_get_youtube($url, $width, $height) );
}
elseif( helperText::is_substring($url, 'vimeo.com') )
{
return( self::video_get_vimeo($url, $width, $height) );
}
return false;
}
private static function video_get_youtube($url, $width = 640, $height = 360)
{
// Youtube ID
preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $matches);
$video_id = $matches[1];
// Check if a valid url
if(!Net::check_http_code('http://gdata.youtube.com/feeds/api/videos/'.$video_id,200))
{
return(false);
}
// GET INFO
$xml = simplexml_load_file('http://gdata.youtube.com/feeds/api/videos/'.$video_id);
$media = $xml->children('http://search.yahoo.com/mrss/');
$info = array();
$info['id'] = $video_id;
$info['title'] = (string)$media->group->title;
$info['description'] = (string)$media->group->description;
$info['thumb'][0] = (string)$media->group->thumbnail[0]->attributes()->url;
$info['thumb'][1] = (string)$media->group->thumbnail[1]->attributes()->url;
$info['thumb'][2] = (string)$media->group->thumbnail[2]->attributes()->url;
$info['thumb'][3] = (string)$media->group->thumbnail[3]->attributes()->url;
$info['embed'] = '<iframe class="youtube_embed" width="'.$width.'" height="'.$height.'" src="http://www.youtube.com/embed/'.$video_id.'?rel=0" frameborder="0" allowfullscreen></iframe>';
return($info);
}
private static function video_get_vimeo($url, $width = 640, $height = 360)
{
preg_match('/vimeo\.com\/([0-9]{1,10})/', $url, $matches);
$video_id = $matches[1];
// Check if a valid url
if(!Net::check_http_code('http://vimeo.com/api/v2/video/'.$video_id.'.php',200))
{
return(false);
}
$hash = unserialize(file_get_contents('http://vimeo.com/api/v2/video/'.$video_id.'.php'));
$info = array();
$info['id'] = $video_id;
$info['title'] = $hash[0]['title'];
$info['description'] = $hash[0]['description'];
$info['thumb'][0] = $hash[0]['thumbnail_medium'];
$info['thumb'][1] = $hash[0]['thumbnail_small'];
$info['embed'] = '<iframe class="vimeo_embed" width="'.$width.'" height="'.$height.'" src="http://player.vimeo.com/video/'.$video_id.'" frameborder="0" allowFullScreen></iframe>';
return($info);
}
}
?>

36
kernel/language.class.php Normal file
View File

@ -0,0 +1,36 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class Language extends DB_SERIALIZE
{
public $en_EN;
function __construct($language)
{
parent::__construct(PATH_LANGUAGES.'en_EN.json', false);
$this->en_EN = $this->vars;
parent::__construct(PATH_LANGUAGES.$language.'.json', false);
}
// Return the translation, if the translation does'n exist then return the English translation.
public function get($text)
{
$key = helperText::lowercase($text);
$key = helperText::replace(' ', '-', $key);
if(isset($this->vars[$key]))
return $this->vars[$key];
// If the key is not translated then return the English translation.
return $this->en_EN[$key];
}
// Print the translation.
public function p($text)
{
echo $this->get($text);
}
}
?>

265
kernel/login.class.php Normal file
View File

@ -0,0 +1,265 @@
<?php
/*
* Nibbleblog -
* http://www.nibbleblog.com
* Author Diego Najar
* All Nibbleblog code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
class Login {
private $session_started;
private $db_users;
function Login($started, $db_users)
{
$this->session_started = $started;
$this->db_users = $db_users;
}
/*
* Set session variables
*
* Parameters
** id_user
** username
*/
public function set_login($args)
{
$_SESSION = array();
$_SESSION['session_login']['id'] = $args['id_user'];
$_SESSION['session_login']['username'] = $args['username'];
$_SESSION['session_login']['key'] = $this->get_key();
}
/*
* Check if the user is logged
*/
public function is_logged()
{
if($this->session_started)
{
if(isset($_SESSION['session_login']['id']) && isset($_SESSION['session_login']['key']))
{
if($_SESSION['session_login']['key']==$this->get_key())
{
return true;
}
}
}
return false;
}
/*
* Verify the username and password are correct
*
* Parameters
** username
** password
*/
public function verify_login($args)
{
// Check the file FILE_SHADOW=shadow.php
if(!file_exists(FILE_SHADOW))
return false;
require(FILE_SHADOW);
// Check empty username and password
if(!empty($args['username'])&&!empty($args['password']))
{
// Check username
if($args['username']==$_USER[0]['username'])
{
// Generate the password hash
$hash = sha1($args['password'].$_USER[0]['salt']);
// Check password
if($hash==$_USER[0]['password'])
{
$this->db_users->set(array('username'=>$args['username'], 'session_fail_count'=>0, 'session_date'=>time()));
$this->set_login(array('id_user'=>0, 'username'=>$args['username']));
return true;
}
}
}
// Set brute force
$this->db_users->set_blacklist();
// Increment the failed count and last failed session date
$user = $this->db_users->get(array('username'=>$args['username']));
$count = $user['session_fail_count'] + 1;
$this->db_users->set(array('username'=>$args['username'], 'session_fail_count'=>$count, 'session_date'=>time()));
return false;
}
/*
* Logout
*
*/
public function logout()
{
// Unset all of the session variables.
$_SESSION = array();
if(ini_get("session.use_cookies"))
{
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
}
session_destroy();
$this->session_started = false;
// Clean remember me
setcookie('nibbleblog_hash', '', time()-42000);
setcookie('nibbleblog_id', '', time()-42000);
}
/*
* Check remember me
*
*/
public function remember_me()
{
// Check the file FILE_SHADOW=shadow.php
if(!file_exists(FILE_SHADOW))
return false;
require(FILE_SHADOW);
// Check the file FILE_KEYS=keys.php
if(!file_exists(FILE_KEYS))
return false;
require(FILE_KEYS);
// Check cookies
if( !isset($_COOKIE['nibbleblog_hash']) || !isset($_COOKIE['nibbleblog_id']) )
return false;
// Sanitize cookies
$cookie_hash = Validation::sanitize_html($_COOKIE['nibbleblog_hash']);
$cookie_id = Validation::sanitize_int($_COOKIE['nibbleblog_id']);
// Check user id
if(!isset($_USER[$cookie_id]))
{
// Set brute force
$this->db_users->set_blacklist();
// Clean cookies
setcookie('nibbleblog_hash', '', time()-42000);
setcookie('nibbleblog_id', '', time()-42000);
return false;
}
// Generate tmp hash
$tmp_hash = sha1($_USER[$cookie_id]['username'].$this->get_key().$_KEYS[2]);
// Check hash
if($tmp_hash!=$cookie_hash)
{
// Set brute force
$this->db_users->set_blacklist();
// Clean cookies
setcookie('nibbleblog_hash', '', time()-42000);
setcookie('nibbleblog_id', '', time()-42000);
return false;
}
$this->set_login(array('id_user'=>$cookie_id, 'username'=>$_USER[$cookie_id]['username']));
return true;
}
/*
* Set remember me
*
*/
public function set_remember_me()
{
if(!$this->is_logged())
return false;
require(FILE_KEYS);
// Generate tmp hash
$tmp_hash = sha1($this->get_username().$this->get_key().$_KEYS[2]);
// Set cookies
setcookie('nibbleblog_hash', $tmp_hash, time()+(3600*24*15));
setcookie('nibbleblog_id', $this->get_user_id(), time()+(3600*24*15));
return true;
}
// =================================================================
// Methods for return the session parameters
// =================================================================
public function get_user_id()
{
if( isset($_SESSION['session_login']['id']) )
{
return($_SESSION['session_login']['id']);
}
else
{
return false;
}
}
public function get_username()
{
if( isset($_SESSION['session_login']['username']) )
{
return($_SESSION['session_login']['username']);
}
else
{
return false;
}
}
/*
========================================================================
PRIVATE METHODS
========================================================================
*/
/*
* Return a hash, with user agent and user IP
*/
private function get_key()
{
// User agent
$agent = getenv('HTTP_USER_AGENT');
if(empty($agent))
$agent = 'Nibbleblog/4.0 (Mr Nibbler Protocol)';
// User IP
if(getenv('HTTP_X_FORWARDED_FOR'))
$ip = getenv('HTTP_X_FORWARDED_FOR');
elseif(getenv('HTTP_CLIENT_IP'))
$ip = getenv('HTTP_CLIENT_IP');
else
$ip = getenv('REMOTE_ADDR');
// Hash
return sha1($agent.$ip);
}
} // END class LOGIN
?>

93
kernel/page.class.php Normal file
View File

@ -0,0 +1,93 @@
<?php
class Page extends Content
{
function __construct($slug)
{
$this->path = PATH_PAGES;
parent::__construct($slug);
}
// Returns the post title.
function title()
{
return $this->get_field('title');
}
// Returns the post content.
function content()
{
return $this->get_field('content');
}
// Returns the post date in unix timestamp format, UTC-0.
function unixstamp()
{
return $this->get_field('unixstamp');
}
// Returns the post date according to locale settings and format settings.
function date($format = false)
{
if($format!==false)
{
$unixstamp = $this->unixstamp();
return Date::format($unixstamp, $format);
}
return $this->get_field('date');
}
// Returns the time ago
function timeago()
{
return $this->get_field('timeago');
}
// Returns the page slug.
function slug()
{
return $this->get_field('slug');
}
// Returns TRUE if the page is published, FALSE otherwise.
function published()
{
return ($this->get_field('status')==='published');
}
// Returns the page permalink.
function permalink()
{
global $Url;
$filter = ltrim($Url->filters('page'), '/');
if($Url->filters('page')==HTML_PATH_ROOT)
return HTML_PATH_ROOT.$this->slug();
return HTML_PATH_ROOT.$filter.$this->slug();
}
function parent()
{
if(!empty($this->get_field('parent')))
return $this->get_field('parent');
return false;
}
function username()
{
return $this->get_field('username');
}
function author()
{
return $this->get_field('author');
}
}
?>

1528
kernel/parsedown.class.php Normal file

File diff suppressed because it is too large Load Diff

80
kernel/post.class.php Normal file
View File

@ -0,0 +1,80 @@
<?php
class Post extends Content
{
function __construct($slug)
{
$this->path = PATH_POSTS;
parent::__construct($slug);
}
// Return the post title
function title()
{
return $this->get_field('title');
}
// Return the post content
function content()
{
return $this->get_field('content');
}
function username()
{
return $this->get_field('username');
}
// Return TRUE if the post is published, FALSE otherwise.
function published()
{
return ($this->get_field('status')==='published');
}
function author()
{
return $this->get_field('author');
}
function unixstamp()
{
return $this->get_field('unixstamp');
}
function date($format = false)
{
if($format!==false)
{
$unixstamp = $this->unixstamp();
return Date::format($unixstamp, $format);
}
return $this->get_field('date');
}
function timeago()
{
return $this->get_field('timeago');
}
function slug()
{
return $this->get_field('slug');
}
function permalink()
{
global $Url;
$filter = ltrim($Url->filters('post'), '/');
if($Url->filters('post')==HTML_PATH_ROOT)
return HTML_PATH_ROOT.$this->slug();
return HTML_PATH_ROOT.$filter.$this->slug();
}
}
?>

96
kernel/site.class.php Normal file
View File

@ -0,0 +1,96 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class Site extends DB_SERIALIZE
{
function __construct()
{
parent::__construct(PATH_DATABASES.'site.php');
// Set timezone
$this->setTimezone( $this->timezone() );
// Set locale
$this->setLocale( $this->locale() );
}
// Returns an array with site configuration.
function get()
{
return $this->vars;
}
// Returns an array with the filters for the url.
public function urlFilters()
{
return $this->vars['urlFilters'];
}
// Returns the site title.
public function title()
{
return $this->vars['title'];
}
// Returns the site slogan.
public function slogan()
{
return $this->vars['slogan'];
}
// Returns the site theme name.
public function theme()
{
return $this->vars['theme'];
}
// Returns the footer text.
public function footer()
{
return $this->vars['footer'];
}
// Returns the timezone.
public function timezone()
{
return $this->vars['timezone'];
}
// Returns the current language.
public function language()
{
return $this->vars['language'];
}
// Returns the current locale.
public function locale()
{
return $this->vars['locale'];
}
// Returns the current homepage.
public function homepage()
{
return $this->vars['homepage'];
}
// Set the locale.
public function setLocale($locale)
{
if(setlocale(LC_ALL, $locale.'.UTF-8')!==false)
return true;
if(setlocale(LC_ALL, $locale.'.UTF8')!==false)
return true;
return setlocale(LC_ALL, $locale);
}
// Set the timezone.
public function setTimezone($timezone)
{
return date_default_timezone_set($timezone);
}
}
?>

140
kernel/url.class.php Normal file
View File

@ -0,0 +1,140 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class Url
{
private $uri;
private $uri_strlen;
private $whereAmI;
private $slug;
private $filters; // Filters for the URI
private $notFound;
// Filters may be changed for different languages
// Ex (Spanish): Array('post'=>'/publicacion/', 'tag'=>'/etiqueta/', ....)
// Ex (English): Array('post'=>'/post/', 'tag'=>'/tag/', ....)
public function init($filters)
{
// Decodes any %## encoding in the given string. Plus symbols ('+') are decoded to a space character.
$this->uri = urldecode($_SERVER['REQUEST_URI']);
// URI Lowercase
//$this->uri = helperText::lowercase($this->uri);
$this->uri_strlen = helperText::length($this->uri);
$this->whereAmI = 'home';
$this->notFound = false;
$this->slug = false;
$this->filters = $filters;
// Check if filtering by post
// Primero verifico que no haya ningun slug filtrado, asi no lo piso.
if($this->slug===false)
$this->is_post($filters['post']);
// Check if filtering by tag
// Primero verifico que no haya ningun slug filtrado, asi no lo piso.
if($this->slug===false)
$this->is_tag($filters['tag']);
// Check if filtering by page
// Primero verifico que no haya ningun slug filtrado, asi no lo piso.
if($this->slug===false)
$this->is_page($filters['page']);
}
public function slug()
{
return $this->slug;
}
public function uri()
{
return $this->uri;
}
// Return the filter used
public function filters($type)
{
return $this->filters[$type];
}
// Return: home, tag, post
public function whereAmI()
{
return $this->whereAmI;
}
public function setWhereAmI($where)
{
$this->whereAmI = $where;
}
public function notFound()
{
return $this->notFound;
}
public function setNotFound($error = true)
{
$this->whereAmI = 'page';
$this->notFound = $error;
}
public function is_tag($filter)
{
if($this->filter_slug($filter)===false)
return false;
$this->whereAmI = 'tag';
return true;
}
public function is_post($filter)
{
if($this->filter_slug($filter)===false)
return false;
$this->whereAmI = 'post';
return true;
}
public function is_page($filter)
{
if($this->filter_slug($filter)===false)
return false;
$this->whereAmI = 'page';
return true;
}
// Return the slug after the $filter
// ex: http://domain.com/cms/$filter/slug123 => slug123
private function filter_slug($filter)
{
$position = helperText::strpos($this->uri, $filter);
if($position===false)
return false;
$start = $position + helperText::length($filter);
$end = $this->uri_strlen;
$this->slug = helperText::cut($this->uri, $start, $end);
if(empty($this->slug))
return false;
return $this->slug;
}
}
?>

5
languages/en_EN.json Normal file
View File

@ -0,0 +1,5 @@
{
"name": "Name",
"first-name": "First Name",
"posted-by": "Posted by"
}

4
languages/es_ES.json Normal file
View File

@ -0,0 +1,4 @@
{
"first-name": "Nombres",
"last-name": "Apellido"
}

BIN
plugins/.DS_Store vendored Normal file

Binary file not shown.

22
plugins/about/plugin.php Normal file
View File

@ -0,0 +1,22 @@
<?php
class pluginAbout extends Plugin {
public function init()
{
$this->dbFields = array(
'title'=>'',
'description'=>''
);
}
public function onSiteHead()
{
$html = '<title>Blog &ndash; Layout Examples &ndash; Pure</title>';
return $html;
}
}
?>

BIN
themes/.DS_Store vendored Normal file

Binary file not shown.

63
themes/aerial/LICENSE.txt Normal file
View File

@ -0,0 +1,63 @@
Creative Commons Attribution 3.0 Unported
http://creativecommons.org/licenses/by/3.0/
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
4. to Distribute and Publicly Perform Adaptations.
5.
For the avoidance of doubt:
1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.
2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.

67
themes/aerial/README.txt Normal file
View File

@ -0,0 +1,67 @@
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
This is Aerial, a single page, single screen responsive site template. Real simple.
Makes heavy use of CSS animation (something I've been messing with a lot lately).
Should work well as a landing page that just directs folks to your stuff elsewhere
on the www. Sass sources are also included, so if you've never used Sass and you're
interested in giving it a try, head on over to sass-lang.com (and if not, you can
safely delete the "sass/" folder).
The scrolling mountainous background was derived from "Icefields" by Ryan Schroeder,
a talented photographer from Vancouver who graciously released it on Unsplash under
the CC0 license. Be sure to check out his other stuff over at flickr (link below)
as well as all the other kickass CC0-licensed images at Unsplash (unsplash.com).
Questions/comments/issues = just email or find me on Twitter. Have fun!
AJ
n33.co @n33co dribbble.com/n33
The Scrolling Background:
This relies entirely on CSS to do its thing, which is cool, but that makes
changing it a bit weird/tricky at first. You can still use pretty much any image
you want, but for best results make sure yours is:
- Horizontally tileable.
- Wide and short.
- About 1500px wide.
- Fades to a solid color either at the top of bottom (which is used to fill
the empty space above or below your image).
Now, there are two ways to use it: with CSS, or with Sass:
CSS:
Look for this line in css/style.css (line 108 as of this writing):
background: #348cb2 url("images/bg.jpg") bottom left;
and use it to set the page background color, URL, and placement of
your image. It should be as close to 1500px wide as you can get it.
Sass:
Set the value of $bg to the page background color, URL, and placement
of your image. Change $bg-width if your image is something other than
1500px wide.
Credits:
Background Image:
Ryan Schroeder via Unsplash (unsplash.com - CC0 licensed)
"Icefields" (flickr.com/photos/ryanschroeder/11876741703)
Icons:
Font Awesome (fortawesome.github.com/Font-Awesome)
Other:
html5shiv.js (@afarkas @jdalton @jon_neal @rem)
CSS3 PIE (css3pie.com)
Sass (sass-lang.com)
skel (n33.co)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,96 @@
<!--
PIE: CSS3 rendering for IE
Version 1.0.0
http://css3pie.com
Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
-->
<PUBLIC:COMPONENT lightWeight="true">
<!-- saved from url=(0014)about:internet -->
<PUBLIC:ATTACH EVENT="oncontentready" FOR="element" ONEVENT="init()" />
<PUBLIC:ATTACH EVENT="ondocumentready" FOR="element" ONEVENT="init()" />
<PUBLIC:ATTACH EVENT="ondetach" FOR="element" ONEVENT="cleanup()" />
<script type="text/javascript">
var doc = element.document;var f=window.PIE;
if(!f){f=window.PIE={F:"-pie-",nb:"Pie",La:"pie_",Ac:{TD:1,TH:1},cc:{TABLE:1,THEAD:1,TBODY:1,TFOOT:1,TR:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,IMG:1,HR:1},fc:{A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1},Gd:{submit:1,button:1,reset:1},aa:function(){}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(aa){}for(var ba=4,Z=doc.createElement("div"),ca=Z.getElementsByTagName("i"),ga;Z.innerHTML="<!--[if gt IE "+ ++ba+"]><i></i><![endif]--\>",ca[0];);f.O=ba;if(ba===6)f.F=f.F.replace(/^-/,"");f.ja=
doc.documentMode||f.O;Z.innerHTML='<v:shape adj="1"/>';ga=Z.firstChild;ga.style.behavior="url(#default#VML)";f.zc=typeof ga.adj==="object";(function(){var a,b=0,c={};f.p={Za:function(d){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")}return a.createElement("css3vml:"+d)},Ba:function(d){return d&&d._pieId||(d._pieId="_"+ ++b)},Eb:function(d){var e,g,j,i,h=arguments;e=1;for(g=h.length;e<g;e++){i=h[e];for(j in i)if(i.hasOwnProperty(j))d[j]=i[j]}return d},
Rb:function(d,e,g){var j=c[d],i,h;if(j)Object.prototype.toString.call(j)==="[object Array]"?j.push([e,g]):e.call(g,j);else{h=c[d]=[[e,g]];i=new Image;i.onload=function(){j=c[d]={h:i.width,f:i.height};for(var k=0,n=h.length;k<n;k++)h[k][0].call(h[k][1],j);i.onload=null};i.src=d}}}})();f.Na={gc:function(a,b,c,d){function e(){k=j>=90&&j<270?b:0;n=j<180?c:0;m=b-k;p=c-n}function g(){for(;j<0;)j+=360;j%=360}var j=d.sa;d=d.zb;var i,h,k,n,m,p,r,t;if(d){d=d.coords(a,b,c);i=d.x;h=d.y}if(j){j=j.jd();g();e();
if(!d){i=k;h=n}d=f.Na.tc(i,h,j,m,p);a=d[0];d=d[1]}else if(d){a=b-i;d=c-h}else{i=h=a=0;d=c}r=a-i;t=d-h;if(j===void 0){j=!r?t<0?90:270:!t?r<0?180:0:-Math.atan2(t,r)/Math.PI*180;g();e()}return{sa:j,xc:i,yc:h,td:a,ud:d,Wd:k,Xd:n,rd:m,sd:p,kd:r,ld:t,rc:f.Na.dc(i,h,a,d)}},tc:function(a,b,c,d,e){if(c===0||c===180)return[d,b];else if(c===90||c===270)return[a,e];else{c=Math.tan(-c*Math.PI/180);a=c*a-b;b=-1/c;d=b*d-e;e=b-c;return[(d-a)/e,(c*d-b*a)/e]}},dc:function(a,b,c,d){a=c-a;b=d-b;return Math.abs(a===0?
b:b===0?a:Math.sqrt(a*a+b*b))}};f.ea=function(){this.Gb=[];this.oc={}};f.ea.prototype={ba:function(a){var b=f.p.Ba(a),c=this.oc,d=this.Gb;if(!(b in c)){c[b]=d.length;d.push(a)}},Ha:function(a){a=f.p.Ba(a);var b=this.oc;if(a&&a in b){delete this.Gb[b[a]];delete b[a]}},xa:function(){for(var a=this.Gb,b=a.length;b--;)a[b]&&a[b]()}};f.Oa=new f.ea;f.Oa.Rd=function(){var a=this,b;if(!a.Sd){b=doc.documentElement.currentStyle.getAttribute(f.F+"poll-interval")||250;(function c(){a.xa();setTimeout(c,b)})();
a.Sd=1}};(function(){function a(){f.L.xa();window.detachEvent("onunload",a);window.PIE=null}f.L=new f.ea;window.attachEvent("onunload",a);f.L.ta=function(b,c,d){b.attachEvent(c,d);this.ba(function(){b.detachEvent(c,d)})}})();f.Qa=new f.ea;f.L.ta(window,"onresize",function(){f.Qa.xa()});(function(){function a(){f.mb.xa()}f.mb=new f.ea;f.L.ta(window,"onscroll",a);f.Qa.ba(a)})();(function(){function a(){c=f.kb.md()}function b(){if(c){for(var d=0,e=c.length;d<e;d++)f.attach(c[d]);c=0}}var c;if(f.ja<9){f.L.ta(window,
"onbeforeprint",a);f.L.ta(window,"onafterprint",b)}})();f.lb=new f.ea;f.L.ta(doc,"onmouseup",function(){f.lb.xa()});f.he=function(){function a(h){this.Y=h}var b=doc.createElement("length-calc"),c=doc.body||doc.documentElement,d=b.style,e={},g=["mm","cm","in","pt","pc"],j=g.length,i={};d.position="absolute";d.top=d.left="-9999px";for(c.appendChild(b);j--;){d.width="100"+g[j];e[g[j]]=b.offsetWidth/100}c.removeChild(b);d.width="1em";a.prototype={Kb:/(px|em|ex|mm|cm|in|pt|pc|%)$/,ic:function(){var h=
this.Jd;if(h===void 0)h=this.Jd=parseFloat(this.Y);return h},yb:function(){var h=this.ae;if(!h)h=this.ae=(h=this.Y.match(this.Kb))&&h[0]||"px";return h},a:function(h,k){var n=this.ic(),m=this.yb();switch(m){case "px":return n;case "%":return n*(typeof k==="function"?k():k)/100;case "em":return n*this.xb(h);case "ex":return n*this.xb(h)/2;default:return n*e[m]}},xb:function(h){var k=h.currentStyle.fontSize,n,m;if(k.indexOf("px")>0)return parseFloat(k);else if(h.tagName in f.cc){m=this;n=h.parentNode;
return f.n(k).a(n,function(){return m.xb(n)})}else{h.appendChild(b);k=b.offsetWidth;b.parentNode===h&&h.removeChild(b);return k}}};f.n=function(h){return i[h]||(i[h]=new a(h))};return a}();f.Ja=function(){function a(e){this.X=e}var b=f.n("50%"),c={top:1,center:1,bottom:1},d={left:1,center:1,right:1};a.prototype={zd:function(){if(!this.ac){var e=this.X,g=e.length,j=f.v,i=j.qa,h=f.n("0");i=i.na;h=["left",h,"top",h];if(g===1){e.push(new j.ob(i,"center"));g++}if(g===2){i&(e[0].k|e[1].k)&&e[0].d in c&&
e[1].d in d&&e.push(e.shift());if(e[0].k&i)if(e[0].d==="center")h[1]=b;else h[0]=e[0].d;else if(e[0].W())h[1]=f.n(e[0].d);if(e[1].k&i)if(e[1].d==="center")h[3]=b;else h[2]=e[1].d;else if(e[1].W())h[3]=f.n(e[1].d)}this.ac=h}return this.ac},coords:function(e,g,j){var i=this.zd(),h=i[1].a(e,g);e=i[3].a(e,j);return{x:i[0]==="right"?g-h:h,y:i[2]==="bottom"?j-e:e}}};return a}();f.Ka=function(){function a(b,c){this.h=b;this.f=c}a.prototype={a:function(b,c,d,e,g){var j=this.h,i=this.f,h=c/d;e=e/g;if(j===
"contain"){j=e>h?c:d*e;i=e>h?c/e:d}else if(j==="cover"){j=e<h?c:d*e;i=e<h?c/e:d}else if(j==="auto"){i=i==="auto"?g:i.a(b,d);j=i*e}else{j=j.a(b,c);i=i==="auto"?j/e:i.a(b,d)}return{h:j,f:i}}};a.Kc=new a("auto","auto");return a}();f.Ec=function(){function a(b){this.Y=b}a.prototype={Kb:/[a-z]+$/i,yb:function(){return this.ad||(this.ad=this.Y.match(this.Kb)[0].toLowerCase())},jd:function(){var b=this.Vc,c;if(b===undefined){b=this.yb();c=parseFloat(this.Y,10);b=this.Vc=b==="deg"?c:b==="rad"?c/Math.PI*180:
b==="grad"?c/400*360:b==="turn"?c*360:0}return b}};return a}();f.Jc=function(){function a(c){this.Y=c}var b={};a.Qd=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;a.Fb={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",
cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",
forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",
lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",
navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",
slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this.Ua){var c=this.Y,d;if(d=c.match(a.Qd)){this.Ua="rgb("+d[1]+","+d[2]+","+d[3]+")";this.Yb=parseFloat(d[4])}else{if((d=c.toLowerCase())in a.Fb)c="#"+a.Fb[d];this.Ua=c;this.Yb=c==="transparent"?0:
1}}},U:function(c){this.parse();return this.Ua==="currentColor"?c.currentStyle.color:this.Ua},fa:function(){this.parse();return this.Yb}};f.ha=function(c){return b[c]||(b[c]=new a(c))};return a}();f.v=function(){function a(c){this.$a=c;this.ch=0;this.X=[];this.Ga=0}var b=a.qa={Ia:1,Wb:2,z:4,Lc:8,Xb:16,na:32,K:64,oa:128,pa:256,Ra:512,Tc:1024,URL:2048};a.ob=function(c,d){this.k=c;this.d=d};a.ob.prototype={Ca:function(){return this.k&b.K||this.k&b.oa&&this.d==="0"},W:function(){return this.Ca()||this.k&
b.Ra}};a.prototype={de:/\s/,Kd:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,nc:/^\-?[_a-z][\w-]*/i,Yd:/^("([^"]*)"|'([^']*)')/,Bd:/^#([\da-f]{6}|[\da-f]{3})/i,be:{px:b.K,em:b.K,ex:b.K,mm:b.K,cm:b.K,"in":b.K,pt:b.K,pc:b.K,deg:b.Ia,rad:b.Ia,grad:b.Ia},fd:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function d(p,r){p=new a.ob(p,r);if(!c){k.X.push(p);k.Ga++}return p}function e(){k.Ga++;return null}var g,j,i,h,k=this;if(this.Ga<this.X.length)return this.X[this.Ga++];for(;this.de.test(this.$a.charAt(this.ch));)this.ch++;
if(this.ch>=this.$a.length)return e();j=this.ch;g=this.$a.substring(this.ch);i=g.charAt(0);switch(i){case "#":if(h=g.match(this.Bd)){this.ch+=h[0].length;return d(b.z,h[0])}break;case '"':case "'":if(h=g.match(this.Yd)){this.ch+=h[0].length;return d(b.Tc,h[2]||h[3]||"")}break;case "/":case ",":this.ch++;return d(b.pa,i);case "u":if(h=g.match(this.url)){this.ch+=h[0].length;return d(b.URL,h[2]||h[3]||h[4]||"")}}if(h=g.match(this.Kd)){i=h[0];this.ch+=i.length;if(g.charAt(i.length)==="%"){this.ch++;
return d(b.Ra,i+"%")}if(h=g.substring(i.length).match(this.nc)){i+=h[0];this.ch+=h[0].length;return d(this.be[h[0].toLowerCase()]||b.Lc,i)}return d(b.oa,i)}if(h=g.match(this.nc)){i=h[0];this.ch+=i.length;if(i.toLowerCase()in f.Jc.Fb||i==="currentColor"||i==="transparent")return d(b.z,i);if(g.charAt(i.length)==="("){this.ch++;if(i.toLowerCase()in this.fd){g=function(p){return p&&p.k&b.oa};h=function(p){return p&&p.k&(b.oa|b.Ra)};var n=function(p,r){return p&&p.d===r},m=function(){return k.next(1)};
if((i.charAt(0)==="r"?h(m()):g(m()))&&n(m(),",")&&h(m())&&n(m(),",")&&h(m())&&(i==="rgb"||i==="hsa"||n(m(),",")&&g(m()))&&n(m(),")"))return d(b.z,this.$a.substring(j,this.ch));return e()}return d(b.Xb,i)}return d(b.na,i)}this.ch++;return d(b.Wb,i)},D:function(){return this.X[this.Ga-- -2]},all:function(){for(;this.next(););return this.X},ma:function(c,d){for(var e=[],g,j;g=this.next();){if(c(g)){j=true;this.D();break}e.push(g)}return d&&!j?null:e}};return a}();var ha=function(a){this.e=a};ha.prototype=
{Z:0,Od:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.x!==b.x||a.y!==b.y)},Td:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.h!==b.h||a.f!==b.f)},hc:function(){var a=this.e,b=a.getBoundingClientRect(),c=f.ja===9,d=f.O===7,e=b.right-b.left;return{x:b.left,y:b.top,h:c||d?a.offsetWidth:e,f:c||d?a.offsetHeight:b.bottom-b.top,Hd:d&&e?a.offsetWidth/e:1}},o:function(){return this.Z?this.Va||(this.Va=this.hc()):this.hc()},Ad:function(){return!!this.qb},cb:function(){++this.Z},hb:function(){if(!--this.Z){if(this.Va)this.qb=
this.Va;this.Va=null}}};(function(){function a(b){var c=f.p.Ba(b);return function(){if(this.Z){var d=this.$b||(this.$b={});return c in d?d[c]:(d[c]=b.call(this))}else return b.call(this)}}f.B={Z:0,ka:function(b){function c(d){this.e=d;this.Zb=this.ia()}f.p.Eb(c.prototype,f.B,b);c.$c={};return c},j:function(){var b=this.ia(),c=this.constructor.$c;return b?b in c?c[b]:(c[b]=this.la(b)):null},ia:a(function(){var b=this.e,c=this.constructor,d=b.style;b=b.currentStyle;var e=this.wa,g=this.Fa,j=c.Yc||(c.Yc=
f.F+e);c=c.Zc||(c.Zc=f.nb+g.charAt(0).toUpperCase()+g.substring(1));return d[c]||b.getAttribute(j)||d[g]||b.getAttribute(e)}),i:a(function(){return!!this.j()}),H:a(function(){var b=this.ia(),c=b!==this.Zb;this.Zb=b;return c}),va:a,cb:function(){++this.Z},hb:function(){--this.Z||delete this.$b}}})();f.Sb=f.B.ka({wa:f.F+"background",Fa:f.nb+"Background",cd:{scroll:1,fixed:1,local:1},fb:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},sc:{"padding-box":1,"border-box":1,"content-box":1},Pd:{top:1,right:1,
bottom:1,left:1,center:1},Ud:{contain:1,cover:1},eb:{Ma:"backgroundClip",z:"backgroundColor",da:"backgroundImage",Pa:"backgroundOrigin",S:"backgroundPosition",T:"backgroundRepeat",Sa:"backgroundSize"},la:function(a){function b(s){return s&&s.W()||s.k&k&&s.d in t}function c(s){return s&&(s.W()&&f.n(s.d)||s.d==="auto"&&"auto")}var d=this.e.currentStyle,e,g,j,i=f.v.qa,h=i.pa,k=i.na,n=i.z,m,p,r=0,t=this.Pd,v,l,q={M:[]};if(this.wb()){e=new f.v(a);for(j={};g=e.next();){m=g.k;p=g.d;if(!j.P&&m&i.Xb&&p===
"linear-gradient"){v={ca:[],P:p};for(l={};g=e.next();){m=g.k;p=g.d;if(m&i.Wb&&p===")"){l.color&&v.ca.push(l);v.ca.length>1&&f.p.Eb(j,v);break}if(m&n){if(v.sa||v.zb){g=e.D();if(g.k!==h)break;e.next()}l={color:f.ha(p)};g=e.next();if(g.W())l.db=f.n(g.d);else e.D()}else if(m&i.Ia&&!v.sa&&!l.color&&!v.ca.length)v.sa=new f.Ec(g.d);else if(b(g)&&!v.zb&&!l.color&&!v.ca.length){e.D();v.zb=new f.Ja(e.ma(function(s){return!b(s)},false))}else if(m&h&&p===","){if(l.color){v.ca.push(l);l={}}}else break}}else if(!j.P&&
m&i.URL){j.Ab=p;j.P="image"}else if(b(g)&&!j.$){e.D();j.$=new f.Ja(e.ma(function(s){return!b(s)},false))}else if(m&k)if(p in this.fb&&!j.bb)j.bb=p;else if(p in this.sc&&!j.Wa){j.Wa=p;if((g=e.next())&&g.k&k&&g.d in this.sc)j.ub=g.d;else{j.ub=p;e.D()}}else if(p in this.cd&&!j.bc)j.bc=p;else return null;else if(m&n&&!q.color)q.color=f.ha(p);else if(m&h&&p==="/"&&!j.Xa&&j.$){g=e.next();if(g.k&k&&g.d in this.Ud)j.Xa=new f.Ka(g.d);else if(g=c(g)){m=c(e.next());if(!m){m=g;e.D()}j.Xa=new f.Ka(g,m)}else return null}else if(m&
h&&p===","&&j.P){j.Hb=a.substring(r,e.ch-1);r=e.ch;q.M.push(j);j={}}else return null}if(j.P){j.Hb=a.substring(r);q.M.push(j)}}else this.Bc(f.ja<9?function(){var s=this.eb,o=d[s.S+"X"],u=d[s.S+"Y"],x=d[s.da],y=d[s.z];if(y!=="transparent")q.color=f.ha(y);if(x!=="none")q.M=[{P:"image",Ab:(new f.v(x)).next().d,bb:d[s.T],$:new f.Ja((new f.v(o+" "+u)).all())}]}:function(){var s=this.eb,o=/\s*,\s*/,u=d[s.da].split(o),x=d[s.z],y,z,B,E,D,C;if(x!=="transparent")q.color=f.ha(x);if((E=u.length)&&u[0]!=="none"){x=
d[s.T].split(o);y=d[s.S].split(o);z=d[s.Pa].split(o);B=d[s.Ma].split(o);s=d[s.Sa].split(o);q.M=[];for(o=0;o<E;o++)if((D=u[o])&&D!=="none"){C=s[o].split(" ");q.M.push({Hb:D+" "+x[o]+" "+y[o]+" / "+s[o]+" "+z[o]+" "+B[o],P:"image",Ab:(new f.v(D)).next().d,bb:x[o],$:new f.Ja((new f.v(y[o])).all()),Wa:z[o],ub:B[o],Xa:new f.Ka(C[0],C[1])})}}});return q.color||q.M[0]?q:null},Bc:function(a){var b=f.ja>8,c=this.eb,d=this.e.runtimeStyle,e=d[c.da],g=d[c.z],j=d[c.T],i,h,k,n;if(e)d[c.da]="";if(g)d[c.z]="";if(j)d[c.T]=
"";if(b){i=d[c.Ma];h=d[c.Pa];n=d[c.S];k=d[c.Sa];if(i)d[c.Ma]="";if(h)d[c.Pa]="";if(n)d[c.S]="";if(k)d[c.Sa]=""}a=a.call(this);if(e)d[c.da]=e;if(g)d[c.z]=g;if(j)d[c.T]=j;if(b){if(i)d[c.Ma]=i;if(h)d[c.Pa]=h;if(n)d[c.S]=n;if(k)d[c.Sa]=k}return a},ia:f.B.va(function(){return this.wb()||this.Bc(function(){var a=this.e.currentStyle,b=this.eb;return a[b.z]+" "+a[b.da]+" "+a[b.T]+" "+a[b.S+"X"]+" "+a[b.S+"Y"]})}),wb:f.B.va(function(){var a=this.e;return a.style[this.Fa]||a.currentStyle.getAttribute(this.wa)}),
qc:function(){var a=0;if(f.O<7){a=this.e;a=""+(a.style[f.nb+"PngFix"]||a.currentStyle.getAttribute(f.F+"png-fix"))==="true"}return a},i:f.B.va(function(){return(this.wb()||this.qc())&&!!this.j()})});f.Vb=f.B.ka({wc:["Top","Right","Bottom","Left"],Id:{thin:"1px",medium:"3px",thick:"5px"},la:function(){var a={},b={},c={},d=false,e=true,g=true,j=true;this.Cc(function(){for(var i=this.e.currentStyle,h=0,k,n,m,p,r,t,v;h<4;h++){m=this.wc[h];v=m.charAt(0).toLowerCase();k=b[v]=i["border"+m+"Style"];n=i["border"+
m+"Color"];m=i["border"+m+"Width"];if(h>0){if(k!==p)g=false;if(n!==r)e=false;if(m!==t)j=false}p=k;r=n;t=m;c[v]=f.ha(n);m=a[v]=f.n(b[v]==="none"?"0":this.Id[m]||m);if(m.a(this.e)>0)d=true}});return d?{J:a,Zd:b,gd:c,ee:j,hd:e,$d:g}:null},ia:f.B.va(function(){var a=this.e,b=a.currentStyle,c;a.tagName in f.Ac&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Cc(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor});return c}),Cc:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,
d=b.borderColor;if(c)b.borderWidth="";if(d)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(d)b.borderColor=d;return a}});(function(){f.jb=f.B.ka({wa:"border-radius",Fa:"borderRadius",la:function(b){var c=null,d,e,g,j,i=false;if(b){e=new f.v(b);var h=function(){for(var k=[],n;(g=e.next())&&g.W();){j=f.n(g.d);n=j.ic();if(n<0)return null;if(n>0)i=true;k.push(j)}return k.length>0&&k.length<5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null};if(b=h()){if(g){if(g.k&f.v.qa.pa&&g.d===
"/")d=h()}else d=b;if(i&&b&&d)c={x:b,y:d}}}return c}});var a=f.n("0");a={tl:a,tr:a,br:a,bl:a};f.jb.Dc={x:a,y:a}})();f.Ub=f.B.ka({wa:"border-image",Fa:"borderImage",fb:{stretch:1,round:1,repeat:1,space:1},la:function(a){var b=null,c,d,e,g,j,i,h=0,k=f.v.qa,n=k.na,m=k.oa,p=k.Ra;if(a){c=new f.v(a);b={};for(var r=function(l){return l&&l.k&k.pa&&l.d==="/"},t=function(l){return l&&l.k&n&&l.d==="fill"},v=function(){g=c.ma(function(l){return!(l.k&(m|p))});if(t(c.next())&&!b.fill)b.fill=true;else c.D();if(r(c.next())){h++;
j=c.ma(function(l){return!l.W()&&!(l.k&n&&l.d==="auto")});if(r(c.next())){h++;i=c.ma(function(l){return!l.Ca()})}}else c.D()};a=c.next();){d=a.k;e=a.d;if(d&(m|p)&&!g){c.D();v()}else if(t(a)&&!b.fill){b.fill=true;v()}else if(d&n&&this.fb[e]&&!b.repeat){b.repeat={f:e};if(a=c.next())if(a.k&n&&this.fb[a.d])b.repeat.Ob=a.d;else c.D()}else if(d&k.URL&&!b.src)b.src=e;else return null}if(!b.src||!g||g.length<1||g.length>4||j&&j.length>4||h===1&&j.length<1||i&&i.length>4||h===2&&i.length<1)return null;if(!b.repeat)b.repeat=
{f:"stretch"};if(!b.repeat.Ob)b.repeat.Ob=b.repeat.f;a=function(l,q){return{t:q(l[0]),r:q(l[1]||l[0]),b:q(l[2]||l[0]),l:q(l[3]||l[1]||l[0])}};b.slice=a(g,function(l){return f.n(l.k&m?l.d+"px":l.d)});if(j&&j[0])b.J=a(j,function(l){return l.W()?f.n(l.d):l.d});if(i&&i[0])b.Da=a(i,function(l){return l.Ca()?f.n(l.d):l.d})}return b}});f.Ic=f.B.ka({wa:"box-shadow",Fa:"boxShadow",la:function(a){var b,c=f.n,d=f.v.qa,e;if(a){e=new f.v(a);b={Da:[],Bb:[]};for(a=function(){for(var g,j,i,h,k,n;g=e.next();){i=g.d;
j=g.k;if(j&d.pa&&i===",")break;else if(g.Ca()&&!k){e.D();k=e.ma(function(m){return!m.Ca()})}else if(j&d.z&&!h)h=i;else if(j&d.na&&i==="inset"&&!n)n=true;else return false}g=k&&k.length;if(g>1&&g<5){(n?b.Bb:b.Da).push({fe:c(k[0].d),ge:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Vd:c(k[3]?k[3].d:"0"),color:f.ha(h||"currentColor")});return true}return false};a(););}return b&&(b.Bb.length||b.Da.length)?b:null}});f.Uc=f.B.ka({ia:f.B.va(function(){var a=this.e.currentStyle;return a.visibility+"|"+a.display}),la:function(){var a=
this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,d;b.visibility="";d=a.visibility;b.visibility=c;return{ce:d!=="hidden",nd:a.display!=="none"}},i:function(){return false}});f.u={R:function(a){function b(c,d,e,g){this.e=c;this.s=d;this.g=e;this.parent=g}f.p.Eb(b.prototype,f.u,a);return b},Cb:false,Q:function(){return false},Ea:f.aa,Lb:function(){this.m();this.i()&&this.V()},ib:function(){this.Cb=true},Mb:function(){this.i()?this.V():this.m()},sb:function(a,b){this.vc(a);for(var c=this.ra||
(this.ra=[]),d=a+1,e=c.length,g;d<e;d++)if(g=c[d])break;c[a]=b;this.I().insertBefore(b,g||null)},za:function(a){var b=this.ra;return b&&b[a]||null},vc:function(a){var b=this.za(a),c=this.Ta;if(b&&c){c.removeChild(b);this.ra[a]=null}},Aa:function(a,b,c,d){var e=this.rb||(this.rb={}),g=e[a];if(!g){g=e[a]=f.p.Za("shape");if(b)g.appendChild(g[b]=f.p.Za(b));if(d){c=this.za(d);if(!c){this.sb(d,doc.createElement("group"+d));c=this.za(d)}}c.appendChild(g);a=g.style;a.position="absolute";a.left=a.top=0;a.behavior=
"url(#default#VML)"}return g},vb:function(a){var b=this.rb,c=b&&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return!!c},kc:function(a){var b=this.e,c=this.s.o(),d=c.h,e=c.f,g,j,i,h,k,n;c=a.x.tl.a(b,d);g=a.y.tl.a(b,e);j=a.x.tr.a(b,d);i=a.y.tr.a(b,e);h=a.x.br.a(b,d);k=a.y.br.a(b,e);n=a.x.bl.a(b,d);a=a.y.bl.a(b,e);d=Math.min(d/(c+j),e/(i+k),d/(n+h),e/(g+a));if(d<1){c*=d;g*=d;j*=d;i*=d;h*=d;k*=d;n*=d;a*=d}return{x:{tl:c,tr:j,br:h,bl:n},y:{tl:g,tr:i,br:k,bl:a}}},ya:function(a,b,c){b=b||1;var d,e,
g=this.s.o();e=g.h*b;g=g.f*b;var j=this.g.G,i=Math.floor,h=Math.ceil,k=a?a.Jb*b:0,n=a?a.Ib*b:0,m=a?a.tb*b:0;a=a?a.Db*b:0;var p,r,t,v,l;if(c||j.i()){d=this.kc(c||j.j());c=d.x.tl*b;j=d.y.tl*b;p=d.x.tr*b;r=d.y.tr*b;t=d.x.br*b;v=d.y.br*b;l=d.x.bl*b;b=d.y.bl*b;e="m"+i(a)+","+i(j)+"qy"+i(c)+","+i(k)+"l"+h(e-p)+","+i(k)+"qx"+h(e-n)+","+i(r)+"l"+h(e-n)+","+h(g-v)+"qy"+h(e-t)+","+h(g-m)+"l"+i(l)+","+h(g-m)+"qx"+i(a)+","+h(g-b)+" x e"}else e="m"+i(a)+","+i(k)+"l"+h(e-n)+","+i(k)+"l"+h(e-n)+","+h(g-m)+"l"+i(a)+
","+h(g-m)+"xe";return e},I:function(){var a=this.parent.za(this.N),b;if(!a){a=doc.createElement(this.Ya);b=a.style;b.position="absolute";b.top=b.left=0;this.parent.sb(this.N,a)}return a},mc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,d=a.tagName,e=f.O===6,g;if(e&&(d in f.cc||d==="FIELDSET")||d==="BUTTON"||d==="INPUT"&&a.type in f.Gd){c.borderWidth="";d=this.g.w.wc;for(g=d.length;g--;){e=d[g];c["padding"+e]="";c["padding"+e]=f.n(b["padding"+e]).a(a)+f.n(b["border"+e+"Width"]).a(a)+(f.O!==
8&&g%2?1:0)}c.borderWidth=0}else if(e){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");d=b.style;d.visibility="visible";for(d.zoom=1;d=a.firstChild;)b.appendChild(d);a.appendChild(b);c.visibility="hidden"}}else c.borderColor="transparent"},ie:function(){},m:function(){this.parent.vc(this.N);delete this.rb;delete this.ra}};f.Rc=f.u.R({i:function(){var a=this.ed;for(var b in a)if(a.hasOwnProperty(b)&&a[b].i())return true;return false},Q:function(){return this.g.Pb.H()},
ib:function(){if(this.i()){var a=this.jc(),b=a,c;a=a.currentStyle;var d=a.position,e=this.I().style,g=0,j=0;j=this.s.o();var i=j.Hd;if(d==="fixed"&&f.O>6){g=j.x*i;j=j.y*i;b=d}else{do b=b.offsetParent;while(b&&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;g=(j.x-c.left)*i-(parseFloat(b.borderLeftWidth)||0);j=(j.y-c.top)*i-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;g=(j.x+b.scrollLeft-b.clientLeft)*i;j=(j.y+b.scrollTop-b.clientTop)*i}b="absolute"}e.position=
b;e.left=g;e.top=j;e.zIndex=d==="static"?-1:a.zIndex;this.Cb=true}},Mb:f.aa,Nb:function(){var a=this.g.Pb.j();this.I().style.display=a.ce&&a.nd?"":"none"},Lb:function(){this.i()?this.Nb():this.m()},jc:function(){var a=this.e;return a.tagName in f.Ac?a.offsetParent:a},I:function(){var a=this.Ta,b;if(!a){b=this.jc();a=this.Ta=doc.createElement("css3-container");a.style.direction="ltr";this.Nb();b.parentNode.insertBefore(a,b)}return a},ab:f.aa,m:function(){var a=this.Ta,b;if(a&&(b=a.parentNode))b.removeChild(a);
delete this.Ta;delete this.ra}});f.Fc=f.u.R({N:2,Ya:"background",Q:function(){var a=this.g;return a.C.H()||a.G.H()},i:function(){var a=this.g;return a.q.i()||a.G.i()||a.C.i()||a.ga.i()&&a.ga.j().Bb},V:function(){var a=this.s.o();if(a.h&&a.f){this.od();this.pd()}},od:function(){var a=this.g.C.j(),b=this.s.o(),c=this.e,d=a&&a.color,e,g;if(d&&d.fa()>0){this.lc();a=this.Aa("bgColor","fill",this.I(),1);e=b.h;b=b.f;a.stroked=false;a.coordsize=e*2+","+b*2;a.coordorigin="1,1";a.path=this.ya(null,2);g=a.style;
g.width=e;g.height=b;a.fill.color=d.U(c);c=d.fa();if(c<1)a.fill.opacity=c}else this.vb("bgColor")},pd:function(){var a=this.g.C.j(),b=this.s.o();a=a&&a.M;var c,d,e,g,j;if(a){this.lc();d=b.h;e=b.f;for(j=a.length;j--;){b=a[j];c=this.Aa("bgImage"+j,"fill",this.I(),2);c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=d*2+","+e*2;c.coordorigin="1,1";c.path=this.ya(0,2);g=c.style;g.width=d;g.height=e;if(b.P==="linear-gradient")this.bd(c,b);else{c.fill.src=b.Ab;this.Nd(c,j)}}}for(j=a?a.length:
0;this.vb("bgImage"+j++););},Nd:function(a,b){var c=this;f.p.Rb(a.fill.src,function(d){var e=c.e,g=c.s.o(),j=g.h;g=g.f;if(j&&g){var i=a.fill,h=c.g,k=h.w.j(),n=k&&k.J;k=n?n.t.a(e):0;var m=n?n.r.a(e):0,p=n?n.b.a(e):0;n=n?n.l.a(e):0;h=h.C.j().M[b];e=h.$?h.$.coords(e,j-d.h-n-m,g-d.f-k-p):{x:0,y:0};h=h.bb;p=m=0;var r=j+1,t=g+1,v=f.O===8?0:1;n=Math.round(e.x)+n+0.5;k=Math.round(e.y)+k+0.5;i.position=n/j+","+k/g;i.size.x=1;i.size=d.h+"px,"+d.f+"px";if(h&&h!=="repeat"){if(h==="repeat-x"||h==="no-repeat"){m=
k+1;t=k+d.f+v}if(h==="repeat-y"||h==="no-repeat"){p=n+1;r=n+d.h+v}a.style.clip="rect("+m+"px,"+r+"px,"+t+"px,"+p+"px)"}}})},bd:function(a,b){var c=this.e,d=this.s.o(),e=d.h,g=d.f;a=a.fill;d=b.ca;var j=d.length,i=Math.PI,h=f.Na,k=h.tc,n=h.dc;b=h.gc(c,e,g,b);h=b.sa;var m=b.xc,p=b.yc,r=b.Wd,t=b.Xd,v=b.rd,l=b.sd,q=b.kd,s=b.ld;b=b.rc;e=h%90?Math.atan2(q*e/g,s)/i*180:h+90;e+=180;e%=360;v=k(r,t,h,v,l);g=n(r,t,v[0],v[1]);i=[];v=k(m,p,h,r,t);n=n(m,p,v[0],v[1])/g*100;k=[];for(h=0;h<j;h++)k.push(d[h].db?d[h].db.a(c,
b):h===0?0:h===j-1?b:null);for(h=1;h<j;h++){if(k[h]===null){m=k[h-1];b=h;do p=k[++b];while(p===null);k[h]=m+(p-m)/(b-h+1)}k[h]=Math.max(k[h],k[h-1])}for(h=0;h<j;h++)i.push(n+k[h]/g*100+"% "+d[h].color.U(c));a.angle=e;a.type="gradient";a.method="sigma";a.color=d[0].color.U(c);a.color2=d[j-1].color.U(c);if(a.colors)a.colors.value=i.join(",");else a.colors=i.join(",")},lc:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},m:function(){f.u.m.call(this);
var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});f.Gc=f.u.R({N:4,Ya:"border",Q:function(){var a=this.g;return a.w.H()||a.G.H()},i:function(){var a=this.g;return a.G.i()&&!a.q.i()&&a.w.i()},V:function(){var a=this.e,b=this.g.w.j(),c=this.s.o(),d=c.h;c=c.f;var e,g,j,i,h;if(b){this.mc();b=this.wd(2);i=0;for(h=b.length;i<h;i++){j=b[i];e=this.Aa("borderPiece"+i,j.stroke?"stroke":"fill",this.I());e.coordsize=d*2+","+c*2;e.coordorigin="1,1";e.path=j.path;g=e.style;g.width=d;g.height=c;
e.filled=!!j.fill;e.stroked=!!j.stroke;if(j.stroke){e=e.stroke;e.weight=j.Qb+"px";e.color=j.color.U(a);e.dashstyle=j.stroke==="dashed"?"2 2":j.stroke==="dotted"?"1 1":"solid";e.linestyle=j.stroke==="double"&&j.Qb>2?"ThinThin":"Single"}else e.fill.color=j.fill.U(a)}for(;this.vb("borderPiece"+i++););}},wd:function(a){var b=this.e,c,d,e,g=this.g.w,j=[],i,h,k,n,m=Math.round,p,r,t;if(g.i()){c=g.j();g=c.J;r=c.Zd;t=c.gd;if(c.ee&&c.$d&&c.hd){if(t.t.fa()>0){c=g.t.a(b);k=c/2;j.push({path:this.ya({Jb:k,Ib:k,
tb:k,Db:k},a),stroke:r.t,color:t.t,Qb:c})}}else{a=a||1;c=this.s.o();d=c.h;e=c.f;c=m(g.t.a(b));k=m(g.r.a(b));n=m(g.b.a(b));b=m(g.l.a(b));var v={t:c,r:k,b:n,l:b};b=this.g.G;if(b.i())p=this.kc(b.j());i=Math.floor;h=Math.ceil;var l=function(o,u){return p?p[o][u]:0},q=function(o,u,x,y,z,B){var E=l("x",o),D=l("y",o),C=o.charAt(1)==="r";o=o.charAt(0)==="b";return E>0&&D>0?(B?"al":"ae")+(C?h(d-E):i(E))*a+","+(o?h(e-D):i(D))*a+","+(i(E)-u)*a+","+(i(D)-x)*a+","+y*65535+","+2949075*(z?1:-1):(B?"m":"l")+(C?d-
u:u)*a+","+(o?e-x:x)*a},s=function(o,u,x,y){var z=o==="t"?i(l("x","tl"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+i(l("y","tr"))*a:o==="b"?h(d-l("x","br"))*a+","+i(e-u)*a:i(u)*a+","+h(e-l("y","bl"))*a;o=o==="t"?h(d-l("x","tr"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+h(e-l("y","br"))*a:o==="b"?i(l("x","bl"))*a+","+i(e-u)*a:i(u)*a+","+i(l("y","tl"))*a;return x?(y?"m"+o:"")+"l"+z:(y?"m"+z:"")+"l"+o};b=function(o,u,x,y,z,B){var E=o==="l"||o==="r",D=v[o],C,F;if(D>0&&r[o]!=="none"&&t[o].fa()>0){C=v[E?o:u];u=v[E?u:
o];F=v[E?o:x];x=v[E?x:o];if(r[o]==="dashed"||r[o]==="dotted"){j.push({path:q(y,C,u,B+45,0,1)+q(y,0,0,B,1,0),fill:t[o]});j.push({path:s(o,D/2,0,1),stroke:r[o],Qb:D,color:t[o]});j.push({path:q(z,F,x,B,0,1)+q(z,0,0,B-45,1,0),fill:t[o]})}else j.push({path:q(y,C,u,B+45,0,1)+s(o,D,0,0)+q(z,F,x,B,0,0)+(r[o]==="double"&&D>2?q(z,F-i(F/3),x-i(x/3),B-45,1,0)+s(o,h(D/3*2),1,0)+q(y,C-i(C/3),u-i(u/3),B,1,0)+"x "+q(y,i(C/3),i(u/3),B+45,0,1)+s(o,i(D/3),1,0)+q(z,i(F/3),i(x/3),B,0,0):"")+q(z,0,0,B-45,1,0)+s(o,0,1,
0)+q(y,0,0,B,1,0),fill:t[o]})}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}}return j},m:function(){if(this.ec||!this.g.q.i())this.e.runtimeStyle.borderColor="";f.u.m.call(this)}});f.Tb=f.u.R({N:5,Md:["t","tr","r","br","b","bl","l","tl","c"],Q:function(){return this.g.q.H()},i:function(){return this.g.q.i()},V:function(){this.I();var a=this.g.q.j(),b=this.g.w.j(),c=this.s.o(),d=this.e,e=this.uc;f.p.Rb(a.src,function(g){function j(s,
o,u,x,y){s=e[s].style;var z=Math.max;s.width=z(o,0);s.height=z(u,0);s.left=x;s.top=y}function i(s,o,u){for(var x=0,y=s.length;x<y;x++)e[s[x]].imagedata[o]=u}var h=c.h,k=c.f,n=f.n("0"),m=a.J||(b?b.J:{t:n,r:n,b:n,l:n});n=m.t.a(d);var p=m.r.a(d),r=m.b.a(d);m=m.l.a(d);var t=a.slice,v=t.t.a(d),l=t.r.a(d),q=t.b.a(d);t=t.l.a(d);j("tl",m,n,0,0);j("t",h-m-p,n,m,0);j("tr",p,n,h-p,0);j("r",p,k-n-r,h-p,n);j("br",p,r,h-p,k-r);j("b",h-m-p,r,m,k-r);j("bl",m,r,0,k-r);j("l",m,k-n-r,0,n);j("c",h-m-p,k-n-r,m,n);i(["tl",
"t","tr"],"cropBottom",(g.f-v)/g.f);i(["tl","l","bl"],"cropRight",(g.h-t)/g.h);i(["bl","b","br"],"cropTop",(g.f-q)/g.f);i(["tr","r","br"],"cropLeft",(g.h-l)/g.h);i(["l","r","c"],"cropTop",v/g.f);i(["l","r","c"],"cropBottom",q/g.f);i(["t","b","c"],"cropLeft",t/g.h);i(["t","b","c"],"cropRight",l/g.h);e.c.style.display=a.fill?"":"none"},this)},I:function(){var a=this.parent.za(this.N),b,c,d,e=this.Md,g=e.length;if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";this.uc={};for(d=
0;d<g;d++){c=this.uc[e[d]]=f.p.Za("rect");c.appendChild(f.p.Za("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;c.imagedata.src=this.g.q.j().src;c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.sb(this.N,a)}return a},Ea:function(){if(this.i()){var a=this.e,b=a.runtimeStyle,c=this.g.q.j().J;b.borderStyle="solid";if(c){b.borderTopWidth=c.t.a(a)+"px";b.borderRightWidth=c.r.a(a)+"px";b.borderBottomWidth=c.b.a(a)+"px";b.borderLeftWidth=c.l.a(a)+"px"}this.mc()}},
m:function(){var a=this.e.runtimeStyle;a.borderStyle="";if(this.ec||!this.g.w.i())a.borderColor=a.borderWidth="";f.u.m.call(this)}});f.Hc=f.u.R({N:1,Ya:"outset-box-shadow",Q:function(){var a=this.g;return a.ga.H()||a.G.H()},i:function(){var a=this.g.ga;return a.i()&&a.j().Da[0]},V:function(){function a(C,F,O,H,M,P,I){C=b.Aa("shadow"+C+F,"fill",d,j-C);F=C.fill;C.coordsize=n*2+","+m*2;C.coordorigin="1,1";C.stroked=false;C.filled=true;F.color=M.U(c);if(P){F.type="gradienttitle";F.color2=F.color;F.opacity=
0}C.path=I;l=C.style;l.left=O;l.top=H;l.width=n;l.height=m;return C}var b=this,c=this.e,d=this.I(),e=this.g,g=e.ga.j().Da;e=e.G.j();var j=g.length,i=j,h,k=this.s.o(),n=k.h,m=k.f;k=f.O===8?1:0;for(var p=["tl","tr","br","bl"],r,t,v,l,q,s,o,u,x,y,z,B,E,D;i--;){t=g[i];q=t.fe.a(c);s=t.ge.a(c);h=t.Vd.a(c);o=t.blur.a(c);t=t.color;u=-h-o;if(!e&&o)e=f.jb.Dc;u=this.ya({Jb:u,Ib:u,tb:u,Db:u},2,e);if(o){x=(h+o)*2+n;y=(h+o)*2+m;z=x?o*2/x:0;B=y?o*2/y:0;if(o-h>n/2||o-h>m/2)for(h=4;h--;){r=p[h];E=r.charAt(0)==="b";
D=r.charAt(1)==="r";r=a(i,r,q,s,t,o,u);v=r.fill;v.focusposition=(D?1-z:z)+","+(E?1-B:B);v.focussize="0,0";r.style.clip="rect("+((E?y/2:0)+k)+"px,"+(D?x:x/2)+"px,"+(E?y:y/2)+"px,"+((D?x/2:0)+k)+"px)"}else{r=a(i,"",q,s,t,o,u);v=r.fill;v.focusposition=z+","+B;v.focussize=1-z*2+","+(1-B*2)}}else{r=a(i,"",q,s,t,o,u);q=t.fa();if(q<1)r.fill.opacity=q}}}});f.Pc=f.u.R({N:6,Ya:"imgEl",Q:function(){var a=this.g;return this.e.src!==this.Xc||a.G.H()},i:function(){var a=this.g;return a.G.i()||a.C.qc()},V:function(){this.Xc=
j;this.Cd();var a=this.Aa("img","fill",this.I()),b=a.fill,c=this.s.o(),d=c.h;c=c.f;var e=this.g.w.j(),g=e&&e.J;e=this.e;var j=e.src,i=Math.round,h=e.currentStyle,k=f.n;if(!g||f.O<7){g=f.n("0");g={t:g,r:g,b:g,l:g}}a.stroked=false;b.type="frame";b.src=j;b.position=(d?0.5/d:0)+","+(c?0.5/c:0);a.coordsize=d*2+","+c*2;a.coordorigin="1,1";a.path=this.ya({Jb:i(g.t.a(e)+k(h.paddingTop).a(e)),Ib:i(g.r.a(e)+k(h.paddingRight).a(e)),tb:i(g.b.a(e)+k(h.paddingBottom).a(e)),Db:i(g.l.a(e)+k(h.paddingLeft).a(e))},
2);a=a.style;a.width=d;a.height=c},Cd:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},m:function(){f.u.m.call(this);this.e.runtimeStyle.filter=""}});f.Oc=f.u.R({ib:f.aa,Mb:f.aa,Nb:f.aa,Lb:f.aa,Ld:/^,+|,+$/g,Fd:/,+/g,gb:function(a,b){(this.pb||(this.pb=[]))[a]=b||void 0},ab:function(){var a=this.pb,b;if(a&&(b=a.join(",").replace(this.Ld,"").replace(this.Fd,","))!==this.Wc)this.Wc=this.e.runtimeStyle.background=b},m:function(){this.e.runtimeStyle.background="";delete this.pb}});f.Mc=f.u.R({ua:1,
Q:function(){return this.g.C.H()},i:function(){var a=this.g;return a.C.i()||a.q.i()},V:function(){var a=this.g.C.j(),b,c,d=0,e,g;if(a){b=[];if(c=a.M)for(;e=c[d++];)if(e.P==="linear-gradient"){g=this.vd(e.Wa);g=(e.Xa||f.Ka.Kc).a(this.e,g.h,g.f,g.h,g.f);b.push("url(data:image/svg+xml,"+escape(this.xd(e,g.h,g.f))+") "+this.dd(e.$)+" / "+g.h+"px "+g.f+"px "+(e.bc||"")+" "+(e.Wa||"")+" "+(e.ub||""))}else b.push(e.Hb);a.color&&b.push(a.color.Y);this.parent.gb(this.ua,b.join(","))}},dd:function(a){return a?
a.X.map(function(b){return b.d}).join(" "):"0 0"},vd:function(a){var b=this.e,c=this.s.o(),d=c.h;c=c.f;var e;if(a!=="border-box")if((e=this.g.w.j())&&(e=e.J)){d-=e.l.a(b)+e.l.a(b);c-=e.t.a(b)+e.b.a(b)}if(a==="content-box"){a=f.n;e=b.currentStyle;d-=a(e.paddingLeft).a(b)+a(e.paddingRight).a(b);c-=a(e.paddingTop).a(b)+a(e.paddingBottom).a(b)}return{h:d,f:c}},xd:function(a,b,c){var d=this.e,e=a.ca,g=e.length,j=f.Na.gc(d,b,c,a);a=j.xc;var i=j.yc,h=j.td,k=j.ud;j=j.rc;var n,m,p,r,t;n=[];for(m=0;m<g;m++)n.push(e[m].db?
e[m].db.a(d,j):m===0?0:m===g-1?j:null);for(m=1;m<g;m++)if(n[m]===null){r=n[m-1];p=m;do t=n[++p];while(t===null);n[m]=r+(t-r)/(p-m+1)}b=['<svg width="'+b+'" height="'+c+'" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="'+a/b*100+'%" y1="'+i/c*100+'%" x2="'+h/b*100+'%" y2="'+k/c*100+'%">'];for(m=0;m<g;m++)b.push('<stop offset="'+n[m]/j+'" stop-color="'+e[m].color.U(d)+'" stop-opacity="'+e[m].color.fa()+'"/>');b.push('</linearGradient></defs><rect width="100%" height="100%" fill="url(#g)"/></svg>');
return b.join("")},m:function(){this.parent.gb(this.ua)}});f.Nc=f.u.R({T:"repeat",Sc:"stretch",Qc:"round",ua:0,Q:function(){return this.g.q.H()},i:function(){return this.g.q.i()},V:function(){var a=this,b=a.g.q.j(),c=a.g.w.j(),d=a.s.o(),e=b.repeat,g=e.f,j=e.Ob,i=a.e,h=0;f.p.Rb(b.src,function(k){function n(Q,R,U,V,W,Y,X,S,w,A){K.push('<pattern patternUnits="userSpaceOnUse" id="pattern'+G+'" x="'+(g===l?Q+U/2-w/2:Q)+'" y="'+(j===l?R+V/2-A/2:R)+'" width="'+w+'" height="'+A+'"><svg width="'+w+'" height="'+
A+'" viewBox="'+W+" "+Y+" "+X+" "+S+'" preserveAspectRatio="none"><image xlink:href="'+v+'" x="0" y="0" width="'+r+'" height="'+t+'" /></svg></pattern>');J.push('<rect x="'+Q+'" y="'+R+'" width="'+U+'" height="'+V+'" fill="url(#pattern'+G+')" />');G++}var m=d.h,p=d.f,r=k.h,t=k.f,v=a.Dd(b.src,r,t),l=a.T,q=a.Sc;k=a.Qc;var s=Math.ceil,o=f.n("0"),u=b.J||(c?c.J:{t:o,r:o,b:o,l:o});o=u.t.a(i);var x=u.r.a(i),y=u.b.a(i);u=u.l.a(i);var z=b.slice,B=z.t.a(i),E=z.r.a(i),D=z.b.a(i);z=z.l.a(i);var C=m-u-x,F=p-o-
y,O=r-z-E,H=t-B-D,M=g===q?C:O*o/B,P=j===q?F:H*x/E,I=g===q?C:O*y/D;q=j===q?F:H*u/z;var K=[],J=[],G=0;if(g===k){M-=(M-(C%M||M))/s(C/M);I-=(I-(C%I||I))/s(C/I)}if(j===k){P-=(P-(F%P||P))/s(F/P);q-=(q-(F%q||q))/s(F/q)}k=['<svg width="'+m+'" height="'+p+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'];n(0,0,u,o,0,0,z,B,u,o);n(u,0,C,o,z,0,O,B,M,o);n(m-x,0,x,o,r-E,0,E,B,x,o);n(0,o,u,F,0,B,z,H,u,q);if(b.fill)n(u,o,C,F,z,B,O,H,M||I||O,q||P||H);n(m-x,o,x,F,r-E,B,E,H,x,P);n(0,
p-y,u,y,0,t-D,z,D,u,y);n(u,p-y,C,y,z,t-D,O,D,I,y);n(m-x,p-y,x,y,r-E,t-D,E,D,x,y);k.push("<defs>"+K.join("\n")+"</defs>"+J.join("\n")+"</svg>");a.parent.gb(a.ua,"url(data:image/svg+xml,"+escape(k.join(""))+") no-repeat border-box border-box");h&&a.parent.ab()},a);h=1},Dd:function(){var a={};return function(b,c,d){var e=a[b],g;if(!e){e=new Image;g=doc.createElement("canvas");e.src=b;g.width=c;g.height=d;g.getContext("2d").drawImage(e,0,0);e=a[b]=g.toDataURL()}return e}}(),Ea:f.Tb.prototype.Ea,m:function(){var a=
this.e.runtimeStyle;this.parent.gb(this.ua);a.borderColor=a.borderStyle=a.borderWidth=""}});f.kb=function(){function a(l,q){l.className+=" "+q}function b(l){var q=v.slice.call(arguments,1),s=q.length;setTimeout(function(){if(l)for(;s--;)a(l,q[s])},0)}function c(l){var q=v.slice.call(arguments,1),s=q.length;setTimeout(function(){if(l)for(;s--;){var o=q[s];o=t[o]||(t[o]=new RegExp("\\b"+o+"\\b","g"));l.className=l.className.replace(o,"")}},0)}function d(l){function q(){if(!U){var w,A,L=f.ja,T=l.currentStyle,
N=T.getAttribute(g)==="true",da=T.getAttribute(i)!=="false",ea=T.getAttribute(h)!=="false";S=T.getAttribute(j);S=L>7?S!=="false":S==="true";if(!R){R=1;l.runtimeStyle.zoom=1;T=l;for(var fa=1;T=T.previousSibling;)if(T.nodeType===1){fa=0;break}fa&&a(l,p)}J.cb();if(N&&(A=J.o())&&(w=doc.documentElement||doc.body)&&(A.y>w.clientHeight||A.x>w.clientWidth||A.y+A.f<0||A.x+A.h<0)){if(!Y){Y=1;f.mb.ba(q)}}else{U=1;Y=R=0;f.mb.Ha(q);if(L===9){G={C:new f.Sb(l),q:new f.Ub(l),w:new f.Vb(l)};Q=[G.C,G.q];K=new f.Oc(l,
J,G);w=[new f.Mc(l,J,G,K),new f.Nc(l,J,G,K)]}else{G={C:new f.Sb(l),w:new f.Vb(l),q:new f.Ub(l),G:new f.jb(l),ga:new f.Ic(l),Pb:new f.Uc(l)};Q=[G.C,G.w,G.q,G.G,G.ga,G.Pb];K=new f.Rc(l,J,G);w=[new f.Hc(l,J,G,K),new f.Fc(l,J,G,K),new f.Gc(l,J,G,K),new f.Tb(l,J,G,K)];l.tagName==="IMG"&&w.push(new f.Pc(l,J,G,K));K.ed=w}I=[K].concat(w);if(w=l.currentStyle.getAttribute(f.F+"watch-ancestors")){w=parseInt(w,10);A=0;for(N=l.parentNode;N&&(w==="NaN"||A++<w);){H(N,"onpropertychange",C);H(N,"onmouseenter",x);
H(N,"onmouseleave",y);H(N,"onmousedown",z);if(N.tagName in f.fc){H(N,"onfocus",E);H(N,"onblur",D)}N=N.parentNode}}if(S){f.Oa.ba(o);f.Oa.Rd()}o(1)}if(!V){V=1;L<9&&H(l,"onmove",s);H(l,"onresize",s);H(l,"onpropertychange",u);ea&&H(l,"onmouseenter",x);if(ea||da)H(l,"onmouseleave",y);da&&H(l,"onmousedown",z);if(l.tagName in f.fc){H(l,"onfocus",E);H(l,"onblur",D)}f.Qa.ba(s);f.L.ba(M)}J.hb()}}function s(){J&&J.Ad()&&o()}function o(w){if(!X)if(U){var A,L=I.length;F();for(A=0;A<L;A++)I[A].Ea();if(w||J.Od())for(A=
0;A<L;A++)I[A].ib();if(w||J.Td())for(A=0;A<L;A++)I[A].Mb();K.ab();O()}else R||q()}function u(){var w,A=I.length,L;w=event;if(!X&&!(w&&w.propertyName in r))if(U){F();for(w=0;w<A;w++)I[w].Ea();for(w=0;w<A;w++){L=I[w];L.Cb||L.ib();L.Q()&&L.Lb()}K.ab();O()}else R||q()}function x(){b(l,k)}function y(){c(l,k,n)}function z(){b(l,n);f.lb.ba(B)}function B(){c(l,n);f.lb.Ha(B)}function E(){b(l,m)}function D(){c(l,m)}function C(){var w=event.propertyName;if(w==="className"||w==="id")u()}function F(){J.cb();for(var w=
Q.length;w--;)Q[w].cb()}function O(){for(var w=Q.length;w--;)Q[w].hb();J.hb()}function H(w,A,L){w.attachEvent(A,L);W.push([w,A,L])}function M(){if(V){for(var w=W.length,A;w--;){A=W[w];A[0].detachEvent(A[1],A[2])}f.L.Ha(M);V=0;W=[]}}function P(){if(!X){var w,A;M();X=1;if(I){w=0;for(A=I.length;w<A;w++){I[w].ec=1;I[w].m()}}S&&f.Oa.Ha(o);f.Qa.Ha(o);I=J=G=Q=l=null}}var I,K,J=new ha(l),G,Q,R,U,V,W=[],Y,X,S;this.Ed=q;this.update=o;this.m=P;this.qd=l}var e={},g=f.F+"lazy-init",j=f.F+"poll",i=f.F+"track-active",
h=f.F+"track-hover",k=f.La+"hover",n=f.La+"active",m=f.La+"focus",p=f.La+"first-child",r={background:1,bgColor:1,display:1},t={},v=[];d.yd=function(l){var q=f.p.Ba(l);return e[q]||(e[q]=new d(l))};d.m=function(l){l=f.p.Ba(l);var q=e[l];if(q){q.m();delete e[l]}};d.md=function(){var l=[],q;if(e){for(var s in e)if(e.hasOwnProperty(s)){q=e[s];l.push(q.qd);q.m()}e={}}return l};return d}();f.supportsVML=f.zc;f.attach=function(a){f.ja<10&&f.zc&&f.kb.yd(a).Ed()};f.detach=function(a){f.kb.m(a)}};
var $=element;function init(){if(doc.media!=="print"){var a=window.PIE;a&&a.attach($)}}function cleanup(){if(doc.media!=="print"){var a=window.PIE;if(a){a.detach($);$=0}}}$.readyState==="complete"&&init();
</script>
</PUBLIC:COMPONENT>

8
themes/aerial/css/ie/html5shiv.js vendored Normal file
View File

@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="gradient1" x1="0%" y1="0%" x2="0%" y2="100%" spreadMethod="pad">
<stop offset="0%" stop-color="rgba(0,0,0,0)" stop-opacity="1"/>
<stop offset="100%" stop-color="rgba(0,0,0,0.65)" stop-opacity="1"/>
</linearGradient>
</defs>
<rect x="0" y="0" width="100%" height="100%" style="fill:url(#gradient1);" />
</svg>

After

Width:  |  Height:  |  Size: 440 B

View File

@ -0,0 +1,26 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Header */
#header nav a {
position: relative;
border: solid 1px white;
border-radius: 100%;
-ms-behavior: url("css/ie/PIE.htc");
}
#header nav a:before {
border: 0;
}
/* Footer */
#footer {
background-image: url("images/footer.png");
background-position: bottom left;
background-repeat: repeat-x;
}

View File

@ -0,0 +1,33 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Wrapper */
#wrapper {
opacity: 1;
}
/* Overlay */
#overlay {
opacity: 1;
}
/* Header */
#header {
opacity: 1;
}
#header nav li {
opacity: 1;
}
/* Footer */
#footer {
background-image: url("images/footer.svg");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000px" height="1000px" viewBox="0 0 1000 1000" zoomAndPan="disable">
<style type="text/css"><![CDATA[
line {
stroke: rgba(255,255,255,0.45);
stroke-width: 0.5px;
}
polygon.one {
fill: rgba(255,255,255,0.225);
}
polygon.two {
fill: rgba(255,255,255,0.15);
}
polygon.three {
fill: rgba(255,255,255,0.075);
}
]]></style>
<polygon class="one" points="-350,0 650,1000 0,1000 0,0" />
<polygon class="two" points="0,0 1000,1000 0,1000 0,0" />
<polygon class="three" points="350,0 1350,1000 0,1000 0,0" />
<line x1="-350" y1="0" x2="650" y2="1000" />
<line x1="0" y1="0" x2="1000" y2="1000" />
<line x1="350" y1="0" x2="1350" y2="1000" />
</svg>

After

Width:  |  Height:  |  Size: 811 B

247
themes/aerial/css/skel.css Normal file
View File

@ -0,0 +1,247 @@
/* Resets (http://meyerweb.com/eric/tools/css/reset/ | v2.0 | 20110126 | License: none (public domain)) */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}body{-webkit-text-size-adjust:none}
/* Box Model */
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* Container */
.container {
margin-left: auto;
margin-right: auto;
/* width: (containers) */
width: 1200px;
}
/* Modifiers */
/* 125% */
.container.\31 25\25 {
width: 100%;
/* max-width: (containers * 1.25) */
max-width: 1500px;
/* min-width: (containers) */
min-width: 1200px;
}
/* 75% */
.container.\37 5\25 {
/* width: (containers * 0.75) */
width: 900px;
}
/* 50% */
.container.\35 0\25 {
/* width: (containers * 0.50) */
width: 600px;
}
/* 25% */
.container.\32 5\25 {
/* width: (containers * 0.25) */
width: 300px;
}
/* Grid */
.row {
border-bottom: solid 1px transparent;
}
.row > * {
float: left;
}
.row:after, .row:before {
content: '';
display: block;
clear: both;
height: 0;
}
.row.uniform > * > :first-child {
margin-top: 0;
}
.row.uniform > * > :last-child {
margin-bottom: 0;
}
/* Gutters */
/* Normal */
.row > * {
/* padding: (gutters.horizontal) 0 0 (gutters.vertical) */
padding: 40px 0 0 40px;
}
.row {
/* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */
margin: -40px 0 -1px -40px;
}
.row.uniform > * {
/* padding: (gutters.vertical) 0 0 (gutters.vertical) */
padding: 40px 0 0 40px;
}
.row.uniform {
/* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */
margin: -40px 0 -1px -40px;
}
/* 200% */
.row.\32 00\25 > * {
/* padding: (gutters.horizontal) 0 0 (gutters.vertical) */
padding: 80px 0 0 80px;
}
.row.\32 00\25 {
/* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */
margin: -80px 0 -1px -80px;
}
.row.uniform.\32 00\25 > * {
/* padding: (gutters.vertical) 0 0 (gutters.vertical) */
padding: 80px 0 0 80px;
}
.row.uniform.\32 00\25 {
/* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */
margin: -80px 0 -1px -80px;
}
/* 150% */
.row.\31 50\25 > * {
/* padding: (gutters.horizontal) 0 0 (gutters.vertical) */
padding: 60px 0 0 60px;
}
.row.\31 50\25 {
/* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */
margin: -60px 0 -1px -60px;
}
.row.uniform.\31 50\25 > * {
/* padding: (gutters.vertical) 0 0 (gutters.vertical) */
padding: 60px 0 0 60px;
}
.row.uniform.\31 50\25 {
/* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */
margin: -60px 0 -1px -60px;
}
/* 50% */
.row.\35 0\25 > * {
/* padding: (gutters.horizontal) 0 0 (gutters.vertical) */
padding: 20px 0 0 20px;
}
.row.\35 0\25 {
/* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */
margin: -20px 0 -1px -20px;
}
.row.uniform.\35 0\25 > * {
/* padding: (gutters.vertical) 0 0 (gutters.vertical) */
padding: 20px 0 0 20px;
}
.row.uniform.\35 0\25 {
/* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */
margin: -20px 0 -1px -20px;
}
/* 25% */
.row.\32 5\25 > * {
/* padding: (gutters.horizontal) 0 0 (gutters.vertical) */
padding: 10px 0 0 10px;
}
.row.\32 5\25 {
/* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */
margin: -10px 0 -1px -10px;
}
.row.uniform.\32 5\25 > * {
/* padding: (gutters.vertical) 0 0 (gutters.vertical) */
padding: 10px 0 0 10px;
}
.row.uniform.\32 5\25 {
/* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */
margin: -10px 0 -1px -10px;
}
/* 0% */
.row.\30 \25 > * {
padding: 0;
}
.row.\30 \25 {
margin: 0 0 -1px 0;
}
/* Cells */
.\31 2u, .\31 2u\24 { width: 100%; clear: none; margin-left: 0; }
.\31 1u, .\31 1u\24 { width: 91.6666666667%; clear: none; margin-left: 0; }
.\31 0u, .\31 0u\24 { width: 83.3333333333%; clear: none; margin-left: 0; }
.\39 u, .\39 u\24 { width: 75%; clear: none; margin-left: 0; }
.\38 u, .\38 u\24 { width: 66.6666666667%; clear: none; margin-left: 0; }
.\37 u, .\37 u\24 { width: 58.3333333333%; clear: none; margin-left: 0; }
.\36 u, .\36 u\24 { width: 50%; clear: none; margin-left: 0; }
.\35 u, .\35 u\24 { width: 41.6666666667%; clear: none; margin-left: 0; }
.\34 u, .\34 u\24 { width: 33.3333333333%; clear: none; margin-left: 0; }
.\33 u, .\33 u\24 { width: 25%; clear: none; margin-left: 0; }
.\32 u, .\32 u\24 { width: 16.6666666667%; clear: none; margin-left: 0; }
.\31 u, .\31 u\24 { width: 8.3333333333%; clear: none; margin-left: 0; }
.\31 2u\24 + *,
.\31 1u\24 + *,
.\31 0u\24 + *,
.\39 u\24 + *,
.\38 u\24 + *,
.\37 u\24 + *,
.\36 u\24 + *,
.\35 u\24 + *,
.\34 u\24 + *,
.\33 u\24 + *,
.\32 u\24 + *,
.\31 u\24 + * {
clear: left;
}
.\-11u { margin-left: 91.6666666667% }
.\-10u { margin-left: 83.3333333333% }
.\-9u { margin-left: 75% }
.\-8u { margin-left: 66.6666666667% }
.\-7u { margin-left: 58.3333333333% }
.\-6u { margin-left: 50% }
.\-5u { margin-left: 41.6666666667% }
.\-4u { margin-left: 33.3333333333% }
.\-3u { margin-left: 25% }
.\-2u { margin-left: 16.6666666667% }
.\-1u { margin-left: 8.3333333333% }

View File

@ -0,0 +1,49 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Basic */
body {
min-width: 320px;
}
body, input, select, textarea {
font-size: 11pt;
}
/* BG */
@-moz-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-300px,0,0); -webkit-transform: translate3d(-300px,0,0); -o-transform: translate3d(-300px,0,0); -ms-transform: translate3d(-300px,0,0); transform: translate3d(-300px,0,0); } }
@-webkit-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-300px,0,0); -webkit-transform: translate3d(-300px,0,0); -o-transform: translate3d(-300px,0,0); -ms-transform: translate3d(-300px,0,0); transform: translate3d(-300px,0,0); } }
@-o-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-300px,0,0); -webkit-transform: translate3d(-300px,0,0); -o-transform: translate3d(-300px,0,0); -ms-transform: translate3d(-300px,0,0); transform: translate3d(-300px,0,0); } }
@-ms-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-300px,0,0); -webkit-transform: translate3d(-300px,0,0); -o-transform: translate3d(-300px,0,0); -ms-transform: translate3d(-300px,0,0); transform: translate3d(-300px,0,0); } }
@keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-300px,0,0); -webkit-transform: translate3d(-300px,0,0); -o-transform: translate3d(-300px,0,0); -ms-transform: translate3d(-300px,0,0); transform: translate3d(-300px,0,0); } }
#bg {
background-size: 300px auto;
width: 900px;
}
/* Header */
#header h1 {
font-size: 2.5em;
}
#header p {
font-size: 1em;
}
#header nav {
font-size: 1em;
}
#header nav a:hover {
font-size: 1em;
}
#header nav a:active {
font-size: 1em;
}

View File

@ -0,0 +1,23 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* BG */
@-moz-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-412.5px,0,0); -webkit-transform: translate3d(-412.5px,0,0); -o-transform: translate3d(-412.5px,0,0); -ms-transform: translate3d(-412.5px,0,0); transform: translate3d(-412.5px,0,0); } }
@-webkit-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-412.5px,0,0); -webkit-transform: translate3d(-412.5px,0,0); -o-transform: translate3d(-412.5px,0,0); -ms-transform: translate3d(-412.5px,0,0); transform: translate3d(-412.5px,0,0); } }
@-o-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-412.5px,0,0); -webkit-transform: translate3d(-412.5px,0,0); -o-transform: translate3d(-412.5px,0,0); -ms-transform: translate3d(-412.5px,0,0); transform: translate3d(-412.5px,0,0); } }
@-ms-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-412.5px,0,0); -webkit-transform: translate3d(-412.5px,0,0); -o-transform: translate3d(-412.5px,0,0); -ms-transform: translate3d(-412.5px,0,0); transform: translate3d(-412.5px,0,0); } }
@keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-412.5px,0,0); -webkit-transform: translate3d(-412.5px,0,0); -o-transform: translate3d(-412.5px,0,0); -ms-transform: translate3d(-412.5px,0,0); transform: translate3d(-412.5px,0,0); } }
#bg {
background-size: 412.5px auto;
width: 1237.5px;
}
/* Header */
#header nav {
padding: 0 1em;
}

View File

@ -0,0 +1,23 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Basic */
body, input, select, textarea {
font-size: 12pt;
}
/* BG */
@-moz-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-750px,0,0); -webkit-transform: translate3d(-750px,0,0); -o-transform: translate3d(-750px,0,0); -ms-transform: translate3d(-750px,0,0); transform: translate3d(-750px,0,0); } }
@-webkit-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-750px,0,0); -webkit-transform: translate3d(-750px,0,0); -o-transform: translate3d(-750px,0,0); -ms-transform: translate3d(-750px,0,0); transform: translate3d(-750px,0,0); } }
@-o-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-750px,0,0); -webkit-transform: translate3d(-750px,0,0); -o-transform: translate3d(-750px,0,0); -ms-transform: translate3d(-750px,0,0); transform: translate3d(-750px,0,0); } }
@-ms-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-750px,0,0); -webkit-transform: translate3d(-750px,0,0); -o-transform: translate3d(-750px,0,0); -ms-transform: translate3d(-750px,0,0); transform: translate3d(-750px,0,0); } }
@keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-750px,0,0); -webkit-transform: translate3d(-750px,0,0); -o-transform: translate3d(-750px,0,0); -ms-transform: translate3d(-750px,0,0); transform: translate3d(-750px,0,0); } }
#bg {
background-size: 750px auto;
width: 2250px;
}

View File

@ -0,0 +1,27 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Wrapper */
#wrapper {
opacity: 1;
}
/* Overlay */
#overlay {
opacity: 1;
}
/* Header */
#header {
opacity: 1;
}
#header nav li {
opacity: 1;
}

View File

@ -0,0 +1,23 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
/* Basic */
body, input, select, textarea {
font-size: 13pt;
}
/* BG */
@-moz-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-1500px,0,0); -webkit-transform: translate3d(-1500px,0,0); -o-transform: translate3d(-1500px,0,0); -ms-transform: translate3d(-1500px,0,0); transform: translate3d(-1500px,0,0); } }
@-webkit-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-1500px,0,0); -webkit-transform: translate3d(-1500px,0,0); -o-transform: translate3d(-1500px,0,0); -ms-transform: translate3d(-1500px,0,0); transform: translate3d(-1500px,0,0); } }
@-o-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-1500px,0,0); -webkit-transform: translate3d(-1500px,0,0); -o-transform: translate3d(-1500px,0,0); -ms-transform: translate3d(-1500px,0,0); transform: translate3d(-1500px,0,0); } }
@-ms-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-1500px,0,0); -webkit-transform: translate3d(-1500px,0,0); -o-transform: translate3d(-1500px,0,0); -ms-transform: translate3d(-1500px,0,0); transform: translate3d(-1500px,0,0); } }
@keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-1500px,0,0); -webkit-transform: translate3d(-1500px,0,0); -o-transform: translate3d(-1500px,0,0); -ms-transform: translate3d(-1500px,0,0); transform: translate3d(-1500px,0,0); } }
#bg {
background-size: 1500px auto;
width: 4500px;
}

397
themes/aerial/css/style.css Normal file
View File

@ -0,0 +1,397 @@
/*
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
@import url("http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,900");
@import url("font-awesome.min.css");
/* Basic */
body, input, select, textarea {
color: white;
font-family: 'Source Sans Pro', sans-serif;
font-size: 15pt;
font-weight: 300 !important;
letter-spacing: -0.025em;
line-height: 1.75em;
}
body {
background: white;
overflow: hidden;
}
body.loading * {
-moz-animation: none !important;
-webkit-animation: none !important;
-o-animation: none !important;
-ms-animation: none !important;
animation: none !important;
}
a {
-moz-transition: border-color 0.2s ease-in-out;
-webkit-transition: border-color 0.2s ease-in-out;
-o-transition: border-color 0.2s ease-in-out;
-ms-transition: border-color 0.2s ease-in-out;
transition: border-color 0.2s ease-in-out;
border-bottom: dotted 1px;
color: inherit;
outline: 0;
text-decoration: none;
}
a:hover {
border-color: transparent;
}
/* Icon */
.icon {
position: relative;
}
.icon:before {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-transform: none !important;
}
.icon > .label {
display: none;
}
/* Wrapper */
@-moz-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
@-webkit-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
@-o-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
@-ms-keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes wrapper { 0% { opacity: 0; } 100% { opacity: 1; } }
#wrapper {
-moz-animation: wrapper 3s forwards;
-webkit-animation: wrapper 3s forwards;
-o-animation: wrapper 3s forwards;
-ms-animation: wrapper 3s forwards;
animation: wrapper 3s forwards;
height: 100%;
left: 0;
opacity: 0;
position: fixed;
top: 0;
width: 100%;
}
/* BG */
#bg {
-moz-animation: bg 60s linear infinite;
-webkit-animation: bg 60s linear infinite;
-o-animation: bg 60s linear infinite;
-ms-animation: bg 60s linear infinite;
animation: bg 60s linear infinite;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-moz-transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
/* Set your background with this */
background: #348cb2 url("images/bg.jpg") bottom left;
background-repeat: repeat-x;
height: 100%;
left: 0;
opacity: 1;
position: fixed;
top: 0;
}
@-moz-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-2250px,0,0); -webkit-transform: translate3d(-2250px,0,0); -o-transform: translate3d(-2250px,0,0); -ms-transform: translate3d(-2250px,0,0); transform: translate3d(-2250px,0,0); } }
@-webkit-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-2250px,0,0); -webkit-transform: translate3d(-2250px,0,0); -o-transform: translate3d(-2250px,0,0); -ms-transform: translate3d(-2250px,0,0); transform: translate3d(-2250px,0,0); } }
@-o-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-2250px,0,0); -webkit-transform: translate3d(-2250px,0,0); -o-transform: translate3d(-2250px,0,0); -ms-transform: translate3d(-2250px,0,0); transform: translate3d(-2250px,0,0); } }
@-ms-keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-2250px,0,0); -webkit-transform: translate3d(-2250px,0,0); -o-transform: translate3d(-2250px,0,0); -ms-transform: translate3d(-2250px,0,0); transform: translate3d(-2250px,0,0); } }
@keyframes bg { 0% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } 100% { -moz-transform: translate3d(-2250px,0,0); -webkit-transform: translate3d(-2250px,0,0); -o-transform: translate3d(-2250px,0,0); -ms-transform: translate3d(-2250px,0,0); transform: translate3d(-2250px,0,0); } }
#bg {
background-size: 2250px auto;
width: 6750px;
}
/* Overlay */
@-moz-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
@-webkit-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
@-o-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
@-ms-keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes overlay { 0% { opacity: 0; } 100% { opacity: 1; } }
#overlay {
-moz-animation: overlay 1.5s 1.5s forwards;
-webkit-animation: overlay 1.5s 1.5s forwards;
-o-animation: overlay 1.5s 1.5s forwards;
-ms-animation: overlay 1.5s 1.5s forwards;
animation: overlay 1.5s 1.5s forwards;
background-attachment: fixed, fixed;
background-image: url("images/overlay-pattern.png"), url("images/overlay.svg");
background-position: top left, center center;
background-repeat: repeat, no-repeat;
background-size: auto, cover;
height: 100%;
left: 0;
opacity: 0;
position: fixed;
top: 0;
width: 100%;
}
/* Main */
#main {
height: 100%;
left: 0;
position: fixed;
text-align: center;
top: 0;
width: 100%;
}
#main:before {
content: '';
display: inline-block;
height: 100%;
margin-right: 0;
vertical-align: middle;
width: 1px;
}
/* Header */
@-moz-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-webkit-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-o-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-ms-keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@keyframes header { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-moz-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-webkit-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-o-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@-ms-keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
@keyframes nav-icons { 0% { -moz-transform: translate3d(0,1em,0); -webkit-transform: translate3d(0,1em,0); -o-transform: translate3d(0,1em,0); -ms-transform: translate3d(0,1em,0); transform: translate3d(0,1em,0); opacity: 0; } 100% { -moz-transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); opacity: 1; } }
#header {
-moz-animation: header 1s 2.25s forwards;
-webkit-animation: header 1s 2.25s forwards;
-o-animation: header 1s 2.25s forwards;
-ms-animation: header 1s 2.25s forwards;
animation: header 1s 2.25s forwards;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-moz-transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
cursor: default;
display: inline-block;
opacity: 0;
position: relative;
text-align: center;
top: -1em;
vertical-align: middle;
width: 90%;
}
#header h1 {
font-size: 4.35em;
font-weight: 900;
letter-spacing: -0.035em;
line-height: 1em;
}
#header p {
font-size: 1.25em;
margin: 0.75em 0 0.25em 0;
opacity: 0.75;
}
#header nav {
margin: 1.5em 0 0 0;
}
#header nav li {
-moz-animation: nav-icons 0.5s ease-in-out forwards;
-webkit-animation: nav-icons 0.5s ease-in-out forwards;
-o-animation: nav-icons 0.5s ease-in-out forwards;
-ms-animation: nav-icons 0.5s ease-in-out forwards;
animation: nav-icons 0.5s ease-in-out forwards;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-moz-transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
display: inline-block;
height: 5.35em;
line-height: 5.885em;
opacity: 0;
position: relative;
top: 0;
width: 5.35em;
}
#header nav li:nth-child(1) {
-moz-animation-delay: 2.5s;
-webkit-animation-delay: 2.5s;
-o-animation-delay: 2.5s;
-ms-animation-delay: 2.5s;
animation-delay: 2.5s;
}
#header nav li:nth-child(2) {
-moz-animation-delay: 2.75s;
-webkit-animation-delay: 2.75s;
-o-animation-delay: 2.75s;
-ms-animation-delay: 2.75s;
animation-delay: 2.75s;
}
#header nav li:nth-child(3) {
-moz-animation-delay: 3s;
-webkit-animation-delay: 3s;
-o-animation-delay: 3s;
-ms-animation-delay: 3s;
animation-delay: 3s;
}
#header nav li:nth-child(4) {
-moz-animation-delay: 3.25s;
-webkit-animation-delay: 3.25s;
-o-animation-delay: 3.25s;
-ms-animation-delay: 3.25s;
animation-delay: 3.25s;
}
#header nav li:nth-child(5) {
-moz-animation-delay: 3.5s;
-webkit-animation-delay: 3.5s;
-o-animation-delay: 3.5s;
-ms-animation-delay: 3.5s;
animation-delay: 3.5s;
}
#header nav li:nth-child(6) {
-moz-animation-delay: 3.75s;
-webkit-animation-delay: 3.75s;
-o-animation-delay: 3.75s;
-ms-animation-delay: 3.75s;
animation-delay: 3.75s;
}
#header nav li:nth-child(7) {
-moz-animation-delay: 4s;
-webkit-animation-delay: 4s;
-o-animation-delay: 4s;
-ms-animation-delay: 4s;
animation-delay: 4s;
}
#header nav li:nth-child(8) {
-moz-animation-delay: 4.25s;
-webkit-animation-delay: 4.25s;
-o-animation-delay: 4.25s;
-ms-animation-delay: 4.25s;
animation-delay: 4.25s;
}
#header nav li:nth-child(9) {
-moz-animation-delay: 4.5s;
-webkit-animation-delay: 4.5s;
-o-animation-delay: 4.5s;
-ms-animation-delay: 4.5s;
animation-delay: 4.5s;
}
#header nav li:nth-child(10) {
-moz-animation-delay: 4.75s;
-webkit-animation-delay: 4.75s;
-o-animation-delay: 4.75s;
-ms-animation-delay: 4.75s;
animation-delay: 4.75s;
}
#header nav a {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
border: 0;
display: inline-block;
}
#header nav a:before {
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
border-radius: 100%;
border: solid 1px white;
display: block;
font-size: 1.75em;
height: 2.5em;
line-height: 2.5em;
position: relative;
text-align: center;
top: 0;
width: 2.5em;
}
#header nav a:hover {
font-size: 1.1em;
}
#header nav a:hover:before {
background-color: rgba(255, 255, 255, 0.175);
color: white;
}
#header nav a:active {
font-size: 0.95em;
background: none;
}
#header nav a:active:before {
background-color: rgba(255, 255, 255, 0.35);
color: white;
}
#header nav a span {
display: none;
}
/* Footer */
#footer {
background-image: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: -o-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: -ms-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.5) 75%);
bottom: 0;
cursor: default;
height: 6em;
left: 0;
line-height: 8em;
position: absolute;
text-align: center;
width: 100%;
}

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More