From 5459579d04e1cdee266a8a8cee227938536d4b19 Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Fri, 15 Jun 2018 13:23:12 +0300 Subject: [PATCH] Added docs styles Improved the documentation and moved it into the Demo app --- src/@fuse/scss/core.scss | 1 + src/@fuse/scss/partials/_docs.scss | 42 ++ .../datatable/ngx-datatable.component.html | 6 +- .../google-maps/google-maps.component.html | 50 +- .../countdown/countdown.component.html | 50 +- .../highlight/highlight.component.html | 58 +- .../material-color-picker.component.html | 84 ++- .../multi-language.component.html | 138 ----- .../multi-language.component.scss | 13 - .../navigation/navigation.component.html | 528 +++++++++++------- .../navigation/navigation.component.ts | 94 +++- .../search-bar/search-bar.component.html | 38 +- .../shortcuts/shortcuts.component.html | 36 +- .../components/sidebar/sidebar.component.html | 47 +- .../components/widget/widget.component.html | 136 +++-- .../directives/directives.module.ts | 51 ++ .../fuseIfOnDom/fuse-if-on-dom.component.html | 40 ++ .../fuseIfOnDom/fuse-if-on-dom.component.scss | 5 + .../fuseIfOnDom/fuse-if-on-dom.component.ts | 13 + .../fuse-inner-scroll.component.html | 43 ++ .../fuse-inner-scroll.component.scss | 5 + .../fuse-inner-scroll.component.ts | 13 + .../fuse-mat-sidenav.component.html | 72 +++ .../fuse-mat-sidenav.component.scss | 8 + .../fuse-mat-sidenav.component.ts | 13 + .../fuse-perfect-scrollbar.component.html | 65 +++ .../fuse-perfect-scrollbar.component.scss | 5 + .../fuse-perfect-scrollbar.component.ts | 13 + .../documentation/documentation.module.ts | 12 + .../getting-started/getting-started.module.ts | 38 ++ .../installation/installation.component.html | 150 +++++ .../installation/installation.component.scss | 5 + .../installation/installation.component.ts | 13 + .../introduction/introduction.component.html | 71 +++ .../introduction/introduction.component.scss | 5 + .../introduction/introduction.component.ts | 13 + .../services/config/config.component.html | 95 ++-- .../splash-screen.component.html | 42 +- .../directory-structure.component.html | 76 +++ .../directory-structure.component.scss | 5 + .../directory-structure.component.ts | 13 + .../multi-language.component.html | 129 +++++ .../multi-language.component.scss | 3 + .../multi-language.component.ts | 4 +- .../page-layouts/page-layouts.component.html | 62 ++ .../page-layouts/page-layouts.component.scss | 5 + .../page-layouts/page-layouts.component.ts | 13 + .../production/production.component.html | 143 +++++ .../production/production.component.scss | 5 + .../production/production.component.ts | 13 + .../server/server.component.html | 79 +++ .../server/server.component.scss | 5 + .../server/server.component.ts | 13 + .../theme-layouts.component.html | 72 +++ .../theme-layouts.component.scss | 5 + .../theme-layouts/theme-layouts.component.ts | 13 + .../updating-fuse.component.html | 52 ++ .../updating-fuse.component.scss | 5 + .../updating-fuse/updating-fuse.component.ts | 13 + .../working-with-fuse.module.ts | 69 +++ src/app/navigation/navigation.ts | 14 +- 61 files changed, 2217 insertions(+), 705 deletions(-) create mode 100644 src/@fuse/scss/partials/_docs.scss delete mode 100644 src/app/main/documentation/components/multi-language/multi-language.component.html delete mode 100644 src/app/main/documentation/components/multi-language/multi-language.component.scss create mode 100644 src/app/main/documentation/directives/directives.module.ts create mode 100644 src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.html create mode 100644 src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.scss create mode 100644 src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.ts create mode 100644 src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.html create mode 100644 src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.scss create mode 100644 src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.ts create mode 100644 src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.html create mode 100644 src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.scss create mode 100644 src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.ts create mode 100644 src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.html create mode 100644 src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.scss create mode 100644 src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.ts create mode 100644 src/app/main/documentation/getting-started/getting-started.module.ts create mode 100644 src/app/main/documentation/getting-started/installation/installation.component.html create mode 100644 src/app/main/documentation/getting-started/installation/installation.component.scss create mode 100644 src/app/main/documentation/getting-started/installation/installation.component.ts create mode 100644 src/app/main/documentation/getting-started/introduction/introduction.component.html create mode 100644 src/app/main/documentation/getting-started/introduction/introduction.component.scss create mode 100644 src/app/main/documentation/getting-started/introduction/introduction.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.html create mode 100644 src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.scss create mode 100644 src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.html create mode 100644 src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.scss rename src/app/main/documentation/{components => working-with-fuse}/multi-language/multi-language.component.ts (67%) create mode 100644 src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.html create mode 100644 src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.scss create mode 100644 src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/production/production.component.html create mode 100644 src/app/main/documentation/working-with-fuse/production/production.component.scss create mode 100644 src/app/main/documentation/working-with-fuse/production/production.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/server/server.component.html create mode 100644 src/app/main/documentation/working-with-fuse/server/server.component.scss create mode 100644 src/app/main/documentation/working-with-fuse/server/server.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.html create mode 100644 src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.scss create mode 100644 src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.html create mode 100644 src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.scss create mode 100644 src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.ts create mode 100644 src/app/main/documentation/working-with-fuse/working-with-fuse.module.ts diff --git a/src/@fuse/scss/core.scss b/src/@fuse/scss/core.scss index 56402cf3..885df826 100644 --- a/src/@fuse/scss/core.scss +++ b/src/@fuse/scss/core.scss @@ -30,6 +30,7 @@ @import "partials/material"; @import "partials/angular-material-fix"; @import "partials/typography"; +@import "partials/docs"; @import "partials/page-layouts"; @import "partials/cards"; @import "partials/navigation"; diff --git a/src/@fuse/scss/partials/_docs.scss b/src/@fuse/scss/partials/_docs.scss new file mode 100644 index 00000000..e6d0f956 --- /dev/null +++ b/src/@fuse/scss/partials/_docs.scss @@ -0,0 +1,42 @@ +.docs { + font-size: 16px; + + > .content { + max-width: 980px; + + > .main-title { + + &:first-child { + margin-top: 0; + } + } + } + + .main-title { + display: flex; + margin-top: 72px; + font-size: 24px; + } + + .section-title { + display: inline-flex; + font-size: 18px; + margin-top: 24px; + border-bottom: 1px solid #F44336; + color: #F44336; + } + + ol, + ul { + padding-left: 24px; + + li { + margin-bottom: 12px; + line-height: 1.7; + } + } + + p { + line-height: 1.7; + } +} \ No newline at end of file diff --git a/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.html b/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.html index 28eb9aa4..7b0fd076 100644 --- a/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.html +++ b/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.html @@ -1,4 +1,4 @@ -
+
home chevron_right - Tables + Documentation + chevron_right + Datatables
ngx-datatable
diff --git a/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html b/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html index 5489ef53..5818799f 100644 --- a/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html +++ b/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html @@ -1,4 +1,4 @@ -
+
home chevron_right - Google Maps + Documentation + chevron_right + 3rd Party Components
Google Maps
@@ -27,33 +29,27 @@ agm-map is a angular component library for Google Maps.

-
-

Sample

-

- - - -

-
+
Sample
+

+ + + +

-
-

Usage

-

- - - -

-
+
Usage
+

+ + + +

-
-

Inputs

- Checkout the component api docs for detail: - AgmMap Api -
+
Inputs
+ Checkout the component api docs for detail: + AgmMap Api
diff --git a/src/app/main/documentation/components/countdown/countdown.component.html b/src/app/main/documentation/components/countdown/countdown.component.html index 5f4d9c38..c39da508 100644 --- a/src/app/main/documentation/components/countdown/countdown.component.html +++ b/src/app/main/documentation/components/countdown/countdown.component.html @@ -1,4 +1,4 @@ -
+
@@ -6,6 +6,8 @@
home chevron_right + Documentation + chevron_right Components
Countdown
@@ -20,34 +22,28 @@ fuse-countdown is a custom built Fuse component allows you to create a countdowns.

-
-

Sample

-

- -

-
+
Sample
+

+ +

-
-

Usage

-

- - - -

-
+
Usage
+

+ + + +

-
-

Inputs

-

- eventDate - - The date of the event. Since fuse-countdown uses moment.js to parse the dates, any moment.js - compatible date string can be used. - -

-
+
Inputs
+

+ eventDate + + The date of the event. Since fuse-countdown uses moment.js to parse the dates, any moment.js + compatible date string can be used. + +

diff --git a/src/app/main/documentation/components/highlight/highlight.component.html b/src/app/main/documentation/components/highlight/highlight.component.html index daa980bd..db234e78 100644 --- a/src/app/main/documentation/components/highlight/highlight.component.html +++ b/src/app/main/documentation/components/highlight/highlight.component.html @@ -1,4 +1,4 @@ -
+
@@ -6,6 +6,8 @@
home chevron_right + Documentation + chevron_right Components
Highlight
@@ -20,28 +22,25 @@ fuse-highlight is a custom built Fuse component allows to show syntax highlighted codes.

-
-

Sample

-

+

Sample
+

- - - + + -

-
+

-
-

Usage

-

- - - -

-
+ + +

-
-

Inputs

-

- lang - - Language of the code to be highlighted. - -

-
+
Inputs
+

+ lang + + Language of the code to be highlighted. + +

diff --git a/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html b/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html index fc7517b3..bd4633fa 100644 --- a/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html +++ b/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html @@ -1,4 +1,4 @@ -
+
@@ -6,6 +6,8 @@
home chevron_right + Documentation + chevron_right Components
Material Color Picker
@@ -21,53 +23,45 @@ that allows to choose one of the many Material spec. colors.

-
-

Sample

-

- -

-
+
Sample
+

+ +

-
-

Usage

-

- - - -

-
+
Usage
+

+ + + +

-
-

Two-way bindings

-

- selectedClass - - The name of the Fuse color class to select, e.g. mat-red-500-bg - -

-

- selectedBg - - The hex code of the color to be selected. It will be only selected if the hex code of the color - matches one of the material colors. - -

-
+
Two-way bindings
+

+ selectedClass + + The name of the Fuse color class to select, e.g. mat-red-500-bg + +

+

+ selectedBg + + The hex code of the color to be selected. It will be only selected if the hex code of the color + matches one of the material colors. + +

-
-

Outputs

-

- onValueChange - - Event that triggered when a color selected. Returns an object that holds palette, hue, class name, - background and foreground colors. - -

-
+
Outputs
+

+ onValueChange + + Event that triggered when a color selected. Returns an object that holds palette, hue, class name, + background and foreground colors. + +

diff --git a/src/app/main/documentation/components/multi-language/multi-language.component.html b/src/app/main/documentation/components/multi-language/multi-language.component.html deleted file mode 100644 index 4308d6d9..00000000 --- a/src/app/main/documentation/components/multi-language/multi-language.component.html +++ /dev/null @@ -1,138 +0,0 @@ -
- - -
-
-
- home - chevron_right - Components -
-
Multi Language
-
-
- - - -
- -

- Fuse uses ngx-translate - module and supports multiple languages and translations. -

- -

- Since not everybody need multi-language setup for their apps, we decided NOT to put translations everywhere. - If you want to see the translations in action, visit - Mail app and then change the language from the Toolbar. -

- Mail app is the only app that has translations for demonstration purposes. You can look at its source code - to see the usage. -

- -
-

Usage

-

In order to use the translations, create your translation file within the module you want to use - the translations. For example, for the Mail app, create i18n/en.ts file inside the - apps/mail folder. -

-

- The structure of the translation file is important and it must define the language id along with the - translation data: -

- -

- - - -

-
- -
-

- After you create your translation files, open the *.component.ts file for the module you - want to have translations, and register your translation file. For this example, we will use the - mail.component.ts file: -

- -

- - - -

-
- -
-

Changing the language

-

- Changing the current language can happen instantly. Simply call the use method from the - translate service: -

-

- - - -

-

- More detailed usage of the translation service can be found in the toolbar.component.ts - file. -

-
- - -
- -
- diff --git a/src/app/main/documentation/components/multi-language/multi-language.component.scss b/src/app/main/documentation/components/multi-language/multi-language.component.scss deleted file mode 100644 index 48d549ab..00000000 --- a/src/app/main/documentation/components/multi-language/multi-language.component.scss +++ /dev/null @@ -1,13 +0,0 @@ -:host { - - .content{ - max-width: 1100px; - - .warning-box{ - background: #FFFDE7; - border: 1px solid #FFC107; - padding: 16px; - } - } - -} diff --git a/src/app/main/documentation/components/navigation/navigation.component.html b/src/app/main/documentation/components/navigation/navigation.component.html index 01d24bec..76d6f1a9 100644 --- a/src/app/main/documentation/components/navigation/navigation.component.html +++ b/src/app/main/documentation/components/navigation/navigation.component.html @@ -1,4 +1,4 @@ -