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