Some minor fixes for 2k11.

This commit is contained in:
Matthias Mees 2011-12-16 21:27:53 +01:00
parent e25a70302d
commit 7e0d7a61d9
10 changed files with 45 additions and 23 deletions

View File

@ -10,6 +10,7 @@
@define('TWOK11_PAG_TITLE', 'Pagination');
@define('TWOK11_PLINK_TEXT', 'Link');
@define('TWOK11_PLINK_TITLE', 'Permanenter Link zu diesem Kommentar');
@define('TWOK11_PLACE_SEARCH', 'Suchbegriff(e)');
@define('TWOK11_PLACE_NAME', 'z.B. John Doe');
@define('TWOK11_PLACE_MAIL', 'z.B. mail@example.org');
@define('TWOK11_PLACE_URL', 'z.B. http://example.org');

View File

@ -10,6 +10,7 @@
@define('TWOK11_PAG_TITLE', 'Pagination');
@define('TWOK11_PLINK_TEXT', 'Link');
@define('TWOK11_PLINK_TITLE', 'Permanent link for this comment');
@define('TWOK11_PLACE_SEARCH', 'Search term(s)');
@define('TWOK11_PLACE_NAME', 'i.e. John Doe');
@define('TWOK11_PLACE_MAIL', 'i.e. mail@example.org');
@define('TWOK11_PLACE_URL', 'i.e. http://example.org');

View File

@ -1,7 +1,7 @@
{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}" role="article">
<article id="post_{$entry.id}" class="serendipity_entry{if $dategroup.is_sticky} sticky{/if}">
<header>
<h2><a href="{$entry.link}">{$entry.title}</a></h2>
@ -121,7 +121,7 @@
{/if}
{/foreach}
{if $footer_info or $footer_prev_page or $footer_next_page}
<nav class="serendipity_pagination" role="navigation">
<nav class="serendipity_pagination">
<h2 class="visuallyhidden">{$CONST.TWOK11_PAG_TITLE}</h2>
<ul class="clearfix">

View File

@ -39,7 +39,7 @@
{if $is_raw_mode != true}
<a class="visuallyhidden" href="#content"><span lang="en">Skip to content</span></a>
<div id="page" class="clearfix">
<header id="banner" class="clearfix{if $leftSidebarElements > 0 && $rightSidebarElements > 0} col3{elseif $leftSidebarElements > 0 && $rightSidebarElements == 0} col2l{else} col2r{/if}{if not $template_option.use_corenav} no-nav{/if}" role="banner">
<header id="banner" class="clearfix{if $leftSidebarElements > 0 && $rightSidebarElements > 0} col3{elseif $leftSidebarElements > 0 && $rightSidebarElements == 0} col2l{else} col2r{/if}{if not $template_option.use_corenav} no-nav{/if}">
<div id="identity">
<h1><a href="{$serendipityBaseURL}">{$blogTitle}</a></h1>
<p>{$blogDescription}</p>
@ -49,7 +49,7 @@
<div>
<input type="hidden" name="serendipity[action]" value="search"/>
<label for="searchterm" class="visuallyhidden">{$CONST.QUICKSEARCH}</label>
<input id="searchterm" name="serendipity[searchTerm]" type="search" placeholder="{$CONST.QUICKSEARCH}" value=""/>
<input id="searchterm" name="serendipity[searchTerm]" type="search" placeholder="{$CONST.TWOK11_PLACE_SEARCH}" value=""/>
<input id="searchsend" name="serendipity[searchButton]" type="submit" value="{$CONST.GO}"/>
</div>
</form>
@ -59,7 +59,7 @@
{/if}
</header>
{if $template_option.use_corenav}
<nav id="primary-nav" role="navigation">
<nav id="primary-nav">
<h2 class="visuallyhidden">{$CONST.TWOK11_NAV_TITLE}</h2>
<ul class="clearfix">{foreach from=$navlinks item="navlink" name="sbnav"}{if $navlink.title!=""&&$navlink.href!=""}<li>{if $currpage==$navlink.href or $currpage2==$navlink.href}<span>{else}<a href="{$navlink.href}">{/if}{$navlink.title}{if $currpage==$navlink.href or $currpage2==$navlink.href}</span>{else}</a>{/if}</li>{/if}{/foreach}</ul>
@ -70,20 +70,20 @@
{$CONTENT}
</div>
{if $leftSidebarElements > 0}
<aside id="sidebar_left" role="complementary">
<aside id="sidebar_left">
<h2 class="visuallyhidden">Sidebar</h2>
{serendipity_printSidebar side="left"}
</aside>
{/if}
{if $rightSidebarElements > 0}
<aside id="sidebar_right" role="complementary">
<aside id="sidebar_right">
<h2 class="visuallyhidden">Sidebar</h2>
{serendipity_printSidebar side="right"}
</aside>
{/if}
</div>
<footer id="colophon" role="contentinfo">
<footer id="colophon">
<small lang="en">Powered by <a href="http://s9y.org">Serendipity</a> &amp; the <a href="http://github.com/yellowled/s9y-2k11">2k11</a> theme.</small>
</footer>
</div>

View File

@ -1,4 +1,4 @@
Name: 2k11
Author: Matthias Mees, Veit Lehmann
Date: 2011-12-07
Date: 2011-12-16
Require Serendipity: 1.6

View File

@ -2,10 +2,17 @@
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
jQuery(function(a){(function(){var b=this;this.hideDetailChildren=function(c){var d=c instanceof jQuery?c[0].childNodes:c.childNodes,e=d.length;a(c).attr("open",false);if(a.browser.safari==true){for(var f=0;f<e;f++){if(d[f].nodeType==3&&d[f].textContent!=""){var g=a("<span />");g.text(d[f].textContent).hide();a(d[f]).after(g);d[f].textContent="";e++}}}a.each(d,function(d,e){if(a(e)[0].nodeType==1&&e==a(e).parent().find("> summary:first-of-type")[0]){if(a(e).data("processed")!=true){a(e).css({display:"block",cursor:"pointer"}).data("processed",true).addClass("detailHidden").bind("click",function(){b.toggleDetailChildren(a(this))});a(c).prepend(a(e))}}else if(a(e)[0].nodeType==3&&!e.isElementContentWhitespace&&!!a.browser.safari==false){var f=a("<span />");f.text(e.textContent).hide();a(e).after(f);e.textContent=""}else if(a(c).find("> summary").length==0){var g=a("<summary />").text("Details").css({display:"block",cursor:"pointer"}).data("processed",true).addClass("detailHidden").bind("click",function(){b.toggleDetailChildren(a(this))});a(c).prepend(g)}a(c).find("> :visible:not(summary:first-child)").hide()})};this.showDetailChildren=function(b){a(b).attr("open",true);a.each(a(b).find("> *"),function(b,c){a(c).show()})};this.toggleDetailChildren=function(a){if(a.hasClass("detailHidden")){a.removeClass("detailHidden");b.showDetailChildren(a.parents("details")[0])}else{a.addClass("detailHidden");b.hideDetailChildren(a.parents("details")[0])}};if("open"in document.createElement("details")==false){a.each(a("details"),function(c,d){b.hideDetailChildren(d);var e=a("<style />").text('summary {-webkit-text-size-adjust: none;} details > summary:first-child:before {content: "▼ "} details > summary.detailHidden:first-child:before {content: "► "}');a("head").append(e)})}})()})
// https://github.com/yatil/accessifyhtml5.js
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'
});
// Disable trackback url link
$('#trackback_url>a').click(function() {
var trackbackMsg = $(this).attr('title');

View File

@ -10,6 +10,7 @@
@define('TWOK11_PAG_TITLE', 'Pagination');
@define('TWOK11_PLINK_TEXT', 'Link');
@define('TWOK11_PLINK_TITLE', 'Permanenter Link zu diesem Kommentar');
@define('TWOK11_PLACE_SEARCH', 'Suchbegriff(e)');
@define('TWOK11_PLACE_NAME', 'z.B. John Doe');
@define('TWOK11_PLACE_MAIL', 'z.B. mail@example.org');
@define('TWOK11_PLACE_URL', 'z.B. http://example.org');

View File

@ -10,6 +10,7 @@
@define('TWOK11_PAG_TITLE', 'Pagination');
@define('TWOK11_PLINK_TEXT', 'Link');
@define('TWOK11_PLINK_TITLE', 'Permanent link for this comment');
@define('TWOK11_PLACE_SEARCH', 'Search term(s)');
@define('TWOK11_PLACE_NAME', 'i.e. John Doe');
@define('TWOK11_PLACE_MAIL', 'i.e. mail@example.org');
@define('TWOK11_PLACE_URL', 'i.e. http://example.org');

View File

@ -1,6 +1,4 @@
{if $plugin_contactform_articleformat}
<div class="serendipity_entry">
{/if}
<div class="serendipity_staticpage{if $plugin_contactform_articleformat} serendipity_entry{/if}">
<h2>{if $plugin_contactform_articleformat}{$plugin_contactform_name}{else}{$plugin_contactform_pagetitle}{/if}</h2>
<div class="serendpity_preface content">
@ -49,6 +47,4 @@
</form>
</div>
{/if}
{if $plugin_contactform_articleformat}
</div>
{/if}
</div>

View File

@ -120,7 +120,7 @@ img,
audio, video,
embed, object { max-width: 100%; }
img { height: auto; }
img, video { height: auto; }
q { quotes: '“' '”' '' ''; }
:lang(de) q { quotes: '„' '“' '' ''; }
@ -496,17 +496,15 @@ pre .geshi {
}
.serendipity_pagination .info {
left: 25%;
text-align: center;
width: 50%;
width: 100%;
}
.serendipity_pagination .prev {
left: -50%;
width: 25%;
}
.serendipity_pagination .prev,
.serendipity_pagination .next { width: 50%; }
.serendipity_pagination .next { width: 25%; }
.ie7 .serendipity_pagination .prev,
.ie7 .serendipity_pagination .next { width: 49.9%; }
.archives_date { min-width: 10em; }
@ -749,6 +747,23 @@ pre .geshi {
clear: both;
margin-right: 5%;
}
.serendipity_pagination .info {
left: 25%;
width: 50%;
}
.serendipity_pagination .prev {
left: -50%;
width: 25%;
}
.serendipity_pagination .next { width: 25%; }
.ie7 .serendipity_pagination .info { width: 49.9%; }
.ie7 .serendipity_pagination .prev,
.ie7 .serendipity_pagination .next { width: 24.9%; }
.archives_year {
float: left;