New plugin loader, page features, API0.2b, Bugfixes
This commit is contained in:
@ -1,19 +1,19 @@
|
||||
<?php
|
||||
if ($blog->entries)
|
||||
{
|
||||
while ($data = $blog->entries())
|
||||
{
|
||||
$entry_init = entry_show_init($data['entryContent'], $data['entrySlug']);
|
||||
echo "<article".($data['entryPinned'] ? ' class="pinned"' : '').(strlen(strip_tags($entry_init)) <= 210 ? ' class="tweet"' : '')." title='".show_date($data['entryPublished'])."'>
|
||||
<header>
|
||||
<h2><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars($data['entryTitle'])."</a></h2>
|
||||
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a></p>
|
||||
</header>
|
||||
<div class='content'>".$entry_init."</div>
|
||||
</article>\n";
|
||||
unset($entry_init);
|
||||
}
|
||||
echo "<p class='paginator'>".(isset($seo[1]) && isnum($seo[1]) ? "<a href='/p/".($seo[1]-1)."' class='prev'>{locale:prev_page}</a><a href='/p/".($seo[1]+1)."' class='next'>{locale:next_page}</a>" : "<a href='/p/2' class='next'>{locale:next_page}</a>")."</p>";
|
||||
} else
|
||||
echo "<h1>{locale:no_more_title}</h1>"
|
||||
<?php
|
||||
if ($blog->entries)
|
||||
{
|
||||
while ($data = $blog->entries())
|
||||
{
|
||||
$entry_init = entry_show_init($data['entryContent'], $data['entrySlug']);
|
||||
echo "<article".($data['entryPinned'] ? ' class="pinned"' : '').(strlen(strip_tags($entry_init)) <= 210 ? ' class="tweet"' : '')." title='".show_date($data['entryPublished'])."'>
|
||||
<header>
|
||||
<h2><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars($data['entryTitle'])."</a></h2>
|
||||
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a></p>
|
||||
</header>
|
||||
<div class='content'>".$entry_init."</div>
|
||||
</article>\n";
|
||||
unset($entry_init);
|
||||
}
|
||||
echo "<p class='paginator'>".(isset($seo[1]) && isnum($seo[1]) ? "<a href='/p/".($seo[1]-1)."' class='prev'>{locale:prev_page}</a><a href='/p/".($seo[1]+1)."' class='next'>{locale:next_page}</a>" : "<a href='/p/2' class='next'>{locale:next_page}</a>")."</p>";
|
||||
} else
|
||||
echo "<h1>{locale:no_more_title}</h1>"
|
||||
."<p>{locale:no_more}</p>\n";
|
@ -1,31 +1,31 @@
|
||||
<?php
|
||||
|
||||
if ($blog->entries)
|
||||
while ($data = $blog->entry())
|
||||
{
|
||||
addTitle($data['entryTitle']);
|
||||
|
||||
if ($data['entryHidden']) echo "<p>{locale:hidden_content}</p>";
|
||||
|
||||
if ($data['entryPIN'] && get_pin() != $data['entryPIN'])
|
||||
echo "<p>{locale:pin_protected_content}</p>
|
||||
<form action='".get_entry_link($data['entrySlug'])."' method='post' name='entry-pin-input'>
|
||||
<input type='text' name='read_entry_pin' placeholder='{locale:entry_pin}' />
|
||||
<button type='submit'>{locale:unlock}</button>
|
||||
</form>";
|
||||
else
|
||||
{
|
||||
addDescription(entry_show_init($data['entryContent'], $data['entrySlug']));
|
||||
addImage((preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', $data['entryContent'], $images) ? $images[1] : 0));
|
||||
headerImage($data['entryHeader']);
|
||||
echo "<article class='full'>
|
||||
".(strlen($data['entryTitle']) > 50 ? "<h2>".htmlspecialchars($data['entryTitle'])."</h2>" : null)."
|
||||
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a>
|
||||
<div class='content'>".entry_show_all($data['entryContent'])."</div>
|
||||
<p clasS='meta'>".get_entry_admin($data)."</p>
|
||||
</article>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "<h1>{locale:entry_not_found_title}</h1>"
|
||||
."<p>{locale:entry_not_found}</p>\n";
|
||||
<?php
|
||||
|
||||
if ($blog->entries)
|
||||
while ($data = $blog->entry())
|
||||
{
|
||||
addTitle($data['entryTitle']);
|
||||
|
||||
if ($data['entryHidden']) echo "<p>{locale:hidden_content}</p>";
|
||||
|
||||
if ($data['entryPIN'] && get_pin() != $data['entryPIN'])
|
||||
echo "<p>{locale:pin_protected_content}</p>
|
||||
<form action='".get_entry_link($data['entrySlug'])."' method='post' name='entry-pin-input'>
|
||||
<input type='text' name='read_entry_pin' placeholder='{locale:entry_pin}' />
|
||||
<button type='submit'>{locale:unlock}</button>
|
||||
</form>";
|
||||
else
|
||||
{
|
||||
addDescription(entry_show_init($data['entryContent'], $data['entrySlug']));
|
||||
addImage((preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', $data['entryContent'], $images) ? $images[1] : 0));
|
||||
headerImage($data['entryHeader']);
|
||||
echo "<article class='full'>
|
||||
".(strlen($data['entryTitle']) > 50 ? "<h2>".htmlspecialchars($data['entryTitle'])."</h2>" : null)."
|
||||
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a>
|
||||
<div class='content'>".entry_show_all($data['entryContent'])."</div>
|
||||
<p clasS='meta'>".get_entry_admin($data)."</p>
|
||||
</article>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "<h1>{locale:entry_not_found_title}</h1>"
|
||||
."<p>{locale:entry_not_found}</p>\n";
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
if ($page->readable())
|
||||
{
|
||||
addTitle($page->data['pageTitle']);
|
||||
echo "<article>".entry_show_all($page->data['pageContent'])."</article>";
|
||||
} else
|
||||
<?php
|
||||
|
||||
if ($page->readable())
|
||||
{
|
||||
addTitle($page->data['pageTitle']);
|
||||
echo "<article>".entry_show_all($page->data['pageContent'])."</article>";
|
||||
} else
|
||||
echo "<h2>$_locale[page_not_found]</h2><p>$_locale[page_not_found_text]</p>";
|
@ -1,46 +1,46 @@
|
||||
<div class="profile">
|
||||
<h3><?=$userData['userName'].($me ? ' <a href="'.get_current_link().'/edit" class="edit">{locale:profile_edit}</a>' : '')?></h3>
|
||||
|
||||
<div id="profile_pic" style="background-image: url('<?=get_profile_picture($userData)?>')">
|
||||
<?php if ($me) : ?>
|
||||
<form action="<?=get_current_link()?>" method="post" name="userpic-upload" enctype="multipart/form-data">
|
||||
<input type="file" name="userPic" id="userPicInput" style="display: none" />
|
||||
<button type="button" onclick="$('#userPicInput').focus().click()">{locale:browse}</button><button type="submit" id="userPicSaveBtn" class="orange">{locale:delete}</button>
|
||||
</form>
|
||||
<script>
|
||||
$("#userPicInput").change(function() {
|
||||
$("#userPicSaveBtn").html('{locale:save}').removeClass('orange');
|
||||
});
|
||||
</script>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if (LOGGEDIN) : ?>
|
||||
<div class='box contact'>
|
||||
<p><strong>{locale:name}:</strong> <?=$userData['userRealName']?></p>
|
||||
<p><strong>{locale:email}:</strong> <?=$userData['userEmail']?></p>
|
||||
<?=($userData['userWeb'] ? '<p><strong>{locale:web}:</strong> '.$userData['userWeb'].'</p>' : null)?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
$recent = $_sql->query("SELECT entrySlug, entryTitle FROM entries WHERE entryBy = $userData[userId] AND entryPublished <= ".time()." ORDER BY entryPublished DESC LIMIT 5");
|
||||
if ($recent->num_rows) : ?>
|
||||
<div class='box recent'>
|
||||
<?php
|
||||
while ($data = $recent->fetch_assoc())
|
||||
echo "<p><a href='".get_entry_link($data['entrySlug'])."'>".trimlink($data['entryTitle'], 42)."</a></p>\n";
|
||||
?>
|
||||
</div>
|
||||
<?php endif; unset($recent); ?>
|
||||
<div style="clear: both"></div>
|
||||
|
||||
<?php if ($userData['userIntroduction']) : ?>
|
||||
<div class='box introduction'>
|
||||
<p><?=$userData['userIntroduction']?></p>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="profile">
|
||||
<h3><?=$userData['userName'].($me ? ' <a href="'.get_current_link().'/edit" class="edit">{locale:profile_edit}</a>' : '')?></h3>
|
||||
|
||||
<div id="profile_pic" style="background-image: url('<?=get_profile_picture($userData)?>')">
|
||||
<?php if ($me) : ?>
|
||||
<form action="<?=get_current_link()?>" method="post" name="userpic-upload" enctype="multipart/form-data">
|
||||
<input type="file" name="userPic" id="userPicInput" style="display: none" />
|
||||
<button type="button" onclick="$('#userPicInput').focus().click()">{locale:browse}</button><button type="submit" id="userPicSaveBtn" class="orange">{locale:delete}</button>
|
||||
</form>
|
||||
<script>
|
||||
$("#userPicInput").change(function() {
|
||||
$("#userPicSaveBtn").html('{locale:save}').removeClass('orange');
|
||||
});
|
||||
</script>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if (LOGGEDIN) : ?>
|
||||
<div class='box contact'>
|
||||
<p><strong>{locale:name}:</strong> <?=$userData['userRealName']?></p>
|
||||
<p><strong>{locale:email}:</strong> <?=$userData['userEmail']?></p>
|
||||
<?=($userData['userWeb'] ? '<p><strong>{locale:web}:</strong> '.$userData['userWeb'].'</p>' : null)?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
$recent = $_sql->query("SELECT entrySlug, entryTitle FROM entries WHERE entryBy = $userData[userId] AND entryPublished <= ".time()." ORDER BY entryPublished DESC LIMIT 5");
|
||||
if ($recent->num_rows) : ?>
|
||||
<div class='box recent'>
|
||||
<?php
|
||||
while ($data = $recent->fetch_assoc())
|
||||
echo "<p><a href='".get_entry_link($data['entrySlug'])."'>".trimlink($data['entryTitle'], 42)."</a></p>\n";
|
||||
?>
|
||||
</div>
|
||||
<?php endif; unset($recent); ?>
|
||||
<div style="clear: both"></div>
|
||||
|
||||
<?php if ($userData['userIntroduction']) : ?>
|
||||
<div class='box introduction'>
|
||||
<p><?=$userData['userIntroduction']?></p>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
|
||||
if ($tagged->num_rows)
|
||||
{
|
||||
$tag = $tagged->fetch_assoc();
|
||||
addTitle($tag['tagName']);
|
||||
if ($entries->num_rows)
|
||||
{
|
||||
while ($data = $entries->fetch_assoc())
|
||||
echo "<h3><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars(trimlink($data['entryTitle'],90))."</a></h3>"
|
||||
."<p>".show_date($data['entryPublished'])."</p>";
|
||||
}
|
||||
} else
|
||||
redirect();
|
||||
|
||||
unset($tag);
|
||||
unset($tagged);
|
||||
<?php
|
||||
|
||||
if ($tagged->num_rows)
|
||||
{
|
||||
$tag = $tagged->fetch_assoc();
|
||||
addTitle($tag['tagName']);
|
||||
if ($entries->num_rows)
|
||||
{
|
||||
while ($data = $entries->fetch_assoc())
|
||||
echo "<h3><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars(trimlink($data['entryTitle'],90))."</a></h3>"
|
||||
."<p>".show_date($data['entryPublished'])."</p>";
|
||||
}
|
||||
} else
|
||||
redirect();
|
||||
|
||||
unset($tag);
|
||||
unset($tagged);
|
||||
unset($entries);
|
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 184 KiB |
@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512; fill: #FFF" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="396.6,160 416,180.7 256,352 96,180.7 115.3,160 256,310.5 "/></svg>
|
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 459 B |
File diff suppressed because it is too large
Load Diff
@ -1,76 +1,76 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php get_page_title(); ?></title>
|
||||
<meta charset="utf-8" />
|
||||
<link href="/includes/css/ui-lightness/jquery-ui.custom.min.css" rel="stylesheet" />
|
||||
<link href="/<?=get_theme_lib()?>/font/typicons.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="/<?=get_theme_lib()?>/style.css" type="text/css" media="screen" />
|
||||
<link href='//fonts.googleapis.com/css?family=Archivo+Narrow:400,700|Open+Sans:400,300&subset=latin,latin-ext' rel='stylesheet' type='text/css' />
|
||||
<script src="/includes/js/jquery.js"></script>
|
||||
<script src="/includes/js/jquery-ui.custom.min.js"></script>
|
||||
<script src="/includes/js/functions.js"></script>
|
||||
<script><?php
|
||||
echo 'var headerimg = '.($headerimg ? 'true':'false').';';
|
||||
if (LOGGEDIN) echo 'var userdata = ['.$user['userFiltrId'].','.$user['userLevel'].',"'.$user['userName'].'","'.$user['userPublicName'].'"];';
|
||||
else echo 'var userdata = false;';
|
||||
?></script>
|
||||
<script src="/<?=get_theme_lib()?>/theme.js"></script>
|
||||
<meta name="keywords" content="<?=keywords()?>" />
|
||||
<meta name="description" content="<?=($description ? $description : $_set['description'])?>" />
|
||||
<meta name="copyright" content="Sandros 2015" />
|
||||
<meta name="robot" content="index, follow" />
|
||||
<meta property="og:title" content="<?=(isset($_title[0]) ? $_title[0] : $_set['title'])?>" />
|
||||
<meta property="og:image" content="<?=($metaimage ? $metaimage : ($headerimg ? $headerimg : '/'.get_theme_lib().'/images/moto360-filter.jpg'))?>" />
|
||||
<meta property="og:description" content="<?=($description ? $description : $_set['description'])?>" />
|
||||
<?php get_page_extra_head(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<header id="floating-header">
|
||||
<div id="header-wrapper"<?=($headerimg ? ' style="background-image:url(\''.$headerimg.'\')" class="dim"' : null)?>>
|
||||
<div id="header" class="container">
|
||||
<div id="logo">
|
||||
<h1><a href="<?=get_current_link()?>"><?=$_set['title'].(isset($_title[0]) ? ' • '.trimlink($_title[0].(isset($_title[1]) ? ' • '.$_title[1] : null), 100) : null)?></a></h1>
|
||||
<p><?=$_set['tagline']?></p>
|
||||
</div>
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<?php get_navigation(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="tags">
|
||||
<ul>
|
||||
<?php get_tags(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="arrowDown" href="#"></a>
|
||||
</header>
|
||||
|
||||
<div id="page">
|
||||
<?php
|
||||
get_errors();
|
||||
get_infos();
|
||||
?>
|
||||
<section id="content">
|
||||
<?php echo get_site_body(); ?>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<footer id="footer">
|
||||
<?php if (!LOGGEDIN) : ?>
|
||||
<form action="//filtr.sandros.hu/app_login/<?=$_set['filtr_appid']?>&ret" method="get" name="login-form" id="footer-account">
|
||||
<input type="submit" name="login" value="<?=$_locale['login']?>" />
|
||||
</form>
|
||||
<?php else :
|
||||
echo "<div id='footer-account'>";
|
||||
include 'includes/sidebar/account.php';
|
||||
echo "</div>";
|
||||
endif; ?>
|
||||
<p>© <?=date('Y')?> <?=$_set['title']?>. All rights reserved. Powered by <a href="http://sandros.hu/">Insanely</a>.</p>
|
||||
</footer>
|
||||
<a id="scroll-up" href="#top"></a>
|
||||
<?php get_page_extra_body(); ?>
|
||||
</body>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php get_page_title(); ?></title>
|
||||
<meta charset="utf-8" />
|
||||
<link href="/includes/css/ui-lightness/jquery-ui.custom.min.css" rel="stylesheet" />
|
||||
<link href="/<?=get_theme_lib()?>/font/typicons.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="/<?=get_theme_lib()?>/style.css" type="text/css" media="screen" />
|
||||
<link href='//fonts.googleapis.com/css?family=Archivo+Narrow:400,700|Open+Sans:400,300&subset=latin,latin-ext' rel='stylesheet' type='text/css' />
|
||||
<script src="/includes/js/jquery.js"></script>
|
||||
<script src="/includes/js/jquery-ui.custom.min.js"></script>
|
||||
<script src="/includes/js/functions.js"></script>
|
||||
<script><?php
|
||||
echo 'var headerimg = '.($headerimg ? 'true':'false').';';
|
||||
if (LOGGEDIN) echo 'var userdata = ['.$user['userFiltrId'].','.$user['userLevel'].',"'.$user['userName'].'","'.$user['userPublicName'].'"];';
|
||||
else echo 'var userdata = false;';
|
||||
?></script>
|
||||
<script src="/<?=get_theme_lib()?>/theme.js"></script>
|
||||
<meta name="keywords" content="<?=keywords()?>" />
|
||||
<meta name="description" content="<?=($description ? $description : $_set['description'])?>" />
|
||||
<meta name="copyright" content="Sandros 2015" />
|
||||
<meta name="robot" content="index, follow" />
|
||||
<meta property="og:title" content="<?=(isset($_title[0]) ? $_title[0] : $_set['title'])?>" />
|
||||
<meta property="og:image" content="<?=($metaimage ? $metaimage : ($headerimg ? $headerimg : '/'.get_theme_lib().'/images/moto360-filter.jpg'))?>" />
|
||||
<meta property="og:description" content="<?=($description ? $description : $_set['description'])?>" />
|
||||
<?php get_page_extra_head(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<header id="floating-header">
|
||||
<div id="header-wrapper"<?=($headerimg ? ' style="background-image:url(\''.$headerimg.'\')" class="dim"' : null)?>>
|
||||
<div id="header" class="container">
|
||||
<div id="logo">
|
||||
<h1><a href="<?=get_current_link()?>"><?=$_set['title'].(isset($_title[0]) ? ' • '.trimlink($_title[0].(isset($_title[1]) ? ' • '.$_title[1] : null), 100) : null)?></a></h1>
|
||||
<p><?=$_set['tagline']?></p>
|
||||
</div>
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<?php get_navigation(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="tags">
|
||||
<ul>
|
||||
<?php get_tags(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="arrowDown" href="#"></a>
|
||||
</header>
|
||||
|
||||
<div id="page">
|
||||
<?php
|
||||
get_errors();
|
||||
get_infos();
|
||||
?>
|
||||
<section id="content">
|
||||
<?php echo get_site_body(); ?>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<footer id="footer">
|
||||
<?php if (!LOGGEDIN) : ?>
|
||||
<form action="//filtr.sandros.hu/app_login/<?=$_set['filtr_appid']?>&ret" method="get" name="login-form" id="footer-account">
|
||||
<input type="submit" name="login" value="<?=$_locale['login']?>" />
|
||||
</form>
|
||||
<?php else :
|
||||
echo "<div id='footer-account'>";
|
||||
include 'includes/sidebar/account.php';
|
||||
echo "</div>";
|
||||
endif; ?>
|
||||
<p>© <?=date('Y')?> <?=$_set['title']?>. All rights reserved. Powered by <a href="http://sandros.hu/">Insanely</a>.</p>
|
||||
</footer>
|
||||
<a id="scroll-up" href="#top"></a>
|
||||
<?php get_page_extra_body(); ?>
|
||||
</body>
|
||||
</html>
|
@ -1,67 +1,67 @@
|
||||
/* jQuery Plugins */
|
||||
(function($) {
|
||||
$.fn.longClick = function(callback, timeout) {
|
||||
var timer;
|
||||
timeout = timeout || 500;
|
||||
$(this).mousedown(function() {
|
||||
timer = setTimeout(function() { callback(); }, timeout);
|
||||
return false;
|
||||
});
|
||||
$(document).mouseup(function() {
|
||||
clearTimeout(timer);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/* EXTRA FUCKING VIEW */
|
||||
function keepThePageAwesome() {
|
||||
if ($(window).width() < 1020)
|
||||
{
|
||||
keepTheFuckingSidebarOnTheScreenOkay = true;
|
||||
$(document.body).addClass('tinyscreen');
|
||||
}
|
||||
else
|
||||
{
|
||||
keepTheFuckingSidebarOnTheScreenOkay = false;
|
||||
$(document.body).removeClass('tinyscreen');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* AWESOMENESS */
|
||||
$(document).ready(function() {
|
||||
|
||||
// Mobile view
|
||||
if ((navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) ? true : false))
|
||||
$(document.body).addClass('tinyscreen');
|
||||
else if (userdata)
|
||||
$('header').append('<a id="miniprofile" href="'+(userdata[1] > 1 ? '/admin' : '/user/'+userdata[2])+'"><img src="//filtr.sandros.hu/proxy/avatar/'+userdata[0]+'" alt=""/>'+userdata[3]+'</a>'); // User miniprofile
|
||||
|
||||
$(window).resize(function() { keepThePageAwesome(); }).resize();
|
||||
|
||||
// TWEET ANIMS
|
||||
$("article.tweet").hover(function() {
|
||||
$(this).find("p.readmore").stop().slideDown();
|
||||
},
|
||||
function(){
|
||||
$(this).find("p.readmore").stop().slideUp();
|
||||
});
|
||||
|
||||
// Sub-page detection
|
||||
if (/entry|\/p\/|tag|page|user|admin/.test(window.location.href) && !headerimg)
|
||||
$(window).scrollTop($('#page').offset().top);
|
||||
|
||||
// Scroll down button
|
||||
$('#arrowDown').click(function() {
|
||||
$("html, body").animate({scrollTop: $('#page').offset().top}, '500', function() {
|
||||
window.location.hash = '#content';
|
||||
});
|
||||
}).longClick(function() {
|
||||
$("html, body").animate({scrollTop: $(document).height()-$(window).height()}, '1800');
|
||||
});
|
||||
|
||||
// Scroll to the top button
|
||||
$('#scroll-up').click(function() { $("html, body").animate({scrollTop: 0}, '2000'); return false; });
|
||||
/* jQuery Plugins */
|
||||
(function($) {
|
||||
$.fn.longClick = function(callback, timeout) {
|
||||
var timer;
|
||||
timeout = timeout || 500;
|
||||
$(this).mousedown(function() {
|
||||
timer = setTimeout(function() { callback(); }, timeout);
|
||||
return false;
|
||||
});
|
||||
$(document).mouseup(function() {
|
||||
clearTimeout(timer);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/* EXTRA FUCKING VIEW */
|
||||
function keepThePageAwesome() {
|
||||
if ($(window).width() < 1020)
|
||||
{
|
||||
keepTheFuckingSidebarOnTheScreenOkay = true;
|
||||
$(document.body).addClass('tinyscreen');
|
||||
}
|
||||
else
|
||||
{
|
||||
keepTheFuckingSidebarOnTheScreenOkay = false;
|
||||
$(document.body).removeClass('tinyscreen');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* AWESOMENESS */
|
||||
$(document).ready(function() {
|
||||
|
||||
// Mobile view
|
||||
if ((navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) ? true : false))
|
||||
$(document.body).addClass('tinyscreen');
|
||||
else if (userdata)
|
||||
$('header').append('<a id="miniprofile" href="'+(userdata[1] > 1 ? '/admin' : '/user/'+userdata[2])+'"><img src="//filtr.sandros.hu/proxy/avatar/'+userdata[0]+'" alt=""/>'+userdata[3]+'</a>'); // User miniprofile
|
||||
|
||||
$(window).resize(function() { keepThePageAwesome(); }).resize();
|
||||
|
||||
// TWEET ANIMS
|
||||
$("article.tweet").hover(function() {
|
||||
$(this).find("p.readmore").stop().slideDown();
|
||||
},
|
||||
function(){
|
||||
$(this).find("p.readmore").stop().slideUp();
|
||||
});
|
||||
|
||||
// Sub-page detection
|
||||
if (/entry|\/p\/|tag|page|user|admin/.test(window.location.href) && !headerimg)
|
||||
$(window).scrollTop($('#page').offset().top);
|
||||
|
||||
// Scroll down button
|
||||
$('#arrowDown').click(function() {
|
||||
$("html, body").animate({scrollTop: $('#page').offset().top}, '500', function() {
|
||||
window.location.hash = '#content';
|
||||
});
|
||||
}).longClick(function() {
|
||||
$("html, body").animate({scrollTop: $(document).height()-$(window).height()}, '1800');
|
||||
});
|
||||
|
||||
// Scroll to the top button
|
||||
$('#scroll-up').click(function() { $("html, body").animate({scrollTop: 0}, '2000'); return false; });
|
||||
});
|
Reference in New Issue
Block a user