comparison mod_http_muc_log/http_muc_log.html @ 1582:8e282eb0c70c

mod_http_muc_log: Split out template into a configurable file.
author Kim Alvefur <zash@zash.se>
date Wed, 03 Dec 2014 15:35:38 +0100
parents
children 0da51b825263
comparison
equal deleted inserted replaced
1581:9f6cd252d233 1582:8e282eb0c70c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>{title}</title>
7 <style>
8 :link,:visited{text-decoration:none;color:#2e3436;text-decoration:none;}
9 :link:hover,:visited:hover{color:#3465a4;}
10 body{background-color:#eeeeec;margin:1ex 0;padding-bottom:3em;font-family:Arial,Helvetica,sans-serif;}
11 ul,ol{padding:0;}
12 li{list-style:none;}
13 hr{visibility:hidden;clear:both;}
14 br{clear:both;}
15 header,footer{margin:1ex 1em;}
16 footer{font-size:smaller;color:#babdb6;}
17 nav{font-size:large;margin:1ex 1ex;clear:both;line-height:1.5em;}
18 footer nav .up{display:none;}
19 @media screen and (min-width: 460px) {
20 nav {font-size:x-large;margin:1ex 1em;}
21 }
22 nav a{padding: 1ex;}
23 nav .up{font-size:smaller;display:block;clear:both;}
24 nav .prev{float:left;}
25 nav .next{float:right;}
26 nav .next::after{content:" →";}
27 nav .prev::before{content:"← ";}
28 nav :empty::after,nav :empty::before{content:""}
29 .content{background-color:white;padding:1em;list-style-position:inside;}
30 .time{float:right;font-size:small;opacity:0.2;}
31 li:hover .time{opacity:1;}
32 .description{font-size:smaller;}
33 .body{white-space:pre-line;}
34 .body::before,.body::after{content:"";}
35 .presence .verb{font-style:normal;color:#30c030;}
36 .unavailable .verb{color:#c03030;}
37 </style>
38 </head>
39 <body>
40 <header>
41 <h1 title="xmpp:{jid?}">{title}</h1>
42 <nav>{links#
43 <a class="{rel?}" href="{href}" rel="{rel?}">{text}</a>}
44 </nav>
45 </header>
46 <hr>
47 <div class="content">
48 <nav>
49 <dl class="room-list">
50 {rooms#
51 <dt class="name"><a href="{href}">{name}</a></dt>
52 <dd class="description">{description?}</dd>}
53 </dl>
54 <ul class="dates">{dates#
55 <li><a href="{date}">{date}</a></li>}
56 </ul>
57 </nav>
58 <ol class="chat-logs">{lines#
59 <li class="{st_name} {st_type?}" id="{key}">
60 <a class="time" href="#{key}"><time datetime="{datetime}">{time}</time></a>
61 <b class="nick">{nick}</b>
62 <em class="verb">{verb?}</em>
63 <q class="body">{body?}</q>
64 </li>}
65 </ol>
66 </div>
67 <hr>
68 <footer>
69 <nav>{links#
70 <a class="{rel?}" href="{href}" rel="{rel?}">{text}</a>}
71 </nav>
72 <br>
73 <div class="powered-by">Prosody</div>
74 </footer>
75 <script>
76 /*
77 * Local timestamps
78 */
79 (function () {
80 var timeTags = document.getElementsByTagName("time");
81 var i = 0, tag, date;
82 while(timeTags[i]) {
83 tag = timeTags[i++];
84 if(date = tag.getAttribute("datetime")) {
85 date = new Date(date);
86 tag.textContent = date.toLocaleTimeString();
87 tag.setAttribute("title", date.toString());
88 }
89 }
90 })();
91 </script>
92 </body>
93 </html>