Debian Codegraph @

src/2.0.0/tests/responsive.html

raw
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="viewport" content="initial-scale=1.0" />
6 <title>Responsive 2.0</title>
7
8 <style>
9 body {
10 background-color: white;
11 font-size: 16px;
12 }
13 .container {
14 max-width: 1024px;
15 margin: 0 auto;
16 }
17 li {
18 margin: 0 0 5px 0;
19 }
20 </style>
21 <script src="../responsive.js"></script>
22
23 </head>
24 <body>
25 <div class="container">
26 <h1>Head.Responsive() v2.0.0-alpha</h1>
27
28
29 <ul>
30 <li>
31 <a href="#profile">Change hash to: #profile</a>
32 </li>
33 <li>
34 <a href="#user/update">Change hash to: #user/update</a>
35 </li>
36 </ul>
37
38 Please read the comments in the <a href="../responsive.js" target="_blank">source-code</a>, and leave your impressions <a href="https://github.com/headjs/headjs/issues/269" target="_blank">here</a>. Thanks !
39
40 <h2>&raquo; Open your DEV console on Elements/Html to see it in action &laquo;</h2>
41
42 <hr/>
43
44 <h2>Changes (in flux)</h2>
45
46 <ul>
47 <li>
48 We can now detect #hashChange just like pages & sections, great for emulating the CSS3 :target pseudo-selector. Actually we can do much more because paths like #user/profile/update are supported, which is great for SPA applications.
49 </li>
50 <li>
51 The prefix h- and w- has been introduced for measuring both viewport height & width. ex. h-lt800, w-gt1680
52 </li>
53 <li>
54 Browsers are no longer declared with min/max, instead we can now declare each browser version individually.
55 This was needed because FF is now at version 26 and Chrome at 33 !
56 Now it's a simple matter of choosing the browser, for example { ie: [6,7,8,11] }
57 </li>
58 <li>
59 Prefixes for browser detections have been changed for better readability, and follow the height/width syntax: .ie, .ie-lt6, .ff-gt25
60 </li>
61 <li>
62 Prefixes for pages/sections have been inverted for better readability in stylesheets: #page-*, .section-*, .hash-*
63 </li>
64 <li>
65 Prefixes for detections have been promoted to boolean suffixes, which makes it easier to concatenate with server or client side scripts: .mobile-true, .landscape-false
66 </li>
67 <li>
68 gte/lte/eq where never activated in the first place, and have been removed for the sake of simplicity and performance
69 </li>
70 <li>
71 Feature detection variables have been moved to their own namespaces instead of polluting the base head.* namespace: head.features.*, head.browser.*, head.viewport.*, head.screen.*
72 </li>
73 </ul>
74 </div>
75
76
77
78 <script>
79 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
80 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
81 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
82 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
83
84 ga('create', 'UA-15567888-7', { 'name': 'itech', 'cookieDomain': 'none' });
85 ga('itech.send', 'pageview');
86 </script>
87 </body>
88 </html>