]> Pileus Git - ~andy/ct/blobdiff - gallery/html.ct
Add timestamp checking
[~andy/ct] / gallery / html.ct
index 2b04615bdf45ebdae061e1edda2ff62f4b8dd5d4..bd3edaeb273efbaff94419c0ecf026369df0ea9e 100644 (file)
@@ -1,24 +1,19 @@
-[#include <glib.h>]
+<% #include <glib.h> %>
 
-[void header() {]
-Content-Type: text/html; charset=UTF-8
-[}]
-
-
-[void frame_index(){]
+<% void frame_index(){ %>
 <html>
        <frameset rows="20, *">
-               <frame name="head" src="?head">
-               <frameset cols="240,*">
-                       <frame name="nav" src="?nav">
-                       <frame name="content" src="?content">
+               <frame name="head" src="head">
+               <frameset cols="248,*">
+                       <frame name="nav" src="nav">
+                       <frame name="content" src="content">
                </frameset>
        </frameset>
 </html>
-[}]
+<% } %>
 
 
-[void frame_head(){]
+<% void frame_head(){ %>
 <html>
        <head>
                <style>
@@ -30,14 +25,14 @@ Content-Type: text/html; charset=UTF-8
        </head>
        <body>
                <center>
-                       <a href="?noframe" target="parent">No Frames</a>
+                       <a href="noframe" target="parent">No Frames</a>
                </center>
        </body>
 </html>
-[}]
+<% } %>
 
 
-[void frame_nav(int square, GList *thumbs) {]
+<% void frame_nav(int square, GList *images) { %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
@@ -53,7 +48,7 @@ Content-Type: text/html; charset=UTF-8
                                text-align:center;
                                text-decoration:none;
                                width:214px;
-                               [if (square)]
+                               <% if (square) %>
                                height:214px;
                        }
                        .box {
@@ -74,21 +69,23 @@ Content-Type: text/html; charset=UTF-8
                </style>
        </head>
        <body>
-               [for (GList *cur =thumbs; cur; cur = cur->next) {]
+               <% for (GList *cur = images; cur; cur = cur->next) { %>
+                       <% gchar *img = (gchar *)cur->data; %>
                        <div class="align">
-                               <a class="box" target="content"
-                                       [g_print("href=\"images/%s\"", (gchar*)cur->data);]
-                               ><img
-                                       [g_print("src=\"thumbs/%s\"", (gchar*)cur->data);]
-                               ></a>
+                               <a class="box" target="content" href="show_small?<%% "%s", img %>">
+                               <img src="thumb/<%% "%s", img %>"></a>
                        </div>
-               [}]
+               <% } %>
        </body>
 </html>
-[}]
-
+<% } %>
 
-[void frame_content(){]
-<html>
-</html>
-[}]
+<% void frame_show(char *this, char *link, char *image){ %>
+<html> 
+       <body style="text-align:center;"> 
+               <a href="<%% "%s?%s", link, image %>">
+                       <img src="<%% "%s/%s", this, image %>">
+               </a> 
+       </body> 
+</html> 
+<% } %>