Framework7 – Accordion

Framework7 – Accordion ”; Previous Next Description The accordion is a graphical control element displayed as a stacked list of items. Each accordion can be expanded or stretched to reveal the content associated with that accordion. Collapsible Layout When you are using single separate collapsible element, you need to omit the accordion-list wrapper element. Following is a structure of collapsible layout − <!– Single collapsible element ——> <div class = “accordion-item”> <div class = “accordion-item-toggle”></div> <div class = “accordion-item-content”></div> </div> <!– Separate collapsible element –> <div class = “accordion-item”> <div class = “accordion-item-toggle”></div> <div class = “accordion-item-content”></div> </div> The following classes are used for accordion in Framework7 − S.No Classes & Description 1 accordion-list It is an optional class, which contains a group of accordion items list. 2 accordion-item It is a required class for single accordion item. 3 accordion-item-toggle It is a required class used to expand accordion item content. 4 accordion-item-content It is a required class used for hidden accordion item content. 5 accordion-item-expanded It is a single expanded accordion item. Accordion JavaScript API JavaScript API methods are used to open and close the accordion programmatically. It contains the following JavaScript API methods − myApp.accordionOpen(item) − Used to open accordion. myApp.accordionClose(item) − Used to close accordion. myApp.accordionToggle(item) − Used to toggle accordion. All methods contains parameter called item which is HTML or string element of accordion-item. Accordion Events Accordion contains four events as listed in the following table − S.No Event Target & Description 1 open Accordion item When you open an animation, this event will get fired. 2 opened Accordion item When the opening of an animation is completed, this event will get fired. 3 close Accordion item When you close an animation, this event will get fired. 4 closed Accordion item When the closing of an animation is completed, this event will get fired. Accordion List View In accordion list view, you can use item-link element instead of accordion-toggle. <div class = “list-block accordion-list”> <ul> <li class = “accordion-item”> <a href = “” class = “item-link item-content”> <div class = “item-inner”> <div class = “item-title”>1st Item</div> </div> </a> <div class = “accordion-item-content”>Content for 1st Item…</div> </li> <li class = “accordion-item”> <a href = “” class = “item-link item-content”> <div class = “item-inner”> <div class = “item-title”>2nd Item</div> </div> </a> <div class = “accordion-item-content”>Content for 2nd Item…</div> </li> </ul> </div> Example The following example demonstrates the use of accordion in the Framework7 − <!DOCTYPE html> <html> <head> <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui”> <meta name=”apple-mobile-web-app-capable” content=”yes”> <meta name=”apple-mobile-web-app-status-bar-style” content=”black”> <title>Accordion</title> <link rel=”stylesheet” href=”https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.min.css”> <link rel=”stylesheet” href=”https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.colors.min.css”> </head> <body> <div class=”views”> <div class=”view view-main”> <div class=”pages”> <div data-page=”home” class=”page navbar-fixed”> <div class=”navbar”> <div class=”navbar-inner”> <div class=”left”> </div> <div class=”center”>Accordion</div> <div class=”right”> </div> </div> </div> <div class=”page-content”> <div class=”content-block-title”>List of Programming Lagauges</div> <div class=”list-block accordion-list”> <ul> <li class=”accordion-item”> <a href=”#” class=”item-content item-link”> <div class=”item-inner”> <div class=”item-title”>C</div> </div> </a> <div class=”accordion-item-content”> <div class=”content-block”> <p>C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers.</p> </div> </div> </li> <li class=”accordion-item”> <a href=”#” class=”item-content item-link”> <div class=”item-inner”> <div class=”item-title”>C++</div> </div> </a> <div class=”accordion-item-content”> <div class=”content-block”> <p>C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This reference will take you through simple and practical approach while learning C++ Programming language. </p> </div> </div> </li> <li class=”accordion-item”> <a href=”#” class=”item-content item-link”> <div class=”item-inner”> <div class=”item-title”>Java</div> </div> </a> <div class=”accordion-item-content”> <div class=”content-block”> <p>Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial gives a complete understanding of Java. This reference will take you through simple and practical approach while learning Java Programming language. </p> </div> </div> </li> </ul> </div> <div class=”content-block-title”>Separate Collapsibles</div> <div class=”list-block”> <ul> <li class=”accordion-item”> <a href=”#” class=”item-content item-link”> <div class=”item-inner”> <div class=”item-title”>C</div> </div> </a> <div class=”accordion-item-content”> <div class=”content-block”> <p >C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers.</p> </div> </div> </li> <li class=”accordion-item”> <a href=”#” class=”item-content item-link”> <div class=”item-inner”> <div class=”item-title”>C++</div> </div> </a> <div class=”accordion-item-content”> <div class=”content-block”> <p>C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This reference will take you through simple and practical approach while learning C++ Programming language. </p> </div> </div> </li> <li class=”accordion-item”> <a href=”#” class=”item-content item-link”> <div class=”item-inner”> <div class=”item-title”>Java</div> </div> </a> <div class=”accordion-item-content”> <div class=”content-block”> <p>Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial gives a complete understanding of Java. This reference will take you through simple and practical approach while learning Java Programming language. </p> </div> </div> </li> </ul> </div> <div class=”content-block-title”>Custom Accordion</div> <div class=”content-block accordion-list custom-accordion”> <div class=”accordion-item”> <div class=”accordion-item-toggle”><i class=”icon icon-plus”>+</i><i class=”icon icon-minus”>-</i><span>C</span></div> <div class=”accordion-item-content”> <p>C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java

Framework7 – Tabs

Framework7 – Tabs ”; Previous Next Description Tabs are sets of logically grouped content that allow us to quickly flip between them to and saves the space like accordions. Tabs Layout The following code defines the layout for the tabs − <!– Tabs wrapper, shoud have “tabs” class.It is a required element –> <div class = “tabs”> <!– The tab, should have “tab” class and unique id attribute –> <!– The tab is active by default – “active” class –> <div class = “tab active” id = “tab1”> … The content for Tab 1 goes here … </div> <!– The second tab, should have “tab” class and unique id attribute –> <div class = “tab” id = “tab2″> … The content for Tab 2 goes here … </div> </div> Where − <div class = “tabs”> − It is a required wrapper for all tabs. If we miss this, tabs will not work at all. <div class = “tab”> − It is a single tab, which should have unique id attribute. <div class = “tab active”> − It is a single active tab, which uses additional active class to make tab visible (active). Switching Between Tabs You can use some controller in tabs layout, so that the user can switch between them. For this, you need to create links (<a> tags) with tab-link class and href attribute equal to the id attribute of target tab − <!– Here the link is used to activates 1st tab, has the same href attribute (#tab1) as the id attribute of 1st tab (tab1) –> <a href = “#tab1” class = “tab-link active”>Tab 1</a> <!– Here the link is used to activates 2st tab, has the same href attribute (#tab2) as the id attribute of 2st tab (tab2) –> <a href = “#tab2” class = “tab-link”>Tab 2</a> <a href = “#tab3” class = “tab-link”>Tab 3</a> Switch Multiple Tabs If you are using single tab link to switch between multiple tabs, then you can use classes instead of using ID”s and data-tab attribute. <!– For Top Tabs –> <div class = “tabs tabs-top”> <div class = “tab tab1 active”>…</div> <div class = “tab tab2”>…</div> <div class = “tab tab3”>…</div> </div> <!– For Bottom Tabs –> <div class = “tabs tabs-bottom”> <div class = “tab tab1 active”>…</div> <div class = “tab tab2”>…</div> <div class = “tab tab3”>…</div> </div> <!– For Tabs links –> <div class = “tab-links”> <!– Links are switch top and bottom tabs to .tab1 –> <a href = “#” class = “tab-link” data-tab = “.tab1”>Tab 1</a> <!– Links are switch top and bottom tabs to .tab2 –> <a href = “#” class = “tab-link” data-tab = “.tab2”>Tab 2</a> <!– Links are switch top and bottom tabs to .tab3 –> <a href = “#” class = “tab-link” data-tab = “.tab3″>Tab 3</a> </div> The data-tab attribute of tab-link contains CSS selector of target tab/tabs. We can use different ways of tabs, these are specified in the following table − S.No Tabs Types & Description 1 Inline Tabs Inline tabs are sets of grouped in inline that allow you to quickly flip between them. 2 Switch Tabs From Navbar We can place tabs in navigation bar that allow you to flip between them. 3 Switch Views From Tab Bar Single tab can be used to switch between views with its own navigation and layout. 4 Animated Tabs You can use simple transition (animation) to switch tabs. 5 Swipeable Tabs You can create swipeable tabs with simple transition by using the tabs-swipeable-wrap class for the tabs. 6 Tabs JavaScript Events JavaScript events can be used when you are working with JavaScript code for the tabs. 7 Show Tab Using JavaScript You can switch or show the tab using JavaScript methods. Print Page Previous Next Advertisements ”;

Framework7 – Cards

Framework7 – Cards ”; Previous Next Description Cards contain organized information related to a single subject like a photo, link, and text. The following table shows Framework7 card types − S.No Types & Description 1 Card HTML Layout The basic card HTML layout uses card classes to arrange its items. 2 List View With Cards You can use cards as list view elements by adding cards-list class to <div class=”list-block”>. Print Page Previous Next Advertisements ”;

Framework7 – Progress Bar

Framework7 – Progress Bar ”; Previous Next Description The progress bars can be used to show loading of assets or progress of a task to the users. You can specify the progress bar by using the progressbar class. When the user does not know how long the loading process will be there for the request, you can use progressbar-infinite class. Progress Bar JavaScript API The progress bar can be used along with the JavaScript API to specify show, hide and progress properties by using the following methods − S.No Methods Description & Parameters 1 myApp.setProgressbar (container , progress, speed) It sets the progress bar for the progress of a task. container − It is a string or HTML element that defines the container of progress bar element. progress − It represents in integer format and defines the progress of a task. speed − It represents in integer format and specifies the duration of the progress of a task. 2 myApp.hideProgressbar (contain er) It hides the progress bar. container − It is a string or HTML element that defines the container of progress bar element. 3 myApp.showProgressbar (contai ner, progress, color) It displays the progress bar. container − It is a string or HTML element that defines the container of progress bar element. progress − It represents in integer format and defines the progress of a task. speed − It represents in integer format and specifies the duration of the progress of a task. Example The following example displays an animated determinate and indeterminate progress bars to indicate activity in Framework7 − <!DOCTYPE html> <html> <head> <meta name = “viewport” content = “width = device-width, initial-scale = 1, maximum-scale = 1, minimum-scale = 1, user-scalable = no, minimal-ui” /> <meta name = “apple-mobile-web-app-capable” content = “yes” /> <meta name = “apple-mobile-web-app-status-bar-style” content = “black” /> <title>Progress Bar</title> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.min.css” /> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.colors.min.css” /> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.material.min.css” /> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.material.colors.min.css” /> </head> <body> <div class = “views”> <div class = “view view-main”> <div class = “pages”> <div data-page = “home” class = “page navbar-fixed”> <div class = “navbar”> <div class = “navbar-inner”> <div class = “center”>Progress Bar</div> </div> </div&gt <div class = “page-content”> <div class = “content-block-title”>Determinate Progress Bar</div> <div class = “content-block”> <div class = “content-block-inner”> <p>Inline determinate progress bar:</p> <div class = “progressbar-inline”> <p><span data-progress = “10” class = “progressbar”></span></p> <p class = “buttons-row”> <a href = “#” data-progress = “25” class = “button button-raised”>25%</a> <a href = “#” data-progress = “50” class = “button button-raised”>50%</a> <a href = “#” data-progress = “75” class = “button button-raised”>75%</a> <a href = “#” data-progress = “100” class = “button button-raised”>100%</a> </p> </div> <p>Loads and hides the determinate progress bar:</p> <div class = “progressbar-load-hide”> <p><a href = “#” class = “button button-raised”>Start Loading</a></p> </div> <p>Displays the determinate progress bar on top:</p> <p class = “progressbar-overlay”><a href = “#” class = “button button-raised”>Start Loading</a></p> </div> </div> <div class = “content-block-title”>Infinite Progress Bar</div> <div class = “content-block”> <div class = “content-block-inner”> <p>Inline infinite progress bar:</p> <p><span class = “progressbar-infinite”></span></p> <p>Displays the infinite progress bar in multiple colors:</p> <p><span class = “progressbar-infinite color-multi”></span></p> <p>Displays the infinite progress bar on top:</p> <p class = “progressbar-infinite-overlay”><a href = “#” class = “button button-raised”>Start Loading</a></p> <p>Displays the infinite progress bar in multiple colors on top:</p> <p class = “progressbar-infinite-multi-overlay”><a href = “#” class = “button button-raised”>Start Loading</a></p> </div> </div> <div class = “content-block-title”>Different types of colored progress bars:</div> <div class = “list-block”> <ul> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “5” class = “progressbar color-red”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “10” class = “progressbar color-pink”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “20” class = “progressbar color-deeppurple”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “30” class = “progressbar color-blue”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “40” class = “progressbar color-cyan”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “50” class = “progressbar color-green”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “60” class = “progressbar color-lime”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “70” class = “progressbar color-amber”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “80” class = “progressbar color-deeporange”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “90” class = “progressbar color-gray”></div> </div> </li> <li class = “item-content”> <div class = “item-inner”> <div data-progress = “100” class = “progressbar color-black”></div> </div> </li> </ul> </div> </div> </div> </div> </div> </div> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/js/framework7.min.js”></script> <script> var myApp = new Framework7({ material: true }); var $$ = Dom7; $$(”.progressbar-inline .button”).on(”click”, function () { var progress = $$(this).attr(”data-progress”); var progressbar = $$(”.progressbar-inline .progressbar”); myApp.setProgressbar(progressbar, progress); }); $$(”.progressbar-load-hide .button”).on(”click”, function () { var container = $$(”.progressbar-load-hide p:first-child”); //it doesn”t load if another progresbar is loading if (container.children(”.progressbar”).length) return; myApp.showProgressbar(container, 0); var progress = 0; function simulateLoading() { setTimeout(function () { var progressBefore = progress; progress += Math.random() * 20; myApp.setProgressbar(container, progress); if (progressBefore < 100) { simulateLoading(); } else myApp.hideProgressbar(container); }, Math.random() * 200 + 200); } simulateLoading(); }); $$(”.progressbar-overlay .button”).on(”click”, function () { var container = $$(”body”); if (container.children(”.progressbar, .progressbar-infinite”).length) return; myApp.showProgressbar(container, 0, ”orange”); var progress = 0; function simulateLoading() { setTimeout(function () { var progressBefore = progress; progress += Math.random() * 20; myApp.setProgressbar(container, progress); if (progressBefore < 100) { simulateLoading(); } //hides the progressbar else myApp.hideProgressbar(container); }, Math.random() * 200 + 200); } simulateLoading(); }); $$(”.progressbar-infinite-overlay .button”).on(”click”, function () { var container = $$(”body”); if (container.children(”.progressbar, .progressbar-infinite”).length) return; myApp.showProgressbar(container, ”yellow”); setTimeout(function () { myApp.hideProgressbar(); }, 3000); }); $$(”.progressbar-infinite-multi-overlay .button”).on(”click”, function () { var container = $$(”body”); if (container.children(”.progressbar, .progressbar-infinite”).length) return; myApp.showProgressbar(container, ”multi”); setTimeout(function () { myApp.hideProgressbar();

Framework7 – Action Button

Framework7 – Action Button ”; Previous Next Description Framework7 provides floating action button for a promoted action. They appear as a floating circled icon over the UI. It has the motion behaviors that contain morphing, launching, and transferring an anchor point. Floating action button is only supported in Material theme. The following table lists the action buttons types used in Framework7 − S.No Types & Description 1 Floating Action Button Layout It is very simple; you just need to place it as a child of page or view. 2 Morph To Popover If you want to open popover on clicking the floating action button then you can use floating-button-to-popover class. 3 Speed Dial You can invoke related actions upon clicking the floating action button by using speed dial. Print Page Previous Next Advertisements ”;

Framework7 – Side Panels

Framework7 – Side Panels ”; Previous Next Description The side panel moves to the left or right side of the screen to display the content. Framework7 allows you to include up to 2 panels (right side panel and left side panel) to your app. You need to add panels in the beginning of the <body> and then choose the opening effect by applying the following listed classes − panel-reveal − This will make the whole app”s content move out. panel-cover − This will make the panel to overlay on app”s content. For instance, the following code shows how to use the above classes − <body> <!– First add Panel”s overlay which will overlays app while panel is opened –> <div class = “panel-overlay”></div> <!– Left panel –> <div class = “panel panel-left panel-cover”> panel”s content </div> <!– Right panel –> <div class = “panel panel-right panel-reveal”> panel”s content </div> </body> The following table shows the panel types supported by Framework77 − S.No Type & Description 1 Open and Close Panels Once you add panel and effects, we need to add functionality to open and close the panels. 2 Panel Events To detect how a user interacts with the panel, you can use panel events. 3 Open Panels With Swipe Framework7 provides you the feature to open panel with swipe gesture. 4 Panel is Opened? We can determine whether panel is opened or not by using the with-panel[position]-[effect] rule. Print Page Previous Next Advertisements ”;

Framework7 – Navbars

Framework7 – Navbars ”; Previous Next Description In this chapter, let us study about navbar. It is a usually placed at top of a screen containing title of the page and navigation elements. Navbar consists of three parts each of which may contain any HTML content, but it is suggested you use these in the way given below − Left − It is designed to place back link icons or single text link. Center − It is used to display title of the page or tab links. Right − This part is similar to the left part. The following table demonstrates the use of navbar in detail − S.No Navbar Types & Description 1 Basic navbar A basic navbar can be created by using the navbar, navbar-inner, left, center and right classes. 2 Navbar with links To use links in left and right part of your navbar, just add <a> tag with class link. 3 Multiple links To use multiple links, just add few more <a class = “link”> to the part of your choice. 4 Links with text and icons The links can be provided with icons and texts by adding classes for icons and wrapping the link text with <span> element. 5 Links with only icons Navbar links can be provided with only icons by adding icon-only class to links. 6 Related app and view methods On initializing the View, framework7 allows you to use methods available for navbar. 7 Hide navbar automatically The navbar can be hidden/shown automatically for some Ajax loaded pages where navbar is not required. Print Page Previous Next Advertisements ”;

Framework7 – Content Block

Framework7 – Content Block ”; Previous Next Description Content blocks can be used to add extra content with different format. Example The following example demonstrates the use of content block in Framework7 − <!DOCTYPE html> <html> <head> <meta name = “viewport” content = “width = device-width, initial-scale = 1, maximum-scale = 1, minimum-scale = 1, user-scalable = no, minimal-ui” /> <meta name = “apple-mobile-web-app-capable” content = “yes” /> <meta name = “apple-mobile-web-app-status-bar-style” content = “black” /> <title>Content Block</title> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.min.css” /> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.colors.min.css” /> </head> <body> <div class = “views”> <div class = “view view-main”> <div class = “pages”> <div data-page = “home” class = “page navbar-fixed”> <div class = “navbar”> <div class = “navbar-inner”> <div class = “left”> </div> <div class = “center”>Content Block</div> <div class = “right”> </div> </div> </div> <div class = “page-content”> <p>This is out side of content block!!!</p> <div class = “content-block”> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p> </div> <div class = “content-block”> <div class = “content-block-inner”>This is another text block wrapped with “content-block-inner”</div> </div> <div class = “content-block-title”>Content Block Title</div> <div class = “content-block”> <p>Praesent nec imperdiet diam. Maecenas vel lectus porttitor, consectetur magna nec, viverra sem. Aliquam sed risus dolor. Morbi tincidunt ut libero id sodales. Integer blandit varius nisi quis consectetur.</p> </div> <div class = “content-block-title”>This is another long content block title</div> <div class = “content-block”> <div class = “content-block-inner”> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p> </div> </div> <div class = “content-block-title”>Content Block Inset</div> <div class = “content-block inset”> <div class = “content-block-inner”> <p>Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis. </p> </div> </div> <div class = “content-block-title”>Content Block Tablet Inset</div> <div class = “content-block tablet-inset”> <div class = “content-block-inner”> <p>Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis. </p> </div> </div> </div> </div> </div> </div> </div> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/js/framework7.min.js”></script> <script> var myApp = new Framework7(); var mainView = myApp.addView(”.view-main”); </script> </body> </html> Output Let us carry out the following steps to see how the above given code works − Save the above given HTML code as content_block.html file in your server root folder. Open this HTML file as http://localhost/content_block.html and the output is displayed as shown below. The code adds extra formatting and required spacing for the text content. Print Page Previous Next Advertisements ”;

Framework7 – Layout Grid

Framework7 – Layout Grid ”; Previous Next Description Framework7 provides different types of grid types to place the content as per user need. The layout grid provides different types of columns size as described in the following table − S.No Class Table Class Width 1 col-5 tablet-5 5% 2 col-10 tablet-10 10% 3 col-15 tablet-15 15% 4 col-20 tablet-20 20% 5 col-25 tablet-25 25% 6 col-30 tablet-30 30% 7 col-33 tablet-33 33.3% 8 col-35 tablet-35 35% 9 col-40 tablet-40 40% 10 col-45 tablet-45 45% 11 col-50 tablet-50 50% 12 col-55 tablet-55 55% 13 col-60 tablet-60 60% 14 col-65 tablet-65 65% 15 col-66 tablet-66 66.6% 16 col-70 tablet-70 70% 17 col-75 tablet-75 75% 18 col-80 tablet-80 80% 19 col-85 tablet-85 85% 20 col-90 tablet-90 90% 21 col-95 tablet-95 95% 21 col-100 tablet-100 100% 22 col-auto tablet-auto Equal width Example The following example provides the grid layout for placing your content as you need in Framework7 − <!DOCTYPE html> <html> <head> <meta name = “viewport” content = “width = device-width, initial-scale = 1, maximum-scale = 1, minimum-scale = 1, user-scalable = no, minimal-ui” /> <meta name = “apple-mobile-web-app-capable” content = “yes” /> <meta name = “apple-mobile-web-app-status-bar-style” content = “black” /> <title>Layout Grid</title> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.min.css” /> <link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/css/framework7.ios.colors.min.css” /> <style> div[class* = “col-“] { background: #fff; text-align: center; color: #000; border: 1px solid #D8D8D8; } .row { margin-bottom: 10px; } </style> </head> <body> <div class = “views”> <div class = “view view-main”> <div class = “navbar”> <div class = “navbar-inner”> <div class = “center sliding”>Layout Grid</div> </div> </div> <div class = “pages”> <div data-page = “index” class = “page navbar-fixed”> <div class = “page-content”> <div class = “content-block-title”>Columns with gutter</div> <div class = “content-block”> <div class = “row”> <div class = “col-50”>col 1</div> <div class = “col-50”>col 2</div> </div> <div class = “row”> <div class = “col-25”>col 1</div> <div class = “col-25”>col 2</div> <div class = “col-25”>col 3</div> <div class = “col-25”>col 4</div> </div> <div class = “row”> <div class = “col-33”>col 1</div> <div class = “col-33”>col 2</div> <div class = “col-33”>col 3</div> </div> <div class = “content-block-title”>Columns without gutter</div> <div class = “content-block”> <div class = “row no-gutter”> <div class = “col-50”>col 1</div> <div class = “col-50”>col 2</div> </div> <div class = “row no-gutter”> <div class = “col-25”>col 1</div> <div class = “col-25”>col 2</div> <div class = “col-25”>col 3</div> <div class = “col-25”>col 4</div> </div> <div class = “row no-gutter”> <div class = “col-33”>col 1</div> <div class = “col-33”>col 2</div> <div class = “col-33”>col 3</div> </div> </div> <div class = “content-block-title”>Nested Columns</div> <div class = “content-block”> <div class = “row”> <div class = “col-50”> col 1 <div class = “row”> <div class = “col-40”>col 2</div> <div class = “col-60”>col 3</div> </div> </div> <div class = “col-50”> col 1 <div class = “row”> <div class = “col-75”>col 2</div> <div class = “col-25”>col 3</div> </div> </div> </div> </div> <div class = “content-block-title”>Columns With Different Equal Width</div> <div class = “content-block”> <div class = “row”> <div class = “col-100 tablet-50”>col 1</div> <div class = “col-100 tablet-50”>col 2</div> </div> <div class = “row”> <div class = “col-50 tablet-25”>col 1</div> <div class = “col-50 tablet-25”>col 2</div> <div class = “col-50 tablet-25”>col 3</div> <div class = “col-50 tablet-25”>col 4</div> </div> <div class = “row”> <div class = “col-100 tablet-40”>col 1</div> <div class = “col-50 tablet-60”>col 2</div> <div class = “col-50 tablet-60”>col 3</div> <div class = “col-100 tablet-40”>col 4</div> </div> </div> <div class = “content-block-title”>Columns With Equal Width</div> <div class = “content-block”> <div class = “row”> <div class = “col-auto”>col-1</div> <div class = “col-auto”>col-2</div> <div class = “col-auto”>col-3</div> <div class = “col-auto”>col-4</div> </div> <div class = “row no-gutter”> <div class = “col-auto”>col-1</div> <div class = “col-auto”>col-2</div> <div class = “col-auto”>col-3</div> <div class = “col-auto”>col-4</div> </div> </div> </div> </div> </div> </div> </div> </div> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/framework7/1.4.2/js/framework7.min.js”></script> <script> var myApp = new Framework7(); var mainView = myApp.addView(”.view-main”); </script> </body> </html> Output Let us carry out the following steps to see how the above given code works − Save the above given HTML code as layout_grid.html file in your server root folder. Open this HTML file as http://localhost/layout_grid.html the output is displayed as shown below. This code provides different types of grid types to place the content as per the user need. Print Page Previous Next Advertisements ”;

Framework7 – Overlays

Framework7 – Overlays ”; Previous Next Description Framework7 provides different types of overlays to work with the applications smoothly. The following table lists some of the Framework7 overlays − S.No Overlay Type & Description 1 Modal Modal is a small window that display the content from separate sources without leaving the parent window. 2 Popup Popup is a popup box which displays the content when the user clicks on the element. 3 Popover To manage the presentation of temporary content, the popover component can be used. 4 Action Sheet The Action Sheet is used to present the user with a set of possibilities for how to handle a given task. 5 Login Screen Overlay login screen is used for displaying the login screen format which can be used in page or popup or as a standalone overlay. 6 Picker Modal Picker modal is used to pick some custom content which is similar to the calender picker. Print Page Previous Next Advertisements ”;