]> Pileus Git - ~andy/ct/blob - gallery/html.ct
e62621aa1920d97f3f84e3d08de1a850a34babe6
[~andy/ct] / gallery / html.ct
1 <% #include <glib.h> %>
2
3
4 <% void header() { %>
5 Content-Type: text/html; charset=UTF-8
6 <% } %>
7
8
9 <% void frame_index(){ %>
10 <html>
11         <frameset rows="20, *">
12                 <frame name="head" src="?head">
13                 <frameset cols="248,*">
14                         <frame name="nav" src="?nav">
15                         <frame name="content" src="?content">
16                 </frameset>
17         </frameset>
18 </html>
19 <% } %>
20
21
22 <% void frame_head(){ %>
23 <html>
24         <head>
25                 <style>
26                         body {
27                                 padding:0px;
28                                 margin:0px;
29                         }
30                 </style>
31         </head>
32         <body>
33                 <center>
34                         <a href="?noframe" target="parent">No Frames</a>
35                 </center>
36         </body>
37 </html>
38 <% } %>
39
40
41 <% void frame_nav(int square, GList *images) { %>
42 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
43   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
44 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
45         <head>
46                 <title>Image viewer</title>
47                 <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
48                 <style type="text/css">
49                         * {padding:0; margin:0;}
50                         .align {
51                                 display:block;
52                                 float:left;
53                                 margin:10px;
54                                 text-align:center;
55                                 text-decoration:none;
56                                 width:214px;
57                                 <% if (square) %>
58                                 height:214px;
59                         }
60                         .box {
61                                 background-color:#f8fbFF;
62                                 border:solid 2px #B4C7F8;
63                                 display:block;
64                                 text-align:center;
65                                 text-decoration:none;
66                                 padding:5px;
67                                 overflow:hidden;
68                         }
69                         .box img {
70                                 border:none;
71                         }
72                         .box:hover {
73                                 color:transparent;
74                         }
75                 </style>
76         </head>
77         <body>
78                 <% for (GList *cur = images; cur; cur = cur->next) { %>
79                         <% gchar *img = (gchar *)cur->data; %>
80                         <div class="align">
81                                 <a class="box" target="content" href="images/<%= "%s", img %>">
82                                 <img src="thumbs/<%= "%s", img %>"></a>
83                         </div>
84                 <% } %>
85         </body>
86 </html>
87 <% } %>
88
89
90 <% void frame_content(){ %>
91 <html>
92 </html>
93 <% } %>