]> git.phdru.name Git - phdru.name/phdru.name.git/blob - phd_site.tmpl
TODO: https://phdru.name/ - done using LetsEncrypt
[phdru.name/phdru.name.git] / phd_site.tmpl
1 #encoding koi8-r
2 #extends phd
3 #implements respond
4 #attr $Lead = ''
5 #attr $Title = ''
6 #attr $Description = None
7 #attr $Keywords = None
8 #attr $Copyright = None
9 #attr $Start = None
10 #attr $First = None
11 #attr $Prev = None
12 #attr $Next = None
13 #attr $Last = None
14 #attr $Refresh = None
15 #import time
16 #attr $last_modified_en = time.strftime("%a, %d %b %Y %T GMT", time.gmtime())
17 #attr $local_time = time.localtime()
18 #attr $styles = None
19 #attr $alternates = None
20 #attr $Tag = ()
21 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
22    "http://www.w3.org/TR/html4/loose.dtd">
23 <html>
24 <!-- THIS PAGE IS AUTOMATICALLY GENERATED USING CheetahTemplate. DO NOT EDIT. -->
25 <head>
26 <meta HTTP-Equiv="Content-Type" content="text/html">
27 <meta HTTP-Equiv="Content-Location" content="http://phdru.name$path">
28 <meta HTTP-Equiv="Last-Modified" content="$last_modified_en">
29 <title>$Title</title>
30 #if $Refresh:
31 <meta HTTP-Equiv="Refresh" content="$Refresh">
32 #end if
33 #if $Description
34 <meta name="description" content="$Description">
35 #end if
36 #if $Keywords
37 <meta name="keywords" content="$Keywords">
38 #end if
39 #if $Copyright
40 #set $full_copyright = $copyright($Copyright)
41 #if $path.startswith("/Russian/")
42 #set $author_href = $root + "Russian/"
43 #set $copy_href = $root + "Russian/free.html"
44 #else
45 #set $author_href = $root or "./"
46 #set $copy_href = $root + "free.html"
47 #end if
48 <meta name="author" content="Oleg Broytman">
49 <link rel="author" href="$author_href" title="&copy; $full_copyright PhiloSoft Design">
50 <meta name="copyright" content="&copy; $full_copyright PhiloSoft Design">
51 <link rel="copyright" href="$copy_href" title="&copy; $full_copyright PhiloSoft Design">
52 #end if
53 <link rev="made" href="mailto:phd@phdru.name">
54 <meta name="generator" content="CheetahTemplate">
55 <meta name="robots" content="index, follow">
56 #if $root
57 #if $path.endswith('index.html')
58 <link rel="up" href="../">
59 #else
60 <link rel="up" href="./">
61 #end if
62 #end if
63 #if $Start
64 <link rel="start" href="$Start">
65 #elif not $path.endswith('index.html')
66 <link rel="start" href="./">
67 #end if
68 #if $First
69 <link rel="first" href="$First">
70 #end if
71 #if $Prev
72 <link rel="prev" href="$Prev">
73 #end if
74 #if $Next
75 <link rel="next" href="$Next">
76 #end if
77 #if $Last
78 <link rel="last" href="$Last">
79 #end if
80 #if $path != "/search.html"
81 <link rel="search" type="text/html" href="${root}search.html">
82 #end if
83 <link rel="stylesheet" type="text/css" media="screen" href="${root}phd.css">
84 #if $styles
85 #for $media, $style in $styles
86 <STYLE type="text/css" media="$media">
87 <!--
88 $style
89 --></STYLE>
90 #end for
91 #end if
92 #if $alternates
93 #for $title, $type, $href in $alternates
94 <link rel="alternate" title="$title" type="$type" href="$href">
95 #end for
96 #end if
97 <link rel="shortcut icon" href="${root}favicon.ico">
98 #if not $root and $path.endswith('index.html')
99 <link rel="openid.delegate" href="http://phdru.name/">
100 <link rel="openid2.local_id" href="http://phdru.name/">
101 <link rel="openid.server" href="http://home.phdru.name/cgi-bin/poit.py">
102 <link rel="openid2.provider" href="http://home.phdru.name/cgi-bin/poit.py">
103 #end if
104 <meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
105 </head>
106 <body bgcolor="#CCCCCC" text="#000000"
107       link="#0000bb"  vlink="#551a8b" alink="#ff0000">
108 <p class="small">
109 #set $path_components = $path.split('/')[1:-1]
110 #set $breadcrumbs = ['<a href="' + $root + '">phdru.name</a>']
111 #for $i in range(len($path_components))
112 #set $subpath = '/'.join($path_components[:i+1])
113 #silent $breadcrumbs.append('<a href="' + $root + $subpath + '/">' + $path_components[i]+ '</a>')
114 #end for
115 #echo " / ".join($breadcrumbs)
116 #if $path.startswith("/Russian/blog/")
117 #set $prev_key, $prev_blog_post, $next_key, $next_blog_post = $find_near_blog_posts()
118 #if $prev_blog_post
119 #set $prev_href = $root + "Russian/blog/" + '/'.join($prev_key + ($prev_blog_post[0].replace('.tmpl', '.html'),))
120 #set $prev_title = $prev_blog_post[1].decode('koi8-r')
121 #end if
122 #if $next_blog_post
123 #set $next_href = $root + "Russian/blog/" + '/'.join($next_key + ($next_blog_post[0].replace('.tmpl', '.html'),))
124 #set $next_title = $next_blog_post[1].decode('koi8-r')
125 #end if
126 <br>
127 <table width="100%">
128   <tr>
129 #if $prev_blog_post
130     <td style="text-align: left" width="50%">&lt;-- <a href="$prev_href">$prev_title</a></td>
131 #else
132     <td style="text-align: left" width="50%">&nbsp;</td>
133 #end if
134 #if $next_blog_post
135     <td style="text-align: right" width="50%"><a href="$next_href">$next_title</a> --&gt;</td>
136 #else
137     <td style="text-align: right" width="50%">&nbsp;</td>
138 #end if
139   </tr>
140 </table>
141 #end if
142 </p>
143 $body
144 #def link_tag($tag)
145 <a href="../../../tags/${tag}.html">$tag</a>
146 #end def
147 #if $Tag
148 <hr width="90%">
149 #from Cheetah.compat import string_type
150 #if isinstance($Tag, string_type)
151 #if $path.startswith("/Russian/")
152 Тег:
153 #else
154 Tag:
155 #end if
156 $link_tag($Tag)
157 #else
158 #if $path.startswith("/Russian/")
159 Теги:
160 #else
161 Tags:
162 #end if
163 #for $tag in $Tag
164 $link_tag($tag)
165 #end for
166 #end if
167 #end if
168 <hr width="90%">
169 #if $path.endswith("index.html")
170 #set $path = $path[:-len("index.html")]
171 #end if
172 #if $path.startswith("/Russian/")
173 <p class="head" style="font-size: 60%">Эта страница <a href="http://phdru.name$path">http://phdru.name$path</a>
174 была сгенерирована $time.strftime("%d.%m.%Y", $local_time) в $time.strftime("%T", $local_time) из шаблона CheetahTemplate
175 <a href="$_fileBaseName">$_fileBaseName</a>;
176 <a href="${root}Russian/free.html">Некоторые права зарезервированы</a>.
177 Вы можете узнать <a href="${root}about/">о</a> <a href="${root}about/technical.html">технических</a>
178 аспектах этого сайта.</p>
179 #else
180 <p class="head" style="font-size: 60%">This is the page <a href="http://phdru.name$path">http://phdru.name$path</a>.
181 It was generated on $last_modified_en from CheetahTemplate <a href="$_fileBaseName">$_fileBaseName</a>.
182 <a href="./${root}free.html">Some rights are reserved</a>.
183 Read more <a href="${root}about/">about</a> <a href="${root}about/technical.html">technical</a> aspects of the site.
184 </p>
185 #end if
186 </body>
187 </html>#slurp