Skip to content

Commit 6236de8

Browse files
committed
Move imports to top of file
1 parent c93e1fe commit 6236de8

23 files changed

+53
-50
lines changed

docs/components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ description: Ionic Framework comes stock with a number of high-level UI componen
44
hide_table_of_contents: true
55
---
66

7+
import DocsCard from '@site/src/components/DocsCard';
8+
import DocsCards from '@site/src/components/DocsCards';
9+
710
# UI Components
811

912
Ionic apps are made of high-level building blocks called Components, which allow you to quickly construct the UI for your app. Ionic comes stock with a number of components, including cards, lists, and tabs. Once you’re familiar with the basics, refer to the [API Index](/docs/api) for a complete list of each component and sub-component.
1013

11-
import DocsCard from '@site/src/components/DocsCard';
12-
import DocsCards from '@site/src/components/DocsCards';
13-
1414
<DocsCards>
1515
<DocsCard header="Action Sheet" href="/docs/api/action-sheet" img="/icons/feature-component-actionsheet-icon.png">
1616
<p>Action Sheets display a set of options with the ability to confirm or cancel an action.</p>

docs/deployment/progressive-web-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ contributors:
55
- mhartington
66
---
77

8+
import DocsCard from '@site/src/components/DocsCard';
9+
import DocsCards from '@site/src/components/DocsCards';
10+
811
# Deploying a Progressive Web App
912

1013
Because Ionic Apps are built with web technologies, they can run just as well as a Progressive Web App as they can a native app. Not sure what PWAs are? Check out Ionic's <a href="https://ionicframework.com/pwa" target="_blank">PWA Overview</a> or the <a href="/docs/core-concepts/what-are-progressive-web-apps">What are Progressive Web Apps</a> page for more info.
1114

1215
For the frameworks Ionic supports, we've created dedicated guides that go into more detail. Below are links for Angular and React.
1316

14-
import DocsCard from '@site/src/components/DocsCard';
15-
import DocsCards from '@site/src/components/DocsCards';
16-
1717
<DocsCards>
1818
<DocsCard header="Angular" href="/docs/angular/pwa" img="/img/frameworks/angular.svg"></DocsCard>
1919
<DocsCard header="React" href="/docs/react/pwa" img="/img/frameworks/react.svg"></DocsCard>

docs/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ contributors:
33
- jsonMartin
44
---
55

6+
import DocsButton from '@site/src/components/DocsButton';
7+
68
# Creating a Photo Gallery with Device Storage
79

810
Last time, we successfully added the Camera plugin to the Tab2 page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
@@ -195,8 +197,6 @@ Sweet! Photos are now saved to your device. To demonstrate that they are indeed
195197

196198
Next up, we’ll look at how to apply a custom theme to an Ionic app.
197199

198-
import DocsButton from '@site/src/components/DocsButton';
199-
200200
<div style={{textAlign: 'right'}}>
201201
<DocsButton href="/docs/angular/your-first-app/theming">Continue <svg viewBox="0 0 512 512"><path d="M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"></path></svg></DocsButton>
202202
</div>

docs/developing/hardware-back-button.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
---
3+
34
import Tabs from '@theme/Tabs';
45
import TabItem from '@theme/TabItem';
56

docs/developing/keyboard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
---
3+
4+
import Codepen from '@site/src/components/Codepen';
35
import Tabs from '@theme/Tabs';
46
import TabItem from '@theme/TabItem';
57

@@ -88,8 +90,6 @@ For a list of accepted values, see the <a href="https://developer.mozilla.org/en
8890
</Tabs>
8991
````
9092

91-
import Codepen from '@site/src/components/Codepen';
92-
9393
<Codepen user="ionic" slug="abvJVVv" height="400" />
9494

9595
> The `inputmode` attribute is supported on devices running Chrome 66+ and iOS Safari 12.2+: https://caniuse.com/#search=inputmode

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ demoUrl: https://ionic-docs-demo.herokuapp.com/
1111
demoSourceUrl: https://github.com/ionic-team/docs-demo
1212
---
1313

14+
import DocsCard from '@site/src/components/DocsCard';
15+
import DocsCards from '@site/src/components/DocsCards';
16+
1417
Ionic Framework is an open source UI toolkit for building performant, high-quality mobile and desktop apps using web technologies — HTML, CSS, and JavaScript — with integrations for popular frameworks like <a href="/docs/angular/overview"> Angular</a>, <a href="/docs/react/overview">React</a>, and <a href="/docs/vue/overview">Vue</a>.
1518

1619
Get started building by <a href="/docs/intro/cli">installing Ionic</a> or following our <a href="/docs/intro/next#build-your-first-app">First App Tutorial</a> to learn the main concepts.
1720

18-
import DocsCard from '@site/src/components/DocsCard';
19-
import DocsCards from '@site/src/components/DocsCards';
20-
2121
<DocsCards>
2222
<DocsCard header="Installation Guide" href="/docs/intro/cli" icon="/icons/guide-installation-icon.svg" hover-icon="/icons/guide-installation-icon-hover.svg">
2323
<p>Step-by-step guides to setting up your system and installing the framework.</p>

docs/intro/first-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
hide_table_of_contents: true
33
---
44

5+
import DocsCard from '@site/src/components/DocsCard';
6+
import DocsCards from '@site/src/components/DocsCards';
7+
58
# Build Your First App Tutorial
69

710
Pick the JavaScript framework you plan to use while building your Ionic app:
811

9-
import DocsCard from '@site/src/components/DocsCard';
10-
import DocsCards from '@site/src/components/DocsCards';
11-
1212
<DocsCards>
1313
<DocsCard header="Start with Angular" href="/docs/angular/your-first-app" icon="/icons/logo-angular-icon.png">
1414
<p>A complete guide to get you up to speed with the basics of building Ionic apps with Angular.</p>

docs/intro/next.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
---
33

4+
import DocsCard from '@site/src/components/DocsCard';
5+
import DocsCards from '@site/src/components/DocsCards';
6+
47
# Next Steps
58

69
## Build Your First App
710

811
Pick the JavaScript framework you plan to use while building your Ionic app:
912

10-
import DocsCard from '@site/src/components/DocsCard';
11-
import DocsCards from '@site/src/components/DocsCards';
12-
1313
<DocsCards>
1414
<DocsCard header="Start with Angular" href="/docs/angular/your-first-app" icon="/icons/logo-angular-icon.png">
1515
<p>A complete guide to get you up to speed with the basics of building Ionic apps with Angular.</p>

docs/layout/structure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ contributors:
44
- brandyscarney
55
---
66

7+
import DocsCard from '@site/src/components/DocsCard';
8+
import DocsCards from '@site/src/components/DocsCards';
9+
710
# Structure
811

912
Ionic Framework provides several different layouts that can be used to structure an app. From single page layouts, to split pane views and modals.
@@ -12,9 +15,6 @@ Ionic Framework provides several different layouts that can be used to structure
1215

1316
### Header
1417

15-
import DocsCard from '@site/src/components/DocsCard';
16-
import DocsCards from '@site/src/components/DocsCards';
17-
1818
<aside>
1919
<DocsCard href="/docs/api/header" header="Learn More" icon="/icons/component-header-icon.png">
2020
<code>ion-header</code> API docs

docs/native.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ meta:
55
description: Build native application experiences with open-source Native APIs. Easily add native device functionality to any Ionic app with Capacitor or Cordova.
66
hide_table_of_contents: true
77
---
8+
89
import DocsCard from '@site/src/components/DocsCard';
910
import DocsCards from '@site/src/components/DocsCards';
1011
import { Helmet } from "react-helmet";

docs/native/community.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Cordova Community Plugins
33
sidebar_label: Setup
44
hide_table_of_contents: true
55
---
6+
67
import Tabs from '@theme/Tabs';
78
import TabItem from '@theme/TabItem';
89

docs/react.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ meta:
88
description: Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards
99
---
1010

11+
import DocsCard from '@site/src/components/DocsCard';
12+
import DocsCards from '@site/src/components/DocsCards';
13+
1114
<div class='flex main-flex'>
1215
<div class="pull-left">
1316
<h3>One Codebase <br/> Any Platform <br/> <strong>Just React</strong></h3>
@@ -109,9 +112,6 @@ $ ionic serve █
109112

110113
## Resources
111114

112-
import DocsCard from '@site/src/components/DocsCard';
113-
import DocsCards from '@site/src/components/DocsCards';
114-
115115
<DocsCards>
116116
<DocsCard header="Getting Started" href="/docs/react/your-first-app" icon="/icons/feature-component-actionsheet-icon.png">
117117
<p>Learn the fundamentals you need to know to start building amazing apps with Ionic Framework.</p>

docs/reference/migration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ contributors:
66
- elylucas
77
---
88

9+
import Tabs from '@theme/Tabs';
10+
import TabItem from '@theme/TabItem';
11+
912
# Migration Guide
1013

1114

@@ -77,9 +80,6 @@ One of the major changes between an Ionic 3 app and an Ionic 4 app is the overal
7780

7881
For example, if an app is using Angular, that project structure will be exactly what an Angular CLI app would be. This change, while not too difficult to accommodate, helps to keep common patterns and documentation consistent.
7982

80-
import Tabs from '@theme/Tabs';
81-
import TabItem from '@theme/TabItem';
82-
8383
````mdx-code-block
8484
<Tabs
8585
defaultValue="v4"

docs/studio.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
hide_table_of_contents: true
33
---
44

5+
import DocsCard from '@site/src/components/DocsCard';
6+
import DocsCards from '@site/src/components/DocsCards';
7+
58
# Welcome to Studio
69

710
Ionic Studio is a fast and easy app builder that helps teams build and prototype apps with minimal coding.
@@ -13,9 +16,6 @@ fully supports bringing code back into the tool, something virtually unheard of
1316

1417
Studio is a desktop tool and requires a subscription, and is only for Ionic Angular 4.x+ projects. To get started, sign up below:
1518

16-
import DocsCard from '@site/src/components/DocsCard';
17-
import DocsCards from '@site/src/components/DocsCards';
18-
1919
<DocsCards class="static-width">
2020
<DocsCard header="Get Studio" href="https://ionicframework.com/studio?utm_source=docs&utm_medium=website&utm_campaign=studio%20launch" icon="/icons/guide-installation-icon.png">
2121
<p>Sign up for Studio and start building today.</p>

docs/techniques/security.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ disableHtmlPreviews: true
33
contributors:
44
- liamdebeasi
55
---
6+
67
import Tabs from '@theme/Tabs';
78
import TabItem from '@theme/TabItem';
89

docs/theming/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ contributors:
77
- marcjulian
88
---
99

10+
import CodeColor from '@site/src/components/CodeColor';
11+
1012
# Advanced Theming
1113

1214
CSS-based theming enables apps to customize the colors quickly by loading a CSS file or changing a few CSS property values.
@@ -128,8 +130,6 @@ $text-darker: darken($text, 15);
128130
$text-lighter: lighten($text, 15);
129131
```
130132

131-
import CodeColor from '@site/src/components/CodeColor';
132-
133133
After running through the Sass compiler, the colors will have the following values:
134134

135135
| Variable | Value |

docs/theming/basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ contributors:
44
- brandyscarney
55
---
66

7+
import ColorAccordion from '@site/src/components/ColorAccordion';
8+
79
# Theming Basics
810

911
Ionic Framework is built to be a blank slate that can easily be customized and modified to fit a brand, while still following the standards of the different platforms. Theming Ionic apps is now easier than ever. Because the framework is built with CSS, it comes with pre-baked default styles which are extremely easy to change and modify.
@@ -14,8 +16,6 @@ Ionic has nine default colors that can be used to change the color of many compo
1416

1517
When changing a color, it is important to set all of the related properties. This can be done easily with the [Color Generator](/docs/theming/color-generator) tool, but these can also be manually written if desired. For more information on Ionic colors, see [Colors](/docs/theming/colors).
1618

17-
import ColorAccordion from '@site/src/components/ColorAccordion';
18-
1919
<ColorAccordion />
2020

2121
## Platform Standards

docs/theming/colors.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ initialTab: 'preview'
33
inlineHtmlPreviews: true
44
---
55

6+
import LayeredColorsSelect from '@site/src/components/LayeredColorsSelect';
7+
import CodeColor from '@site/src/components/CodeColor';
8+
69
# Colors
710

811
Ionic has nine default colors that can be used to change the color of many components. Each color is actually a collection of multiple properties, including a `shade` and `tint`, used throughout Ionic.
@@ -26,14 +29,10 @@ A color can be applied to an Ionic component in order to change the default colo
2629

2730
Each color consists of the following properties: a `base`, `contrast`, `shade`, and `tint`. The `base` and `contrast` colors also require a `rgb` property which is the same color, just in <a href="https://developer.mozilla.org/en-US/docs/Glossary/RGB" target="_blank">rgb format</a>. See [The Alpha Problem](./advanced#the-alpha-problem) for an explanation of why the `rgb` property is also needed. Select from the dropdown below to see all of the default colors Ionic provides and their variations.
2831

29-
import LayeredColorsSelect from '@site/src/components/LayeredColorsSelect';
30-
3132
<LayeredColorsSelect />
3233

3334
## Modifying Colors
3435

35-
import CodeColor from '@site/src/components/CodeColor';
36-
3736
To change the default values of a color, all of the listed variations for that color should be set. For example, to change the secondary color to <CodeColor mode="md" value="#006600"></CodeColor>, set the following CSS properties:
3837

3938
```css

docs/theming/dark-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ initialTab: 'preview'
33
inlineHtmlPreviews: true
44
---
55

6+
import Codepen from '@site/src/components/Codepen';
7+
68
# Dark Mode
79

810
Ionic makes it easy to change the themes of your app, including supporting dark color schemes. With growing support for dark mode in native apps, developers are now looking to add it to their apps to support user preferences.
@@ -77,8 +79,6 @@ function toggleDarkTheme(shouldAdd) {
7779

7880
> Tip: make sure to view the Codepen below in a [supported browser](https://caniuse.com/#feat=prefers-color-scheme) and then try changing the system preferences on your device between light & dark mode. Here's [how to enable dark mode on Windows 10](https://blogs.windows.com/windowsexperience/2016/08/08/windows-10-tip-personalize-your-pc-by-enabling-the-dark-theme/) and [how to enable it on a Mac](https://support.apple.com/en-us/HT208976).
7981
80-
import Codepen from '@site/src/components/Codepen';
81-
8282
<!-- Codepen https://codepen.io/ionic/pen/jONzJpG -->
8383
<Codepen preview="false" user="ionic" slug="jONzJpG" height="550px" default-tab="js,result" />
8484

docs/theming/themes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ initialTab: 'preview'
33
inlineHtmlPreviews: true
44
---
55

6+
import CodeColor from '@site/src/components/CodeColor';
7+
68
# Themes
79

810
Ionic provides several global variables that are used throughout components to change the default theme of an entire application. [Application Colors](#application-colors) are useful to change the look of most of the Ionic components, and [Stepped Colors](#stepped-colors) are used as variations in some of the Ionic components.
@@ -50,8 +52,6 @@ After exploring different ways to customize the Ionic theme, we found that we co
5052

5153
While updating the background (`--ion-background-color`) and text (`--ion-text-color`) variables will change the look of the app for most components, there are certain Ionic components where it may look off, or broken. This will be more apparent when applying a darker theme.
5254

53-
import CodeColor from '@site/src/components/CodeColor';
54-
5555
In some components we use a shade darker than the background or lighter than the text. For example, an item heading text may need to be <CodeColor mode="md" value="#404040"></CodeColor>, which is a few shades lighter than our default text color. Meanwhile, the loading component background is a shade darker than white, using <CodeColor mode="md" value="#f2f2f2"></CodeColor>. We use stepped colors in order to define these slight variations. It is important to update the stepped colors when updating the background or text color of an application.
5656

5757
By default, the Ionic stepped colors start at the default background color value <CodeColor mode="md" value="#ffffff"></CodeColor> and mix with the text color value <CodeColor mode="md" value="#000000"></CodeColor> using an increasing percentage. The full list of stepped colors is shown in the generator below.

docs/utilities/animations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
---
3+
4+
import Codepen from '@site/src/components/Codepen';
35
import Tabs from '@theme/Tabs';
46
import TabItem from '@theme/TabItem';
57

@@ -204,8 +206,6 @@ In the example above, an animation that changes the opacity on the `.square` ele
204206

205207
By default, all Ionic Animations are paused until the `play` method is called.
206208

207-
import Codepen from '@site/src/components/Codepen';
208-
209209
<Codepen user="ionic" slug="bGbMojP" />
210210

211211
## Keyframe Animations

docs/utilities/gestures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
---
3+
4+
import Codepen from '@site/src/components/Codepen';
35
import Tabs from '@theme/Tabs';
46
import TabItem from '@theme/TabItem';
57

@@ -258,8 +260,6 @@ const onMove = (detail) => {
258260

259261
In this example, our app listens for gestures on the `.rectangle` element. When a gesture movement is detected, the `onMove` function is called, and our app logs the current gesture information.
260262

261-
import Codepen from '@site/src/components/Codepen';
262-
263263
<Codepen user="ionic" slug="xxKBYdL" />
264264

265265
## Double Click Gesture

docs/vue/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
sidebar_label: Overview
33
---
44

5+
import DocsCard from '@site/src/components/DocsCard';
6+
import DocsCards from '@site/src/components/DocsCards';
7+
58
# Ionic Vue Overview
69

710
`@ionic/vue` combines the core Ionic Framework experience with the tooling and APIs that are tailored to Vue Developers.
@@ -36,9 +39,6 @@ $ ionic serve █
3639

3740
## Resources
3841

39-
import DocsCard from '@site/src/components/DocsCard';
40-
import DocsCards from '@site/src/components/DocsCards';
41-
4242
<DocsCards>
4343
<DocsCard header="Getting Started" href="/docs/vue/your-first-app" icon="/icons/feature-component-actionsheet-icon.png">
4444
<p>Learn the fundamentals you need to know to start building amazing apps with Ionic Framework.</p>

0 commit comments

Comments
 (0)