Skip to content

Commit 6b8f322

Browse files
committed
Updated the single and multi-page templates to use the CDN version and have better design/content. Linked to these from the index page so they are more accessible too.
1 parent 4f6eea6 commit 6b8f322

File tree

10 files changed

+71
-45
lines changed

10 files changed

+71
-45
lines changed

docs/pages/docs-dialogs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ <h3>More in this section</h3>
8181
<li data-role="list-divider">Pages &amp; Dialogs</li>
8282
<li><a href="docs-pages.html">Anatomy of a page</a></li>
8383
<li><a href="docs-transitions.html">Page transitions</a></li>
84+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
85+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
8486
<li data-theme="a"><a href="docs-dialogs.html">Dialogs</a></li>
8587
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>
8688
<li><a href="link-formats.html">Link format examples</a></li>

docs/pages/docs-links.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ <h3>More in this section</h3>
8585

8686
<li data-role="list-divider">Pages &amp; Dialogs</li>
8787
<li data-theme="a"><a href="docs-pages.html">Anatomy of a page</a></li>
88+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
89+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
8890
<li><a href="docs-transitions.html">Page transitions</a></li>
8991
<li><a href="docs-dialogs.html">Dialogs</a></li>
9092
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>

docs/pages/docs-navmodel.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ <h3>More in this section</h3>
107107

108108
<li data-role="list-divider">Pages &amp; Dialogs</li>
109109
<li><a href="docs-pages.html">Anatomy of a page</a></li>
110+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
111+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
110112
<li><a href="docs-transitions.html">Page transitions</a></li>
111113
<li><a href="docs-dialogs.html">Dialogs</a></li>
112114
<li data-theme="a"><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>

docs/pages/docs-pages.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ <h3>More in this section</h3>
212212

213213
<li data-role="list-divider">Pages &amp; Dialogs</li>
214214
<li data-theme="a"><a href="docs-pages.html">Anatomy of a page</a></li>
215+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
216+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
215217
<li><a href="docs-transitions.html">Page transitions</a></li>
216218
<li><a href="docs-dialogs.html">Dialogs</a></li>
217219
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>

docs/pages/docs-transitions.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ <h3>More in this section</h3>
6161

6262
<li data-role="list-divider">Pages &amp; Dialogs</li>
6363
<li><a href="docs-pages.html">Anatomy of a page</a></li>
64+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
65+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
6466
<li data-theme="a"><a href="docs-transitions.html">Page transitions</a></li>
6567
<li><a href="docs-dialogs.html">Dialogs</a></li>
6668
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>

docs/pages/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ <h1>Pages</h1>
2727

2828
<ul data-role="listview" data-inset="true">
2929
<li><a href="docs-pages.html">Anatomy of a page</a></li>
30+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
31+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
3032
<li><a href="docs-transitions.html">Page transitions</a></li>
3133
<li><a href="docs-dialogs.html">Dialogs</a></li>
3234
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>
3335
<li><a href="link-formats.html">Link format examples</a></li>
3436
<li><a href="pages-themes.html">Theming pages</a></li>
35-
<!--<li><a href="api-pages.html">API documentation</a></li>-->
3637
</ul>
3738

39+
3840
</div><!-- /ui-body wrapper -->
3941
</div><!-- /page -->
4042

docs/pages/link-formats.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ <h3>More in this section</h3>
5757

5858
<li data-role="list-divider">Pages &amp; Dialogs</li>
5959
<li><a href="docs-pages.html">Anatomy of a page</a></li>
60+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
61+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
6062
<li><a href="docs-transitions.html">Page transitions</a></li>
6163
<li><a href="docs-dialogs.html">Dialogs</a></li>
6264
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>

docs/pages/multipage-template.html

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,73 +5,80 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>Page Title</title>
8-
<link rel="stylesheet" href="../../themes/default/" />
9-
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
10-
<script src="../../js/jquery.js"></script>
11-
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
12-
<script src="../_assets/js/jqm-docs.js"></script>
13-
<script src="../../js/"></script>
14-
</head>
8+
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
9+
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
10+
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
11+
</head>
12+
1513

1614
<body>
1715

18-
<!-- Start of first page -->
16+
<!-- Start of first page: #one -->
1917
<div data-role="page" id="foo">
2018

2119
<div data-role="header">
22-
<h1>Foo</h1>
20+
<a href="index.html" data-icon="arrow-l" data-ajax="false">List</a>
21+
<h1>Multi-page</h1>
2322
</div><!-- /header -->
2423

25-
<div data-role="content">
26-
<h2>Foo</h2>
27-
<p>I'm first in the source order so I'm shown as the page.</p>
28-
<p>View internal page called <a href="#bar">bar</a></p>
29-
<p>View internal page called <a href="#baz" data-rel="dialog" data-transition="pop">baz</a> as a dialog.</p>
24+
<div data-role="content" id="one">
25+
<h2>One</h2>
26+
27+
<p>I have an id of "one" on my page container. I'm first in the source order so I'm shown when the page loads.</p>
28+
29+
<p>This is a multi-page boilerplate template that you can copy to build you first jQuery Mobile page. This template contains multiple "page" containers inside, unlike a <a href="page-template.html"> single page template</a> that has just one page within it.</p>
30+
<p>Just view the source and copy the code to get started. All the CSS and JS is linked to the jQuery CDN versions so this is super easy to set up. Remember to include a meta viewport tag in the head to set the zoom level.</p>
31+
<p>You link to internal pages by referring to the ID of the page you want to show. For example, to <a href="#two" >link</a> to the page with an ID of "two", my link would have a <code>href="#two"</code> in the code.</p>
32+
33+
<h3>Show internal pages:</h3>
34+
<p><a href="#two" data-role="button">Show page "two"</a></p>
35+
<p><a href="#popup"data-role="button" data-rel="dialog" data-transition="pop">Show page "popup" (as a dialog)</a></p>
3036
</div><!-- /content -->
3137

32-
<div data-role="footer">
38+
<div data-role="footer" data-theme="d">
3339
<h4>Page Footer</h4>
3440
</div><!-- /footer -->
35-
</div><!-- /page -->
41+
</div><!-- /page one -->
3642

3743

38-
<!-- Start of second page -->
39-
<div data-role="page" id="bar">
44+
<!-- Start of second page: #two -->
45+
<div data-role="page" id="two" data-theme="a">
4046

4147
<div data-role="header">
42-
<h1>Bar</h1>
48+
<h1>Two</h1>
4349
</div><!-- /header -->
4450

45-
<div data-role="content">
46-
<h2>Bar</h2>
47-
<p>I'm the bar page.</p>
48-
<p><a href="#foo" data-direction="reverse">Back to foo</a></p>
49-
<p>Or view an <a href="link-formats.html">external page</a> from here!</p>
51+
<div data-role="content" data-theme="a">
52+
<h2>Two</h2>
53+
<p>I have an id of "two" on my page container. I'm the second page container in this multi-page template.</p>
54+
<p>Notice that the theme is different for this page because we've added a few <code>data-theme</code> swatch assigments here to show off how flexible it is. You can add any content or widget to these pages, but we're keeping these simple.</p>
55+
<p><a href="#one" data-direction="reverse" data-role="button" data-theme="b">Back to page "one"</a></p>
56+
5057
</div><!-- /content -->
5158

5259
<div data-role="footer">
5360
<h4>Page Footer</h4>
5461
</div><!-- /footer -->
55-
</div><!-- /page -->
62+
</div><!-- /page two -->
5663

5764

58-
<!-- Start of second page -->
59-
<div data-role="page" id="baz">
65+
<!-- Start of third page: #popup -->
66+
<div data-role="page" id="popup">
6067

61-
<div data-role="header">
62-
<h1>Baz</h1>
68+
<div data-role="header" data-theme="e">
69+
<h1>Dialog</h1>
6370
</div><!-- /header -->
6471

65-
<div data-role="content">
66-
<h2>Baz</h2>
67-
<p>I'm the baz page, viewed as a dialog.</p>
68-
<p><a href="#foo" data-rel="back">Back to foo</a></p>
72+
<div data-role="content" data-theme="d">
73+
<h2>Popup</h2>
74+
<p>I have an id of "popup" on my page container and only look like a dialog because the link to me had a <code>data-rel="dialog"</code> attribute which gives me this inset look and a <code>data-transition="pop"</code> attribute to change the transition to pop. Without this, I'd be styled as a normal page.</p>
75+
<p><a href="#one" data-rel="back" data-role="button" data-inline="true" data-icon="back">Back to page "one"</a></p>
6976
</div><!-- /content -->
7077

7178
<div data-role="footer">
7279
<h4>Page Footer</h4>
7380
</div><!-- /footer -->
74-
</div><!-- /page -->
81+
</div><!-- /page popup -->
7582

7683
</body>
7784
</html>

docs/pages/page-template.html

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
3+
4+
<head>
45
<meta charset="utf-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1">
67
<title>Page Title</title>
7-
<link rel="stylesheet" href="../../themes/default/" />
8-
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9-
<script src="../../js/jquery.js"></script>
10-
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
11-
<script src="../_assets/js/jqm-docs.js"></script>
12-
<script src="../../js/"></script>
8+
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
9+
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
10+
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
1311
</head>
12+
1413
<body>
1514

1615
<div data-role="page">
1716

1817
<div data-role="header">
19-
<h1>Page Title</h1>
18+
<a href="index.html" data-icon="arrow-l" data-ajax="false">List</a>
19+
<h1>Single page</h1>
2020
</div><!-- /header -->
2121

2222
<div data-role="content">
23-
<p>Page content goes here.</p>
23+
<p>This is a single page boilerplate template that you can copy to build you first jQuery Mobile page. Each link or form from here will pull a new page in via Ajax to support the animated page transitions.</p>
24+
<p>Just view the source and copy the code to get started. All the CSS and JS is linked to the jQuery CDN versions so this is super easy to set up. Remember to include a meta viewport tag in the head to set the zoom level.</p>
25+
<p>This template is standard HTML document with a single "page" container inside, unlike a <a href="multipage-template.html">multi-page template</a> that has multiple pages within it. We strongly recommend builidng your site or app as a series of separate pages like this because it's cleaner, more lightweight and works better without JavaScript.</p>
2426
</div><!-- /content -->
2527

2628
<div data-role="footer">
27-
<h4>Page Footer</h4>
29+
<h4>Footer content</h4>
2830
</div><!-- /footer -->
31+
2932
</div><!-- /page -->
3033

3134
</body>

docs/pages/pages-themes.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ <h3>More in this section</h3>
197197

198198
<li data-role="list-divider">Pages &amp; Dialogs</li>
199199
<li><a href="docs-pages.html">Anatomy of a page</a></li>
200+
<li><a href="page-template.html" data-ajax="false">Single page template</a></li>
201+
<li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
200202
<li><a href="docs-transitions.html">Page transitions</a></li>
201203
<li><a href="docs-dialogs.html">Dialogs</a></li>
202204
<li><a href="docs-navmodel.html">Navigation: Ajax, hashes &amp; history</a></li>

0 commit comments

Comments
 (0)