Updated 2k11 to v1.0.5.

This commit is contained in:
Matthias Mees 2012-01-20 21:04:38 +01:00
parent f2c6b669ad
commit 695c1e7715
5 changed files with 38 additions and 24 deletions

View File

@ -3,6 +3,7 @@
<h4>{if $comment.url}<a href="{$comment.url}">{/if}{$comment.author|@default:$CONST.ANONYMOUS}{if $comment.url}</a>{/if} {$CONST.ON} <time datetime="{$comment.timestamp|@serendipity_smarty_html5time}" pubdate>{$comment.timestamp|@formatTime:$template_option.date_format}</time>:</h4>
<div class="serendipity_commentBody clearfix content">
{if $comment.avatar}{$comment.avatar}{/if}
{if $comment.body == 'COMMENT_DELETED'}
{$CONST.COMMENT_IS_DELETED}
{else}

View File

@ -1,8 +1,8 @@
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
<article id="post_{$entry.id}" class="serendipity_entry{if $dategroup.is_sticky} sticky{/if}">
<header>
<article id="post_{$entry.id}" class="clearfix serendipity_entry{if $dategroup.is_sticky} sticky{/if}">
<header class="clearfix">
<h2><a href="{$entry.link}">{$entry.title}</a></h2>
<span class="serendipity_byline">{$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> {$CONST.ON} <time datetime="{$entry.timestamp|@serendipity_smarty_html5time}" pubdate>{$entry.timestamp|@formatTime:$template_option.date_format}</time>{if $entry.is_entry_owner and not $is_preview} | <a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a>{/if}</span>
@ -21,7 +21,7 @@
</div>
{/if}
<footer>
<footer class="clearfix">
{if $entry.categories}
<span class="visuallyhidden">{$CONST.CATEGORIES}: </span>{foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach}
{/if}

View File

@ -1,4 +1,4 @@
Name: 2k11
Author: Matthias Mees, Veit Lehmann
Date: 2012-01-06
Date: 2012-01-20
Require Serendipity: 1.6

View File

@ -1,3 +1,7 @@
//https://github.com/scottjehl/iOS-Orientationchange-Fix
(function(j){var i=j.document;if(!i.querySelector){return}var l=i.querySelector("meta[name=viewport]"),a=l&&l.getAttribute("content"),h=a+", maximum-scale=1",d=a+", maximum-scale=10",g=true,c=j.orientation,k=0;if(!l){return}function f(){l.setAttribute("content",d);g=true}function b(){l.setAttribute("content",h);g=false}function e(m){c=Math.abs(j.orientation);k=Math.abs(m.gamma);if(k>8&&c===0){if(g){b()}}else{if(!g){f()}}}j.addEventListener("orientationchange",f,false);j.addEventListener("deviceorientation",e,false)})(this);
// https://github.com/davatron5000/FitVids.js
(function(a){a.fn.fitVids=function(b){var c={customSelector:null};var e=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];e.className="fit-vids-style";e.innerHTML="&shy;<style> .fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; } .fluid-width-video-wrapper iframe, .fluid-width-video-wrapper object, .fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style>";d.parentNode.insertBefore(e,d);if(b){a.extend(c,b)}return this.each(function(){var f=["iframe[src^='http://player.vimeo.com']","iframe[src^='http://www.youtube.com']","iframe[src^='http://www.kickstarter.com']","object","embed"];if(c.customSelector){f.push(c.customSelector)}var g=a(this).find(f.join(","));g.each(function(){var j=a(this);if(this.tagName.toLowerCase()=="embed"&&j.parent("object").length||j.parent(".fluid-width-video-wrapper").length){return}var h=this.tagName.toLowerCase()=="object"?j.attr("height"):j.height(),i=h/j.width();j.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",(i*100)+"%");j.removeAttr("height").removeAttr("width")})})}})(jQuery);
// http://mths.be/placeholder v1.8.5 by @mathias
jQuery(function(g,a,$){var f='placeholder' in a.createElement('input'),b='placeholder' in a.createElement('textarea');if(f&&b){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((f?'textarea':':input')+'[placeholder]').bind('focus.placeholder',c).bind('blur.placeholder',e).trigger('blur.placeholder').end()};$.fn.placeholder.input=f;$.fn.placeholder.textarea=b;$(function(){$('form').bind('submit.placeholder',function(){var h=$('.placeholder',this).each(c);setTimeout(function(){h.each(e)},10)})});$(g).bind('unload.placeholder',function(){$('.placeholder').val('')})}function d(i){var h={},j=/^jQuery\d+$/;$.each(i.attributes,function(l,k){if(k.specified&&!j.test(k.name)){h[k.name]=k.value}});return h}function c(){var h=$(this);if(h.val()===h.attr('placeholder')&&h.hasClass('placeholder')){if(h.data('placeholder-password')){h.hide().next().show().focus().attr('id',h.removeAttr('id').data('placeholder-id'))}else{h.val('').removeClass('placeholder')}}}function e(){var l,k=$(this),h=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=$('<input>').attr($.extend(d(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',c);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}}(this,document,jQuery));
// https://github.com/manuelbieh/Details-Polyfill
@ -6,8 +10,6 @@ jQuery(function(a){(function(){var b=this;this.hideDetailChildren=function(c){va
var AccessifyHTML5=function(b){var a={article:{role:"article"},aside:{role:"complementary"},nav:{role:"navigation"},output:{"aria-live":"polite"},section:{role:"region"},"[required]":{"aria-required":"true"}};if(b){if(b.header){a[b.header]={role:"banner"}}if(b.footer){a[b.footer]={role:"contentinfo"}}}jQuery.each(a,function(c,d){jQuery(c).attr(d)})};
// 2k11
jQuery(document).ready(function($) {
// placeholder polyfill
$('input, textarea').placeholder();
// Assign WAI-ARIA roles
AccessifyHTML5({header:'#banner',footer:'#colophon'});
// Cloned primary navigation for small screen
@ -17,8 +19,14 @@ jQuery(document).ready(function($) {
// Replace entrypaging icons
$('.serendipity_entrypaging_left .epicon').text('←');
$('.serendipity_entrypaging_right .epicon').text('→');
// Fit embedded videos
$('#content>article').fitVids();
// placeholder polyfill
$('input, textarea').placeholder();
// Disable trackback + short url links
$('#trackback_url>a,.short-url').click(function(){var linkMsg=$(this).attr('title');alert(linkMsg);return false;});
// Fix non-smarty gravatar w/ float right
$(".comment_avatar").each(function(){test=$(this).css("float");if(test=="right"){$(this).css("margin","0 0 .625em .625em")}});
// Comment reply
$('.comment_reply').click(function(){var commentId=$(this).attr('id').replace(/serendipity_reply_/g,"");$('#serendipity_replyTo').val(commentId);});
// Confirm comment deletion

View File

@ -90,9 +90,9 @@ input[type=url],
textarea {
border: 1px solid #aaa;
color: #666;
-webkit-border-radius: 3px 3px 3px 3px;
-moz-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
input[type=text]:focus,
@ -119,10 +119,9 @@ button { padding: 4px; }
img,
audio, video,
embed, object,
.content iframe { max-width: 100%; }
.content>iframe { max-width: 100%; }
img, video,
.content iframe { height: auto; }
img, video { height: auto; }
q { quotes: '“' '”' '' ''; }
:lang(de) q { quotes: '„' '“' '' ''; }
@ -229,6 +228,7 @@ h4, h5, h6,
p, ul, ol, dl,
table, details,
audio, video,
.fluid-width-video-wrapper,
#trackback_url,
.manage_comments,
.plugin_comment_wrap,
@ -404,7 +404,7 @@ fieldset,
.serendipity_entry,
.serendipity_staticpage,
.sidebar_plugin, .archives,
.freetag_cloud,
.freetag_cloud, .content_msg,
.serendipity_entrypaging { margin: 0 1em 2em; }
.serendipity_search,
@ -490,7 +490,10 @@ pre .geshi {
.serendipity_byline { margin: 0 0 1.2308em; }
.serendipity_pagination { margin: 0 1.2308em 1.2308em; }
.serendipity_pagination {
clear: both;
margin: 0 1.2308em 1.2308em;
}
.serendipity_pagination li {
float: left;
@ -530,6 +533,9 @@ pre .geshi {
.serendipity_commentDirection {
background: #eee;
border: 1px solid #aaa;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
#c { padding: .625em; }
@ -558,6 +564,7 @@ pre .geshi {
.comment_avatar {
border: 1px solid #aaa;
float: left;
margin: 0 .625em .625em 0;
padding: 0!important;
overflow: hidden;
@ -581,23 +588,20 @@ pre .geshi {
.serendipity_msg_important,
.serendipity_msg_notice {
color: #fff;
font-size: .8125em;
line-height: 1.8462;
max-width: 35em;
padding: .3846em;
text-shadow: 1px 1px 1px rgba(0,0,0,.8);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.serendipity_msg_important {
background: #fee;
border: 1px solid #900;
color: #900;
}
.serendipity_msg_important { background: #800; }
.serendipity_msg_notice {
background: #efe;
border: 1px solid #090;
color: #090;
}
.serendipity_msg_notice { background: #080; }
.serendipity_image_left,
.serendipity_image_right,
@ -934,6 +938,7 @@ pre .geshi {
.serendipity_entry { margin: 0 2em 3em; }
.archives, .freetag_cloud,
.content_msg,
.serendipity_staticpage,
#sidebar_left .sidebar_plugin,
.ie7 #sidebar_left .sidebar_plugin,