├── README.md ├── webapp-t7p-rest-auth-2 ├── README.md ├── contacts.html ├── css │ ├── framework7.css │ ├── framework7.min.css │ ├── framework7.rtl.css │ ├── framework7.rtl.min.css │ ├── framework7.themes.css │ ├── framework7.themes.min.css │ └── my-app.css ├── img │ ├── bg.jpg │ ├── i-f7.png │ ├── i-form-calendar.png │ ├── i-form-comment.png │ ├── i-form-email.png │ ├── i-form-gender.png │ ├── i-form-name.png │ ├── i-form-password.png │ ├── i-form-settings.png │ ├── i-form-tel.png │ ├── i-form-toggle.png │ ├── i-form-url.png │ ├── icon-114.png │ ├── icon-120.png │ ├── icon-144.png │ ├── icon-152.png │ ├── icon-57.png │ ├── icon-72.png │ └── icon-76.png ├── index.html ├── jade │ ├── car.jade │ ├── cars.jade │ ├── contacts.jade │ ├── index.jade │ └── projects.jade ├── js │ ├── framework7.debug.js │ ├── framework7.js │ ├── framework7.js.map │ ├── framework7.min.js │ ├── framework7.min.js.map │ ├── my-app.js │ └── template7-helpers.js ├── less │ └── my-app.less ├── manifest.php ├── post.html └── posts.html ├── webapp-t7p-rest-auth ├── README.md ├── contacts.html ├── css │ ├── framework7.css │ ├── framework7.min.css │ ├── framework7.rtl.css │ ├── framework7.rtl.min.css │ ├── framework7.themes.css │ ├── framework7.themes.min.css │ └── my-app.css ├── img │ ├── bg.jpg │ ├── i-f7.png │ ├── i-form-calendar.png │ ├── i-form-comment.png │ ├── i-form-email.png │ ├── i-form-gender.png │ ├── i-form-name.png │ ├── i-form-password.png │ ├── i-form-settings.png │ ├── i-form-tel.png │ ├── i-form-toggle.png │ ├── i-form-url.png │ ├── icon-114.png │ ├── icon-120.png │ ├── icon-144.png │ ├── icon-152.png │ ├── icon-57.png │ ├── icon-72.png │ └── icon-76.png ├── index.html ├── jade │ ├── car.jade │ ├── cars.jade │ ├── contacts.jade │ ├── index.jade │ └── projects.jade ├── js │ ├── framework7.debug.js │ ├── framework7.js │ ├── framework7.js.map │ ├── framework7.min.js │ ├── framework7.min.js.map │ ├── my-app.js │ └── template7-helpers.js ├── less │ └── my-app.less ├── manifest.php ├── post.html └── posts.html ├── webapp-t7p-rest-v2 ├── contacts.html ├── css │ ├── framework7.css │ ├── framework7.min.css │ ├── framework7.rtl.css │ ├── framework7.rtl.min.css │ ├── framework7.themes.css │ ├── framework7.themes.min.css │ └── my-app.css ├── img │ ├── bg.jpg │ ├── i-f7-ios.png │ ├── i-f7.png │ ├── i-form-calendar.png │ ├── i-form-comment.png │ ├── i-form-email.png │ ├── i-form-gender.png │ ├── i-form-name.png │ ├── i-form-password.png │ ├── i-form-settings.png │ ├── i-form-tel.png │ ├── i-form-toggle.png │ ├── i-form-url.png │ ├── icon-114.png │ ├── icon-120.png │ ├── icon-144.png │ ├── icon-152.png │ ├── icon-57.png │ ├── icon-72.png │ └── icon-76.png ├── index.html ├── jade │ ├── car.jade │ ├── cars.jade │ ├── contacts.jade │ ├── index.jade │ └── projects.jade ├── js │ ├── framework7.debug.js │ ├── framework7.js │ ├── framework7.js.map │ ├── framework7.min.js │ ├── framework7.min.js.map │ ├── my-app.js │ └── template7-helpers.js ├── less │ └── my-app.less ├── manifest.php ├── post.html └── posts.html ├── webapp-t7p-rest-v3 ├── contacts.html ├── css │ ├── framework7.ios.colors.css │ ├── framework7.ios.colors.min.css │ ├── framework7.ios.css │ ├── framework7.ios.min.css │ ├── framework7.ios.rtl.css │ ├── framework7.ios.rtl.min.css │ ├── framework7.material.colors.css │ ├── framework7.material.colors.min.css │ ├── framework7.material.css │ ├── framework7.material.min.css │ ├── framework7.material.rtl.css │ ├── framework7.material.rtl.min.css │ └── my-app.css ├── img │ ├── bg.jpg │ ├── i-f7-ios.png │ ├── i-f7-material.png │ ├── i-f7.png │ ├── i-form-calendar-ios.svg │ ├── i-form-calendar-material.svg │ ├── i-form-calendar.png │ ├── i-form-comment-ios.svg │ ├── i-form-comment-material.svg │ ├── i-form-comment.png │ ├── i-form-email-ios.svg │ ├── i-form-email-material.svg │ ├── i-form-email.png │ ├── i-form-gender-ios.svg │ ├── i-form-gender-material.svg │ ├── i-form-gender.png │ ├── i-form-name-ios.svg │ ├── i-form-name-material.svg │ ├── i-form-name.png │ ├── i-form-password-ios.svg │ ├── i-form-password-material.svg │ ├── i-form-password.png │ ├── i-form-settings-ios.svg │ ├── i-form-settings-material.svg │ ├── i-form-settings.png │ ├── i-form-tel-ios.svg │ ├── i-form-tel-material.svg │ ├── i-form-tel.png │ ├── i-form-toggle-ios.svg │ ├── i-form-toggle-material.svg │ ├── i-form-toggle.png │ ├── i-form-url-ios.svg │ ├── i-form-url-material.svg │ ├── i-form-url.png │ ├── icon-114.png │ ├── icon-120.png │ ├── icon-144.png │ ├── icon-152.png │ ├── icon-57.png │ ├── icon-72.png │ └── icon-76.png ├── index.html ├── jade │ ├── car.jade │ ├── cars.jade │ ├── contacts.jade │ ├── index.jade │ └── projects.jade ├── js │ ├── framework7.debug.js │ ├── framework7.js │ ├── framework7.js.map │ ├── framework7.min.js │ ├── framework7.min.js.map │ ├── my-app.js │ ├── my-app.js 2.zip │ ├── my-app.js.zip │ └── template7-helpers.js ├── less │ └── my-app.less ├── manifest.php ├── post.html └── posts.html ├── webapp-t7p-rest ├── README.md ├── contacts.html ├── css │ ├── framework7.css │ ├── framework7.min.css │ ├── framework7.rtl.css │ ├── framework7.rtl.min.css │ ├── framework7.themes.css │ ├── framework7.themes.min.css │ └── my-app.css ├── img │ ├── bg.jpg │ ├── i-f7.png │ ├── i-form-calendar.png │ ├── i-form-comment.png │ ├── i-form-email.png │ ├── i-form-gender.png │ ├── i-form-name.png │ ├── i-form-password.png │ ├── i-form-settings.png │ ├── i-form-tel.png │ ├── i-form-toggle.png │ ├── i-form-url.png │ ├── icon-114.png │ ├── icon-120.png │ ├── icon-144.png │ ├── icon-152.png │ ├── icon-57.png │ ├── icon-72.png │ └── icon-76.png ├── index.html ├── jade │ ├── car.jade │ ├── cars.jade │ ├── contacts.jade │ ├── index.jade │ └── projects.jade ├── js │ ├── framework7.debug.js │ ├── framework7.js │ ├── framework7.js.map │ ├── framework7.min.js │ ├── framework7.min.js.map │ ├── my-app.js │ └── template7-helpers.js ├── less │ └── my-app.less ├── manifest.php ├── post.html └── posts.html ├── webapp-t7p4wp ├── README.md ├── contacts.html ├── css │ ├── framework7.css │ ├── framework7.min.css │ ├── framework7.rtl.css │ ├── framework7.rtl.min.css │ ├── framework7.themes.css │ ├── framework7.themes.min.css │ └── my-app.css ├── img │ ├── bg.jpg │ ├── i-f7.png │ ├── i-form-calendar.png │ ├── i-form-comment.png │ ├── i-form-email.png │ ├── i-form-gender.png │ ├── i-form-name.png │ ├── i-form-password.png │ ├── i-form-settings.png │ ├── i-form-tel.png │ ├── i-form-toggle.png │ ├── i-form-url.png │ ├── icon-114.png │ ├── icon-120.png │ ├── icon-144.png │ ├── icon-152.png │ ├── icon-57.png │ ├── icon-72.png │ └── icon-76.png ├── index.html ├── jade │ ├── car.jade │ ├── cars.jade │ ├── contacts.jade │ ├── index.jade │ └── projects.jade ├── js │ ├── framework7.debug.js │ ├── framework7.js │ ├── framework7.js.map │ ├── framework7.min.js │ ├── framework7.min.js.map │ ├── my-app.js │ └── template7-helpers.js ├── less │ └── my-app.less ├── manifest.php ├── post.html └── posts.html └── wp-plugins ├── xili-f7-basic-auth ├── README.md └── xili-f7-basic-auth.php ├── xili-json-api-addon └── xili-json-api-addon.php └── xili-rest-api-addon └── xili-rest-api-addon.php /README.md: -------------------------------------------------------------------------------- 1 | # framework7 2 | examples and tests with framework7 (from idangero.us) and WordPress and iOS context. 3 | 4 | 5 | ## New tests with F7 version 1.2.0 and for WP REST API 2.0-beta3 6 | 7 | (2015-08-28 - sub-folder /webapp-t7p-rest-v3) 8 | 9 | - Now use Framework v1.2.0 and css for iOS context (need another css for Android Material) 10 | 11 | - See previous version for WP REST API infos 12 | 13 | - Tests are also done (remote website) with a WP 4.2.4 multilingual with xili-language to create links between translation (helper) if both translations are in the REST response. 14 | 15 | ## With F7 version 1.0.7 and for WP REST API 2.0-beta3 16 | 17 | (2015-07-11 - folder webapp-t7p-rest-v2) 18 | 19 | - WP REST API 2.0 introduces very important changes in routes and WP_REST response needing changing way to request the remote WP. 20 | - examples of route/queries : 21 | - wp-json/wp/v2/posts?showposts=20 22 | - wp-json/wp/v2/posts?lang=fr_fr (with xili-language) 23 | - Some new helpers were created. 24 | - Because beta3, some collections in json response are faulty (_links). 25 | - The WP plugin (xili-rest-api-addon) modifies the response to include meta and taxonomies per post. 26 | - Tests are also done with a WP 4.2.2 multilingual with xili-language to create links between translation (helper) if both translation are in the REST response. 27 | 28 | ## With F7 version 1.0.5 29 | 30 | - first example (latest posts from a wp website) = in folder webapp-t7p4wp (see readme inside) 31 | - second example (latest posts from a wp website) = in folder webapp-t7p-rest (with recent JSON REST API 1.2.0) (see readme inside) 32 | - third example: same but with Basic Authentication - with F7 1.0.5 in folder webapp-t7p-rest-auth 33 | - fourth example: same but with Basic Authentication only for JSON - only works with Apache Server and WP - with F7 1.0.5 in folder webapp-t7p-rest-auth-2 34 | - wp plugins (to use to improve default json get from wp json plugin and provide Basic Auth for Json feed only) -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/README.md: -------------------------------------------------------------------------------- 1 | # framework7 2 | examples and tests with framework7 (from idangero.us) and WordPress 3 | 4 | ## 4 - Template7 Pages for WordPress and JSON REST API and Basic Authentication only for JSON feed 5 | 6 | This example is the result of tests to learn famous Framework7 with WordPress. 7 | This is based on examples available in http://www.idangero.us/framework7/examples/ 8 | This example is published to open discussion and improvements... 9 | 10 | Now, query and login/passwd are set via a popup form (a way to test F7 functions formFromJSON and formToJSON) 11 | 12 | ### Prerequisites 13 | 14 | A (local or not) WordPress website as json server (needs json plugin https://wordpress.org/plugins/json-rest-api/ version 1.2.1). 15 | This plugin is able to deliver json file that will be incorporated in latest posts page of webapp. 16 | To collect custom fields use plugin named xili-json-api-addon (in this same repository) 17 | 18 | URI must be adapted to your config in now via Settings popup form (today: works with Safari, Chrome, IOS Safari and IOS homescreen webapp "apple-mobile-web-app-capable" ) 19 | 20 | The webApp uses Framework7 v. 1.0.5 (March 28th, 2015) 21 | 22 | Tested also with an iPad Air retina (via browser or as webapp installed in iPad homepage) 23 | 24 | ### installation 25 | 26 | - install the folder in a (local) server (apache like MAMP) 27 | - modify the URI of the WP website to keep json (verify that the apache server is ready to deliver json for IP client - .htaccess) 28 | 29 | Example of .htaccess (modify paths) 30 | ``` 31 | Header set Access-Control-Allow-Origin "http://michel-i5-imac.local" 32 | Header set Access-Control-Allow-Credentials "true" 33 | Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" 34 | Header set Access-Control-Request-Method "GET, OPTIONS, POST" 35 | # Only if not OPTIONS 36 | 37 | AuthType Basic 38 | AuthName "Prototype F7 WP" 39 | AuthUserFile "/Applications/MAMP/htdocs/wp_svn41/.htpasswd" 40 | #require valid-user - not used in this v2 41 | 42 | 43 | # BEGIN WordPress 44 | 45 | RewriteEngine On 46 | RewriteBase /wp_svn41/ 47 | RewriteRule ^index\.php$ - [L] 48 | RewriteCond %{REQUEST_FILENAME} !-f 49 | RewriteCond %{REQUEST_FILENAME} !-d 50 | RewriteRule . /wp_svn41/index.php [L] 51 | 52 | 53 | # END WordPress 54 | ``` 55 | WP server must use plugin named "xili-f7-basic-auth" here in this gitHub 56 | 57 | ### Done 58 | 59 | - form to choose URI of WP server and all other login params 60 | - caching of Json Datas 61 | - insertion of thumbnail_images if available 62 | - better var 63 | - Basic Authentication step only for JSON feed 64 | 65 | ### Pending issues 66 | 67 | - full off line 68 | - doc 69 | 70 | ### Projects 71 | 72 | - more integration with WordPress themes 73 | - ... 74 | 75 | - french speaking references tips and tricks website 76 | 77 | michelwppi dev.xiligroup 2015-04-16 -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
10 |
11 |
12 |
13 |
14 |

You can contact me using your iPhone or using iPad by emailing at {{email}}

15 |

My address is {{city}}, {{country}}

16 |
17 |
18 |
19 |
20 |
-------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/css/my-app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/css/my-app.css -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/bg.jpg -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-f7.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-calendar.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-comment.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-email.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-gender.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-name.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-password.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-settings.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-tel.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-toggle.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/i-form-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/i-form-url.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-114.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-120.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-144.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-152.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-57.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-72.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/img/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth-2/img/icon-76.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/jade/car.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding {{vendor}} {{model}} 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="car") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | h3 {{vendor}} {{model}} 17 | ul 18 | li Power - {{power}} hp 19 | li Max speed - {{speed}} km/h 20 | li Weight - {{weight}} kg 21 | li Color - {{color}} 22 | li Year - {{year}} 23 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/jade/cars.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding My Cars 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="cars") 13 | .page-content 14 | .content-block-title My Cars 15 | .list-block 16 | ul 17 | | {{#each this}} 18 | li 19 | | 20 | |
21 | |
{{vendor}} {{model}}
22 | |
23 | |
24 | | {{/each}} 25 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/jade/contacts.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Contacts 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="contacts") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} 17 | p My address is {{street}}, {{city}}, {{country}}, {{zip}} 18 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype 2 | html 3 | head 4 | meta(charset="utf-8") 5 | meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") 6 | meta(name='apple-mobile-web-app-capable', content='yes') 7 | meta(name="apple-mobile-web-app-status-bar-style", content="black") 8 | title My App 9 | // Path to Framework7 Library CSS 10 | link(rel="stylesheet", href="../../dist/css/framework7.min.css") 11 | // Path to your custom app styles 12 | link(rel="stylesheet", href="css/my-app.css") 13 | body 14 | // Status bar overlay for fullscreen mode 15 | .statusbar-overlay 16 | 17 | // Panels overlay 18 | .panel-overlay 19 | // Left panel with reveal effect 20 | .panel.panel-left.panel-reveal 21 | .content-block 22 | p Left panel content goes here 23 | // Right panel with cover effect 24 | .panel.panel-right.panel-cover 25 | .content-block 26 | p Right panel content goes here 27 | 28 | // Views 29 | .views 30 | // Your main view, should have "view-main" class 31 | .view.view-main 32 | // Top Navbar 33 | .navbar 34 | .navbar-inner 35 | .center.sliding Template7 Pages 36 | .right 37 | a(href="#").link.icon-only.open-panel 38 | i.icon.icon-bars 39 | // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes 40 | .pages.navbar-through.toolbar-through 41 | // Index Page 42 | .page(data-page="index") 43 | .page-content 44 | .content-block-title Welcome To My Awesome App 45 | .content-block 46 | .content-block-inner 47 | p This app illustrates how you can use built-in template engine Template7 to render pages with required data. 48 | .list-block 49 | ul 50 | li 51 | a(href="#", data-template="about", date-contextName="about").item-link.item-content 52 | .item-inner 53 | .item-title About Me 54 | li 55 | a(href="projects.html").item-link.item-content 56 | .item-inner 57 | .item-title My Projects 58 | li 59 | a(href="cars.html", data-contextName="cars").item-link.item-content 60 | .item-inner 61 | .item-title My Cars 62 | li 63 | a(href="contacts.html").item-link.item-content 64 | .item-inner 65 | .item-title Contacts 66 | 67 | .content-block-title Side panels 68 | .content-block 69 | .row 70 | .col-50 71 | a(href="#", data-panel="left").button.open-panel Left Panel 72 | .col-50 73 | a(href="#", data-panel="right").button.open-panel Right Panel 74 | 75 | // Bottom Toolbar 76 | .toolbar 77 | .toolbar-inner 78 | a(href="#").link Link 1 79 | a(href="#").link Link 2 80 | 81 | // Template7 templates 82 | script(type="text/template7", id="about") 83 | .navbar 84 | .navbar-inner 85 | .left.sliding 86 | a(href="#").back.link 87 | i.icon.icon-back 88 | span Back 89 | .center.sliding About Me 90 | .right 91 | a(href="#").link.icon-only.open-panel 92 | i.icon.icon-bars 93 | .pages 94 | .page(data-page="about") 95 | .page-content 96 | .content-block 97 | .content-block-inner 98 | p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. 99 | p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} 100 | 101 | // Path to Framework7 Library JS 102 | script(type="text/javascript", src="../../dist/js/framework7.min.js") 103 | // Path to your app js 104 | script(type="text/javascript", src="js/my-app.js") 105 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/jade/projects.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Projects 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="projects") 13 | .page-content 14 | .content-block-title My Projects 15 | .list-block.media-list 16 | ul 17 | | {{#each projects}} 18 | li.item-content 19 | .item-inner 20 | .item-title-row 21 | .item-title {{title}} 22 | .item-subtitle {{description}} 23 | | {{/each}} 24 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/js/framework7.debug.js: -------------------------------------------------------------------------------- 1 | Framework7.prototype.plugins.debug = function (app, params) { 2 | // exit if not enabled 3 | if (!params) return; 4 | 5 | return { 6 | hooks: { 7 | appInit: function () { 8 | console.log ('appInit'); 9 | }, 10 | navbarInit: function (navbar, pageData) { 11 | console.log('navbarInit', navbar, pageData); 12 | }, 13 | pageInit: function (pageData) { 14 | console.log('pageInit', pageData); 15 | }, 16 | pageBeforeInit: function (pageData) { 17 | console.log('pageBeforeInit', pageData); 18 | }, 19 | pageBeforeAnimation: function (pageData) { 20 | console.log('pageBeforeAnimation', pageData); 21 | }, 22 | pageAfterAnimation: function (pageData) { 23 | console.log('pageAfterAnimation', pageData); 24 | }, 25 | pageBeforeRemove: function (pageData) { 26 | console.log('pageBeforeRemove', pageData); 27 | }, 28 | addView: function (view) { 29 | console.log('addView', view); 30 | }, 31 | loadPage: function (view, url, content) { 32 | console.log('loadPage', view, url, content); 33 | }, 34 | goBack: function (view, url, preloadOnly) { 35 | console.log('goBack', view, url, preloadOnly); 36 | }, 37 | swipePanelSetTransform: function (views, panel, percentage) { 38 | console.log('swipePanelSetTransform', views, panel, percentage); 39 | } 40 | } 41 | }; 42 | }; -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/js/template7-helpers.js: -------------------------------------------------------------------------------- 1 | // helpers for web-app 2 | // not in main file now (my-app.js) 3 | // 2015-03-17 4 | 5 | /* two helpers "if_filled_object" & "joinindex" used in post.html 6 |
  • {{#if_filled_object categories}}Categories: {{joinindex categories delimeter=" | " indexname="title"}}{{else}}Uncategorized yet...{{/if_filled_object}}
  • 7 | */ 8 | 9 | Template7.registerHelper('joinindex', function (arr, options) { 10 | // First we need to check is the passed arr argument is function 11 | if (typeof arr === 'function') arr = arr.call(this); 12 | 13 | arrmapped = arr.map(function(a){return a[options.hash.indexname]}); 14 | /* 15 | Passed delimeter is in the options.hash object: 16 | console.log(options.hash) -> {delimeter: ', '} 17 | */ 18 | //console.log(options.hash); 19 | // And return joined array 20 | return arrmapped.join(options.hash.delimeter); 21 | }); 22 | 23 | Template7.registerHelper('if_filled_object', function (condition, options) { 24 | // "this" in function context is equal to the expression execution context 25 | // "condition" argument contains passed context/condition 26 | /* 27 | @options contains object with the wollowing properties and methods: 28 | "hash" - contains passed hash object with parameters 29 | "fn" - method to pass helper block content further to compilier 30 | "inverse" - method to pass helper block inverse ({{else}}) content further to compilier 31 | "data" - contains additional expression data, like @index for arrays or @key for object 32 | */ 33 | //console.log(options.data); 34 | // First we need to check is the passed context is function 35 | if (typeof condition === 'function') condition = condition.call(this); 36 | 37 | // If context condition - here json return an empty object named categories - the basic if dont test if empty 38 | if (typeof condition === 'object' && Object.keys(condition).length > 0 ) { 39 | // We need to pass block content further to compilier with the same context and the same data: 40 | return options.fn(this, options.data); 41 | } 42 | else { 43 | // We need to pass block inverse ({{else}}) content further to compilier with the same context and the same data: 44 | return options.inverse(this, options.data); 45 | } 46 | }); 47 | 48 | Template7.registerHelper('linkstopostinotherlang', function (custom_fields, options) { 49 | var arrindex = Template7.data.ID_to_index; 50 | //console.log(arrindex); 51 | //console.log(custom_fields); 52 | var languages = [ {'slug':'fr_fr', 'name':'french'}, {'slug':'en_us', 'name':'english'}, {'slug':'de_de', 'name':'german'}]; 53 | var tag_before = ( typeof(options.hash.before) == 'undefined' ) ? '
  • ' : options.hash.before; 54 | var tag_after = ( typeof(options.hash.after) == 'undefined' ) ? '
  • ' : options.hash.after; 55 | var link_title = ( typeof(options.hash.link_title) == 'undefined' ) ? 'Same in' : options.hash.link_title; 56 | var output = ''; 57 | 58 | if ( Object.keys(custom_fields).length > 0 ) { 59 | $$.each(custom_fields, function(key, one_field) { 60 | $$.each(languages, function( keyl, lang) { 61 | if ( typeof(arrindex[one_field[0]])!='undefined' && key == 'lang-'+lang['slug']) { 62 | var index = arrindex[one_field[0]]; 63 | output += tag_before + ''+link_title+' '+lang['name']+''+tag_after; 64 | } 65 | }); 66 | }); 67 | } 68 | return output; 69 | }); 70 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/less/my-app.less: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | 3 | /* Tab bar icons */ 4 | i.tabbar-demo-icon-1 { 5 | width: 30px; 6 | height: 30px; 7 | background-image: url("data:image/svg+xml;charset=utf-8,"); 8 | .active & { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | } 12 | i.tabbar-demo-icon-2 { 13 | width: 25px; 14 | height: 30px; 15 | background-image: url("data:image/svg+xml;charset=utf-8,"); 16 | .active & { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | } 20 | i.tabbar-demo-icon-3 { 21 | width: 30px; 22 | height: 30px; 23 | background-image: url("data:image/svg+xml;charset=utf-8,"); 24 | .active & { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | } 28 | i.tabbar-demo-icon-4 { 29 | width: 25px; 30 | height: 30px; 31 | background-image: url("data:image/svg+xml;charset=utf-8,"); 32 | .active & { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | } -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/manifest.php: -------------------------------------------------------------------------------- 1 | 16 | CACHE MANIFEST 17 | 18 | CACHE: 19 | 27 | 28 | NETWORK: 29 | * 30 | 31 | # Hash Version: -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/post.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{title}}

    15 |

    {{#if thumbnail_images}}{{/if}}

    16 |

    {{content}}

    17 |
      18 |
    • Date: {{modified}}
    • 19 |
    • Author: {{author['name']}}
    • 20 |
    • {{#if_filled_object terms.category}}Categories: {{joinindex terms.category delimeter=" | " indexname="name"}}{{else}}Uncategorized yet...{{/if_filled_object}}
    • 21 |
    • {{#if_filled_object terms.post_tag}}Tags: {{joinindex terms.post_tag delimeter=" | " indexname="name"}}{{else}}No tag yet...{{/if_filled_object}}
    • 22 |
    • {{#if_filled_object terms.language}}Language: {{joinindex terms.language delimeter=" | " indexname="description"}}{{else}}Undefined...{{/if_filled_object}}
    • 23 | {{linkstopostinotherlang custom_fields link_title="This post in"}} 24 |
    25 |
    26 |
    27 |
    28 |
    29 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-auth-2/posts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    Latest Posts {{url_query.deversion}}
    13 |
    14 | 23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/README.md: -------------------------------------------------------------------------------- 1 | # framework7 2 | examples and tests with framework7 (from idangero.us) and WordPress 3 | 4 | ## 2 - Template7 Pages for WordPress and JSON REST API and Basic Authentication 5 | 6 | This example is the result of tests to learn famous Framework7 with WordPress. 7 | This is based on examples available in http://www.idangero.us/framework7/examples/ 8 | This example is published to open discussion and improvements... 9 | 10 | ### Prerequisites 11 | 12 | A (local or not) WordPress website as json server (needs json plugin https://wordpress.org/plugins/json-rest-api/ version 1.2.0). 13 | This plugin is able to deliver json file that will be incorporated in latest posts page of webapp. 14 | To collect custom fields use plugin named xili-json-api-addon (in this same repository) 15 | 16 | URI must be adapted to your config in now via Settings popup form, Authentication Password is in my-app.js (today: works with Safari, Chrome, IOS Safari and IOS homescreen webapp "apple-mobile-web-app-capable" ) 17 | 18 | The webApp uses Framework7 v. 1.0.5 (March 28th, 2015) 19 | 20 | Tested also with an iPad Air retina (via browser or as webapp installed in iPad homepage) 21 | 22 | ### installation 23 | 24 | - install the folder in a (local) server 25 | - modify the URI of the WP website to keep json (verify that the apache server is ready to deliver json for IP client - .htaccess) 26 | 27 | Example of .htaccess (modify paths) 28 | ``` 29 | Header set Access-Control-Allow-Origin "http://michel-i5-imac.local" 30 | Header set Access-Control-Allow-Credentials "true" 31 | Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" 32 | Header set Access-Control-Request-Method "GET, OPTIONS, POST" 33 | # Only if not OPTIONS 34 | 35 | AuthType Basic 36 | AuthName "Prototype F7 WP" 37 | AuthUserFile "/Applications/MAMP/htdocs/wp_svn41/.htpasswd" 38 | require valid-user 39 | 40 | 41 | # BEGIN WordPress 42 | 43 | RewriteEngine On 44 | RewriteBase /wp_svn41/ 45 | RewriteRule ^index\.php$ - [L] 46 | RewriteCond %{REQUEST_FILENAME} !-f 47 | RewriteCond %{REQUEST_FILENAME} !-d 48 | RewriteRule . /wp_svn41/index.php [L] 49 | 50 | 51 | # END WordPress 52 | ``` 53 | WP server must use plugin named JSON Basic Authentication (same login/passwd in htpasswd and in WP user) 54 | 55 | ### Done 56 | 57 | - form to choose URI of WP server 58 | - caching of Json Datas 59 | - insertion of thumbnail_images if available 60 | - better var 61 | - Basic Authentication step ! 62 | 63 | ### Pending issues 64 | 65 | - full off line 66 | - doc 67 | 68 | ### Projects 69 | 70 | - more integration with WordPress themes 71 | - ... 72 | 73 | - french speaking references tips and tricks website 74 | 75 | michelwppi dev.xiligroup 2015-04-10 -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    You can contact me using your iPhone or using iPad by emailing at {{email}}

    15 |

    My address is {{city}}, {{country}}

    16 |
    17 |
    18 |
    19 |
    20 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/css/my-app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/css/my-app.css -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/bg.jpg -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-f7.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-calendar.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-comment.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-email.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-gender.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-name.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-password.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-settings.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-tel.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-toggle.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/i-form-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/i-form-url.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-114.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-120.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-144.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-152.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-57.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-72.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/img/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-auth/img/icon-76.png -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/jade/car.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding {{vendor}} {{model}} 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="car") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | h3 {{vendor}} {{model}} 17 | ul 18 | li Power - {{power}} hp 19 | li Max speed - {{speed}} km/h 20 | li Weight - {{weight}} kg 21 | li Color - {{color}} 22 | li Year - {{year}} 23 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/jade/cars.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding My Cars 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="cars") 13 | .page-content 14 | .content-block-title My Cars 15 | .list-block 16 | ul 17 | | {{#each this}} 18 | li 19 | | 20 | |
    21 | |
    {{vendor}} {{model}}
    22 | |
    23 | |
    24 | | {{/each}} 25 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/jade/contacts.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Contacts 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="contacts") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} 17 | p My address is {{street}}, {{city}}, {{country}}, {{zip}} 18 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype 2 | html 3 | head 4 | meta(charset="utf-8") 5 | meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") 6 | meta(name='apple-mobile-web-app-capable', content='yes') 7 | meta(name="apple-mobile-web-app-status-bar-style", content="black") 8 | title My App 9 | // Path to Framework7 Library CSS 10 | link(rel="stylesheet", href="../../dist/css/framework7.min.css") 11 | // Path to your custom app styles 12 | link(rel="stylesheet", href="css/my-app.css") 13 | body 14 | // Status bar overlay for fullscreen mode 15 | .statusbar-overlay 16 | 17 | // Panels overlay 18 | .panel-overlay 19 | // Left panel with reveal effect 20 | .panel.panel-left.panel-reveal 21 | .content-block 22 | p Left panel content goes here 23 | // Right panel with cover effect 24 | .panel.panel-right.panel-cover 25 | .content-block 26 | p Right panel content goes here 27 | 28 | // Views 29 | .views 30 | // Your main view, should have "view-main" class 31 | .view.view-main 32 | // Top Navbar 33 | .navbar 34 | .navbar-inner 35 | .center.sliding Template7 Pages 36 | .right 37 | a(href="#").link.icon-only.open-panel 38 | i.icon.icon-bars 39 | // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes 40 | .pages.navbar-through.toolbar-through 41 | // Index Page 42 | .page(data-page="index") 43 | .page-content 44 | .content-block-title Welcome To My Awesome App 45 | .content-block 46 | .content-block-inner 47 | p This app illustrates how you can use built-in template engine Template7 to render pages with required data. 48 | .list-block 49 | ul 50 | li 51 | a(href="#", data-template="about", date-contextName="about").item-link.item-content 52 | .item-inner 53 | .item-title About Me 54 | li 55 | a(href="projects.html").item-link.item-content 56 | .item-inner 57 | .item-title My Projects 58 | li 59 | a(href="cars.html", data-contextName="cars").item-link.item-content 60 | .item-inner 61 | .item-title My Cars 62 | li 63 | a(href="contacts.html").item-link.item-content 64 | .item-inner 65 | .item-title Contacts 66 | 67 | .content-block-title Side panels 68 | .content-block 69 | .row 70 | .col-50 71 | a(href="#", data-panel="left").button.open-panel Left Panel 72 | .col-50 73 | a(href="#", data-panel="right").button.open-panel Right Panel 74 | 75 | // Bottom Toolbar 76 | .toolbar 77 | .toolbar-inner 78 | a(href="#").link Link 1 79 | a(href="#").link Link 2 80 | 81 | // Template7 templates 82 | script(type="text/template7", id="about") 83 | .navbar 84 | .navbar-inner 85 | .left.sliding 86 | a(href="#").back.link 87 | i.icon.icon-back 88 | span Back 89 | .center.sliding About Me 90 | .right 91 | a(href="#").link.icon-only.open-panel 92 | i.icon.icon-bars 93 | .pages 94 | .page(data-page="about") 95 | .page-content 96 | .content-block 97 | .content-block-inner 98 | p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. 99 | p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} 100 | 101 | // Path to Framework7 Library JS 102 | script(type="text/javascript", src="../../dist/js/framework7.min.js") 103 | // Path to your app js 104 | script(type="text/javascript", src="js/my-app.js") 105 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/jade/projects.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Projects 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="projects") 13 | .page-content 14 | .content-block-title My Projects 15 | .list-block.media-list 16 | ul 17 | | {{#each projects}} 18 | li.item-content 19 | .item-inner 20 | .item-title-row 21 | .item-title {{title}} 22 | .item-subtitle {{description}} 23 | | {{/each}} 24 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/js/framework7.debug.js: -------------------------------------------------------------------------------- 1 | Framework7.prototype.plugins.debug = function (app, params) { 2 | // exit if not enabled 3 | if (!params) return; 4 | 5 | return { 6 | hooks: { 7 | appInit: function () { 8 | console.log ('appInit'); 9 | }, 10 | navbarInit: function (navbar, pageData) { 11 | console.log('navbarInit', navbar, pageData); 12 | }, 13 | pageInit: function (pageData) { 14 | console.log('pageInit', pageData); 15 | }, 16 | pageBeforeInit: function (pageData) { 17 | console.log('pageBeforeInit', pageData); 18 | }, 19 | pageBeforeAnimation: function (pageData) { 20 | console.log('pageBeforeAnimation', pageData); 21 | }, 22 | pageAfterAnimation: function (pageData) { 23 | console.log('pageAfterAnimation', pageData); 24 | }, 25 | pageBeforeRemove: function (pageData) { 26 | console.log('pageBeforeRemove', pageData); 27 | }, 28 | addView: function (view) { 29 | console.log('addView', view); 30 | }, 31 | loadPage: function (view, url, content) { 32 | console.log('loadPage', view, url, content); 33 | }, 34 | goBack: function (view, url, preloadOnly) { 35 | console.log('goBack', view, url, preloadOnly); 36 | }, 37 | swipePanelSetTransform: function (views, panel, percentage) { 38 | console.log('swipePanelSetTransform', views, panel, percentage); 39 | } 40 | } 41 | }; 42 | }; -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/js/template7-helpers.js: -------------------------------------------------------------------------------- 1 | // helpers for web-app 2 | // not in main file now (my-app.js) 3 | // 2015-03-17 4 | 5 | /* two helpers "if_filled_object" & "joinindex" used in post.html 6 |
  • {{#if_filled_object categories}}Categories: {{joinindex categories delimeter=" | " indexname="title"}}{{else}}Uncategorized yet...{{/if_filled_object}}
  • 7 | */ 8 | 9 | Template7.registerHelper('joinindex', function (arr, options) { 10 | // First we need to check is the passed arr argument is function 11 | if (typeof arr === 'function') arr = arr.call(this); 12 | 13 | arrmapped = arr.map(function(a){return a[options.hash.indexname]}); 14 | /* 15 | Passed delimeter is in the options.hash object: 16 | console.log(options.hash) -> {delimeter: ', '} 17 | */ 18 | //console.log(options.hash); 19 | // And return joined array 20 | return arrmapped.join(options.hash.delimeter); 21 | }); 22 | 23 | Template7.registerHelper('if_filled_object', function (condition, options) { 24 | // "this" in function context is equal to the expression execution context 25 | // "condition" argument contains passed context/condition 26 | /* 27 | @options contains object with the wollowing properties and methods: 28 | "hash" - contains passed hash object with parameters 29 | "fn" - method to pass helper block content further to compilier 30 | "inverse" - method to pass helper block inverse ({{else}}) content further to compilier 31 | "data" - contains additional expression data, like @index for arrays or @key for object 32 | */ 33 | //console.log(options.data); 34 | // First we need to check is the passed context is function 35 | if (typeof condition === 'function') condition = condition.call(this); 36 | 37 | // If context condition - here json return an empty object named categories - the basic if dont test if empty 38 | if (typeof condition === 'object' && Object.keys(condition).length > 0 ) { 39 | // We need to pass block content further to compilier with the same context and the same data: 40 | return options.fn(this, options.data); 41 | } 42 | else { 43 | // We need to pass block inverse ({{else}}) content further to compilier with the same context and the same data: 44 | return options.inverse(this, options.data); 45 | } 46 | }); 47 | 48 | Template7.registerHelper('linkstopostinotherlang', function (custom_fields, options) { 49 | var arrindex = Template7.data.ID_to_index; 50 | //console.log(arrindex); 51 | //console.log(custom_fields); 52 | var languages = [ {'slug':'fr_fr', 'name':'french'}, {'slug':'en_us', 'name':'english'}, {'slug':'de_de', 'name':'german'}]; 53 | var tag_before = ( typeof(options.hash.before) == 'undefined' ) ? '
  • ' : options.hash.before; 54 | var tag_after = ( typeof(options.hash.after) == 'undefined' ) ? '
  • ' : options.hash.after; 55 | var link_title = ( typeof(options.hash.link_title) == 'undefined' ) ? 'Same in' : options.hash.link_title; 56 | var output = ''; 57 | 58 | if ( Object.keys(custom_fields).length > 0 ) { 59 | $$.each(custom_fields, function(key, one_field) { 60 | $$.each(languages, function( keyl, lang) { 61 | if ( typeof(arrindex[one_field[0]])!='undefined' && key == 'lang-'+lang['slug']) { 62 | var index = arrindex[one_field[0]]; 63 | output += tag_before + ''+link_title+' '+lang['name']+''+tag_after; 64 | } 65 | }); 66 | }); 67 | } 68 | return output; 69 | }); 70 | -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/less/my-app.less: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | 3 | /* Tab bar icons */ 4 | i.tabbar-demo-icon-1 { 5 | width: 30px; 6 | height: 30px; 7 | background-image: url("data:image/svg+xml;charset=utf-8,"); 8 | .active & { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | } 12 | i.tabbar-demo-icon-2 { 13 | width: 25px; 14 | height: 30px; 15 | background-image: url("data:image/svg+xml;charset=utf-8,"); 16 | .active & { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | } 20 | i.tabbar-demo-icon-3 { 21 | width: 30px; 22 | height: 30px; 23 | background-image: url("data:image/svg+xml;charset=utf-8,"); 24 | .active & { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | } 28 | i.tabbar-demo-icon-4 { 29 | width: 25px; 30 | height: 30px; 31 | background-image: url("data:image/svg+xml;charset=utf-8,"); 32 | .active & { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | } -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/manifest.php: -------------------------------------------------------------------------------- 1 | 16 | CACHE MANIFEST 17 | 18 | CACHE: 19 | 27 | 28 | NETWORK: 29 | * 30 | 31 | # Hash Version: -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/post.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{title}}

    15 |

    {{#if thumbnail_images}}{{/if}}

    16 |

    {{content}}

    17 |
      18 |
    • Date: {{modified}}
    • 19 |
    • Author: {{author['name']}}
    • 20 |
    • {{#if_filled_object terms.category}}Categories: {{joinindex terms.category delimeter=" | " indexname="name"}}{{else}}Uncategorized yet...{{/if_filled_object}}
    • 21 |
    • {{#if_filled_object terms.post_tag}}Tags: {{joinindex terms.post_tag delimeter=" | " indexname="name"}}{{else}}No tag yet...{{/if_filled_object}}
    • 22 |
    • {{#if_filled_object terms.language}}Language: {{joinindex terms.language delimeter=" | " indexname="description"}}{{else}}Undefined...{{/if_filled_object}}
    • 23 | {{linkstopostinotherlang custom_fields link_title="This post in"}} 24 |
    25 |
    26 |
    27 |
    28 |
    29 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-auth/posts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    Latest Posts {{url_query.deversion}}
    13 |
    14 | 23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    You can contact me using your iPhone or using iPad by emailing at {{email}}

    15 |

    My address is {{city}}, {{country}}

    16 |
    17 |
    18 |
    19 |
    20 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/css/my-app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/css/my-app.css -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/bg.jpg -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-f7-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-f7-ios.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-f7.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-calendar.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-comment.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-email.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-gender.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-name.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-password.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-settings.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-tel.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-toggle.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/i-form-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/i-form-url.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-114.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-120.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-144.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-152.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-57.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-72.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/img/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v2/img/icon-76.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/jade/car.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding {{vendor}} {{model}} 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="car") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | h3 {{vendor}} {{model}} 17 | ul 18 | li Power - {{power}} hp 19 | li Max speed - {{speed}} km/h 20 | li Weight - {{weight}} kg 21 | li Color - {{color}} 22 | li Year - {{year}} 23 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/jade/cars.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding My Cars 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="cars") 13 | .page-content 14 | .content-block-title My Cars 15 | .list-block 16 | ul 17 | | {{#each this}} 18 | li 19 | | 20 | |
    21 | |
    {{vendor}} {{model}}
    22 | |
    23 | |
    24 | | {{/each}} 25 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/jade/contacts.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Contacts 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="contacts") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} 17 | p My address is {{street}}, {{city}}, {{country}}, {{zip}} 18 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype 2 | html 3 | head 4 | meta(charset="utf-8") 5 | meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") 6 | meta(name='apple-mobile-web-app-capable', content='yes') 7 | meta(name="apple-mobile-web-app-status-bar-style", content="black") 8 | title My App 9 | // Path to Framework7 Library CSS 10 | link(rel="stylesheet", href="../../dist/css/framework7.min.css") 11 | // Path to your custom app styles 12 | link(rel="stylesheet", href="css/my-app.css") 13 | body 14 | // Status bar overlay for fullscreen mode 15 | .statusbar-overlay 16 | 17 | // Panels overlay 18 | .panel-overlay 19 | // Left panel with reveal effect 20 | .panel.panel-left.panel-reveal 21 | .content-block 22 | p Left panel content goes here 23 | // Right panel with cover effect 24 | .panel.panel-right.panel-cover 25 | .content-block 26 | p Right panel content goes here 27 | 28 | // Views 29 | .views 30 | // Your main view, should have "view-main" class 31 | .view.view-main 32 | // Top Navbar 33 | .navbar 34 | .navbar-inner 35 | .center.sliding Template7 Pages 36 | .right 37 | a(href="#").link.icon-only.open-panel 38 | i.icon.icon-bars 39 | // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes 40 | .pages.navbar-through.toolbar-through 41 | // Index Page 42 | .page(data-page="index") 43 | .page-content 44 | .content-block-title Welcome To My Awesome App 45 | .content-block 46 | .content-block-inner 47 | p This app illustrates how you can use built-in template engine Template7 to render pages with required data. 48 | .list-block 49 | ul 50 | li 51 | a(href="#", data-template="about", date-contextName="about").item-link.item-content 52 | .item-inner 53 | .item-title About Me 54 | li 55 | a(href="projects.html").item-link.item-content 56 | .item-inner 57 | .item-title My Projects 58 | li 59 | a(href="cars.html", data-contextName="cars").item-link.item-content 60 | .item-inner 61 | .item-title My Cars 62 | li 63 | a(href="contacts.html").item-link.item-content 64 | .item-inner 65 | .item-title Contacts 66 | 67 | .content-block-title Side panels 68 | .content-block 69 | .row 70 | .col-50 71 | a(href="#", data-panel="left").button.open-panel Left Panel 72 | .col-50 73 | a(href="#", data-panel="right").button.open-panel Right Panel 74 | 75 | // Bottom Toolbar 76 | .toolbar 77 | .toolbar-inner 78 | a(href="#").link Link 1 79 | a(href="#").link Link 2 80 | 81 | // Template7 templates 82 | script(type="text/template7", id="about") 83 | .navbar 84 | .navbar-inner 85 | .left.sliding 86 | a(href="#").back.link 87 | i.icon.icon-back 88 | span Back 89 | .center.sliding About Me 90 | .right 91 | a(href="#").link.icon-only.open-panel 92 | i.icon.icon-bars 93 | .pages 94 | .page(data-page="about") 95 | .page-content 96 | .content-block 97 | .content-block-inner 98 | p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. 99 | p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} 100 | 101 | // Path to Framework7 Library JS 102 | script(type="text/javascript", src="../../dist/js/framework7.min.js") 103 | // Path to your app js 104 | script(type="text/javascript", src="js/my-app.js") 105 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/jade/projects.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Projects 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="projects") 13 | .page-content 14 | .content-block-title My Projects 15 | .list-block.media-list 16 | ul 17 | | {{#each projects}} 18 | li.item-content 19 | .item-inner 20 | .item-title-row 21 | .item-title {{title}} 22 | .item-subtitle {{description}} 23 | | {{/each}} 24 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/js/framework7.debug.js: -------------------------------------------------------------------------------- 1 | Framework7.prototype.plugins.debug = function (app, params) { 2 | // exit if not enabled 3 | if (!params) return; 4 | 5 | return { 6 | hooks: { 7 | appInit: function () { 8 | console.log ('appInit'); 9 | }, 10 | navbarInit: function (navbar, pageData) { 11 | console.log('navbarInit', navbar, pageData); 12 | }, 13 | pageInit: function (pageData) { 14 | console.log('pageInit', pageData); 15 | }, 16 | pageBeforeInit: function (pageData) { 17 | console.log('pageBeforeInit', pageData); 18 | }, 19 | pageBeforeAnimation: function (pageData) { 20 | console.log('pageBeforeAnimation', pageData); 21 | }, 22 | pageAfterAnimation: function (pageData) { 23 | console.log('pageAfterAnimation', pageData); 24 | }, 25 | pageBeforeRemove: function (pageData) { 26 | console.log('pageBeforeRemove', pageData); 27 | }, 28 | addView: function (view) { 29 | console.log('addView', view); 30 | }, 31 | loadPage: function (view, url, content) { 32 | console.log('loadPage', view, url, content); 33 | }, 34 | goBack: function (view, url, preloadOnly) { 35 | console.log('goBack', view, url, preloadOnly); 36 | }, 37 | swipePanelSetTransform: function (views, panel, percentage) { 38 | console.log('swipePanelSetTransform', views, panel, percentage); 39 | } 40 | } 41 | }; 42 | }; -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/js/template7-helpers.js: -------------------------------------------------------------------------------- 1 | // helpers for web-app 2 | // not in main file now (my-app.js) 3 | // 2015-03-17 4 | 5 | /* two helpers "if_filled_object" & "joinindex" used in post.html 6 |
  • {{#if_filled_object categories}}Categories: {{joinindex categories delimeter=" | " indexname="title"}}{{else}}Uncategorized yet...{{/if_filled_object}}
  • 7 | */ 8 | // var termarray = "version-history"; 9 | var termseries = "http://v2.wp-api.org/term"; 10 | 11 | 12 | Template7.registerHelper('joinindex', function (arr, options) { 13 | // First we need to check is the passed arr argument is function 14 | if (typeof arr === 'function') arr = arr.call(this); 15 | 16 | arrmapped = arr.map(function(a){return a[options.hash.indexname]}); 17 | /* 18 | Passed delimeter is in the options.hash object: 19 | console.log(options.hash) -> {delimeter: ', '} 20 | */ 21 | //console.log(options.hash); 22 | // And return joined array 23 | return arrmapped.join(options.hash.delimeter); 24 | }); 25 | 26 | Template7.registerHelper('termsarray', function ( arr, options) { 27 | var output = []; 28 | var thedelimiter = ( typeof(options.hash.delimiter) == 'undefined' ) ? ' | ' : options.hash.delimiter; 29 | //console.log('---- ' + JSON.stringify( arr[termseries] )); 30 | // console.log('---- ' + JSON.stringify( arr.self )); 31 | $$.each( arr[termseries], function(key, one_taxonomy) { 32 | output.push(one_taxonomy.taxonomy); 33 | }); 34 | 35 | return output.join( thedelimiter ); 36 | 37 | }); 38 | 39 | Template7.registerHelper('taxonomiesarray', function ( arr, options) { 40 | var output = ''; 41 | //console.log('---- ' + JSON.stringify( arr.self )); 42 | $$.each( arr[termseries], function(key, one_taxonomy) { 43 | if (one_taxonomy.taxonomy == options.hash.taxonomy ) { 44 | output = one_taxonomy.embeddable ; 45 | } 46 | }); 47 | return output; 48 | }); 49 | 50 | Template7.registerHelper('taxonomylist', function ( arr, options) { 51 | var output = ''; 52 | var listoutput = []; 53 | var thedelimiter = ( typeof(options.hash.delimiter) == 'undefined' ) ? ' | ' : options.hash.delimiter; 54 | var element = options.hash.taxonomy; 55 | //console.log(element + ' ---- ' + JSON.stringify( arr )); 56 | if ( arr[element] ) { 57 | $$.each( arr[element] , function(key, one_taxonomy) { 58 | if ( element == 'language') 59 | listoutput.push(one_taxonomy.description); 60 | else 61 | listoutput.push(one_taxonomy.name); 62 | }); 63 | output = listoutput.join( thedelimiter ); 64 | } 65 | return output; 66 | }); 67 | 68 | Template7.registerHelper('if_filled_object', function (condition, options) { 69 | // "this" in function context is equal to the expression execution context 70 | // "condition" argument contains passed context/condition 71 | /* 72 | @options contains object with the wollowing properties and methods: 73 | "hash" - contains passed hash object with parameters 74 | "fn" - method to pass helper block content further to compilier 75 | "inverse" - method to pass helper block inverse ({{else}}) content further to compilier 76 | "data" - contains additional expression data, like @index for arrays or @key for object 77 | */ 78 | //console.log(options.data); 79 | // First we need to check is the passed context is function 80 | if (typeof condition === 'function') condition = condition.call(this); 81 | 82 | // If context condition - here json return an empty object named categories - the basic if dont test if empty 83 | if (typeof condition === 'object' && Object.keys(condition).length > 0 ) { 84 | // We need to pass block content further to compilier with the same context and the same data: 85 | return options.fn(this, options.data); 86 | } 87 | if (typeof condition === 'array' && condition.length > 0 ) { 88 | // We need to pass block content further to compilier with the same context and the same data: 89 | return options.fn(this, options.data); 90 | } 91 | else { 92 | // We need to pass block inverse ({{else}}) content further to compilier with the same context and the same data: 93 | return options.inverse(this, options.data); 94 | } 95 | }); 96 | 97 | Template7.registerHelper('linkstopostinotherlang', function (custom_fields, options) { 98 | var arrindex = Template7.data.ID_to_index; 99 | console.log( JSON.stringify( arrindex) ); 100 | //console.log( '---> ' + JSON.stringify( custom_fields ) ); 101 | var languages = [ {'slug':'fr_fr', 'name':'french'}, {'slug':'en_us', 'name':'english'}, {'slug':'de_de', 'name':'german'}]; 102 | var tag_before = ( typeof(options.hash.before) == 'undefined' ) ? '
  • ' : options.hash.before; 103 | var tag_after = ( typeof(options.hash.after) == 'undefined' ) ? '
  • ' : options.hash.after; 104 | var link_title = ( typeof(options.hash.link_title) == 'undefined' ) ? 'Same in' : options.hash.link_title; 105 | var output = ''; 106 | 107 | if ( Object.keys(custom_fields).length > 0 ) { 108 | $$.each(custom_fields, function(key, one_field) { 109 | $$.each(languages, function( keyl, lang) { console.log(arrindex[one_field[0]]); 110 | if ( typeof(arrindex[one_field[0]])!='undefined' && key == 'lang-'+lang['slug']) { 111 | var index = arrindex[one_field[0]]; 112 | output += tag_before + ''+link_title+' '+lang['name']+''+tag_after; 113 | } 114 | }); 115 | }); 116 | } 117 | return output; 118 | }); 119 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/less/my-app.less: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | 3 | /* Tab bar icons */ 4 | i.tabbar-demo-icon-1 { 5 | width: 30px; 6 | height: 30px; 7 | background-image: url("data:image/svg+xml;charset=utf-8,"); 8 | .active & { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | } 12 | i.tabbar-demo-icon-2 { 13 | width: 25px; 14 | height: 30px; 15 | background-image: url("data:image/svg+xml;charset=utf-8,"); 16 | .active & { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | } 20 | i.tabbar-demo-icon-3 { 21 | width: 30px; 22 | height: 30px; 23 | background-image: url("data:image/svg+xml;charset=utf-8,"); 24 | .active & { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | } 28 | i.tabbar-demo-icon-4 { 29 | width: 25px; 30 | height: 30px; 31 | background-image: url("data:image/svg+xml;charset=utf-8,"); 32 | .active & { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | } -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/manifest.php: -------------------------------------------------------------------------------- 1 | 16 | CACHE MANIFEST 17 | 18 | CACHE: 19 | 27 | 28 | NETWORK: 29 | * 30 | 31 | # Hash Version: -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/post.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{title['rendered']}}

    15 |

    {{#if thumbnail_images}}{{/if}}

    16 |

    {{content['rendered']}}

    17 |
      18 |
    • Date: {{modified}}
    • 19 | 20 |
    • Author: {{author}}
    • 21 |
    • Taxonomies: {{termsarray this._links delimeter=", "}}
    • 22 |
    • Languages: {{taxonomylist this.selected_taxonomies delimeter=" | " taxonomy="language"}}
    • 23 |
    • Categories: {{taxonomylist this.selected_taxonomies delimeter=" | " taxonomy="category"}}
    • 24 |
    • Post tags: {{taxonomylist this.selected_taxonomies delimeter=", " taxonomy="post_tag"}}
    • 25 | {{linkstopostinotherlang this.custom_fields link_title="This post in"}} 26 |
    27 |
    28 |
    29 |
    30 |
    31 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-v2/posts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    Latest Posts {{url_query.deversion}}
    13 |
    14 | 23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    You can contact me using your iPhone or using iPad by emailing at {{email}}

    15 |

    My address is {{city}}, {{country}}

    16 |
    17 |
    18 |
    19 |
    20 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/css/my-app.css: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | /* Tab bar icons */ 3 | i.tabbar-demo-icon-1 { 4 | width: 30px; 5 | height: 30px; 6 | background-image: url("data:image/svg+xml;charset=utf-8,"); 7 | } 8 | .active i.tabbar-demo-icon-1 { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | i.tabbar-demo-icon-2 { 12 | width: 25px; 13 | height: 30px; 14 | background-image: url("data:image/svg+xml;charset=utf-8,"); 15 | } 16 | .active i.tabbar-demo-icon-2 { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | i.tabbar-demo-icon-3 { 20 | width: 30px; 21 | height: 30px; 22 | background-image: url("data:image/svg+xml;charset=utf-8,"); 23 | } 24 | .active i.tabbar-demo-icon-3 { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | i.tabbar-demo-icon-4 { 28 | width: 25px; 29 | height: 30px; 30 | background-image: url("data:image/svg+xml;charset=utf-8,"); 31 | } 32 | .active i.tabbar-demo-icon-4 { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/bg.jpg -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-f7-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-f7-ios.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-f7-material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-f7-material.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-f7.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-calendar-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-calendar-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-calendar.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-comment-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-comment-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-comment.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-email-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-email-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-email.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-gender-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-gender-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-gender.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-name-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-name-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-name.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-password-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-password-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-password.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-settings-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-settings-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-settings.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-tel-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-tel-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-tel.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-toggle-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-toggle-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-toggle.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-url-ios.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-url-material.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/i-form-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/i-form-url.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-114.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-120.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-144.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-152.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-57.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-72.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/img/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/img/icon-76.png -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/jade/car.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding {{vendor}} {{model}} 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="car") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | h3 {{vendor}} {{model}} 17 | ul 18 | li Power - {{power}} hp 19 | li Max speed - {{speed}} km/h 20 | li Weight - {{weight}} kg 21 | li Color - {{color}} 22 | li Year - {{year}} 23 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/jade/cars.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding My Cars 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="cars") 13 | .page-content 14 | .content-block-title My Cars 15 | .list-block 16 | ul 17 | | {{#each this}} 18 | li 19 | | 20 | |
    21 | |
    {{vendor}} {{model}}
    22 | |
    23 | |
    24 | | {{/each}} 25 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/jade/contacts.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Contacts 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="contacts") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} 17 | p My address is {{street}}, {{city}}, {{country}}, {{zip}} 18 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype 2 | html 3 | head 4 | meta(charset="utf-8") 5 | meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") 6 | meta(name='apple-mobile-web-app-capable', content='yes') 7 | meta(name="apple-mobile-web-app-status-bar-style", content="black") 8 | title My App 9 | // Path to Framework7 Library CSS 10 | link(rel="stylesheet", href="../../dist/css/framework7.min.css") 11 | // Path to your custom app styles 12 | link(rel="stylesheet", href="css/my-app.css") 13 | body 14 | // Status bar overlay for fullscreen mode 15 | .statusbar-overlay 16 | 17 | // Panels overlay 18 | .panel-overlay 19 | // Left panel with reveal effect 20 | .panel.panel-left.panel-reveal 21 | .content-block 22 | p Left panel content goes here 23 | // Right panel with cover effect 24 | .panel.panel-right.panel-cover 25 | .content-block 26 | p Right panel content goes here 27 | 28 | // Views 29 | .views 30 | // Your main view, should have "view-main" class 31 | .view.view-main 32 | // Top Navbar 33 | .navbar 34 | .navbar-inner 35 | .center.sliding Template7 Pages 36 | .right 37 | a(href="#").link.icon-only.open-panel 38 | i.icon.icon-bars 39 | // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes 40 | .pages.navbar-through.toolbar-through 41 | // Index Page 42 | .page(data-page="index") 43 | .page-content 44 | .content-block-title Welcome To My Awesome App 45 | .content-block 46 | .content-block-inner 47 | p This app illustrates how you can use built-in template engine Template7 to render pages with required data. 48 | .list-block 49 | ul 50 | li 51 | a(href="#", data-template="about", date-contextName="about").item-link.item-content 52 | .item-inner 53 | .item-title About Me 54 | li 55 | a(href="projects.html").item-link.item-content 56 | .item-inner 57 | .item-title My Projects 58 | li 59 | a(href="cars.html", data-contextName="cars").item-link.item-content 60 | .item-inner 61 | .item-title My Cars 62 | li 63 | a(href="contacts.html").item-link.item-content 64 | .item-inner 65 | .item-title Contacts 66 | 67 | .content-block-title Side panels 68 | .content-block 69 | .row 70 | .col-50 71 | a(href="#", data-panel="left").button.open-panel Left Panel 72 | .col-50 73 | a(href="#", data-panel="right").button.open-panel Right Panel 74 | 75 | // Bottom Toolbar 76 | .toolbar 77 | .toolbar-inner 78 | a(href="#").link Link 1 79 | a(href="#").link Link 2 80 | 81 | // Template7 templates 82 | script(type="text/template7", id="about") 83 | .navbar 84 | .navbar-inner 85 | .left.sliding 86 | a(href="#").back.link 87 | i.icon.icon-back 88 | span Back 89 | .center.sliding About Me 90 | .right 91 | a(href="#").link.icon-only.open-panel 92 | i.icon.icon-bars 93 | .pages 94 | .page(data-page="about") 95 | .page-content 96 | .content-block 97 | .content-block-inner 98 | p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. 99 | p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} 100 | 101 | // Path to Framework7 Library JS 102 | script(type="text/javascript", src="../../dist/js/framework7.min.js") 103 | // Path to your app js 104 | script(type="text/javascript", src="js/my-app.js") 105 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/jade/projects.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Projects 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="projects") 13 | .page-content 14 | .content-block-title My Projects 15 | .list-block.media-list 16 | ul 17 | | {{#each projects}} 18 | li.item-content 19 | .item-inner 20 | .item-title-row 21 | .item-title {{title}} 22 | .item-subtitle {{description}} 23 | | {{/each}} 24 | -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/js/framework7.debug.js: -------------------------------------------------------------------------------- 1 | Framework7.prototype.plugins.debug = function (app, params) { 2 | // exit if not enabled 3 | if (!params) return; 4 | 5 | return { 6 | hooks: { 7 | appInit: function () { 8 | console.log ('appInit'); 9 | }, 10 | navbarInit: function (navbar, pageData) { 11 | console.log('navbarInit', navbar, pageData); 12 | }, 13 | pageInit: function (pageData) { 14 | console.log('pageInit', pageData); 15 | }, 16 | pageBeforeInit: function (pageData) { 17 | console.log('pageBeforeInit', pageData); 18 | }, 19 | pageBeforeAnimation: function (pageData) { 20 | console.log('pageBeforeAnimation', pageData); 21 | }, 22 | pageAfterAnimation: function (pageData) { 23 | console.log('pageAfterAnimation', pageData); 24 | }, 25 | pageBeforeRemove: function (pageData) { 26 | console.log('pageBeforeRemove', pageData); 27 | }, 28 | addView: function (view) { 29 | console.log('addView', view); 30 | }, 31 | loadPage: function (view, url, content) { 32 | console.log('loadPage', view, url, content); 33 | }, 34 | goBack: function (view, url, preloadOnly) { 35 | console.log('goBack', view, url, preloadOnly); 36 | }, 37 | swipePanelSetTransform: function (views, panel, percentage) { 38 | console.log('swipePanelSetTransform', views, panel, percentage); 39 | } 40 | } 41 | }; 42 | }; -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/js/my-app.js 2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/js/my-app.js 2.zip -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/js/my-app.js.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest-v3/js/my-app.js.zip -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/less/my-app.less: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | 3 | /* Tab bar icons */ 4 | i.tabbar-demo-icon-1 { 5 | width: 30px; 6 | height: 30px; 7 | background-image: url("data:image/svg+xml;charset=utf-8,"); 8 | .active & { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | } 12 | i.tabbar-demo-icon-2 { 13 | width: 25px; 14 | height: 30px; 15 | background-image: url("data:image/svg+xml;charset=utf-8,"); 16 | .active & { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | } 20 | i.tabbar-demo-icon-3 { 21 | width: 30px; 22 | height: 30px; 23 | background-image: url("data:image/svg+xml;charset=utf-8,"); 24 | .active & { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | } 28 | i.tabbar-demo-icon-4 { 29 | width: 25px; 30 | height: 30px; 31 | background-image: url("data:image/svg+xml;charset=utf-8,"); 32 | .active & { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | } -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/manifest.php: -------------------------------------------------------------------------------- 1 | 16 | CACHE MANIFEST 17 | 18 | CACHE: 19 | 27 | 28 | NETWORK: 29 | * 30 | 31 | # Hash Version: -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/post.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{title['rendered']}}

    15 |

    {{#if thumbnail_images}}{{/if}}

    16 |

    {{content['rendered']}}

    17 |
      18 |
    • Date: {{modified}}
    • 19 | 20 |
    • Author: {{author}}
    • 21 |
    • Taxonomies: {{termsarray this._links delimeter=", "}}
    • 22 |
    • Languages: {{taxonomylist this.selected_taxonomies delimeter=" | " taxonomy="language"}}
    • 23 |
    • Categories: {{taxonomylist this.selected_taxonomies delimeter=" | " taxonomy="category"}}
    • 24 |
    • Post tags: {{taxonomylist this.selected_taxonomies delimeter=", " taxonomy="post_tag"}}
    • 25 | {{linkstopostinotherlang this.custom_fields link_title="This post in"}} 26 |
    27 |
    28 |
    29 |
    30 |
    31 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest-v3/posts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    Latest Posts {{url_query.deversion}}
    13 |
    14 | 23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest/README.md: -------------------------------------------------------------------------------- 1 | # framework7 2 | examples and tests with framework7 (from idangero.us) and WordPress 3 | 4 | ## 2 - Template7 Pages for WordPress and JSON REST API 5 | 6 | This example is the result of tests to learn famous Framework7 with WordPress. 7 | This is based on examples available in http://www.idangero.us/framework7/examples/ 8 | This example is published to open discussion and improvements... 9 | 10 | ### Prerequisites 11 | 12 | A (local or not) WordPress website as json server (needs json plugin https://wordpress.org/plugins/json-rest-api/ version 1.2.0). 13 | This plugin is able to deliver json file that will be incorporated in latest posts page of webapp. 14 | To collect custom fields use plugin named xili-json-api-addon (in this same repository) 15 | 16 | URI must be adapted to your config in function $$.getJSON of my-app.js - now via Settings popup form 17 | 18 | The webApp uses Framework7 v. 1.0.4 (March 21th, 2015) 19 | 20 | Tested also with an iPad Air retina (via browser or as webapp installed in iPad homepage) 21 | 22 | ### installation 23 | 24 | - install the folder in a (local) server 25 | - modify the URI of the WP website to keep json (verify that the apache server is ready to deliver json for IP client - .htaccess) 26 | 27 | ### Done 28 | 29 | - form to choose URI of WP server 30 | - caching of Json Datas 31 | - insertion of thumbnail_images if available 32 | - better var 33 | 34 | ### Pending issues 35 | 36 | - full off line 37 | - doc 38 | 39 | ### Projects 40 | 41 | - more integration with WordPress themes 42 | - ... 43 | 44 | - french speaking references tips and tricks website 45 | 46 | michelwppi dev.xiligroup 2015-03-27 -------------------------------------------------------------------------------- /webapp-t7p-rest/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    You can contact me using your iPhone or using iPad by emailing at {{email}}

    15 |

    My address is {{city}}, {{country}}

    16 |
    17 |
    18 |
    19 |
    20 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest/css/my-app.css: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | /* Tab bar icons */ 3 | i.tabbar-demo-icon-1 { 4 | width: 30px; 5 | height: 30px; 6 | background-image: url("data:image/svg+xml;charset=utf-8,"); 7 | } 8 | .active i.tabbar-demo-icon-1 { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | i.tabbar-demo-icon-2 { 12 | width: 25px; 13 | height: 30px; 14 | background-image: url("data:image/svg+xml;charset=utf-8,"); 15 | } 16 | .active i.tabbar-demo-icon-2 { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | i.tabbar-demo-icon-3 { 20 | width: 30px; 21 | height: 30px; 22 | background-image: url("data:image/svg+xml;charset=utf-8,"); 23 | } 24 | .active i.tabbar-demo-icon-3 { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | i.tabbar-demo-icon-4 { 28 | width: 25px; 29 | height: 30px; 30 | background-image: url("data:image/svg+xml;charset=utf-8,"); 31 | } 32 | .active i.tabbar-demo-icon-4 { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | -------------------------------------------------------------------------------- /webapp-t7p-rest/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/bg.jpg -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-f7.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-calendar.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-comment.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-email.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-gender.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-name.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-password.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-settings.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-tel.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-toggle.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/i-form-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/i-form-url.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-114.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-120.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-144.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-152.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-57.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-72.png -------------------------------------------------------------------------------- /webapp-t7p-rest/img/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p-rest/img/icon-76.png -------------------------------------------------------------------------------- /webapp-t7p-rest/jade/car.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding {{vendor}} {{model}} 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="car") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | h3 {{vendor}} {{model}} 17 | ul 18 | li Power - {{power}} hp 19 | li Max speed - {{speed}} km/h 20 | li Weight - {{weight}} kg 21 | li Color - {{color}} 22 | li Year - {{year}} 23 | -------------------------------------------------------------------------------- /webapp-t7p-rest/jade/cars.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding My Cars 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="cars") 13 | .page-content 14 | .content-block-title My Cars 15 | .list-block 16 | ul 17 | | {{#each this}} 18 | li 19 | | 20 | |
    21 | |
    {{vendor}} {{model}}
    22 | |
    23 | |
    24 | | {{/each}} 25 | -------------------------------------------------------------------------------- /webapp-t7p-rest/jade/contacts.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Contacts 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="contacts") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} 17 | p My address is {{street}}, {{city}}, {{country}}, {{zip}} 18 | -------------------------------------------------------------------------------- /webapp-t7p-rest/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype 2 | html 3 | head 4 | meta(charset="utf-8") 5 | meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") 6 | meta(name='apple-mobile-web-app-capable', content='yes') 7 | meta(name="apple-mobile-web-app-status-bar-style", content="black") 8 | title My App 9 | // Path to Framework7 Library CSS 10 | link(rel="stylesheet", href="../../dist/css/framework7.min.css") 11 | // Path to your custom app styles 12 | link(rel="stylesheet", href="css/my-app.css") 13 | body 14 | // Status bar overlay for fullscreen mode 15 | .statusbar-overlay 16 | 17 | // Panels overlay 18 | .panel-overlay 19 | // Left panel with reveal effect 20 | .panel.panel-left.panel-reveal 21 | .content-block 22 | p Left panel content goes here 23 | // Right panel with cover effect 24 | .panel.panel-right.panel-cover 25 | .content-block 26 | p Right panel content goes here 27 | 28 | // Views 29 | .views 30 | // Your main view, should have "view-main" class 31 | .view.view-main 32 | // Top Navbar 33 | .navbar 34 | .navbar-inner 35 | .center.sliding Template7 Pages 36 | .right 37 | a(href="#").link.icon-only.open-panel 38 | i.icon.icon-bars 39 | // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes 40 | .pages.navbar-through.toolbar-through 41 | // Index Page 42 | .page(data-page="index") 43 | .page-content 44 | .content-block-title Welcome To My Awesome App 45 | .content-block 46 | .content-block-inner 47 | p This app illustrates how you can use built-in template engine Template7 to render pages with required data. 48 | .list-block 49 | ul 50 | li 51 | a(href="#", data-template="about", date-contextName="about").item-link.item-content 52 | .item-inner 53 | .item-title About Me 54 | li 55 | a(href="projects.html").item-link.item-content 56 | .item-inner 57 | .item-title My Projects 58 | li 59 | a(href="cars.html", data-contextName="cars").item-link.item-content 60 | .item-inner 61 | .item-title My Cars 62 | li 63 | a(href="contacts.html").item-link.item-content 64 | .item-inner 65 | .item-title Contacts 66 | 67 | .content-block-title Side panels 68 | .content-block 69 | .row 70 | .col-50 71 | a(href="#", data-panel="left").button.open-panel Left Panel 72 | .col-50 73 | a(href="#", data-panel="right").button.open-panel Right Panel 74 | 75 | // Bottom Toolbar 76 | .toolbar 77 | .toolbar-inner 78 | a(href="#").link Link 1 79 | a(href="#").link Link 2 80 | 81 | // Template7 templates 82 | script(type="text/template7", id="about") 83 | .navbar 84 | .navbar-inner 85 | .left.sliding 86 | a(href="#").back.link 87 | i.icon.icon-back 88 | span Back 89 | .center.sliding About Me 90 | .right 91 | a(href="#").link.icon-only.open-panel 92 | i.icon.icon-bars 93 | .pages 94 | .page(data-page="about") 95 | .page-content 96 | .content-block 97 | .content-block-inner 98 | p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. 99 | p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} 100 | 101 | // Path to Framework7 Library JS 102 | script(type="text/javascript", src="../../dist/js/framework7.min.js") 103 | // Path to your app js 104 | script(type="text/javascript", src="js/my-app.js") 105 | -------------------------------------------------------------------------------- /webapp-t7p-rest/jade/projects.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Projects 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="projects") 13 | .page-content 14 | .content-block-title My Projects 15 | .list-block.media-list 16 | ul 17 | | {{#each projects}} 18 | li.item-content 19 | .item-inner 20 | .item-title-row 21 | .item-title {{title}} 22 | .item-subtitle {{description}} 23 | | {{/each}} 24 | -------------------------------------------------------------------------------- /webapp-t7p-rest/js/framework7.debug.js: -------------------------------------------------------------------------------- 1 | Framework7.prototype.plugins.debug = function (app, params) { 2 | // exit if not enabled 3 | if (!params) return; 4 | 5 | return { 6 | hooks: { 7 | appInit: function () { 8 | console.log ('appInit'); 9 | }, 10 | navbarInit: function (navbar, pageData) { 11 | console.log('navbarInit', navbar, pageData); 12 | }, 13 | pageInit: function (pageData) { 14 | console.log('pageInit', pageData); 15 | }, 16 | pageBeforeInit: function (pageData) { 17 | console.log('pageBeforeInit', pageData); 18 | }, 19 | pageBeforeAnimation: function (pageData) { 20 | console.log('pageBeforeAnimation', pageData); 21 | }, 22 | pageAfterAnimation: function (pageData) { 23 | console.log('pageAfterAnimation', pageData); 24 | }, 25 | pageBeforeRemove: function (pageData) { 26 | console.log('pageBeforeRemove', pageData); 27 | }, 28 | addView: function (view) { 29 | console.log('addView', view); 30 | }, 31 | loadPage: function (view, url, content) { 32 | console.log('loadPage', view, url, content); 33 | }, 34 | goBack: function (view, url, preloadOnly) { 35 | console.log('goBack', view, url, preloadOnly); 36 | }, 37 | swipePanelSetTransform: function (views, panel, percentage) { 38 | console.log('swipePanelSetTransform', views, panel, percentage); 39 | } 40 | } 41 | }; 42 | }; -------------------------------------------------------------------------------- /webapp-t7p-rest/js/template7-helpers.js: -------------------------------------------------------------------------------- 1 | // helpers for web-app 2 | // not in main file now (my-app.js) 3 | // 2015-03-17 4 | 5 | /* two helpers "if_filled_object" & "joinindex" used in post.html 6 |
  • {{#if_filled_object categories}}Categories: {{joinindex categories delimeter=" | " indexname="title"}}{{else}}Uncategorized yet...{{/if_filled_object}}
  • 7 | */ 8 | 9 | Template7.registerHelper('joinindex', function (arr, options) { 10 | // First we need to check is the passed arr argument is function 11 | if (typeof arr === 'function') arr = arr.call(this); 12 | 13 | arrmapped = arr.map(function(a){return a[options.hash.indexname]}); 14 | /* 15 | Passed delimeter is in the options.hash object: 16 | console.log(options.hash) -> {delimeter: ', '} 17 | */ 18 | //console.log(options.hash); 19 | // And return joined array 20 | return arrmapped.join(options.hash.delimeter); 21 | }); 22 | 23 | Template7.registerHelper('if_filled_object', function (condition, options) { 24 | // "this" in function context is equal to the expression execution context 25 | // "condition" argument contains passed context/condition 26 | /* 27 | @options contains object with the wollowing properties and methods: 28 | "hash" - contains passed hash object with parameters 29 | "fn" - method to pass helper block content further to compilier 30 | "inverse" - method to pass helper block inverse ({{else}}) content further to compilier 31 | "data" - contains additional expression data, like @index for arrays or @key for object 32 | */ 33 | //console.log(options.data); 34 | // First we need to check is the passed context is function 35 | if (typeof condition === 'function') condition = condition.call(this); 36 | 37 | // If context condition - here json return an empty object named categories - the basic if dont test if empty 38 | if (typeof condition === 'object' && Object.keys(condition).length > 0 ) { 39 | // We need to pass block content further to compilier with the same context and the same data: 40 | return options.fn(this, options.data); 41 | } 42 | else { 43 | // We need to pass block inverse ({{else}}) content further to compilier with the same context and the same data: 44 | return options.inverse(this, options.data); 45 | } 46 | }); 47 | 48 | Template7.registerHelper('linkstopostinotherlang', function (custom_fields, options) { 49 | var arrindex = Template7.data.ID_to_index; 50 | //console.log(arrindex); 51 | //console.log(custom_fields); 52 | var languages = [ {'slug':'fr_fr', 'name':'french'}, {'slug':'en_us', 'name':'english'}, {'slug':'de_de', 'name':'german'}]; 53 | var tag_before = ( typeof(options.hash.before) == 'undefined' ) ? '
  • ' : options.hash.before; 54 | var tag_after = ( typeof(options.hash.after) == 'undefined' ) ? '
  • ' : options.hash.after; 55 | var link_title = ( typeof(options.hash.link_title) == 'undefined' ) ? 'Same in' : options.hash.link_title; 56 | var output = ''; 57 | 58 | if ( Object.keys(custom_fields).length > 0 ) { 59 | $$.each(custom_fields, function(key, one_field) { 60 | $$.each(languages, function( keyl, lang) { 61 | if ( key == 'lang-'+lang['slug']) { 62 | var index = arrindex[one_field[0]]; 63 | output += tag_before + ''+link_title+' '+lang['name']+''+tag_after; 64 | } 65 | }); 66 | }); 67 | } 68 | return output; 69 | }); 70 | -------------------------------------------------------------------------------- /webapp-t7p-rest/less/my-app.less: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | 3 | /* Tab bar icons */ 4 | i.tabbar-demo-icon-1 { 5 | width: 30px; 6 | height: 30px; 7 | background-image: url("data:image/svg+xml;charset=utf-8,"); 8 | .active & { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | } 12 | i.tabbar-demo-icon-2 { 13 | width: 25px; 14 | height: 30px; 15 | background-image: url("data:image/svg+xml;charset=utf-8,"); 16 | .active & { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | } 20 | i.tabbar-demo-icon-3 { 21 | width: 30px; 22 | height: 30px; 23 | background-image: url("data:image/svg+xml;charset=utf-8,"); 24 | .active & { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | } 28 | i.tabbar-demo-icon-4 { 29 | width: 25px; 30 | height: 30px; 31 | background-image: url("data:image/svg+xml;charset=utf-8,"); 32 | .active & { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | } -------------------------------------------------------------------------------- /webapp-t7p-rest/manifest.php: -------------------------------------------------------------------------------- 1 | 16 | CACHE MANIFEST 17 | 18 | CACHE: 19 | 27 | 28 | NETWORK: 29 | * 30 | 31 | # Hash Version: -------------------------------------------------------------------------------- /webapp-t7p-rest/post.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{title}}

    15 |

    {{#if thumbnail_images}}{{/if}}

    16 |

    {{content}}

    17 |
      18 |
    • Date: {{modified}}
    • 19 |
    • Author: {{author['name']}}
    • 20 |
    • {{#if_filled_object terms.category}}Categories: {{joinindex terms.category delimeter=" | " indexname="name"}}{{else}}Uncategorized yet...{{/if_filled_object}}
    • 21 |
    • {{#if_filled_object terms.post_tag}}Tags: {{joinindex terms.post_tag delimeter=" | " indexname="name"}}{{else}}No tag yet...{{/if_filled_object}}
    • 22 |
    • {{#if_filled_object terms.language}}Language: {{joinindex terms.language delimeter=" | " indexname="description"}}{{else}}Undefined...{{/if_filled_object}}
    • 23 | {{linkstopostinotherlang custom_fields link_title="This post in"}} 24 |
    25 |
    26 |
    27 |
    28 |
    29 |
    -------------------------------------------------------------------------------- /webapp-t7p-rest/posts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    Latest Posts {{url_query.deversion}}
    13 |
    14 | 23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /webapp-t7p4wp/README.md: -------------------------------------------------------------------------------- 1 | # framework7 2 | examples and tests with framework7 (from idangero.us) and WordPress 3 | 4 | ## 1 - Template7 Pages for WordPress 5 | 6 | This example is the result of tests to learn famous Framework7 with WordPress. 7 | This is based on examples available in http://www.idangero.us/framework7/examples/ 8 | This example is published to open discussion and improvements... 9 | 10 | ### Prerequisites 11 | 12 | A (local or not) WordPress website as json server (needs json plugin https://wordpress.org/plugins/json-api/ ). 13 | This plugin is able to deliver json file that will be incorporated in latest posts page of webapp. 14 | 15 | URI must be adapted to your config in function $$.getJSON of my-app.js - now via Settings popup form 16 | 17 | The webApp uses Framework7 v. 1.0.4 (updated March 22th, 2015) 18 | 19 | Tested also with an iPad Air retina (via browser or as webapp installed in iPad homepage) 20 | 21 | ### installation 22 | 23 | - install the folder in a (local) server 24 | - modify the URI of the WP website to keep json (verify that the apache server is ready to deliver json for IP client - .htaccess) 25 | 26 | ### Done 27 | 28 | - form to choose URI of WP server 29 | - caching of Json Datas 30 | - insertion of thumbnail_images if available 31 | - better var 32 | 33 | ### Pending issues 34 | 35 | - X refreshing excepted:'? with post.html ever in cache if home iOS webApp' 36 | - X caching (partially) 37 | - abstraction layer between json and f7 datas (to merge the both examples) 38 | - full off line 39 | - doc 40 | 41 | ### Projects 42 | 43 | - more integration with WordPress themes 44 | - ... 45 | 46 | - french speaking references tips and tricks website 47 | 48 | michelwppi dev.xiligroup 2015-03-27 -------------------------------------------------------------------------------- /webapp-t7p4wp/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    You can contact me using your iPhone or using iPad by emailing at {{email}}

    15 |

    My address is {{city}}, {{country}}

    16 |
    17 |
    18 |
    19 |
    20 |
    -------------------------------------------------------------------------------- /webapp-t7p4wp/css/my-app.css: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | /* Tab bar icons */ 3 | i.tabbar-demo-icon-1 { 4 | width: 30px; 5 | height: 30px; 6 | background-image: url("data:image/svg+xml;charset=utf-8,"); 7 | } 8 | .active i.tabbar-demo-icon-1 { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | i.tabbar-demo-icon-2 { 12 | width: 25px; 13 | height: 30px; 14 | background-image: url("data:image/svg+xml;charset=utf-8,"); 15 | } 16 | .active i.tabbar-demo-icon-2 { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | i.tabbar-demo-icon-3 { 20 | width: 30px; 21 | height: 30px; 22 | background-image: url("data:image/svg+xml;charset=utf-8,"); 23 | } 24 | .active i.tabbar-demo-icon-3 { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | i.tabbar-demo-icon-4 { 28 | width: 25px; 29 | height: 30px; 30 | background-image: url("data:image/svg+xml;charset=utf-8,"); 31 | } 32 | .active i.tabbar-demo-icon-4 { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | -------------------------------------------------------------------------------- /webapp-t7p4wp/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/bg.jpg -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-f7.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-calendar.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-comment.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-email.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-gender.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-name.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-password.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-settings.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-tel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-tel.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-toggle.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/i-form-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/i-form-url.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-114.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-120.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-144.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-152.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-57.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-72.png -------------------------------------------------------------------------------- /webapp-t7p4wp/img/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-xiligroup/framework7/b7ba70576b4e0320bf10f07292aa1e5721adc038/webapp-t7p4wp/img/icon-76.png -------------------------------------------------------------------------------- /webapp-t7p4wp/jade/car.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding {{vendor}} {{model}} 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="car") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | h3 {{vendor}} {{model}} 17 | ul 18 | li Power - {{power}} hp 19 | li Max speed - {{speed}} km/h 20 | li Weight - {{weight}} kg 21 | li Color - {{color}} 22 | li Year - {{year}} 23 | -------------------------------------------------------------------------------- /webapp-t7p4wp/jade/cars.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding My Cars 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="cars") 13 | .page-content 14 | .content-block-title My Cars 15 | .list-block 16 | ul 17 | | {{#each this}} 18 | li 19 | | 20 | |
    21 | |
    {{vendor}} {{model}}
    22 | |
    23 | |
    24 | | {{/each}} 25 | -------------------------------------------------------------------------------- /webapp-t7p4wp/jade/contacts.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Contacts 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="contacts") 13 | .page-content 14 | .content-block 15 | .content-block-inner 16 | p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} 17 | p My address is {{street}}, {{city}}, {{country}}, {{zip}} 18 | -------------------------------------------------------------------------------- /webapp-t7p4wp/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype 2 | html 3 | head 4 | meta(charset="utf-8") 5 | meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") 6 | meta(name='apple-mobile-web-app-capable', content='yes') 7 | meta(name="apple-mobile-web-app-status-bar-style", content="black") 8 | title My App 9 | // Path to Framework7 Library CSS 10 | link(rel="stylesheet", href="../../dist/css/framework7.min.css") 11 | // Path to your custom app styles 12 | link(rel="stylesheet", href="css/my-app.css") 13 | body 14 | // Status bar overlay for fullscreen mode 15 | .statusbar-overlay 16 | 17 | // Panels overlay 18 | .panel-overlay 19 | // Left panel with reveal effect 20 | .panel.panel-left.panel-reveal 21 | .content-block 22 | p Left panel content goes here 23 | // Right panel with cover effect 24 | .panel.panel-right.panel-cover 25 | .content-block 26 | p Right panel content goes here 27 | 28 | // Views 29 | .views 30 | // Your main view, should have "view-main" class 31 | .view.view-main 32 | // Top Navbar 33 | .navbar 34 | .navbar-inner 35 | .center.sliding Template7 Pages 36 | .right 37 | a(href="#").link.icon-only.open-panel 38 | i.icon.icon-bars 39 | // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes 40 | .pages.navbar-through.toolbar-through 41 | // Index Page 42 | .page(data-page="index") 43 | .page-content 44 | .content-block-title Welcome To My Awesome App 45 | .content-block 46 | .content-block-inner 47 | p This app illustrates how you can use built-in template engine Template7 to render pages with required data. 48 | .list-block 49 | ul 50 | li 51 | a(href="#", data-template="about", date-contextName="about").item-link.item-content 52 | .item-inner 53 | .item-title About Me 54 | li 55 | a(href="projects.html").item-link.item-content 56 | .item-inner 57 | .item-title My Projects 58 | li 59 | a(href="cars.html", data-contextName="cars").item-link.item-content 60 | .item-inner 61 | .item-title My Cars 62 | li 63 | a(href="contacts.html").item-link.item-content 64 | .item-inner 65 | .item-title Contacts 66 | 67 | .content-block-title Side panels 68 | .content-block 69 | .row 70 | .col-50 71 | a(href="#", data-panel="left").button.open-panel Left Panel 72 | .col-50 73 | a(href="#", data-panel="right").button.open-panel Right Panel 74 | 75 | // Bottom Toolbar 76 | .toolbar 77 | .toolbar-inner 78 | a(href="#").link Link 1 79 | a(href="#").link Link 2 80 | 81 | // Template7 templates 82 | script(type="text/template7", id="about") 83 | .navbar 84 | .navbar-inner 85 | .left.sliding 86 | a(href="#").back.link 87 | i.icon.icon-back 88 | span Back 89 | .center.sliding About Me 90 | .right 91 | a(href="#").link.icon-only.open-panel 92 | i.icon.icon-bars 93 | .pages 94 | .page(data-page="about") 95 | .page-content 96 | .content-block 97 | .content-block-inner 98 | p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. 99 | p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} 100 | 101 | // Path to Framework7 Library JS 102 | script(type="text/javascript", src="../../dist/js/framework7.min.js") 103 | // Path to your app js 104 | script(type="text/javascript", src="js/my-app.js") 105 | -------------------------------------------------------------------------------- /webapp-t7p4wp/jade/projects.jade: -------------------------------------------------------------------------------- 1 | .navbar 2 | .navbar-inner 3 | .left.sliding 4 | a(href="#").back.link 5 | i.icon.icon-back 6 | span Back 7 | .center.sliding Projects 8 | .right 9 | a(href="#").link.icon-only.open-panel 10 | i.icon.icon-bars 11 | .pages 12 | .page(data-page="projects") 13 | .page-content 14 | .content-block-title My Projects 15 | .list-block.media-list 16 | ul 17 | | {{#each projects}} 18 | li.item-content 19 | .item-inner 20 | .item-title-row 21 | .item-title {{title}} 22 | .item-subtitle {{description}} 23 | | {{/each}} 24 | -------------------------------------------------------------------------------- /webapp-t7p4wp/js/framework7.debug.js: -------------------------------------------------------------------------------- 1 | Framework7.prototype.plugins.debug = function (app, params) { 2 | // exit if not enabled 3 | if (!params) return; 4 | 5 | return { 6 | hooks: { 7 | appInit: function () { 8 | console.log ('appInit'); 9 | }, 10 | navbarInit: function (navbar, pageData) { 11 | console.log('navbarInit', navbar, pageData); 12 | }, 13 | pageInit: function (pageData) { 14 | console.log('pageInit', pageData); 15 | }, 16 | pageBeforeInit: function (pageData) { 17 | console.log('pageBeforeInit', pageData); 18 | }, 19 | pageBeforeAnimation: function (pageData) { 20 | console.log('pageBeforeAnimation', pageData); 21 | }, 22 | pageAfterAnimation: function (pageData) { 23 | console.log('pageAfterAnimation', pageData); 24 | }, 25 | pageBeforeRemove: function (pageData) { 26 | console.log('pageBeforeRemove', pageData); 27 | }, 28 | addView: function (view) { 29 | console.log('addView', view); 30 | }, 31 | loadPage: function (view, url, content) { 32 | console.log('loadPage', view, url, content); 33 | }, 34 | goBack: function (view, url, preloadOnly) { 35 | console.log('goBack', view, url, preloadOnly); 36 | }, 37 | swipePanelSetTransform: function (views, panel, percentage) { 38 | console.log('swipePanelSetTransform', views, panel, percentage); 39 | } 40 | } 41 | }; 42 | }; -------------------------------------------------------------------------------- /webapp-t7p4wp/js/template7-helpers.js: -------------------------------------------------------------------------------- 1 | // helpers for web-app 2 | // not in main file now (my-app.js) 3 | // 2015-03-17 4 | 5 | /* two helpers "if_filled_object" & "joinindex" used in post.html 6 |
  • {{#if_filled_object categories}}Categories: {{joinindex categories delimeter=" | " indexname="title"}}{{else}}Uncategorized yet...{{/if_filled_object}}
  • 7 | */ 8 | 9 | Template7.registerHelper('joinindex', function (arr, options) { 10 | // First we need to check is the passed arr argument is function 11 | if (typeof arr === 'function') arr = arr.call(this); 12 | 13 | arrmapped = arr.map(function(a){return a[options.hash.indexname]}); 14 | /* 15 | Passed delimeter is in the options.hash object: 16 | console.log(options.hash) -> {delimeter: ', '} 17 | */ 18 | //console.log(options.hash); 19 | // And return joined array 20 | return arrmapped.join(options.hash.delimeter); 21 | }); 22 | 23 | Template7.registerHelper('if_filled_object', function (condition, options) { 24 | // "this" in function context is equal to the expression execution context 25 | // "condition" argument contains passed context/condition 26 | /* 27 | @options contains object with the wollowing properties and methods: 28 | "hash" - contains passed hash object with parameters 29 | "fn" - method to pass helper block content further to compilier 30 | "inverse" - method to pass helper block inverse ({{else}}) content further to compilier 31 | "data" - contains additional expression data, like @index for arrays or @key for object 32 | */ 33 | //console.log(options.data); 34 | // First we need to check is the passed context is function 35 | if (typeof condition === 'function') condition = condition.call(this); 36 | 37 | // If context condition - here json return an empty object named categories - the basic if dont test if empty 38 | if (typeof condition === 'object' && Object.keys(condition).length > 0 ) { 39 | // We need to pass block content further to compilier with the same context and the same data: 40 | return options.fn(this, options.data); 41 | } 42 | else { 43 | // We need to pass block inverse ({{else}}) content further to compilier with the same context and the same data: 44 | return options.inverse(this, options.data); 45 | } 46 | }); 47 | 48 | Template7.registerHelper('linkstopostinotherlang', function (custom_fields, options) { 49 | var arrindex = Template7.data.ID_to_index; 50 | //console.log(arrindex); 51 | //console.log(custom_fields); 52 | var languages = [ {'slug':'fr_fr', 'name':'french'}, {'slug':'en_us', 'name':'english'}, {'slug':'de_de', 'name':'german'}]; 53 | var tag_before = ( typeof(options.hash.before) == 'undefined' ) ? '
  • ' : options.hash.before; 54 | var tag_after = ( typeof(options.hash.after) == 'undefined' ) ? '
  • ' : options.hash.after; 55 | var link_title = ( typeof(options.hash.link_title) == 'undefined' ) ? 'Same in' : options.hash.link_title; 56 | var output = ''; 57 | 58 | if ( Object.keys(custom_fields).length > 0 ) { 59 | $$.each(custom_fields, function(key, one_field) { 60 | $$.each(languages, function( keyl, lang) { 61 | if ( key == 'lang-'+lang['slug']) { 62 | var index = arrindex[one_field[0]]; 63 | output += tag_before + ''+link_title+' '+lang['name']+''+tag_after; 64 | } 65 | }); 66 | }); 67 | } 68 | return output; 69 | }); 70 | -------------------------------------------------------------------------------- /webapp-t7p4wp/less/my-app.less: -------------------------------------------------------------------------------- 1 | /* Your app custom files in this file */ 2 | 3 | /* Tab bar icons */ 4 | i.tabbar-demo-icon-1 { 5 | width: 30px; 6 | height: 30px; 7 | background-image: url("data:image/svg+xml;charset=utf-8,"); 8 | .active & { 9 | background-image: url("data:image/svg+xml;charset=utf-8,"); 10 | } 11 | } 12 | i.tabbar-demo-icon-2 { 13 | width: 25px; 14 | height: 30px; 15 | background-image: url("data:image/svg+xml;charset=utf-8,"); 16 | .active & { 17 | background-image: url("data:image/svg+xml;charset=utf-8,"); 18 | } 19 | } 20 | i.tabbar-demo-icon-3 { 21 | width: 30px; 22 | height: 30px; 23 | background-image: url("data:image/svg+xml;charset=utf-8,"); 24 | .active & { 25 | background-image: url("data:image/svg+xml;charset=utf-8,"); 26 | } 27 | } 28 | i.tabbar-demo-icon-4 { 29 | width: 25px; 30 | height: 30px; 31 | background-image: url("data:image/svg+xml;charset=utf-8,"); 32 | .active & { 33 | background-image: url("data:image/svg+xml;charset=utf-8,"); 34 | } 35 | } -------------------------------------------------------------------------------- /webapp-t7p4wp/manifest.php: -------------------------------------------------------------------------------- 1 | 16 | CACHE MANIFEST 17 | 18 | CACHE: 19 | 27 | 28 | NETWORK: 29 | * 30 | 31 | # Hash Version: -------------------------------------------------------------------------------- /webapp-t7p4wp/post.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    {{title}}

    15 |

    {{#if thumbnail_images}}{{/if}}

    16 |

    {{content}}

    17 |
      18 |
    • Date: {{modified}}
    • 19 |
    • Author: {{author['name']}}
    • 20 |
    • {{#if_filled_object categories}}Categories: {{joinindex categories delimeter=" | " indexname="title"}}{{else}}Uncategorized yet...{{/if_filled_object}}
    • 21 |
    • {{#if_filled_object tags}}Tags: {{joinindex tags delimeter=" | " indexname="title"}}{{else}}No tag yet...{{/if_filled_object}}
    • 22 |
    • {{#if_filled_object taxonomy_language}}Language: {{joinindex taxonomy_language delimeter=" | " indexname="description"}}{{else}}Undefined...{{/if_filled_object}}
    • 23 | {{linkstopostinotherlang custom_fields link_title="This post in"}} 24 |
    25 |
    26 |
    27 |
    28 |
    29 |
    -------------------------------------------------------------------------------- /webapp-t7p4wp/posts.html: -------------------------------------------------------------------------------- 1 | 2 | 9 |
    10 |
    11 |
    12 |
    Latest Posts {{url_query.deversion}}
    13 |
    14 | 23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /wp-plugins/xili-f7-basic-auth/README.md: -------------------------------------------------------------------------------- 1 | # Json Basic Authentication handler 2 | This plugin adds Basic Authentication to a WordPress site - only for the AJAX / JSON feed 3 | 4 | Inspired from this plugin : https://github.com/WP-API/Basic-Auth 5 | (need that all site was blocked by Basic Auth) 6 | 7 | Note that this plugin requires sending your username and password with every 8 | request, and should only be used for development and testing. We strongly 9 | recommend using the [OAuth 1.0a][oauth] authentication handler for production. 10 | 11 | ## Installing 12 | 1. Download the plugin into your plugins directory 13 | 2. Enable in the WordPress admin 14 | 15 | ## Prerequisite 16 | 17 | 1. A Apache server (to keep headers of request) 18 | 19 | ## Using 20 | 21 | See F7 example in this xili gitHub : https://github.com/dev-xiligroup/framework7 22 | 23 | 24 | ## Sources 25 | 26 | [oauth]: https://github.com/WP-API/OAuth1 27 | [RFC2617]: https://tools.ietf.org/html/rfc2617 28 | -------------------------------------------------------------------------------- /wp-plugins/xili-f7-basic-auth/xili-f7-basic-auth.php: -------------------------------------------------------------------------------- 1 | ID; 43 | 44 | } else { 45 | 46 | $json_error_obj = new WP_Error( 'json_encode_error', 'wp_json_basic_auth_error: header Authorization but no basic', array( 'status' => 500 ) ); 47 | $wp_json_basic_auth_error = $json_error_obj; 48 | return null; 49 | } 50 | } else { 51 | $json_error_obj = new WP_Error( 'json_encode_error', 'wp_json_basic_auth_error: no header Authorization', array( 'status' => 500 ) ); 52 | $wp_json_basic_auth_error = $json_error_obj; 53 | return null; 54 | } 55 | } 56 | add_filter( 'determine_current_user', 'json_basic_auth_handler', 20 ); 57 | 58 | 59 | function json_basic_auth_error( $error ) { 60 | // Passthrough other errors 61 | if ( ! empty( $error ) ) { 62 | return $error; 63 | } 64 | 65 | global $wp_json_basic_auth_error; 66 | return $wp_json_basic_auth_error; 67 | } 68 | add_filter( 'json_authentication_errors', 'json_basic_auth_error' ); 69 | -------------------------------------------------------------------------------- /wp-plugins/xili-json-api-addon/xili-json-api-addon.php: -------------------------------------------------------------------------------- 1 | get_post_custom( $post['ID']) ) ) ; 19 | $data['custom_fields'] = xili_get_post_custom( $post['ID']); // custom_fields like in previous json_api 20 | return $data; 21 | } 22 | // in class wp-json-posts.php 23 | add_filter('json_prepare_post', 'xili_rest_api_post_meta_add', 10, 3); 24 | 25 | /** 26 | * don't select _key (invisible $key) 27 | * 28 | */ 29 | function xili_get_post_custom ( $post_ID ) { 30 | $raw_customs = get_post_custom( $post_ID ); 31 | $customs = array(); 32 | if ( $raw_customs ) { 33 | foreach ($raw_customs as $key => $meta ) { 34 | if ( substr($key, 0, 1) != '_' ) { 35 | $customs[$key] = $meta; 36 | } 37 | } 38 | } 39 | return $customs; 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /wp-plugins/xili-rest-api-addon/xili-rest-api-addon.php: -------------------------------------------------------------------------------- 1 | get_post_custom( $post['ID']) ) ) ; 19 | 20 | $data->data['custom_fields'] = xili_get_post_custom( $post->ID); // custom_fields like in previous json_api 21 | 22 | $data->data['selected_taxonomies'] = xili_get_post_selected_taxonomies( $post->ID, array ('category', 'post_tag', 'language') ); 23 | 24 | return $data; 25 | } 26 | // in class WP_REST_Posts_Controller 27 | add_filter('rest_prepare_post', 'xili_rest_api_post_meta_add', 10, 3); 28 | 29 | 30 | /** 31 | * test if JSON REST QUERY and dont insert lang tag after root url (permalinks class ) in wp_json links 32 | * 33 | */ 34 | function xili_json_dont_insert_lang_tag_root ( $false, $url, $path, $orig_scheme, $blog_id ){ 35 | global $wp_query; 36 | if ( isset( $wp_query->query_vars['json_route']) )return true; // no insertion 37 | return $false; 38 | } 39 | add_filter('xili_json_dont_insert_lang_tag_root', 'xili_json_dont_insert_lang_tag_root', 10, 5 ); // filter since XL 2.16.6 40 | 41 | /** 42 | * don't select _key (invisible $key) 43 | * 44 | */ 45 | function xili_get_post_custom ( $post_ID ) { 46 | $raw_customs = get_post_custom( $post_ID ); 47 | $customs = array(); 48 | if ( $raw_customs ) { 49 | foreach ($raw_customs as $key => $meta ) { 50 | if ( substr($key, 0, 1) != '_' ) { 51 | $customs[$key] = $meta; 52 | } 53 | } 54 | } 55 | return $customs; 56 | } 57 | 58 | function xili_get_post_selected_taxonomies( $post_ID, $taxonomies = array ( 'category', 'post_tag' ) ) { 59 | $terms_of_post = array(); 60 | foreach ( $taxonomies as $taxonomy ) { 61 | $result = get_the_terms( $post_ID, $taxonomy ); 62 | if ( !is_wp_error ( $result ) ) 63 | $terms_of_post[$taxonomy] = $result ; 64 | } 65 | return $terms_of_post; 66 | } 67 | 68 | ?> --------------------------------------------------------------------------------