tazpanel view test.cgi @ rev 527

Add hosts.cgi; update translations
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Aug 26 05:51:08 2015 +0300 (2015-08-26)
parents 3117717c007d
children 694b20d6963c
line source
1 #!/bin/sh
2 #
3 # test.cgi - Test TazPanel styles.
4 #
5 # Copyright (C) 2015 SliTaz GNU/Linux - BSD License
6 #
8 # Common functions from libtazpanel
9 . lib/libtazpanel
10 get_config
11 header
13 TITLE='Test'
15 xhtml_header 'Show icons and styles'
17 cat <<EOT
19 <section>
20 <header><span data-img="info"></span>Buttons with font icons</header>
21 <!--
22 --><button data-icon="add" >Add </button><button data-icon="admin" >Admin </button><!--
23 --><button data-icon="back" >Back </button><button data-icon="battery" >Battery </button><!--
24 --><button data-icon="brightness" >Brightness </button><button data-icon="cancel" >Cancel </button><!--
25 --><button data-icon="cd" >CD </button><button data-icon="check" >Check </button><!--
26 --><button data-icon="clock" >Clock </button><button data-icon="conf" >Conf </button><!--
27 --><button data-icon="daemons" >Daemons </button><button data-icon="delete" >Delete </button><!--
28 --><button data-icon="detect" >Detect </button><button data-icon="diff" >Diff </button><!--
29 --><button data-icon="download" >Download </button><button data-icon="edit" >Edit </button><!--
30 --><button data-icon="eth" >Eth </button><button data-icon="group" >Group </button><!--
31 --><button data-icon="grub" >GRUB </button><button data-icon="hdd" >HDD </button><!--
32 --><button data-icon="help" >Help </button><button data-icon="history" >History </button><!--
33 --><button data-icon="info" >Info </button><button data-icon="install" >Install </button><!--
34 --><button data-icon="link" >Link </button><button data-icon="list" >List </button><!--
35 --><button data-icon="locale" >Locale </button><button data-icon="lock" >Lock </button><!--
36 --><button data-icon="logs" >Logs </button><button data-icon="loopback">Loopback</button><!--
37 --><button data-icon="man" >Man </button><button data-icon="modules" >Modules </button><!--
38 --><button data-icon="off" >Off </button><button data-icon="ok" >OK </button><!--
39 --><button data-icon="on" >On </button><button data-icon="opt" >Opt </button><!--
40 --><button data-icon="proc" >Proc </button><button data-icon="refresh" >Refresh </button><!--
41 --><button data-icon="removable" >Removable </button><button data-icon="remove" >Remove </button><!--
42 --><button data-icon="repack" >Repack </button><button data-icon="report" >Report </button><!--
43 --><button data-icon="restart" >Restart </button><button data-icon="run" >Run </button><!--
44 --><button data-icon="save" >Save </button><button data-icon="scan" >Scan </button><!--
45 --><button data-icon="settings" >Settings </button><button data-icon="slitaz" >SliTaz </button><!--
46 --><button data-icon="start" >Start </button><button data-icon="stop" >Stop </button><!--
47 --><button data-icon="sync" >Sync </button><button data-icon="tags" >Tags </button><!--
48 --><button data-icon="tag" >Tag </button><button data-icon="tazx" >TazX </button><!--
49 --><button data-icon="temperature">Temperature</button><button data-icon="terminal">Terminal</button><!--
50 --><button data-icon="text" >Text </button><button data-icon="unlink" >Unlink </button><!--
51 --><button data-icon="unlock" >Unlock </button><button data-icon="upgrade" >Upgrade </button><!--
52 --><button data-icon="user" >User </button><button data-icon="view" >View </button><!--
53 --><button data-icon="web" >Web </button><button data-icon="wifi" >Wi-Fi </button><!--
54 --><button data-icon="toggle" >Toggle </button><button data-icon="chlock" >ChLock </button><!--
55 --><button data-icon="calendar" >Calendar </button><button data-icon="modem" >Modem </button><!--
56 --><button data-icon="vpn" >VPN </button><button data-icon="display" >Display </button><!--
57 --><button data-icon="cpu" >CPU </button>
58 </section>
61 <section>
62 <header><span data-img="link"></span>Links with font icons</header>
63 <div>
64 <p>
65 <a data-icon="add" >Add </a> <a data-icon="admin" >Admin </a> <a data-icon="back" >Back </a>
66 <a data-icon="battery" >Battery </a> <a data-icon="brightness">Brightness</a> <a data-icon="cancel" >Cancel </a>
67 <a data-icon="cd" >CD </a> <a data-icon="check" >Check </a> <a data-icon="clock" >Clock </a>
68 <a data-icon="conf" >Conf </a> <a data-icon="daemons" >Daemons </a> <a data-icon="delete" >Delete </a>
69 <a data-icon="detect" >Detect </a> <a data-icon="diff" >Diff </a> <a data-icon="download" >Download </a>
70 <a data-icon="edit" >Edit </a> <a data-icon="eth" >Eth </a> <a data-icon="group" >Group </a>
71 <a data-icon="grub" >GRUB </a> <a data-icon="hdd" >HDD </a> <a data-icon="help" >Help </a>
72 <a data-icon="history" >History </a> <a data-icon="info" >Info </a> <a data-icon="install" >Install </a>
73 <a data-icon="link" >Link </a> <a data-icon="list" >List </a> <a data-icon="locale" >Locale </a>
74 <a data-icon="lock" >Lock </a> <a data-icon="logs" >Logs </a> <a data-icon="loopback" >Loopback </a>
75 <a data-icon="man" >Man </a> <a data-icon="modules" >Modules </a> <a data-icon="off" >Off </a>
76 <a data-icon="ok" >OK </a> <a data-icon="on" >On </a> <a data-icon="opt" >Opt </a>
77 <a data-icon="proc" >Proc </a> <a data-icon="refresh" >Refresh </a> <a data-icon="removable">Removable</a>
78 <a data-icon="remove" >Remove </a> <a data-icon="repack" >Repack </a> <a data-icon="report" >Report </a>
79 <a data-icon="restart" >Restart </a> <a data-icon="run" >Run </a> <a data-icon="save" >Save </a>
80 <a data-icon="scan" >Scan </a> <a data-icon="settings" >Settings </a> <a data-icon="slitaz" >SliTaz </a>
81 <a data-icon="start" >Start </a> <a data-icon="stop" >Stop </a> <a data-icon="sync" >Sync </a>
82 <a data-icon="tags" >Tags </a> <a data-icon="tag" >Tag </a> <a data-icon="tazx" >TazX </a>
83 <a data-icon="temperature">Temperature</a> <a data-icon="terminal" >Terminal </a> <a data-icon="text" >Text </a>
84 <a data-icon="unlink" >Unlink </a> <a data-icon="unlock" >Unlock </a> <a data-icon="upgrade" >Upgrade </a>
85 <a data-icon="user" >User </a> <a data-icon="view" >View </a> <a data-icon="web" >Web </a>
86 <a data-icon="wifi" >Wi-Fi </a>
87 </p>
88 </div>
89 </section>
92 <section>
93 <header><span data-img="view"></span>Links with font icons only (small buttons)</header>
94 <p>
95 <a data-img="conf" href="#"></a>Conf <a data-img="help" href="#"></a>Help <a data-img="man" href="#"></a>Man
96 <a data-img="off" href="#"></a>Off <a data-img="on" href="#"></a>On <a data-img="opt" href="#"></a>Opt
97 <a data-img="remove" href="#"></a>Remove <a data-img="run" href="#"></a>Run <a data-img="stop" href="#"></a>Stop
98 <a data-img="web" href="#"></a>Web <a data-img="slitaz" href="#"></a>SliTaz <a data-img="user" href="#"></a>User
99 </p>
100 </section>
103 <section>
104 <header><span data-img="sechi"></span>Status icons</header>
105 <div>
106 <span data-icon="lvl0">lvl0</span> <span data-icon="lvl1">lvl1</span> <span data-icon="lvl2">lvl2</span>
107 <span data-icon="lvl3">lvl3</span> <span data-icon="lvl4">lvl4, lvl5</span>
108 <span data-icon="online">online</span> <span data-icon="offline">offline</span>
109 <span data-icon="sechi">sechi</span> <span data-icon="secmi">secmi</span> <span data-icon="seclo">seclo</span>
110 <span data-icon="pkg">pkg</span> <span data-icon="pkgi">pkgi</span> <span data-icon="pkgib">pkgib</span>
111 </div>
112 <div>
113 <span data-icon="msg">msg</span> <span data-icon="msgerr">msgerr</span>
114 <span data-icon="msgwarn">msgwarn</span> <span data-icon="msgup">msgup</span>
115 <span data-icon="msgtip">msgtip</span>
116 </div>
117 </section>
120 <section>
121 <header><span data-img="&#xf20a;"></span>Font components</header>
122 <div>
123 <span data-icon="&#xf200;">#f200</span> <span data-icon="&#xf201;">#f201</span>
124 <span data-icon="&#xf202;">#f202</span> <span data-icon="&#xf203;">#f203</span>
125 <span data-icon="&#xf204;">#f204</span> <span data-icon="&#xf205;">#f205</span>
126 <span data-icon="&#xf206;">#f206</span> <span data-icon="&#xf207;">#f207</span>
127 <span data-icon="&#xf208;">#f208</span> <span data-icon="&#xf209;">#f209</span>
128 <span data-icon="&#xf20a;">#f20a</span> <span data-icon="&#xf20b;">#f20b</span>
129 <span data-icon="&#xf20c;">#f20c</span> <span data-icon="&#xf20d;">#f20d</span>
130 </div>
131 </section>
134 <section>
135 <header>Message boxes</header>
136 $(msg msg "Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
137 $(msg tip "Fusce volutpat est a euismod malesuada.")
138 $(msg warn "Aenean elementum augue et nisl sollicitudin, ut pellentesque leo rutrum.")
139 $(msg err "Etiam nisi elit, fringilla sit amet consectetur quis, efficitur eu ligula.")
140 $(msg up "Sed pharetra ex ligula, nec commodo erat suscipit eu.")
141 </section>
144 <section>
145 <header><span data-img="check"></span>User input elements</header>
146 <div><form>
147 <table>
148 <tr><td>Text:</td>
149 <td><input type="text" placeholder="Text"/></td>
150 </tr>
151 <tr><td>Password:</td>
152 <td><input type="password" placeholder="Password"/></td>
153 </tr>
154 <tr><td>Button:</td>
155 <td><input type="button" value="Button" data-icon="ok"/></td>
156 </tr>
157 <tr><td>Checkbox:</td>
158 <td><input type="checkbox" id="chk"/><label for="chk">Check it</label></td>
159 </tr>
160 <tr><td>Radio:</td>
161 <td>
162 <label><input type="radio" name="rad" id="radio1"/>Option 1</label>
163 <label><input type="radio" name="rad" id="radio2" checked/>Option 2</label>
164 <label><input type="radio" name="rad" id="radio3"/>Option 3</label>
165 </td>
166 </tr>
167 <tr><td>File:</td>
168 <td><input type="file" accept=".txt,.png"/></td>
169 </tr>
170 <tr><td>Image:</td>
171 <td><input type="image" src="/styles/default/images/msg-warn.png"/></td>
172 </tr>
173 <tr><td>Reset:</td><td><input type="reset"/></td></tr>
174 <tr><td>Submit:</td><td><input type="submit"/></td></tr>
175 <tr><td>Select:</td>
176 <td><select><option data-icon="user">Option 1<option>Option 2<option>Option 3</select></td>
177 </tr>
178 <tr><td colspan="2"><b>HTML 5 inputs:</b></td></tr>
179 <tr><td>Search:</td><td><input type="search" results="5" autosave="pkgsearch" autocomplete="on"/></td></tr>
180 <tr><td>Number:</td><td><input type="number" name="n" value="3" min="0" max="10"/></td></tr>
181 <tr><td>Range:</td><td><input type="range" name="r" value="3" min="0" max="10"/></td></tr>
182 <tr><td>Color:</td><td><input type="color" name="c"/></td></tr>
183 <tr><td>Tel:</td><td><input type="tel" name="t"/></td></tr>
184 <tr><td>URL:</td><td><input type="url" name="u"/></td></tr>
185 <tr><td>E-mail:</td><td><input type="email" name="e" data-x="A part number is a digit followed by three uppercase letters." required/></td></tr>
186 <tr><td>Date:</td><td><input type="date" name="d" value="$(date +'%F')"/></td></tr>
187 <tr><td>Month:</td><td><input type="month" name="m" value="$(date +'%Y-%m')"/></td></tr>
188 <tr><td>Week:</td><td><input type="week" name="w" value="$(date +'%Y-W%V')"/></td></tr>
189 <tr><td>Time:</td><td><input type="time" name="ti" value="$(date +'%R')"/></td></tr>
190 <tr><td>Date &amp; Time:</td><td><input type="datetime" name="dt" value="$(date +'%FT%RZ')"/></td></tr>
191 <tr><td>Date &amp; Time Local:</td><td><input type="datetime-local" name="dtl" value="$(date +'%FT%R')"/></td></tr>
192 </table>
193 </form></div>
194 </section>
195 EOT
196 xhtml_footer
197 exit 0