Skip to content

Commit fec5b0f

Browse files
committed
feat: add ToolbarPane to templates
1 parent 699b75c commit fec5b0f

File tree

9 files changed

+55
-33
lines changed

9 files changed

+55
-33
lines changed

create/templates/core/generate-home-page.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ module.exports = (options) => {
7676
<!-- Toolbar-->
7777
<div class="toolbar toolbar-bottom">
7878
<div class="toolbar-inner">
79-
<a href="#" class="link">Left Link</a>
80-
<a href="#" class="link">Right Link</a>
79+
<div class="toolbar-pane">
80+
<a href="#" class="link">Left Link</a>
81+
<a href="#" class="link">Right Link</a>
82+
</div>
8183
</div>
8284
</div>
8385
`.trim()

create/templates/core/generate-root.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,23 @@ module.exports = (options) => {
109109
<!-- Tabbar for switching views-tabs -->
110110
<div class="toolbar toolbar-bottom tabbar-icons">
111111
<div class="toolbar-inner">
112-
<a href="#view-home" class="tab-link tab-link-active">
113-
<i class="icon f7-icons if-not-md">house_fill</i>
114-
<i class="icon material-icons if-md">home</i>
115-
<span class="tabbar-label">Home</span>
116-
</a>
117-
<a href="#view-catalog" class="tab-link">
118-
<i class="icon f7-icons if-not-md">square_list_fill</i>
119-
<i class="icon material-icons if-md">view_list</i>
120-
<span class="tabbar-label">Catalog</span>
121-
</a>
122-
<a href="#view-settings" class="tab-link">
123-
<i class="icon f7-icons if-not-md">gear</i>
124-
<i class="icon material-icons if-md">settings</i>
125-
<span class="tabbar-label">Settings</span>
126-
</a>
112+
<div class="toolbar-pane">
113+
<a href="#view-home" class="tab-link tab-link-active">
114+
<i class="icon f7-icons if-not-md">house_fill</i>
115+
<i class="icon material-icons if-md">home</i>
116+
<span class="tabbar-label">Home</span>
117+
</a>
118+
<a href="#view-catalog" class="tab-link">
119+
<i class="icon f7-icons if-not-md">square_list_fill</i>
120+
<i class="icon material-icons if-md">view_list</i>
121+
<span class="tabbar-label">Catalog</span>
122+
</a>
123+
<a href="#view-settings" class="tab-link">
124+
<i class="icon f7-icons if-not-md">gear</i>
125+
<i class="icon material-icons if-md">settings</i>
126+
<span class="tabbar-label">Settings</span>
127+
</a>
128+
</div>
127129
</div>
128130
</div>
129131

create/templates/generate-config-xml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = (options) => {
1111
? `
1212
<platform name="android">
1313
<preference name="StatusBarOverlaysWebView" value="false" />
14-
<preference name="android-minSdkVersion" value="22" />
14+
<preference name="android-minSdkVersion" value="24" />
1515
<preference name="SplashMaintainAspectRatio" value="true" />
1616
<splash density="land-hdpi" src="res/screen/android/drawable-hdpi/screen.png" />
1717
<splash density="land-mdpi" src="res/screen/android/drawable-mdpi/screen.png" />

create/templates/react/generate-home-page.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module.exports = (options) => {
4040
NavTitleLarge,
4141
Link,
4242
Toolbar,
43+
ToolbarPane,
4344
Block,
4445
} from 'framework7-react';
4546
`.trim()
@@ -53,6 +54,7 @@ module.exports = (options) => {
5354
NavRight,
5455
Link,
5556
Toolbar,
57+
ToolbarPane,
5658
Block,
5759
BlockTitle,
5860
List,
@@ -91,8 +93,10 @@ module.exports = (options) => {
9193
? `
9294
{/* Toolbar */}
9395
<Toolbar bottom>
94-
<Link>Left Link</Link>
95-
<Link>Right Link</Link>
96+
<ToolbarPane>
97+
<Link>Left Link</Link>
98+
<Link>Right Link</Link>
99+
</ToolbarPane>
96100
</Toolbar>
97101
98102
`.trim()

create/templates/react/generate-root.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ module.exports = (options) => {
7070
<Views tabs className="safe-areas">
7171
{/* Tabbar for switching views-tabs */}
7272
<Toolbar tabbar icons bottom>
73-
<Link tabLink="#view-home" tabLinkActive iconIos="f7:house_fill" iconMd="material:home" text="Home" />
74-
<Link tabLink="#view-catalog" iconIos="f7:square_list_fill" iconMd="material:view_list" text="Catalog" />
75-
<Link tabLink="#view-settings" iconIos="f7:gear" iconMd="material:settings" text="Settings" />
73+
<ToolbarPane>
74+
<Link tabLink="#view-home" tabLinkActive iconIos="f7:house_fill" iconMd="material:home" text="Home" />
75+
<Link tabLink="#view-catalog" iconIos="f7:square_list_fill" iconMd="material:view_list" text="Catalog" />
76+
<Link tabLink="#view-settings" iconIos="f7:gear" iconMd="material:settings" text="Settings" />
77+
</ToolbarPane>
7678
</Toolbar>
7779
7880
{/* Your main view/tab, should have "view-main" class. It also has "tabActive" prop */}
@@ -112,6 +114,7 @@ module.exports = (options) => {
112114
Page,
113115
Navbar,
114116
Toolbar,
117+
ToolbarPane,
115118
NavRight,
116119
Link,
117120
Block,

create/templates/svelte/generate-home-page.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ module.exports = (options) => {
5757
? `
5858
<!-- Toolbar -->
5959
<Toolbar bottom>
60-
<Link>Left Link</Link>
61-
<Link>Right Link</Link>
60+
<ToolbarPane>
61+
<Link>Left Link</Link>
62+
<Link>Right Link</Link>
63+
</ToolbarPane>
6264
</Toolbar>
6365
6466
`.trim()
@@ -119,6 +121,7 @@ module.exports = (options) => {
119121
NavTitleLarge,
120122
Link,
121123
Toolbar,
124+
ToolbarPane,
122125
Block,
123126
} from 'framework7-svelte';
124127
</script>
@@ -134,6 +137,7 @@ module.exports = (options) => {
134137
NavRight,
135138
Link,
136139
Toolbar,
140+
ToolbarPane,
137141
Block,
138142
BlockTitle,
139143
List,

create/templates/svelte/generate-root.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ module.exports = (options) => {
7070
<Views tabs class="safe-areas">
7171
<!-- Tabbar for switching views-tabs -->
7272
<Toolbar tabbar icons bottom>
73-
<Link tabLink="#view-home" tabLinkActive iconIos="f7:house_fill" iconMd="material:home" text="Home" />
74-
<Link tabLink="#view-catalog" iconIos="f7:square_list_fill" iconMd="material:view_list" text="Catalog" />
75-
<Link tabLink="#view-settings" iconIos="f7:gear" iconMd="material:settings" text="Settings" />
73+
<ToolbarPane>
74+
<Link tabLink="#view-home" tabLinkActive iconIos="f7:house_fill" iconMd="material:home" text="Home" />
75+
<Link tabLink="#view-catalog" iconIos="f7:square_list_fill" iconMd="material:view_list" text="Catalog" />
76+
<Link tabLink="#view-settings" iconIos="f7:gear" iconMd="material:settings" text="Settings" />
77+
</ToolbarPane>
7678
</Toolbar>
7779
7880
<!-- Your main view/tab, should have "view-main" class. It also has "tabActive" prop -->
@@ -168,6 +170,7 @@ module.exports = (options) => {
168170
Page,
169171
Navbar,
170172
Toolbar,
173+
ToolbarPane,
171174
NavRight,
172175
Link,
173176
Block,

create/templates/vue/generate-home-page.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ module.exports = (options) => {
5858
? `
5959
<!-- Toolbar-->
6060
<f7-toolbar bottom>
61-
<f7-link>Left Link</f7-link>
62-
<f7-link>Right Link</f7-link>
61+
<f7-toolbar-pane>
62+
<f7-link>Left Link</f7-link>
63+
<f7-link>Right Link</f7-link>
64+
</f7-toolbar-pane>
6365
</f7-toolbar>
6466
6567
`.trim()

create/templates/vue/generate-root.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ module.exports = (options) => {
7070
<f7-views tabs class="safe-areas">
7171
<!-- Tabbar for switching views-tabs -->
7272
<f7-toolbar tabbar icons bottom>
73-
<f7-link tab-link="#view-home" tab-link-active icon-ios="f7:house_fill" icon-md="material:home" text="Home"></f7-link>
74-
<f7-link tab-link="#view-catalog" icon-ios="f7:square_list_fill" icon-md="material:view_list" text="Catalog"></f7-link>
75-
<f7-link tab-link="#view-settings" icon-ios="f7:gear" icon-md="material:settings" text="Settings"></f7-link>
73+
<f7-toolbar-pane>
74+
<f7-link tab-link="#view-home" tab-link-active icon-ios="f7:house_fill" icon-md="material:home" text="Home"></f7-link>
75+
<f7-link tab-link="#view-catalog" icon-ios="f7:square_list_fill" icon-md="material:view_list" text="Catalog"></f7-link>
76+
<f7-link tab-link="#view-settings" icon-ios="f7:gear" icon-md="material:settings" text="Settings"></f7-link>
77+
</f7-toolbar-pane>
7678
</f7-toolbar>
7779
7880
<!-- Your main view/tab, should have "view-main" class. It also has "tab-active" class -->

0 commit comments

Comments
 (0)