]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Start/first/last links.
authorOleg Broytman <phd@phdru.name>
Fri, 20 Aug 2010 21:12:49 +0000 (21:12 +0000)
committerOleg Broytman <phd@phdru.name>
Fri, 20 Aug 2010 21:12:49 +0000 (21:12 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@108 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

dotfiles2html/dotfiles2html.py
phd_pp_ru.tmpl
reindex_blog.py

index 10ec3c2ff211b08350a9a9a98e4437c5c8d4ddbf..3c0e1b12c6efad69d9a6a4f1d1fe449cda4b8953 100755 (executable)
@@ -38,10 +38,12 @@ def add_headers(fname, start, prev, next):
    html_file.write("#attr $Copyright = 2003\n")
    if start:
       html_file.write("#attr $Start = \"index.html\"\n")
+   html_file.write("#attr $First = \"profile.html\"\n")
    if prev:
       html_file.write("#attr $Prev = \"%s.html\"\n" % prev)
    if next:
       html_file.write("#attr $Next = \"%s.html\"\n" % next)
+   html_file.write("#attr $Last = \"pdbrc.py.html\"\n")
    html_file.write('#attr $alternates = (("Plain text version", "text/plain", "%s"),)' % txt_name)
    html_file.write("\n")
    html_file.write("#def body_html\n")
index c87bfce900a14907061cb2542a122db3d0dd6df5..2ede5d4c4ef9267e7a0356c23a50602a7a00bc8c 100644 (file)
@@ -6,8 +6,10 @@
 #attr $Keywords = None
 #attr $Copyright = None
 #attr $Start = None
+#attr $First = None
 #attr $Prev = None
 #attr $Next = None
+#attr $Last = None
 #attr $refresh = None
 #import time
 #attr $last_modified_en = time.strftime("%a, %d %b %Y %T GMT", time.gmtime())
 #end if
 #if $Copyright
 #set $full_copyright = $copyright($Copyright)
+#if $path.startswith("/Russian/")
+#set $author_href = $root + "Russian/"
+#set $copy_href = $root + "Russian/free.html"
+#else
+#set $author_href = $root or "./"
+#set $copy_href = $root + "free.html"
+#end if
 <meta name="author" content="Oleg Broytman">
+<link rel="author" href="$author_href" title="&copy; $full_copyright PhiloSoft Design">
 <meta name="copyright" content="&copy; $full_copyright PhiloSoft Design">
-<link rel="copyright" href="." title="&copy; $full_copyright PhiloSoft Design">
+<link rel="copyright" href="$copy_href" title="&copy; $full_copyright PhiloSoft Design">
 #end if
-<meta name="generator" content="CheetahTemplate">
 <link rev="made" href="mailto:phd@phd.pp.ru">
+<meta name="generator" content="CheetahTemplate">
 <meta name="robots" content="index, follow">
 #if $root
-<link rel="Top" href="$root">
-<link rel="Up" href="../">
+#if $path.endswith('index.html')
+<link rel="up" href="../">
+#else
+<link rel="up" href="./">
+#end if
 #end if
 #if $Start
-<link rel="Start" href="$Start">
+<link rel="start" href="$Start">
+#elif not $path.endswith('index.html')
+<link rel="start" href="./">
+#end if
+#if $First
+<link rel="first" href="$First">
 #end if
 #if $Prev
-<link rel="Prev" href="$Prev">
+<link rel="prev" href="$Prev">
 #end if
 #if $Next
-<link rel="Next" href="$Next">
+<link rel="next" href="$Next">
+#end if
+#if $Last
+<link rel="last" href="$Last">
+#end if
+#if $path != "/search.html"
+<link rel="search" type="text/html" href="${root}search.html">
 #end if
 <link rel="stylesheet" type="text/css" media="screen" href="${root}phd.css">
 #if $styles
index a57f1d2e5db28e9225889729f603ae872af7de52..5c14d4693590138f44db0fe794b8f95ca8339e39 100755 (executable)
@@ -167,11 +167,6 @@ def write_template(level, year, month, day, titles, tags=None):
       iday = int(day)
       imonth = int(month)
 
-      new_text.append("""\
-#attr $Next = "%s"
-""" % titles[0][3])
-
-
       if len(titles) == 1:
          new_text.append("""\
 #attr $refresh = "0; URL=%s"