X-Git-Url: https://git.phdru.name/?p=phdru.name%2Fphdru.name.git;a=blobdiff_plain;f=phd_site.tmpl;h=0568b49090046382724192633240900f9d3feee3;hp=5cfc7719f8ad1cef37ee271a6aa786ee9c1bc948;hb=HEAD;hpb=253cdee8a17751e898f025cec46d2baaf39381e1 diff --git a/phd_site.tmpl b/phd_site.tmpl index 5cfc771..67eb341 100644 --- a/phd_site.tmpl +++ b/phd_site.tmpl @@ -11,10 +11,9 @@ #attr $Prev = None #attr $Next = None #attr $Last = None -#attr $refresh = None -#import time +#attr $Refresh = None #attr $last_modified_en = time.strftime("%a, %d %b %Y %T GMT", time.gmtime()) -#attr $last_modified_ru = time.strftime("%d.%m.%Y × %T", time.localtime()) +#attr $local_time = time.localtime() #attr $styles = None #attr $alternates = None #attr $Tag = () @@ -23,12 +22,16 @@ +#if $path.startswith("/Russian/") + +#else - +#end if + $Title -#if $refresh: - +#if $Refresh: + #end if #if $Description @@ -50,6 +53,7 @@ #end if + @@ -95,23 +99,57 @@ $style #end for #end if -#if not $root - - - - -#end if +

+#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 +#from urllib import quote +#def encode_tag(tag): +$quote(tag.decode('utf-8').encode('koi8-r').replace(' ', '_')) +#end def #def link_tag($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 @@ -134,13 +172,14 @@ $link_tag($tag) #set $path = $path[:-len("index.html")] #end if #if $path.startswith("/Russian/") -

üÔÁ ÓÔÒÁÎÉÃÁ http://phdru.name$path -ÂÙÌÁ ÓÇÅÎÅÒÉÒÏ×ÁÎÁ $last_modified_ru ÉÚ ÛÁÂÌÏÎÁ CheetahTemplate $_fileBaseName; +

üÔÁ ÓÔÒÁÎÉÃÁ https://phdru.name$path +ÂÙÌÁ ÓÇÅÎÅÒÉÒÏ×ÁÎÁ $time.strftime("%d.%m.%Y", $local_time) × $time.strftime("%T", $local_time) ÉÚ ÛÁÂÌÏÎÁ CheetahTemplate +$_fileBaseName; îÅËÏÔÏÒÙÅ ÐÒÁ×Á ÚÁÒÅÚÅÒ×ÉÒÏ×ÁÎÙ. -÷Ù ÍÏÖÅÔÅ ÕÚÎÁÔØ Ï ÔÅÈÎÉÞÅÓËÉÈ ÁÓÐÅËÔÁÈ ÜÔÏÇÏ ÓÁÊÔÁ. -

+÷Ù ÍÏÖÅÔÅ ÕÚÎÁÔØ Ï ÔÅÈÎÉÞÅÓËÉÈ +ÁÓÐÅËÔÁÈ ÜÔÏÇÏ ÓÁÊÔÁ.

#else -

This is the page http://phdru.name$path. +

This is the page https://phdru.name$path. It was generated on $last_modified_en from CheetahTemplate $_fileBaseName. Some rights are reserved. Read more about technical aspects of the site.