Move page source to git
authorJoey Schulze <joey@infodrom.org>
Tue, 10 May 2016 19:12:17 +0000 (21:12 +0200)
committerJoey Schulze <joey@infodrom.org>
Tue, 10 May 2016 19:12:17 +0000 (21:12 +0200)
Styles/basic.style

index c06e815..399ce4a 100644 (file)
@@ -26,7 +26,7 @@
 
 <define-tag page-footer>
 <:
-  $cvsurl = "http://cvs.infodrom.org/service.infodrom.org/%s%s?cvsroot=infodrom.org";
+  $giturl = "http://git.infodrom.org/?p=infodrom.org/service.infodrom.org;a=%s;f=%s%s";
   @months = ("Dummy", "January","February","March","April","May","June",
             "July","August","September","October","November","December");
 
   $date = sprintf ("%s %d, %d", $months[$2], $3, $1);
 
   if (length ("<get-var source>")) {
-    if ("<get-var source>" ne ".") {
-      $url = "<get-var source>";
-    } else {
-      $url = '';
-    }
+    $url_history = '';
   } else {
     "<get-var WML_SRC_DIRNAME>/" =~ /.*\/(src\/.*)$/;
-    $url = sprintf ($cvsurl, $1, "<get-var WML_SRC_FILENAME>");
+    $url_history = sprintf($giturl, "history", $1, "<get-var WML_SRC_FILENAME>");
+    $url_source = sprintf($giturl, "blob_plain", $1, "<get-var WML_SRC_FILENAME>");
   }
-  if (length ($url)) {
-    $url = sprintf (', <a href="%s">page source</a>', $url);
+  if (length ($url_history)) {
+    $url = sprintf(', page <a href="%s">source</a> <a href="%s">history</a>', $url_source, $url_history);
   }
 :>