Presentation is loading. Please wait.

Presentation is loading. Please wait.

WDV 331 Dreamweaver Applications JQuery Mobile for Apps Dreamweaver CS6 Chapter 11 Page 537 Kindle 11543.

Similar presentations


Presentation on theme: "WDV 331 Dreamweaver Applications JQuery Mobile for Apps Dreamweaver CS6 Chapter 11 Page 537 Kindle 11543."— Presentation transcript:

1 WDV 331 Dreamweaver Applications JQuery Mobile for Apps Dreamweaver CS6 Chapter 11 Page 537 Kindle 11543

2 jQuery Mobile jQuery Mobile - a “mobile development framework,” it provides the tools to build web pages that act more like mobile applications than traditional web pages. A page built with jQuery Mobile includes – screen transitions (one web page slides into view as the old one slides out), – a more phone-like interface (large, rounded-corner buttons and smooth color gradients), and – support for non-mouse-like interactions (like screen taps and swipes). basic HTML & CSS, transformed into a phone-like presentation uses JavaScript framework – solves cross-browser problems – JavaScript programming a lot easier.

3 Creating a Basic JQuery Mobile Page A lot of complex programming behind a jQuery Mobile web page Adding content and building a page uses techniques you hnow: – inserting divs ( The Insert Div Tag Tool ), – typing in text, – adding images. Lab – Create a basic jQ Mobile Page. – Page 539 kindle 11548

4 Lab  Basic JQuery Mobile Page Choose File →New. Select the Page From Sample category from the left-hand list of options and then click the Mobile Starters folder from the Sample Folder column. Three options listed:

5 Lab  Three options 1> jQuery Mobile (CDN), “content delivery network,” jQuery’s web server stores the required external files. JavaScript, CSS, and graphic files from jQuery.com. CDN option won’t work without an Internet connection, and you’re dependent on the jQuery.com 2> jQuery Mobile (Local), puts all the required files in your site folder.

6 Lab  Three options 3> jQuery Mobile with theme (Local). – The most flexible option, – Like #2>, all necessary files in your local site folder. – Breaks the CSS file into two external files: – jquery.mobile.structure-1.0. min.css provides all the CSS required for the basic functions and layout. Do not edit. – jquery.mobile.theme-1.0. min.css — contains styles for basic look  fonts, colors, drop-shadows, and so on. – Also works with jQuery Mobile’s ThemeRoller website. Visually customize the look of jQuery Mobile elements and then download a new mobile theme CSS file.

7 jQuery Mobile with theme (Local). When creating a new jQuery Mobile page, CHOOSE  jQuery Mobile with theme (Local). provides the easiest way to customize the look of your mobile site Make sure you leave the HTML5 doctype selected. Click Create

8 What does the code look like? A jQuery Mobile page are a bunch of nested divs. Dreamweaver applies a special attribute to each div that tells jQuery Mobile what to do with the div. For example, a screen’s worth of information is one div, and its code looks like this:. Within that div are other divs: – header ( ), – content ( ), – footer ( ). When you mouse over one of the divs, Dreamweaver displays a blue tab indicating that div’s role.

9 Anatomy of a JQurey Mobile Page Visit the site, and the browser downloads a single HTML file, but only display a portion of the HTML at a time. See Figure (next slide) jQuery Mobile  applies special attributes to other HTML tags. i. e. a simple unordered list: Page Three Page Four data-role =" listview“ changed basic bulleted set to a special, mobile-enhanced list.

10 Figure 11-21

11 Adding Content header &footer Select the dummy text Dreamweaver provides and change it. a long sentence in either the header or footer is kept to a single line and is cut off if it doesn’t fit. – keep the text in a header or footer short.

12 Adding Content  central div The central div in each page is where you add the main content. The word “content” is inside that div, delete it and add HTML as you normally would: – headlines, paragraphs, bulleted lists, and images Also insert special jQuery Mobile items – list views, layout grids, collapsible blocks, and link buttons — as well as additional “pages”.

13 Adding JQurey Mobile List View jQuery Mobile includes its own “widgets” — elements for links, layout, and content display. The page, header, and footer divs are widgets, for example. You can also insert a list of links Dreamweaver’s stock mobile “home page” includes a list of links to Page Two, Page Three, and Page Four Dreamweaver calls a list the “list view,” and jQuery Mobile supplies several variations List views are either ordered or unordered lists, created using the and tags. You can display these two types of list five ways:

14 List View

15 Lab – add a list view Lists are used for data display, navigation, result lists, and data entry so jQuery Mobile includes a wide range of list types and formatting examples to cover most common design patterns. List of more types Page 545 Kindle 1166 If you add data-rel =“ dialog” to a link (an tag) on a jQuery Mobile page, the linked page pops into view like a dialog box, complete with a close button.

16 Change: (text & link for each list item) (A inserted List view) Each list item includes the text “Page” with an empty link (# appears in the Property Inspector’s link box). Select the text and type in whatever you wish. Link that text to another page, just as you would in a desktop web site. Once you insert a list view into a page, there’s no way to return to the List View window and change its settings. You can, however, go into Code view and edit the HTML. Helpful information on creating lists see link on the previous slide.

17 Adding A Layout Grid A layout grid is basically a series of div tags that jQuery floats to create columns, the same technique you used to create the multi- column layouts Click inside the content div of a “page” div and then click the Layout Grid button on the Insert panel. Book 549 Kindle 11709

18 A Layout Grid HTML for a one-row, two-column grid: Block 1,1 Block 1,2 The letter in the class name determines the grid’s number of columns: – ui-grid-a is a two-column grid, – ui-grid-b gives you a three-column grid, – ui-grid-c results in a four-column grid, – ui-grid-d is a five-column grid. Follow pattern in code view to expand, shrink table ontent-grids.html ontent-grids.html

19 Adding A Collapsible Block Collapsible blocks  the blocks hide content until a visitor wants to read it. Keep’s a page appearance simple. To insert a collapsible block: – Click inside the content div of a “page” div and click the Collapsible Block button in the Insert panel

20 Edit Collapsible Block Edit the headline and the content. – Select the dummy “Header” text and type in your own headline. Header limited to a single line. – Change the dummy content to anything you want. You can even insert multiple paragraphs, lists, and images. Dreamweaver inserts four div tags when you add a collapsible block to a page. Collapsible blocks start closed. To make content visible  change to: data-collapsed =“ false” instead of “true”

21 Collapsible Block HTML Header Content Header Content Header Content

22 More About Collapsible Collapsible set (accordion) Dreamweaver ontent/content-collapsible-set.html ontent/content-collapsible-set.html Collapsible content ontent/content-collapsible.html ontent/content-collapsible.html

23 Adding Form Elements The jQuery Mobile category of the Insert panel includes many form elements — text fields, password fields, checkboxes, radio buttons, and so on. However, these fields don’t work like traditional form fields at all unless you add JavaScript programming. Dreamweaver CS6 doesn’t provide any tools to do so. Unless you know how to write JavaScript, select only “Link” from the Button Type menu. This lets you insert regular page links that look like attractive buttons. The Input Type menu is only available when you select “Input” from the Button Type menu, and it lets you select one of the HTML form buttons discussed later pg585

24 jQuery Mobile Buttons More on buttons uttons/index.html uttons/index.html

25 Adding New “Pages” jQuery Mobile “pages” are just a series of divs — one for the header, one for content, and one for a footer. You can choose to leave out either the header or footer (or both). Find the correct location in the code. Click the Page button from the jQuery Mobile category of the Insert panel.

26 New Page Code Header Content Footer

27 Formatting When viewed in Dreamweaver’s Design view, a jQuery Mobile Page is pretty unimpressive. The browser view of the same HTML is astonishingly different. The mobile page with subtle gradients, rounded corners, shadows, and sophisticated icons. Where does this design come from? jQuery Mobile is more than JavaScript — it’s also complex CSS that makes the HTML look like a smartphone application. You can use your CSS skills to change the appearance of your jQuery Mobile site, but you’re in for a lot of work The CSS is complex, and there are literally hundreds of styles required to make jQuery Mobile work. If you want to give it a try, Dreamweaver’s Inspect mode is your best bet at deciphering the CSS.

28 Five Built-in Designs Another approach is to use one of jQuery Mobile’s five built-in designs that you can switch among simply by adding attributes to the HTML tags. By default, jQuery Mobile uses its “a” theme for pages, but you can choose its b, c, d, and e themes. To change one page to the “b” theme add data-theme =“ b” to that page’s tag like this: To change a List View to the “e” theme, div: ontent-themes.html ontent-themes.html

29 Swatches Panel You don’t need to add that theme data by hand. Dreamweaver CS6 includes a handy, context-sensitive jQuery Mobile Swatches panel (see next slide). Window → jQuery Mobile Swatches. Apply a swatch by clicking into a jQuery mobile element. The Swatches panel displays the formatting options for the current element.

30 Five Basic Swatches Panel

31 Swatches Panel For example, in last slide, Dreamweaver displays the options for the selected link (circled) inside a jQuery mobile list view. In this instance, you could apply one of five swatches (labeled a to e) to the list itself, as well as other swatches for the different types of available lists. Clicking into another element, like a page header, updates the Swatches panel to list just the swatches available for page headers. Click a swatch to apply it to the selected page element.

32 ThemeRoller Website If you want to create your own look for a jQuery Mobile site, Click Get More Themes link at bottom. This will take you to jQuery Mobile ThemeRoller website Try different fonts, colors, borders, and shadows, and see a live, interactive rendering of your design choices.

33 ThemeRoller Once you’re satisfied, click the Download button. You’ll end up with a CSS file containing your design, as well as an Images folder containing the icons for the design. Simply move those files into the jquery-mobile folder in your site (replacing the original files). Change the link from the CSS file Dreamweaver supplies (jquery.mobile.theme-1.0.min.css) to your new theme file, and you’re done. Dreamweaver is smart enough to realize you’re using a new theme, and displays it in the jQuery Mobile Swatches panel.

34 Formatting Summary jQuery Mobile Swatches panel makes it easy to apply formatting to mobile page elements. You’re not stuck with just the five basic swatches that jQuery Mobile ships with. Click the “Get more themes” link to launch a web browser and visit the jQuery Mobile ThemeRoller — an online web application for visually creating mobile theme files.

35 Launching Your jQuery Mobile Site Load to you web server Link from your main web site to mobile site. Link  ”See our Mobile Site Version”

36 Convert for use on Android and iPhone PhoneGap Build Service From dreamweaver access – Site  PhoneGap Build Service  PhoneGap Build Service From dreamweaver Settings – Site  PhoneGap Build Service  PhoneGap Build Settings

37 PhoneGap Build Service Help videos cloud-feature-tour-for-web/using-the- phonegap-build-panel-in-dreamweaver-cs6- to-build-native-applications-for-android-and- ios-devices/ cloud-feature-tour-for-web/using-the- phonegap-build-panel-in-dreamweaver-cs6- to-build-native-applications-for-android-and- ios-devices/ dreamweaver-cs6/packaging-and-uploading- phone-gap-apps/ dreamweaver-cs6/packaging-and-uploading- phone-gap-apps/


Download ppt "WDV 331 Dreamweaver Applications JQuery Mobile for Apps Dreamweaver CS6 Chapter 11 Page 537 Kindle 11543."

Similar presentations


Ads by Google