X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=phd_site.tmpl;h=293eea81f0da35e8f5961c27fc0f9aa5a20935fa;hb=b0f6761ec25c37779fc4ba3a8b4ff1cda0a401ef;hp=6da679aa1a9311ec8bd7662f8e9722f36b3a92c3;hpb=03f9943609343c4035886209f2e14b6ebdb6afb9;p=phdru.name%2Fphdru.name.git diff --git a/phd_site.tmpl b/phd_site.tmpl index 6da679a..293eea8 100644 --- a/phd_site.tmpl +++ b/phd_site.tmpl @@ -23,7 +23,11 @@ +#if $path.startswith("/Russian/") + +#else +#end if $Title @@ -95,7 +99,7 @@ $style #end for #end if -#if not $root +#if not $root and $path.endswith('index.html') @@ -105,13 +109,49 @@ $style +

+#set $path_components = $path.split('/')[1:-1] +#set $breadcrumbs = ['phdru.name'] +#for $i in range(len($path_components)) +#set $subpath = '/'.join($path_components[:i+1]) +#silent $breadcrumbs.append('' + $path_components[i]+ '') +#end for +#echo " / ".join($breadcrumbs) +#if $path.startswith("/Russian/blog/") +#set $prev_key, $prev_blog_post, $next_key, $next_blog_post = $find_near_blog_posts() +#if $prev_blog_post +#set $prev_href = $root + "Russian/blog/" + '/'.join($prev_key + ($prev_blog_post[0].replace('.tmpl', '.html'),)) +#set $prev_title = $prev_blog_post[1].decode('koi8-r') +#end if +#if $next_blog_post +#set $next_href = $root + "Russian/blog/" + '/'.join($next_key + ($next_blog_post[0].replace('.tmpl', '.html'),)) +#set $next_title = $next_blog_post[1].decode('koi8-r') +#end if +
+ + +#if $prev_blog_post + +#else + +#end if +#if $next_blog_post + +#else + +#end if + +
<-- $prev_title $next_title --> 
+#end if +

$body #def link_tag($tag) $tag #end def #if $Tag
-#if isinstance($Tag, basestring) +#from Cheetah.compat import string_type +#if isinstance($Tag, string_type) #if $path.startswith("/Russian/") ôÅÇ: #else