slitaz-forge rev 525
Clean-up scn and add new custom files
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Apr 24 01:41:10 2014 +0200 (2014-04-24) |
parents | d48ef19876cd |
children | 84357a7b43f3 |
files | scn/README scn/header.html scn/images/artwork-avatar.png scn/images/devel-avatar.png scn/images/i18n-avatar.png scn/images/support-avatar.png scn/style.css scn/themes/slitaz/footer.php scn/themes/slitaz/header.php scn/themes/slitaz/images/favicon.ico scn/themes/slitaz/images/logo.png scn/themes/slitaz/images/network.png scn/themes/slitaz/qr.png scn/themes/slitaz/qrcode.js scn/themes/slitaz/screenshot.png scn/themes/slitaz/style.css |
line diff
1.1 --- a/scn/README Mon Apr 14 20:58:24 2014 +0100 1.2 +++ b/scn/README Thu Apr 24 01:41:10 2014 +0200 1.3 @@ -1,7 +1,7 @@ 1.4 1.5 +SCN is powered by TinyCM. This folder have the custom CSS style and 1.6 +header skeleton. 1.7 1.8 -Receipts folder is the custom packages receipts for the SliTaz network. 1.9 -Note that all receipts are made for tazwok 3.1 and SliTaz 3.0. 1.10 +Receipts folder is the custom packages receipts for the old wordpress 1.11 +SliTaz SCN. Note that all receipts are made for tazwok 3.1 and SliTaz 3.0. 1.12 1.13 -Themes folder has the SliTaz Wordpress themes. 1.14 -
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/scn/header.html Thu Apr 24 01:41:10 2014 +0200 2.3 @@ -0,0 +1,70 @@ 2.4 +<!DOCTYPE html> 2.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 2.6 +<head> 2.7 + <title>SCN %TITLE%</title> 2.8 + <meta charset="utf-8" /> 2.9 + <link rel="shortcut icon" href="favicon.ico" /> 2.10 + <link rel="stylesheet" type="text/css" href="style.css" /> 2.11 + <script type="text/javascript" src="lib/functions.js"></script> 2.12 +</head> 2.13 +<body> 2.14 + 2.15 +<div id="header"> 2.16 + <div id="logo"></div> 2.17 + <div id="network"> 2.18 + <a href="http://www.slitaz.org/">Home</a> 2.19 + <span>Community</span> 2.20 + <a href="http://doc.slitaz.org/">Doc</a> 2.21 + <a href="http://forum.slitaz.org/">Forum</a> 2.22 + <a href="http://irc.slitaz.org/">IRC</a> 2.23 + <a href="http://shop.slitaz.org/">Shop</a> 2.24 + <a href="http://bugs.slitaz.org/">Bugs</a> 2.25 + <a href="http://hg.slitaz.org/">Hg</a> 2.26 + </div> 2.27 + <h1><a href="index.cgi">SliTaz Community</a></h1> 2.28 +</div> 2.29 + 2.30 +<!-- Block --> 2.31 +<div id="block"> 2.32 + <!-- Navigation --> 2.33 + <div id="block_nav"> 2.34 + 2.35 + <!-- Twitter button 2.36 + <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-hashtags="SliTaz">Tweet</a> 2.37 + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> 2.38 + --> 2.39 + 2.40 + <a href="http://twitter.com/slitaz" title="Follow us on Twitter"> 2.41 + <img src="images/twitter.png" alt="Twitter" /></a> 2.42 + <a href="http://www.facebook.com/slitaz" title="Follow us on Facebook"> 2.43 + <img src="images/fb.png" alt="Facebook" /></a> 2.44 + 2.45 + <!-- PayPal button --> 2.46 + <form action="https://www.paypal.com/cgi-bin/webscr" method="post" 2.47 + style="display: inline;"> 2.48 + <input type="hidden" name="cmd" value="_s-xclick" /> 2.49 + <input type="hidden" name="hosted_button_id" value="4885025" /> 2.50 + <input type="image" src="images/paypal.png" name="submit" title="Donate" 2.51 + alt="PayPal - The safer, easier way to pay online!" /> 2.52 + </form> 2.53 + 2.54 + <!-- Hardcoded SCN links --> 2.55 + <nav id="nav"> 2.56 + <a href="?blog">Blog</a> 2.57 + <a href="?log">Activity</a> 2.58 + <a href="?d=en/about">About</a> 2.59 + </nav> 2.60 + 2.61 + </div> 2.62 + <!-- Information/image --> 2.63 + <div id="block_info"> 2.64 + <p> 2.65 + The SliTaz Community Network provide latest news, lets you 2.66 + connect with SliTaz users and developers, share ideas about 2.67 + SliTaz, help others and get involved in the project. 2.68 + </p> 2.69 + </div> 2.70 +</div> 2.71 + 2.72 +<!-- Content --> 2.73 +<div id="content">
3.1 Binary file scn/images/artwork-avatar.png has changed
4.1 Binary file scn/images/devel-avatar.png has changed
5.1 Binary file scn/images/i18n-avatar.png has changed
6.1 Binary file scn/images/support-avatar.png has changed
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/scn/style.css Thu Apr 24 01:41:10 2014 +0200 7.3 @@ -0,0 +1,336 @@ 7.4 +/* CSS style for SliTaz Bugs/TinyCM */ 7.5 + 7.6 +html { min-height: 102%; } 7.7 +body { font: 13px sans-serif, vernada, arial; margin: 0; } 7.8 +h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; } 7.9 +h1 a { color: #fff; text-decoration: none; } 7.10 +h2 { color: #444; } h3 { color: #666; font-size: 140%; } 7.11 +a { text-decoration: underline; color: #215090; } 7.12 +a:hover { text-decoration: none; } 7.13 +img { border: 0pt none; vertical-align: middle; } 7.14 +pre { 7.15 + overflow: auto; 7.16 + font-size: 98%; 7.17 +} 7.18 +textarea, table { width: 100%; } 7.19 +thead { font-weight: bold; } 7.20 + 7.21 +/* Header */ 7.22 + 7.23 +#header { 7.24 + background: #111 ; 7.25 + height: 40px; 7.26 +} 7.27 + 7.28 +#header h1 { 7.29 + margin: 0; 7.30 + padding: 8px 0 0 42px; 7.31 + width: 250px; 7.32 +} 7.33 + 7.34 +#header h1 a { 7.35 + color: white; 7.36 + text-decoration: none; 7.37 + font-size: 20px; 7.38 + font-style: italic; 7.39 +} 7.40 + 7.41 +#header h1 a:hover { 7.42 + color: #afafaf; 7.43 +} 7.44 + 7.45 +/* Header links */ 7.46 + 7.47 +#network { 7.48 + float: right; 7.49 + padding: 14px 5px 0; 7.50 + font-size: 12px; 7.51 + margin-right: 100px; 7.52 +} 7.53 + 7.54 +#network a, #network span { 7.55 + padding: 0 4px; 7.56 + color: #fff; 7.57 + font-weight: bold; 7.58 + text-decoration: none; 7.59 +} 7.60 + 7.61 +#network a:hover, #user a:hover, #network span { color: #afafaf; } 7.62 + 7.63 +/* Logo */ 7.64 + 7.65 +#logo { 7.66 + background: url(images/logo.png) no-repeat left; 7.67 + position: absolute; 7.68 + float: left; 7.69 + left: 0px; 7.70 + top: 0px; 7.71 + width: 40px; 7.72 + height: 40px; 7.73 +} 7.74 + 7.75 +/* Login and user box */ 7.76 + 7.77 +#login { 7.78 + width: 240px; 7.79 + float: left; 7.80 + height: 120px; 7.81 +} 7.82 + 7.83 +#login input[type="text"], #login input[type="password"] { 7.84 + width: 200px; } 7.85 + 7.86 +#signup input[type="text"], #signup input[type="password"] { 7.87 + width: 400px; } 7.88 + 7.89 +#login input[type="submit"] { float: none; } 7.90 +#login p { display: inline; } 7.91 + 7.92 +#user { 7.93 + background-color: #333; 7.94 + padding: 4px; 7.95 + width: 84px; 7.96 + float: right; 7.97 + font-size: 12px; 7.98 + position: absolute; 7.99 + right: 10px; 7.100 + top: 6px; 7.101 +} 7.102 +#user a { padding: 0 2px; color: #fff; 7.103 + font-weight: bold; text-decoration: none; } 7.104 + 7.105 +#account-info { width: 380px; height: 120px; float: right; } 7.106 + 7.107 +/* Block */ 7.108 + 7.109 +#block { 7.110 + min-height: 92px; 7.111 + background: #ccc; 7.112 + padding: 20px 10% 0px; 7.113 + text-align: center; 7.114 + color: #222; 7.115 + border-bottom: 1px solid #afafaf; 7.116 +} 7.117 + 7.118 +#block_info { 7.119 + text-align: justify; 7.120 + width: 48%; 7.121 + padding: 0px 10px 0 0; 7.122 +} 7.123 + 7.124 +#block_info p { margin: 10px 0; padding: 0 12px 0 0; } 7.125 +#block_info a { font-weight: normal; } 7.126 +#block ul { list-style-type: square; } 7.127 +#block a:hover { color: #351a0a; } 7.128 + 7.129 +/* Navigation */ 7.130 + 7.131 +#block_nav { 7.132 + background: #666; 7.133 + padding: 10px; 7.134 + text-align: justify; 7.135 + width: 48%; 7.136 + float: right; 7.137 +} 7.138 + 7.139 +nav { margin: 12px 0 0 0; } 7.140 + 7.141 +nav a { 7.142 + text-decoration: none; 7.143 + padding: 0px 4px; 7.144 + color: #fff; 7.145 + font-weight: bold; 7.146 +} 7.147 + 7.148 +#block_nav a:hover, nav a:hover { color: #afafaf; } 7.149 +#block_nav img { vertical-align: top; } 7.150 + 7.151 +/* Languages */ 7.152 + 7.153 +#lang { 7.154 + position: absolute; 7.155 + right: 0; 7.156 + top: 152px; 7.157 + padding: 6px; 7.158 + font-size: 12px; 7.159 +} 7.160 + 7.161 +#lang a { 7.162 + text-decoration: none; 7.163 + padding: 0 2px; 7.164 +} 7.165 + 7.166 +#lang a:hover { 7.167 + text-decoration: underline; 7.168 +} 7.169 + 7.170 +/* Search */ 7.171 + 7.172 +#search { 7.173 + position: absolute; 7.174 + right: 20px; 7.175 + top: 72px; 7.176 + 7.177 +} 7.178 + 7.179 +#search input[type="text"] { width: 180px; } 7.180 + 7.181 +/* Content */ 7.182 + 7.183 +#content { 7.184 + margin: 40px auto; 7.185 + padding: 0 20px; 7.186 + text-align: justify; 7.187 + max-width: 680px; 7.188 +} 7.189 + 7.190 +#edit textarea { width: 100%; height: 240px; background: #f8f8f8; } 7.191 +#edit a { text-decoration: none; } 7.192 + 7.193 +.box, pre, #login, #account-info { 7.194 + background-color: #f8f8f8; 7.195 + border: 1px solid #ddd; 7.196 + padding: 10px; 7.197 +} 7.198 + 7.199 +pre img { margin: 4px 4px 4px 0px; } 7.200 +#content p img { display: block; 7.201 + margin: 0 auto; } 7.202 + 7.203 +.error { color: red; } 7.204 +.ok { color: green; } 7.205 +.date { color: #666; font-size: 96%; } 7.206 + 7.207 +/* Progress bar */ 7.208 + 7.209 +.pct { background: #9dff4a; padding: 2px 4px; } 7.210 + 7.211 +.pctbar { 7.212 + margin: 0; 7.213 + color: #666; 7.214 + background: #f1f1f1; 7.215 + border: 1px solid #ddd; 7.216 + overflow: hidden; 7.217 + clear: both; 7.218 +} 7.219 + 7.220 +/* Form */ 7.221 + 7.222 +form { display: inline; } 7.223 +textarea { border: 2px solid #ccc; padding: 4px; width: 100%; } 7.224 +select { min-width: 180px; } 7.225 +input[type="submit"], input[type="text"], input[type="password"], 7.226 +select, #tools a { 7.227 + color: #444444; 7.228 + border: 1px solid #cccccc; 7.229 + padding: 4px; 7.230 + margin: 4px 0px; 7.231 + font-size: 14px; 7.232 + line-height: 1.2em; 7.233 + background-image: -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5); 7.234 + background-image: -moz-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5); 7.235 + -webkit-appearance: none; 7.236 + -webkit-padding-end: 12px; 7.237 + -webkit-padding-start: 6px; 7.238 +} 7.239 + 7.240 +input[type="text"], input[type="password"] { 7.241 + background: #fefefe; border: 2px solid #ccc; 7.242 + width: 100%; } 7.243 +/*input[type="file"] { border: 2px solid #ddd; }*/ 7.244 +/*input[type="checkbox"] { background: #fefefe; }*/ 7.245 + 7.246 +/* Be compatible with old FF and Webkit version. */ 7.247 +input[type="submit"] { 7.248 + -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); 7.249 + -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); 7.250 + box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); 7.251 +} 7.252 + 7.253 +input[type="submit"]:hover, #tools a:hover { 7.254 + cursor: pointer; 7.255 + color: black; 7.256 +} 7.257 + 7.258 +select { 7.259 + background-image: url(images/down.png), 7.260 + -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5); 7.261 + background-position: center right; 7.262 + background-repeat: no-repeat; 7.263 +} 7.264 + 7.265 +#tools { 7.266 + padding-top: 10px; 7.267 + margin: 20px 0px; 7.268 + /*border-top: 1px dotted #ccc; 7.269 + position: fixed; 7.270 + bottom: 10px;*/ 7.271 +} 7.272 +#tools a { text-decoration: none; margin: 4px 6px 4px 0px; } 7.273 + 7.274 +/* Round corner */ 7.275 + 7.276 +pre, .button, .pctbar, .box, #login, #account-info, #user, img, 7.277 +input, textarea, select, #tools a, #block_nav { 7.278 + -moz-border-radius: 4px; 7.279 + -webkit-border-radius: 4px; 7.280 + border-radius: 4px; 7.281 +} 7.282 + 7.283 +/* notes */ 7.284 + 7.285 +.noteclassic,.noteimportant,.notewarning,.notetip { 7.286 + margin:2em; 7.287 + margin-left:auto; 7.288 + margin-right:auto; 7.289 + width:70% !important; 7.290 + min-height:40px; 7.291 + clear:both; 7.292 + text-align:justify; 7.293 + vertical-align:middle; 7.294 + border-collapse:collapse; 7.295 + padding:15px 20px 15px 80px; 7.296 + background-position:20px 50%; 7.297 + background-repeat:no-repeat; 7.298 + -moz-border-radius:20px; 7.299 + -khtml-border-radius:20px; 7.300 + border-radius:20px; 7.301 +} 7.302 + 7.303 +.noteclassic { 7.304 + background-color:#eef; 7.305 + background-image:url(images/note.png); 7.306 +} 7.307 + 7.308 +.noteimportant { 7.309 + background-color:#ffc; 7.310 + background-image:url(images/important.png); 7.311 +} 7.312 + 7.313 +.notewarning { 7.314 + background-color:#fdd; 7.315 + background-image:url(images/warning.png); 7.316 +} 7.317 + 7.318 +.notetip { 7.319 + background-color:#dfd; 7.320 + background-image:url(images/tip.png); 7.321 +} 7.322 + 7.323 +/* Footer */ 7.324 + 7.325 +#footer { 7.326 + text-align: center; 7.327 + padding: 20px; 7.328 + border-top: 1px solid #ddd; 7.329 + font-size: 90%; 7.330 +} 7.331 + 7.332 +#footer a { padding: 0 2px; } 7.333 + 7.334 +/* Plugins CSS */ 7.335 + 7.336 +.post-tools { border-bottom: 1px dotted #ccc; 7.337 + border-top: 1px dotted #ccc; padding: 4px 0;} 7.338 +.post-tools a { text-decoration: none; } 7.339 +.post-tools a:hover { text-decoration: underline; }
8.1 --- a/scn/themes/slitaz/footer.php Mon Apr 14 20:58:24 2014 +0100 8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 8.3 @@ -1,34 +0,0 @@ 8.4 - </div> <!-- #container --> 8.5 - 8.6 - <?php do_action( 'bp_after_container' ) ?> 8.7 - <?php do_action( 'bp_before_footer' ) ?> 8.8 - 8.9 - <script type="text/javascript" src="/wp-content/themes/custom-community/qrcode.js"></script> 8.10 - 8.11 - <div id="footer"> 8.12 - <p>Copyright © <?php echo date('Y'); ?> 8.13 - <a href="http://www.slitaz.org">SliTaz</a> - SCN is 8.14 - proudly powered by <a href="http://wordpress.org">WordPress</a> 8.15 - and <a href="http://buddypress.org">BuddyPress</a> 8.16 - </p> 8.17 - <p> 8.18 - <img src="/wp-content/themes/custom-community/qr.png" 8.19 - alt="SliTaz @" onmouseover="this.title = location.href" 8.20 - onclick="this.src = QRCode.generatePNG(location.href, {ecclevel: 'H'})" /> 8.21 - <a href="http://twitter.com/slitaz">Twitter</a> 8.22 - <a href="http://www.facebook.com/slitaz">Facebook</a> 8.23 - <a href="http://distrowatch.com/slitaz">Distrowatch</a> 8.24 - <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a> 8.25 - <a href="http://flattr.com/profile/slitaz">Flattr</a> 8.26 - </p> 8.27 - 8.28 - <?php do_action( 'bp_footer' ) ?> 8.29 - </div><!-- #footer --> 8.30 - 8.31 - <?php do_action( 'bp_after_footer' ) ?> 8.32 - 8.33 - <?php wp_footer(); ?> 8.34 - 8.35 - </body> 8.36 - 8.37 -</html>
9.1 --- a/scn/themes/slitaz/header.php Mon Apr 14 20:58:24 2014 +0100 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,97 +0,0 @@ 9.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 9.5 - 9.6 -<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 9.7 - 9.8 - <head profile="http://gmpg.org/xfn/11"> 9.9 - 9.10 - <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 9.11 - 9.12 - <title><?php bp_page_title() ?></title> 9.13 - 9.14 - <?php do_action( 'bp_head' ) ?> 9.15 - 9.16 - <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats --> 9.17 - 9.18 - <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> 9.19 - 9.20 - <?php if ( function_exists( 'bp_sitewide_activity_feed_link' ) ) : ?> 9.21 - <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" /> 9.22 - <?php endif; ?> 9.23 - 9.24 - <?php if ( function_exists( 'bp_member_activity_feed_link' ) && bp_is_member() ) : ?> 9.25 - <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" /> 9.26 - <?php endif; ?> 9.27 - 9.28 - <?php if ( function_exists( 'bp_group_activity_feed_link' ) && bp_is_group() ) : ?> 9.29 - <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" /> 9.30 - <?php endif; ?> 9.31 - 9.32 - <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts RSS Feed', 'buddypress' ) ?>" href="<?php bloginfo('rss2_url'); ?>" /> 9.33 - <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts Atom Feed', 'buddypress' ) ?>" href="<?php bloginfo('atom_url'); ?>" /> 9.34 - 9.35 - <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> 9.36 - <link rel="shortcut icon" href="<?php echo site_url() ?>/wp-content/themes/slitaz/images/favicon.ico" /> 9.37 - <?php wp_head(); ?> 9.38 - 9.39 - </head> 9.40 - 9.41 - <body <?php body_class() ?> id="bp-default"> 9.42 - 9.43 - <?php do_action( 'bp_before_header' ) ?> 9.44 - 9.45 - <div id="header"> 9.46 - 9.47 - <!-- SliTaz Network --> 9.48 - <div id="network"> 9.49 - <a href="http://www.slitaz.org/"> 9.50 - <img src="<?php echo site_url() ?>/wp-content/themes/slitaz/images/network.png" alt="network.png" /></a> 9.51 - <a href="http://scn.slitaz.org/">Community</a> 9.52 - <a href="http://doc.slitaz.org/">Doc</a> 9.53 - <a href="http://forum.slitaz.org/">Forum</a> 9.54 - <a href="http://bugs.slitaz.org/">Bugs</a> 9.55 - <a href="http://hg.slitaz.org/?sort=lastchange">Hg</a> 9.56 - </div> 9.57 - 9.58 - <h1 id="logo"><a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1> 9.59 - 9.60 - <div id="search-bar"> 9.61 - <div class="padder"> 9.62 - 9.63 - <?php if ( bp_search_form_enabled() ) : ?> 9.64 - 9.65 - <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form"> 9.66 - <input type="text" id="search-terms" name="search-terms" value="" /> 9.67 - <?php echo bp_search_form_type_select() ?> 9.68 - 9.69 - <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" /> 9.70 - <?php wp_nonce_field( 'bp_search_form' ) ?> 9.71 - </form><!-- #search-form --> 9.72 - 9.73 - <?php endif; ?> 9.74 - 9.75 - <?php do_action( 'bp_search_login_bar' ) ?> 9.76 - 9.77 - </div><!-- .padder --> 9.78 - </div><!-- #search-bar --> 9.79 - 9.80 - <div id="navigation" role="navigation"> 9.81 - <?php wp_nav_menu( array( 'container' => false, 'menu_id' => 'nav', 'theme_location' => 'primary', 'fallback_cb' => 'bp_dtheme_main_nav' ) ); ?> 9.82 - </div> 9.83 - 9.84 - <?php do_action( 'bp_header' ) ?> 9.85 - 9.86 - </div><!-- #header --> 9.87 - 9.88 - <!-- SliTaz Block --> 9.89 - <div id="block"> 9.90 - <div style="text-align: justify; width: 48%; padding: 0 10px 0 0;"> 9.91 - The SliTaz Community Network lets you connect with SliTaz 9.92 - users and developers, share ideas about SliTaz, 9.93 - help others and get involved in the project. 9.94 - </div> 9.95 - </div> 9.96 - 9.97 - <?php do_action( 'bp_after_header' ) ?> 9.98 - <?php do_action( 'bp_before_container' ) ?> 9.99 - 9.100 - <div id="container">
10.1 Binary file scn/themes/slitaz/images/favicon.ico has changed
11.1 Binary file scn/themes/slitaz/images/logo.png has changed
12.1 Binary file scn/themes/slitaz/images/network.png has changed
13.1 Binary file scn/themes/slitaz/qr.png has changed
14.1 --- a/scn/themes/slitaz/qrcode.js Mon Apr 14 20:58:24 2014 +0100 14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 14.3 @@ -1,733 +0,0 @@ 14.4 -/* qr.js -- QR code generator in Javascript (revision 2011-01-19) 14.5 - * Written by Kang Seonghoon <public+qrjs@mearie.org>. 14.6 - * 14.7 - * This source code is in the public domain; if your jurisdiction does not 14.8 - * recognize the public domain the terms of Creative Commons CC0 license 14.9 - * apply. In the other words, you can always do what you want. 14.10 - */ 14.11 - 14.12 -var QRCode = (function(){ 14.13 - 14.14 -/* Quick overview: QR code composed of 2D array of modules (a rectangular 14.15 - * area that conveys one bit of information); some modules are fixed to help 14.16 - * the recognition of the code, and remaining data modules are further divided 14.17 - * into 8-bit code words which are augumented by Reed-Solomon error correcting 14.18 - * codes (ECC). There could be multiple ECCs, in the case the code is so large 14.19 - * that it is helpful to split the raw data into several chunks. 14.20 - * 14.21 - * The number of modules is determined by the code's "version", ranging from 1 14.22 - * (21x21) to 40 (177x177). How many ECC bits are used is determined by the 14.23 - * ECC level (L/M/Q/H). The number and size (and thus the order of generator 14.24 - * polynomial) of ECCs depend to the version and ECC level. 14.25 - */ 14.26 - 14.27 -// per-version information (cf. JIS X 0510:2004 pp. 30--36, 71) 14.28 -// 14.29 -// [0]: the degree of generator polynomial by ECC levels 14.30 -// [1]: # of code blocks by ECC levels 14.31 -// [2]: left-top positions of alignment patterns 14.32 -// 14.33 -// the number in this table (in particular, [0]) does not exactly match with 14.34 -// the numbers in the specficiation. see augumenteccs below for the reason. 14.35 -var VERSIONS = [ 14.36 - null, 14.37 - [[10, 7,17,13], [ 1, 1, 1, 1], []], 14.38 - [[16,10,28,22], [ 1, 1, 1, 1], [4,16]], 14.39 - [[26,15,22,18], [ 1, 1, 2, 2], [4,20]], 14.40 - [[18,20,16,26], [ 2, 1, 4, 2], [4,24]], 14.41 - [[24,26,22,18], [ 2, 1, 4, 4], [4,28]], 14.42 - [[16,18,28,24], [ 4, 2, 4, 4], [4,32]], 14.43 - [[18,20,26,18], [ 4, 2, 5, 6], [4,20,36]], 14.44 - [[22,24,26,22], [ 4, 2, 6, 6], [4,22,40]], 14.45 - [[22,30,24,20], [ 5, 2, 8, 8], [4,24,44]], 14.46 - [[26,18,28,24], [ 5, 4, 8, 8], [4,26,48]], 14.47 - [[30,20,24,28], [ 5, 4,11, 8], [4,28,52]], 14.48 - [[22,24,28,26], [ 8, 4,11,10], [4,30,56]], 14.49 - [[22,26,22,24], [ 9, 4,16,12], [4,32,60]], 14.50 - [[24,30,24,20], [ 9, 4,16,16], [4,24,44,64]], 14.51 - [[24,22,24,30], [10, 6,18,12], [4,24,46,68]], 14.52 - [[28,24,30,24], [10, 6,16,17], [4,24,48,72]], 14.53 - [[28,28,28,28], [11, 6,19,16], [4,28,52,76]], 14.54 - [[26,30,28,28], [13, 6,21,18], [4,28,54,80]], 14.55 - [[26,28,26,26], [14, 7,25,21], [4,28,56,84]], 14.56 - [[26,28,28,30], [16, 8,25,20], [4,32,60,88]], 14.57 - [[26,28,30,28], [17, 8,25,23], [4,26,48,70,92]], 14.58 - [[28,28,24,30], [17, 9,34,23], [4,24,48,72,96]], 14.59 - [[28,30,30,30], [18, 9,30,25], [4,28,52,76,100]], 14.60 - [[28,30,30,30], [20,10,32,27], [4,26,52,78,104]], 14.61 - [[28,26,30,30], [21,12,35,29], [4,30,56,82,108]], 14.62 - [[28,28,30,28], [23,12,37,34], [4,28,56,84,112]], 14.63 - [[28,30,30,30], [25,12,40,34], [4,32,60,88,116]], 14.64 - [[28,30,30,30], [26,13,42,35], [4,24,48,72,96,120]], 14.65 - [[28,30,30,30], [28,14,45,38], [4,28,52,76,100,124]], 14.66 - [[28,30,30,30], [29,15,48,40], [4,24,50,76,102,128]], 14.67 - [[28,30,30,30], [31,16,51,43], [4,28,54,80,106,132]], 14.68 - [[28,30,30,30], [33,17,54,45], [4,32,58,84,110,136]], 14.69 - [[28,30,30,30], [35,18,57,48], [4,28,56,84,112,140]], 14.70 - [[28,30,30,30], [37,19,60,51], [4,32,60,88,116,144]], 14.71 - [[28,30,30,30], [38,19,63,53], [4,28,52,76,100,124,148]], 14.72 - [[28,30,30,30], [40,20,66,56], [4,22,48,74,100,126,152]], 14.73 - [[28,30,30,30], [43,21,70,59], [4,26,52,78,104,130,156]], 14.74 - [[28,30,30,30], [45,22,74,62], [4,30,56,82,108,134,160]], 14.75 - [[28,30,30,30], [47,24,77,65], [4,24,52,80,108,136,164]], 14.76 - [[28,30,30,30], [49,25,81,68], [4,28,56,84,112,140,168]]]; 14.77 - 14.78 -// mode constants (cf. Table 2 in JIS X 0510:2004 p. 16) 14.79 -var MODE_TERMINATOR = 0; 14.80 -var MODE_NUMERIC = 1, MODE_ALPHANUMERIC = 2, MODE_OCTET = 4, MODE_KANJI = 8; 14.81 - 14.82 -// validation regexps 14.83 -var NUMERIC_REGEXP = /^\d*$/; 14.84 -var ALPHANUMERIC_REGEXP = /^[A-Za-z0-9 $%*+\-./:]*$/; 14.85 -var ALPHANUMERIC_OUT_REGEXP = /^[A-Z0-9 $%*+\-./:]*$/; 14.86 - 14.87 -// ECC levels (cf. Table 22 in JIS X 0510:2004 p. 45) 14.88 -var ECCLEVEL_L = 1, ECCLEVEL_M = 0, ECCLEVEL_Q = 3, ECCLEVEL_H = 2; 14.89 - 14.90 -// GF(2^8)-to-integer mapping with a reducing polynomial x^8+x^4+x^3+x^2+1 14.91 -// invariant: GF256_MAP[GF256_INVMAP[i]] == i for all i in [1,256) 14.92 -var GF256_MAP = [], GF256_INVMAP = [-1]; 14.93 -for (var i = 0, v = 1; i < 255; ++i) { 14.94 - GF256_MAP.push(v); 14.95 - GF256_INVMAP[v] = i; 14.96 - v = (v * 2) ^ (v >= 128 ? 0x11d : 0); 14.97 -} 14.98 - 14.99 -// generator polynomials up to degree 30 14.100 -// (should match with polynomials in JIS X 0510:2004 Appendix A) 14.101 -// 14.102 -// generator polynomial of degree K is product of (x-\alpha^0), (x-\alpha^1), 14.103 -// ..., (x-\alpha^(K-1)). by convention, we omit the K-th coefficient (always 1) 14.104 -// from the result; also other coefficients are written in terms of the exponent 14.105 -// to \alpha to avoid the redundant calculation. (see also calculateecc below.) 14.106 -var GF256_GENPOLY = [[]]; 14.107 -for (var i = 0; i < 30; ++i) { 14.108 - var prevpoly = GF256_GENPOLY[i], poly = []; 14.109 - for (var j = 0; j <= i; ++j) { 14.110 - var a = (j < i ? GF256_MAP[prevpoly[j]] : 0); 14.111 - var b = GF256_MAP[(i + (prevpoly[j-1] || 0)) % 255]; 14.112 - poly.push(GF256_INVMAP[a ^ b]); 14.113 - } 14.114 - GF256_GENPOLY.push(poly); 14.115 -} 14.116 - 14.117 -// alphanumeric character mapping (cf. Table 5 in JIS X 0510:2004 p. 19) 14.118 -var ALPHANUMERIC_MAP = {}; 14.119 -for (var i = 0; i < 45; ++i) { 14.120 - ALPHANUMERIC_MAP['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'.charAt(i)] = i; 14.121 -} 14.122 - 14.123 -// mask functions in terms of row # and column # 14.124 -// (cf. Table 20 in JIS X 0510:2004 p. 42) 14.125 -var MASKFUNCS = [ 14.126 - function(i,j) { return (i+j) % 2 == 0; }, 14.127 - function(i,j) { return i % 2 == 0; }, 14.128 - function(i,j) { return j % 3 == 0; }, 14.129 - function(i,j) { return (i+j) % 3 == 0; }, 14.130 - function(i,j) { return (((i/2)|0) + ((j/3)|0)) % 2 == 0; }, 14.131 - function(i,j) { return (i*j) % 2 + (i*j) % 3 == 0; }, 14.132 - function(i,j) { return ((i*j) % 2 + (i*j) % 3) % 2 == 0; }, 14.133 - function(i,j) { return ((i+j) % 2 + (i*j) % 3) % 2 == 0; }]; 14.134 - 14.135 -// returns true when the version information has to be embeded. 14.136 -var needsverinfo = function(ver) { return ver > 6; }; 14.137 - 14.138 -// returns the size of entire QR code for given version. 14.139 -var getsizebyver = function(ver) { return 4 * ver + 17; }; 14.140 - 14.141 -// returns the number of bits available for code words in this version. 14.142 -var nfullbits = function(ver) { 14.143 - /* 14.144 - * |<--------------- n --------------->| 14.145 - * | |<----- n-17 ---->| | 14.146 - * +-------+ ///+-------+ ---- 14.147 - * | | ///| | ^ 14.148 - * | 9x9 | @@@@@ ///| 9x8 | | 14.149 - * | | # # # @5x5@ # # # | | | 14.150 - * +-------+ @@@@@ +-------+ | 14.151 - * # ---| 14.152 - * ^ | 14.153 - * # | 14.154 - * @@@@@ @@@@@ @@@@@ | n 14.155 - * @5x5@ @5x5@ @5x5@ n-17 14.156 - * @@@@@ @@@@@ @@@@@ | | 14.157 - * # | | 14.158 - * ////// v | 14.159 - * //////# ---| 14.160 - * +-------+ @@@@@ @@@@@ | 14.161 - * | | @5x5@ @5x5@ | 14.162 - * | 8x9 | @@@@@ @@@@@ | 14.163 - * | | v 14.164 - * +-------+ ---- 14.165 - * 14.166 - * when the entire code has n^2 modules and there are m^2-3 alignment 14.167 - * patterns, we have: 14.168 - * - 225 (= 9x9 + 9x8 + 8x9) modules for finder patterns and 14.169 - * format information; 14.170 - * - 2n-34 (= 2(n-17)) modules for timing patterns; 14.171 - * - 36 (= 3x6 + 6x3) modules for version information, if any; 14.172 - * - 25m^2-75 (= (m^2-3)(5x5)) modules for alignment patterns 14.173 - * if any, but 10m-20 (= 2(m-2)x5) of them overlaps with 14.174 - * timing patterns. 14.175 - */ 14.176 - var v = VERSIONS[ver]; 14.177 - var nbits = 16*ver*ver + 128*ver + 64; // finder, timing and format info. 14.178 - if (needsverinfo(ver)) nbits -= 36; // version information 14.179 - if (v[2].length) { // alignment patterns 14.180 - nbits -= 25 * v[2].length * v[2].length - 10 * v[2].length - 55; 14.181 - } 14.182 - return nbits; 14.183 -}; 14.184 - 14.185 -// returns the number of bits available for data portions (i.e. excludes ECC 14.186 -// bits but includes mode and length bits) in this version and ECC level. 14.187 -var ndatabits = function(ver, ecclevel) { 14.188 - var nbits = nfullbits(ver) & ~7; // no sub-octet code words 14.189 - var v = VERSIONS[ver]; 14.190 - nbits -= 8 * v[0][ecclevel] * v[1][ecclevel]; // ecc bits 14.191 - return nbits; 14.192 -} 14.193 - 14.194 -// returns the number of bits required for the length of data. 14.195 -// (cf. Table 3 in JIS X 0510:2004 p. 16) 14.196 -var ndatalenbits = function(ver, mode) { 14.197 - switch (mode) { 14.198 - case MODE_NUMERIC: return (ver < 10 ? 10 : ver < 27 ? 12 : 14); 14.199 - case MODE_ALPHANUMERIC: return (ver < 10 ? 9 : ver < 27 ? 11 : 13); 14.200 - case MODE_OCTET: return (ver < 10 ? 8 : 16); 14.201 - case MODE_KANJI: return (ver < 10 ? 8 : ver < 27 ? 10 : 12); 14.202 - } 14.203 -}; 14.204 - 14.205 -// returns the maximum length of data possible in given configuration. 14.206 -var getmaxdatalen = function(ver, mode, ecclevel) { 14.207 - var nbits = ndatabits(ver, ecclevel) - 4 - ndatalenbits(ver, mode); // 4 for mode bits 14.208 - switch (mode) { 14.209 - case MODE_NUMERIC: 14.210 - return ((nbits/10) | 0) * 3 + (nbits%10 < 4 ? 0 : nbits%10 < 7 ? 1 : 2); 14.211 - case MODE_ALPHANUMERIC: 14.212 - return ((nbits/11) | 0) * 2 + (nbits%11 < 6 ? 0 : 1); 14.213 - case MODE_OCTET: 14.214 - return (nbits/8) | 0; 14.215 - case MODE_KANJI: 14.216 - return (nbits/13) | 0; 14.217 - } 14.218 -}; 14.219 - 14.220 -// checks if the given data can be encoded in given mode, and returns 14.221 -// the converted data for the further processing if possible. otherwise 14.222 -// returns null. 14.223 -// 14.224 -// this function does not check the length of data; it is a duty of 14.225 -// encode function below (as it depends on the version and ECC level too). 14.226 -var validatedata = function(mode, data) { 14.227 - switch (mode) { 14.228 - case MODE_NUMERIC: 14.229 - if (!data.match(NUMERIC_REGEXP)) return null; 14.230 - return data; 14.231 - 14.232 - case MODE_ALPHANUMERIC: 14.233 - if (!data.match(ALPHANUMERIC_REGEXP)) return null; 14.234 - return data.toUpperCase(); 14.235 - 14.236 - case MODE_OCTET: 14.237 - if (typeof data === 'string') { // encode as utf-8 string 14.238 - var newdata = []; 14.239 - for (var i = 0; i < data.length; ++i) { 14.240 - var ch = data.charCodeAt(i); 14.241 - if (ch < 0x80) { 14.242 - newdata.push(ch); 14.243 - } else if (ch < 0x800) { 14.244 - newdata.push(0xc0 | (ch >> 6), 14.245 - 0x80 | (ch & 0x3f)); 14.246 - } else if (ch < 0x10000) { 14.247 - newdata.push(0xe0 | (ch >> 12), 14.248 - 0x80 | ((ch >> 6) & 0x3f), 14.249 - 0x80 | (ch & 0x3f)); 14.250 - } else { 14.251 - newdata.push(0xf0 | (ch >> 18), 14.252 - 0x80 | ((ch >> 12) & 0x3f), 14.253 - 0x80 | ((ch >> 6) & 0x3f), 14.254 - 0x80 | (ch & 0x3f)); 14.255 - } 14.256 - } 14.257 - return newdata; 14.258 - } else { 14.259 - return data; 14.260 - } 14.261 - } 14.262 -}; 14.263 - 14.264 -// returns the code words (sans ECC bits) for given data and configurations. 14.265 -// requires data to be preprocessed by validatedata. no length check is 14.266 -// performed, and everything has to be checked before calling this function. 14.267 -var encode = function(ver, mode, data, maxbuflen) { 14.268 - var buf = []; 14.269 - var bits = 0, remaining = 8; 14.270 - var datalen = data.length; 14.271 - 14.272 - // this function is intentionally no-op when n=0. 14.273 - var pack = function(x, n) { 14.274 - if (n >= remaining) { 14.275 - buf.push(bits | (x >> (n -= remaining))); 14.276 - while (n >= 8) buf.push((x >> (n -= 8)) & 255); 14.277 - bits = 0; 14.278 - remaining = 8; 14.279 - } 14.280 - if (n > 0) bits |= (x & ((1 << n) - 1)) << (remaining -= n); 14.281 - }; 14.282 - 14.283 - var nlenbits = ndatalenbits(ver, mode); 14.284 - pack(mode, 4); 14.285 - pack(datalen, nlenbits); 14.286 - 14.287 - switch (mode) { 14.288 - case MODE_NUMERIC: 14.289 - for (var i = 2; i < datalen; i += 3) { 14.290 - pack(parseInt(data.substring(i-2,i+1), 10), 10); 14.291 - } 14.292 - pack(parseInt(data.substring(i-2), 10), [0,4,7][datalen%3]); 14.293 - break; 14.294 - 14.295 - case MODE_ALPHANUMERIC: 14.296 - for (var i = 1; i < datalen; i += 2) { 14.297 - pack(ALPHANUMERIC_MAP[data.charAt(i-1)] * 45 + 14.298 - ALPHANUMERIC_MAP[data.charAt(i)], 11); 14.299 - } 14.300 - if (datalen % 2 == 1) { 14.301 - pack(ALPHANUMERIC_MAP[data.charAt(i-1)], 6); 14.302 - } 14.303 - break; 14.304 - 14.305 - case MODE_OCTET: 14.306 - for (var i = 0; i < datalen; ++i) { 14.307 - pack(data[i], 8); 14.308 - } 14.309 - break; 14.310 - }; 14.311 - 14.312 - // final bits. it is possible that adding terminator causes the buffer 14.313 - // to overflow, but then the buffer truncated to the maximum size will 14.314 - // be valid as the truncated terminator mode bits and padding is 14.315 - // identical in appearance (cf. JIS X 0510:2004 sec 8.4.8). 14.316 - pack(MODE_TERMINATOR, 4); 14.317 - if (remaining < 8) buf.push(bits); 14.318 - 14.319 - // the padding to fill up the remaining space. we should not add any 14.320 - // words when the overflow already occurred. 14.321 - while (buf.length + 1 < maxbuflen) buf.push(0xec, 0x11); 14.322 - if (buf.length < maxbuflen) buf.push(0xec); 14.323 - return buf; 14.324 -}; 14.325 - 14.326 -// calculates ECC code words for given code words and generator polynomial. 14.327 -// 14.328 -// this is quite similar to CRC calculation as both Reed-Solomon and CRC use 14.329 -// the certain kind of cyclic codes, which is effectively the division of 14.330 -// zero-augumented polynomial by the generator polynomial. the only difference 14.331 -// is that Reed-Solomon uses GF(2^8), instead of CRC's GF(2), and Reed-Solomon 14.332 -// uses the different generator polynomial than CRC's. 14.333 -var calculateecc = function(poly, genpoly) { 14.334 - var modulus = poly.slice(0); 14.335 - var polylen = poly.length, genpolylen = genpoly.length; 14.336 - for (var i = 0; i < genpolylen; ++i) modulus.push(0); 14.337 - for (var i = 0; i < polylen; ) { 14.338 - var quotient = GF256_INVMAP[modulus[i++]]; 14.339 - if (quotient >= 0) { 14.340 - for (var j = 0; j < genpolylen; ++j) { 14.341 - modulus[i+j] ^= GF256_MAP[(quotient + genpoly[j]) % 255]; 14.342 - } 14.343 - } 14.344 - } 14.345 - return modulus.slice(polylen); 14.346 -}; 14.347 - 14.348 -// auguments ECC code words to given code words. the resulting words are 14.349 -// ready to be encoded in the matrix. 14.350 -// 14.351 -// the much of actual augumenting procedure follows JIS X 0510:2004 sec 8.7. 14.352 -// the code is simplified using the fact that the size of each code & ECC 14.353 -// blocks is almost same; for example, when we have 4 blocks and 46 data words 14.354 -// the number of code words in those blocks are 11, 11, 12, 12 respectively. 14.355 -var augumenteccs = function(poly, nblocks, genpoly) { 14.356 - var subsizes = []; 14.357 - var subsize = (poly.length / nblocks) | 0, subsize0 = 0; 14.358 - var pivot = nblocks - poly.length % nblocks; 14.359 - for (var i = 0; i < pivot; ++i) { 14.360 - subsizes.push(subsize0); 14.361 - subsize0 += subsize; 14.362 - } 14.363 - for (var i = pivot; i < nblocks; ++i) { 14.364 - subsizes.push(subsize0); 14.365 - subsize0 += subsize+1; 14.366 - } 14.367 - subsizes.push(subsize0); 14.368 - 14.369 - var eccs = []; 14.370 - for (var i = 0; i < nblocks; ++i) { 14.371 - eccs.push(calculateecc(poly.slice(subsizes[i], subsizes[i+1]), genpoly)); 14.372 - } 14.373 - 14.374 - var result = []; 14.375 - var nitemsperblock = (poly.length / nblocks) | 0; 14.376 - for (var i = 0; i < nitemsperblock; ++i) { 14.377 - for (var j = 0; j < nblocks; ++j) { 14.378 - result.push(poly[subsizes[j] + i]); 14.379 - } 14.380 - } 14.381 - for (var j = pivot; j < nblocks; ++j) { 14.382 - result.push(poly[subsizes[j+1] - 1]); 14.383 - } 14.384 - for (var i = 0; i < genpoly.length; ++i) { 14.385 - for (var j = 0; j < nblocks; ++j) { 14.386 - result.push(eccs[j][i]); 14.387 - } 14.388 - } 14.389 - return result; 14.390 -}; 14.391 - 14.392 -// auguments BCH(p+q,q) code to the polynomial over GF(2), given the proper 14.393 -// genpoly. the both input and output are in binary numbers, and unlike 14.394 -// calculateecc genpoly should include the 1 bit for the highest degree. 14.395 -// 14.396 -// actual polynomials used for this procedure are as follows: 14.397 -// - p=10, q=5, genpoly=x^10+x^8+x^5+x^4+x^2+x+1 (JIS X 0510:2004 Appendix C) 14.398 -// - p=18, q=6, genpoly=x^12+x^11+x^10+x^9+x^8+x^5+x^2+1 (ibid. Appendix D) 14.399 -var augumentbch = function(poly, p, genpoly, q) { 14.400 - var modulus = poly << q; 14.401 - for (var i = p - 1; i >= 0; --i) { 14.402 - if ((modulus >> (q+i)) & 1) modulus ^= genpoly << i; 14.403 - } 14.404 - return (poly << q) | modulus; 14.405 -}; 14.406 - 14.407 -// creates the base matrix for given version. it returns two matrices, one of 14.408 -// them is the actual one and the another represents the "reserved" portion 14.409 -// (e.g. finder and timing patterns) of the matrix. 14.410 -// 14.411 -// some entries in the matrix may be undefined, rather than 0 or 1. this is 14.412 -// intentional (no initialization needed!), and putdata below will fill 14.413 -// the remaining ones. 14.414 -var makebasematrix = function(ver) { 14.415 - var v = VERSIONS[ver], n = getsizebyver(ver); 14.416 - var matrix = [], reserved = []; 14.417 - for (var i = 0; i < n; ++i) { 14.418 - matrix.push([]); 14.419 - reserved.push([]); 14.420 - } 14.421 - 14.422 - var blit = function(y, x, h, w, bits) { 14.423 - for (var i = 0; i < h; ++i) { 14.424 - for (var j = 0; j < w; ++j) { 14.425 - matrix[y+i][x+j] = (bits[i] >> j) & 1; 14.426 - reserved[y+i][x+j] = 1; 14.427 - } 14.428 - } 14.429 - }; 14.430 - 14.431 - // finder patterns and a part of timing patterns 14.432 - // will also mark the format information area (not yet written) as reserved. 14.433 - blit(0, 0, 9, 9, [0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x17f, 0x00, 0x40]); 14.434 - blit(n-8, 0, 8, 9, [0x100, 0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x7f]); 14.435 - blit(0, n-8, 9, 8, [0xfe, 0x82, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00]); 14.436 - 14.437 - // the rest of timing patterns 14.438 - for (var i = 9; i < n-8; ++i) { 14.439 - matrix[6][i] = matrix[i][6] = ~i & 1; 14.440 - reserved[6][i] = reserved[i][6] = 1; 14.441 - } 14.442 - 14.443 - // alignment patterns 14.444 - var aligns = v[2], m = aligns.length; 14.445 - for (var i = 0; i < m; ++i) { 14.446 - var minj = (i==0 || i==m-1 ? 1 : 0), maxj = (i==0 ? m-1 : m); 14.447 - for (var j = minj; j < maxj; ++j) { 14.448 - blit(aligns[i], aligns[j], 5, 5, [0x1f, 0x11, 0x15, 0x11, 0x1f]); 14.449 - } 14.450 - } 14.451 - 14.452 - // version information 14.453 - if (needsverinfo(ver)) { 14.454 - var code = augumentbch(ver, 6, 0x1f25, 12); 14.455 - var k = 0; 14.456 - for (var i = 0; i < 6; ++i) { 14.457 - for (var j = 0; j < 3; ++j) { 14.458 - matrix[i][(n-11)+j] = matrix[(n-11)+j][i] = (code >> k++) & 1; 14.459 - reserved[i][(n-11)+j] = reserved[(n-11)+j][i] = 1; 14.460 - } 14.461 - } 14.462 - } 14.463 - 14.464 - return {matrix: matrix, reserved: reserved}; 14.465 -}; 14.466 - 14.467 -// fills the data portion (i.e. unmarked in reserved) of the matrix with given 14.468 -// code words. the size of code words should be no more than available bits, 14.469 -// and remaining bits are padded to 0 (cf. JIS X 0510:2004 sec 8.7.3). 14.470 -var putdata = function(matrix, reserved, buf) { 14.471 - var n = matrix.length; 14.472 - var k = 0, dir = -1; 14.473 - for (var i = n-1; i >= 0; i -= 2) { 14.474 - if (i == 6) --i; // skip the entire timing pattern column 14.475 - var jj = (dir < 0 ? n-1 : 0); 14.476 - for (var j = 0; j < n; ++j) { 14.477 - for (var ii = i; ii > i-2; --ii) { 14.478 - if (!reserved[jj][ii]) { 14.479 - // may overflow, but (undefined >> x) 14.480 - // is 0 so it will auto-pad to zero. 14.481 - matrix[jj][ii] = (buf[k >> 3] >> (~k&7)) & 1; 14.482 - ++k; 14.483 - } 14.484 - } 14.485 - jj += dir; 14.486 - } 14.487 - dir = -dir; 14.488 - } 14.489 - return matrix; 14.490 -}; 14.491 - 14.492 -// XOR-masks the data portion of the matrix. repeating the call with the same 14.493 -// arguments will revert the prior call (convenient in the matrix evaluation). 14.494 -var maskdata = function(matrix, reserved, mask) { 14.495 - var maskf = MASKFUNCS[mask]; 14.496 - var n = matrix.length; 14.497 - for (var i = 0; i < n; ++i) { 14.498 - for (var j = 0; j < n; ++j) { 14.499 - if (!reserved[i][j]) matrix[i][j] ^= maskf(i,j); 14.500 - } 14.501 - } 14.502 - return matrix; 14.503 -} 14.504 - 14.505 -// puts the format information. 14.506 -var putformatinfo = function(matrix, reserved, ecclevel, mask) { 14.507 - var n = matrix.length; 14.508 - var code = augumentbch((ecclevel << 3) | mask, 5, 0x537, 10) ^ 0x5412; 14.509 - for (var i = 0; i < 15; ++i) { 14.510 - var r = [0,1,2,3,4,5,7,8,n-7,n-6,n-5,n-4,n-3,n-2,n-1][i]; 14.511 - var c = [n-1,n-2,n-3,n-4,n-5,n-6,n-7,n-8,7,5,4,3,2,1,0][i]; 14.512 - matrix[r][8] = matrix[8][c] = (code >> i) & 1; 14.513 - // we don't have to mark those bits reserved; always done 14.514 - // in makebasematrix above. 14.515 - } 14.516 - return matrix; 14.517 -}; 14.518 - 14.519 -// evaluates the resulting matrix and returns the score (lower is better). 14.520 -// (cf. JIS X 0510:2004 sec 8.8.2) 14.521 -// 14.522 -// the evaluation procedure tries to avoid the problematic patterns naturally 14.523 -// occuring from the original matrix. for example, it penaltizes the patterns 14.524 -// which just look like the finder pattern which will confuse the decoder. 14.525 -// we choose the mask which results in the lowest score among 8 possible ones. 14.526 -// 14.527 -// note: zxing seems to use the same procedure and in many cases its choice 14.528 -// agrees to ours, but sometimes it does not. practically it doesn't matter. 14.529 -var evaluatematrix = function(matrix) { 14.530 - // N1+(k-5) points for each consecutive row of k same-colored modules, where k >= 5. no overlapping row counts. 14.531 - var PENALTY_CONSECUTIVE = 3; 14.532 - // N2 points for each 2x2 block of same-colored modules. Overlapping block does count. 14.533 - var PENALTY_TWOBYTWO = 3; 14.534 - // N3 points for each pattern with >4W:1B:1W:3B:1W:1B or 14.535 - // 1B:1W:3B:1W:1B:>4W, or their multiples (e.g. highly unlikely, but 13W:3B:3W:9B:3W:3B counts). 14.536 - var PENALTY_FINDERLIKE = 40; 14.537 - // N4*k points for every (5*k)% deviation from 50% black density. 14.538 - // i.e. k=1 for 55~60% and 40~45%, k=2 for 60~65% and 35~40%, etc. 14.539 - var PENALTY_DENSITY = 10; 14.540 - 14.541 - var evaluategroup = function(groups) { // assumes [W,B,W,B,W,...,B,W] 14.542 - var score = 0; 14.543 - for (var i = 0; i < groups.length; ++i) { 14.544 - if (groups[i] >= 5) score += PENALTY_CONSECUTIVE + (groups[i]-5); 14.545 - } 14.546 - for (var i = 5; i < groups.length; i += 2) { 14.547 - var p = groups[i]; 14.548 - if (groups[i-1] == p && groups[i-2] == 3*p && groups[i-3] == p && 14.549 - groups[i-4] == p && (groups[i-5] >= 4*p || groups[i+1] >= 4*p)) { 14.550 - // this part differs from zxing... 14.551 - score += PENALTY_FINDERLIKE; 14.552 - } 14.553 - } 14.554 - return score; 14.555 - }; 14.556 - 14.557 - var n = matrix.length; 14.558 - var score = 0, nblacks = 0; 14.559 - for (var i = 0; i < n; ++i) { 14.560 - var row = matrix[i]; 14.561 - var groups; 14.562 - 14.563 - // evaluate the current row 14.564 - groups = [0]; // the first empty group of white 14.565 - for (var j = 0; j < n; ) { 14.566 - var k; 14.567 - for (k = 0; j < n && row[j]; ++k) ++j; 14.568 - groups.push(k); 14.569 - for (k = 0; j < n && !row[j]; ++k) ++j; 14.570 - groups.push(k); 14.571 - } 14.572 - score += evaluategroup(groups); 14.573 - 14.574 - // evaluate the current column 14.575 - groups = [0]; 14.576 - for (var j = 0; j < n; ) { 14.577 - var k; 14.578 - for (k = 0; j < n && matrix[j][i]; ++k) ++j; 14.579 - groups.push(k); 14.580 - for (k = 0; j < n && !matrix[j][i]; ++k) ++j; 14.581 - groups.push(k); 14.582 - } 14.583 - score += evaluategroup(groups); 14.584 - 14.585 - // check the 2x2 box and calculate the density 14.586 - var nextrow = matrix[i+1] || []; 14.587 - nblacks += row[0]; 14.588 - for (var j = 1; j < n; ++j) { 14.589 - var p = row[j]; 14.590 - nblacks += p; 14.591 - // at least comparison with next row should be strict... 14.592 - if (row[j-1] == p && nextrow[j] === p && nextrow[j-1] === p) { 14.593 - score += PENALTY_TWOBYTWO; 14.594 - } 14.595 - } 14.596 - } 14.597 - 14.598 - score += PENALTY_DENSITY * ((Math.abs(nblacks / n / n - 0.5) / 0.05) | 0); 14.599 - return score; 14.600 -}; 14.601 - 14.602 -// returns the fully encoded QR code matrix which contains given data. 14.603 -// it also chooses the best mask automatically when mask is -1. 14.604 -var generate = function(data, ver, mode, ecclevel, mask) { 14.605 - var v = VERSIONS[ver]; 14.606 - var buf = encode(ver, mode, data, ndatabits(ver, ecclevel) >> 3); 14.607 - buf = augumenteccs(buf, v[1][ecclevel], GF256_GENPOLY[v[0][ecclevel]]); 14.608 - 14.609 - var result = makebasematrix(ver); 14.610 - var matrix = result.matrix, reserved = result.reserved; 14.611 - putdata(matrix, reserved, buf); 14.612 - 14.613 - if (mask < 0) { 14.614 - // find the best mask 14.615 - maskdata(matrix, reserved, 0); 14.616 - putformatinfo(matrix, reserved, ecclevel, 0); 14.617 - var bestmask = 0, bestscore = evaluatematrix(matrix); 14.618 - maskdata(matrix, reserved, 0); 14.619 - for (mask = 1; mask < 8; ++mask) { 14.620 - maskdata(matrix, reserved, mask); 14.621 - putformatinfo(matrix, reserved, ecclevel, mask); 14.622 - var score = evaluatematrix(matrix); 14.623 - if (bestscore > score) { 14.624 - bestscore = score; 14.625 - bestmask = mask; 14.626 - } 14.627 - maskdata(matrix, reserved, mask); 14.628 - } 14.629 - mask = bestmask; 14.630 - } 14.631 - 14.632 - maskdata(matrix, reserved, mask); 14.633 - putformatinfo(matrix, reserved, ecclevel, mask); 14.634 - return matrix; 14.635 -}; 14.636 - 14.637 -// the public interface is trivial; the options available are as follows: 14.638 -// 14.639 -// - version: an integer in [1,40]. when omitted (or -1) the smallest possible 14.640 -// version is chosen. 14.641 -// - mode: one of 'numeric', 'alphanumeric', 'octet'. when omitted the smallest 14.642 -// possible mode is chosen. 14.643 -// - ecclevel: one of 'L', 'M', 'Q', 'H'. defaults to 'L'. 14.644 -// - mask: an integer in [0,7]. when omitted (or -1) the best mask is chosen. 14.645 -// 14.646 -// for generate{HTML,PNG}: 14.647 -// 14.648 -// - modulesize: a number. this is a size of each modules in pixels, and 14.649 -// defaults to 5px. 14.650 -// - margin: a number. this is a size of margin in *modules*, and defaults to 14.651 -// 4 (white modules). the specficiation mandates the margin no less than 4 14.652 -// modules, so it is better not to alter this value unless you know what 14.653 -// you're doing. 14.654 -var QRCode = { 14.655 - 'generate': function(data, options) { 14.656 - var MODES = {'numeric': MODE_NUMERIC, 'alphanumeric': MODE_ALPHANUMERIC, 14.657 - 'octet': MODE_OCTET}; 14.658 - var ECCLEVELS = {'L': ECCLEVEL_L, 'M': ECCLEVEL_M, 'Q': ECCLEVEL_Q, 14.659 - 'H': ECCLEVEL_H}; 14.660 - 14.661 - options = options || {}; 14.662 - var ver = options.version || -1; 14.663 - var ecclevel = ECCLEVELS[(options.ecclevel || 'L').toUpperCase()]; 14.664 - var mode = options.mode ? MODES[options.mode.toLowerCase()] : -1; 14.665 - var mask = 'mask' in options ? options.mask : -1; 14.666 - 14.667 - if (mode < 0) { 14.668 - if (typeof data === 'string') { 14.669 - if (data.match(NUMERIC_REGEXP)) { 14.670 - mode = MODE_NUMERIC; 14.671 - } else if (data.match(ALPHANUMERIC_OUT_REGEXP)) { 14.672 - // while encode supports case-insensitive 14.673 - // encoding, we restrict the data to be 14.674 - // uppercased when auto-selecting the mode. 14.675 - mode = MODE_ALPHANUMERIC; 14.676 - } else { 14.677 - mode = MODE_OCTET; 14.678 - } 14.679 - } else { 14.680 - mode = MODE_OCTET; 14.681 - } 14.682 - } else if (!(mode == MODE_NUMERIC || mode == MODE_ALPHANUMERIC || 14.683 - mode == MODE_OCTET)) { 14.684 - throw 'invalid or unsupported mode'; 14.685 - } 14.686 - 14.687 - data = validatedata(mode, data); 14.688 - if (data === null) throw 'invalid data format'; 14.689 - 14.690 - if (ecclevel < 0 || ecclevel > 3) throw 'invalid ECC level'; 14.691 - 14.692 - if (ver < 0) { 14.693 - for (ver = 1; ver <= 40; ++ver) { 14.694 - if (data.length <= getmaxdatalen(ver, mode, ecclevel)) break; 14.695 - } 14.696 - if (ver > 40) throw 'too large data'; 14.697 - } else if (ver < 1 || ver > 40) { 14.698 - throw 'invalid version'; 14.699 - } 14.700 - 14.701 - if (mask != -1 && (mask < 0 || mask > 8)) throw 'invalid mask'; 14.702 - 14.703 - return generate(data, ver, mode, ecclevel, mask); 14.704 - }, 14.705 - 14.706 - 14.707 - 'generatePNG': function(data, options) { 14.708 - options = options || {}; 14.709 - var matrix = QRCode['generate'](data, options); 14.710 - var modsize = Math.max(options.modulesize || 5, 0.5); 14.711 - var margin = Math.max(options.margin || 4, 0.0); 14.712 - var n = matrix.length; 14.713 - var size = modsize * (n + 2 * margin); 14.714 - 14.715 - var canvas = document.createElement('canvas'), context; 14.716 - canvas.width = canvas.height = size; 14.717 - context = canvas.getContext('2d'); 14.718 - if (!context) throw 'canvas support is needed for PNG output'; 14.719 - 14.720 - context.fillStyle = '#fff'; 14.721 - context.fillRect(0, 0, size, size); 14.722 - context.fillStyle = '#000'; 14.723 - for (var i = 0; i < n; ++i) { 14.724 - for (var j = 0; j < n; ++j) { 14.725 - if (matrix[i][j]) { 14.726 - context.fillRect(modsize * (margin + j), modsize * (margin + i), modsize, modsize); 14.727 - } 14.728 - } 14.729 - } 14.730 - //context.fillText('evaluation: ' + evaluatematrix(matrix), 10, 10); 14.731 - return canvas.toDataURL(); 14.732 - } 14.733 -}; 14.734 - 14.735 -return QRCode; 14.736 -})();
15.1 Binary file scn/themes/slitaz/screenshot.png has changed
16.1 --- a/scn/themes/slitaz/style.css Mon Apr 14 20:58:24 2014 +0100 16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 16.3 @@ -1,172 +0,0 @@ 16.4 -/* 16.5 -Theme Name: SliTaz BuddyPress 16.6 -Theme URI: http://www.slitaz.org 16.7 -Description: The default SliTaz theme for BuddyPress. 16.8 -Version: 1.1 16.9 -Author: Christophe Lincoln 16.10 -Author URI: http://people.slitaz.org/~pankso/ 16.11 -Template: bp-default 16.12 -Tags: buddypress, two-columns, custom-header, white, brown 16.13 -*/ 16.14 - 16.15 -/* Inherit the default theme styles */ 16.16 -@import url( ../../plugins/buddypress/bp-themes/bp-default/_inc/css/default.css ); 16.17 - 16.18 -/* Inherit the default theme adminbar styles */ 16.19 -@import url( ../../plugins/buddypress/bp-themes/bp-default/_inc/css/adminbar.css ); 16.20 - 16.21 -/* SliTaz theme styles */ 16.22 - 16.23 -html { 16.24 - min-height: 102%; 16.25 -} 16.26 - 16.27 -body { 16.28 - background: #fff; 16.29 - font-size: 13px; 16.30 - font-family: sans-serif, vernada, arial; 16.31 - line-height: 130%; 16.32 - color: #000; 16.33 - width: auto; 16.34 - min-width: 780px; 16.35 - max-width: 100%; 16.36 - margin: 0 auto; 16.37 - padding-top: 0 !important; 16.38 -} 16.39 - 16.40 -a { text-decoration: underline; color: #215090; } 16.41 -a:hover { text-decoration: none; color: blue; } 16.42 - 16.43 -#wp-admin-bar .padder { 16.44 - width: 100% !important; /* Line up the admin bar with the content body in this theme */ 16.45 -} 16.46 - 16.47 -#header { 16.48 - color: #fff; 16.49 - background: #351a0a; 16.50 - -moz-border-radius-bottomleft: 0px; 16.51 - -webkit-border-bottom-left-radius: 0px; 16.52 - -moz-border-radius-bottomright: 0px; 16.53 - -webkit-border-bottom-right-radius: 0px; 16.54 - padding-top: 1px; 16.55 - margin: 0px; 16.56 - height: 39px; 16.57 -} 16.58 - 16.59 -#header #search-bar { 16.60 - z-index: 100; 16.61 - position: absolute; 16.62 - top: 76px; 16.63 - right: 20px; 16.64 - width: 386px; 16.65 - text-align: right; 16.66 - background: #cc5b17; 16.67 - -moz-border-radius: 4px; 16.68 - -webkit-border-radius: 4px; 16.69 - border-radius: 4px; 16.70 - height: 40px; 16.71 -} 16.72 - 16.73 -#header h1 { 16.74 - position: absolute; 16.75 - bottom: 0; 16.76 - top: 0px; 16.77 - left: 0px; 16.78 - width: 250px; 16.79 - margin: 0; 16.80 - line-height: 100%; 16.81 - background: url(images/logo.png) no-repeat left center; 16.82 - padding: 6px 0 0 42px; 16.83 -} 16.84 -#header h1 a { 16.85 - color: #fff; 16.86 - font-size: 20px; 16.87 - font-style: italic; 16.88 - text-decoration: none; 16.89 -} 16.90 - 16.91 -#header h1 a:hover, #network a:hover { color: #d66018; } 16.92 - 16.93 -#network { 16.94 - float: right; 16.95 - padding: 9px 5px 0; 16.96 - font-size: 12px; 16.97 -} 16.98 -#network a { padding: 0 6px; color: #fff; font-weight: bold; text-decoration: none;} 16.99 -#network img, .infobox img { vertical-align: middle; } 16.100 - 16.101 -#block { 16.102 - z-index: 20; 16.103 - min-height: 120px; 16.104 - position: absolute; 16.105 - /* top: 40px; */ 16.106 - background: #d66018; 16.107 - margin: 0 0 40px 0; 16.108 - padding: 40px 12% 0; 16.109 - text-align: center; 16.110 - color: #333; 16.111 - border-bottom: 1px solid #f5f5f5; 16.112 -} 16.113 - 16.114 -div#container { 16.115 - position: relative; 16.116 - width: auto; 16.117 - -moz-border-radius: 6px; 16.118 - -webkit-border-radius: 6px; 16.119 - border-right: 1px solid #e0e0e0; 16.120 - border-bottom: 1px solid #e0e0e0; 16.121 - background: #fff; 16.122 - overflow: hidden; 16.123 - margin-top: 180px; 16.124 - padding: 0 40px 40px 40px; 16.125 -} 16.126 - 16.127 -div#content .padder { padding: 0 19px 19px 0; } 16.128 - 16.129 -ul#nav { bottom: -130px; z-index: 120; } 16.130 -ul#nav li a { background: #cc5b17; padding: 6px; } 16.131 -ul#nav li.selected a, ul#nav li.current_page_item a { 16.132 - background: #fff; } 16.133 - 16.134 -#footer { 16.135 - background: #f1f1f1; 16.136 - padding: 40px; 16.137 - text-align: center; 16.138 - color: #666; 16.139 - text-shadow: #fafafa 0px 0px 0; 16.140 - margin: 0; 16.141 -} 16.142 -#footer a { color: #666; padding: 0 2px; } 16.143 - 16.144 -/* Adminbar */ 16.145 - 16.146 -#wp-admin-bar { position: absolute; top: 40px; width: 100%; } 16.147 -body#bp-default #wp-admin-bar .padder { 16.148 - min-width: 840px; 16.149 - max-width: 100%; 16.150 -} 16.151 -#wp-admin-bar .padder { background: #d66018; } 16.152 -#wp-admin-bar ul li ul { 16.153 - background: #f1f1f1; 16.154 - border: 1px solid #ddd; 16.155 -} 16.156 -#wp-admin-bar li a, #admin-bar-logo, #wp-admin-bar ul li ul a, 16.157 -#wp-admin-bar ul li ul li:hover ul li a, 16.158 -#wp-admin-bar ul li ul li ul li:hover a { 16.159 - color: #333333; 16.160 -} 16.161 -#wp-admin-bar ul.main-nav li:hover, 16.162 -#wp-admin-bar ul.main-nav li.sfhover, 16.163 -#wp-admin-bar ul.main-nav li ul li.sfhover { 16.164 - background-color: #f1f1f1; 16.165 -} 16.166 -#wp-admin-bar ul.main-nav li ul li:hover, 16.167 -#wp-admin-bar ul.main-nav li ul li.sfhover, 16.168 -#wp-admin-bar ul.main-nav li ul li.sfhover { 16.169 - background-color: #f1f1f1; 16.170 -} 16.171 -#wp-admin-bar li a:hover, #wp-admin-bar ul li ul a:hover, 16.172 -#wp-admin-bar ul li ul li:hover a, 16.173 -#wp-admin-bar ul li ul li ul li:hover a:hover { 16.174 - color: blue; 16.175 -}