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 @@ -
agm-map
is a angular component library for Google Maps.
-
-
+
-
+
fuse-countdown
is a custom built Fuse component allows you to create a countdowns.
-
-
+
-
+
- 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.
-
-
+ 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.
+
+
fuse-highlight
is a custom built Fuse component allows to show syntax highlighted codes.
- +
-
-
+
- lang
-
- Language of the code to be highlighted.
-
-
+ lang
+
+ Language of the code to be highlighted.
+
+
-
+
-
+
- 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.
-
-
+ 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.
+
+
- onValueChange
-
- Event that triggered when a color selected. Returns an object that holds palette, hue, class name,
- background and foreground colors.
-
-
+ onValueChange
+
+ Event that triggered when a color selected. Returns an object that holds palette, hue, class name,
+ background and foreground colors.
+
+
- 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.
-
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 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.
-
-
+
- Direct modifications on the navigation data will be reflected to the component. So you can modify the - json data, or even create it from scratch using your backend and the changes will reflected to the - component immediately. -
++ An alternative usage to the above one is to using the Navigation Service. Simply, you get your + navigation array, register that as a navigation using the service and then set it as the current + navigation. This allows for easier updating and swapping of the navigation: +
+ +
+
+ Once you register your navigation like this, you no longer need to provide the [navigation] input
+ while using the fuse-navigation
:
+
+
+
+
+
+ It's possible to change the default folded status of the navigation. +
+
+ Find the layout that you want to edit from app/layout/vertical/ directory. Edit the layout's html
+ file and look for the [folded]
attribute on fuse-sidebar
components.
+
+ Assigning true
to that attribute will make the vertical navigation folded by default.
+
+ In order to make the runtime modifications easier, it's strongly recommended that to give a unique id + to all of your navigation items. +
+ +
-
+
-
+
-
+
+ Vertical Navigation Default Folded Status
+ // Add the new nav item at the beginning of the navigation
+ this._fuseNavigationService.addNavigationItem(newNavItem, 'start');
+ }
+
- It's possible to change the default folded status of the navigation. -
-
- Edit the main.component.html
file and look for the [folded]
attribute on
- fuse-sidebar
components.
-
- Assigning true
to that attribute will make the vertical navigation folded by default.
-
+
-
-
-
-
+
-
+
- input
- Triggers every time an input occurs within the search bar. Can be used to trigger the actual
- search mechanism. The $event is the value from the search input.
-
-
+ input
+ Triggers every time an input occurs within the search bar. Can be used to trigger the actual
+ search mechanism. The $event is the value from the search input.
+
+
-
+
- <fuse-shortcuts></fuse-shortcuts>
uses the same service with navigation
- component to populate the shortcuts. It can search the navigation items as well as pin and unpin them as
- shortcuts. It uses browser cookies to store the shortcuts.
-
+ <fuse-shortcuts></fuse-shortcuts>
uses the same service with navigation
+ component to populate the shortcuts. It can search the navigation items as well as pin and unpin them as
+ shortcuts. It uses browser cookies to store the shortcuts.
+
-
+
+ Controls the position of the sidebar when it's hidden. This doesn't affect on the locked-open placement + of the sidebar, it only controls which side the sidebar is going to slide in when it's completely + hidden. +
+@@ -55,6 +64,22 @@
+ The sidebar service allows you to control the Sidebar's states from anywhere. To access the sidebar, + you need to use the name attribute: +
+
+
fuse-widget
is a custom built Fuse component allows to create flippable widget boxes.
- -
+
+ *fuseIfOnDom
is a helper directive that detaches and re-attaches the given element if it's
+ currently in the DOM. This will help in various cases such as charts that don't resize properly or
+ animations that don't wait to route to be loaded completely.
+
+
+ fuseInnerScroll
is a class directive that can be used in page layouts. It will lock the
+ container's scroll allowing for individual scroll such as sidebar and the content itself.
+
+ This directive will only work with Fuse's pre-built page layouts and it's a class directive. +
+ +
+
+ fuseMatSidenav
is a helper directive that enhances the Angular Material's sidenav. It modifies
+ the sidenav so it will function like the Angular Material 1.x sidenav. It also has a service which you can
+ register a sidenav in order to access and control its status from anywhere.
+
+
+ fuseMatSidenavHelper
+
+ A unique name for the sidenav.
+
+
+ mat-is-locked-open
+
+ Adds a locked open functionality just like Angular Material 1.x sidenav. Works with the media step
+ aliases of the FlexLayout library.
+
+
+
+ fusePerfectScrollbar
is an Angular directive for the Perfect Scrollbar library.
+
+
+
+
+
+ This section will give you some information about what tools you will need. You can skip to the
+ Installation section to start installing the template. We already mentioned all the prerequisites and
+ how to install them in the Installation section.
+
+ Fuse uses Angular CLI for quickly
+ bootstrapping the application. You can check out the link for
+ more detailed information.
+
+ Simply, Angular CLI is a tool to initialize, develop, scaffold and maintain Angular
+ applications
+
+ To install and use Fuse, you will need Node.js
+ installed to your computer. We won't get into too much detail about Node.js as it's out of the scope
+ of this documentation. Also you won't need to actually use Node.js, it's only required for the
+ development process.
+
+ To be able to install and use Fuse, you will also need
+ Git installed to your computer. Git is required for
+ npm to work correctly.
+
+ Fuse uses npm package manager to install and manage 3rd
+ party components and libraries.
+
+ Now you are ready to install the Fuse.
+
+ This command will install all the required Node.js modules into the node_modules
+ directory inside your work folder.
+
+ And now, you are ready to run the Fuse for the first time. Please continue to the
+ Working with Fuse section.
+
+ This version of Fuse is NOT a traditional admin template, it's an Angular app written entirely
+ with Typescript and has no jQuery dependency.
+
+ While Fuse is a great tool and source for learning Angular, it also requires at least an entry level of
+ Angular knowledge so you can find your way within the source code.
+
+ Here you can find a list of core libraries, design specifications and coding standards that we use in Fuse:
+
+ All libraries and custom made components are following Google's Material Design Specifications.
+
+ Angular is the core of Fuse.
+
+ Angular Material is the primary UI
+ library of the Fuse. It's a set of Angular components, directives and services that implements Material
+ Design Specifications and it's in active development by Google.
+
+ The Angular CLI is a tool to initialize, develop, scaffold and maintain Angular applications.
+ You can find more information about at:
+ angular-cli
+
-
-
-
+
-
+ Fuse has a fairly simple directory structure. All source code that you will need stays inside the
+ /src folder.
+
+ Once you build your app, a /dist folder will appear at the root which will contain the built app. You
+ can simply upload the contents of it to your server to start running your app.
+
+ The source folder has the general Angular CLI project structure along with an additional folder called
+ /@fuse which contains the core elements of the Fuse.
+
+ We recommend you not to touch /@fuse directory to easily update Fuse in the future.
+
+ This folder contains the AppComponent along with the following directories. Everything that being
+ contained inside these folders are belong to your app and you can edit them however you like while
+ building your app:
+
+ 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.
+ 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
+ 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
+ Changing the current language can happen instantly. Simply call the
+ More detailed usage of the translation service can be found in the
+ One of the strong sides of the Fuse is its Page layouts. Every single app, pre-built page and even this
+ documentation pages uses the Fuse's page layouts.
+
+ Simply, page layouts are pre-built layouts with a demo content which you can simply copy/paste and start
+ building your own page or app based on it. Because page layouts, it's very easy to replicate any page style
+ that you can find in Fuse, without needing to remove all the demo functionality from them.
+
+ You can easily identify the layout that particular page or app using by simply looking at its main html
+ file. The very top wrapper div will tell you everything you need to know:
+
+ The above example is using the carded style page with a left sidebar setup which can be found
+ in /ui/page-layouts/carded/left-sidebar-1 directory.
+
+ The numbers in the folder names represents the scrolling style of that particular page layout. For example,
+ left-sidebar-1 has the exact same layout with left-sidebar-2 but the former one uses
+ a single scrollbar while the latter one uses separate scrollbars for its content and its sidebar.
+
+ The following command builds the application into an output directory
+
+ The build artifacts will be stored in the /dist directory. All commands that build or serve your
+ project, will delete the output directory.
+
+ To build your app with AoT (Ahead of Time) compiler, use the following command:
+
+ or if you want to serve with AoT, use the following:
+
+ This will make use of uglifying and tree-shaking functionality while serving the app from
+ the memory.
+
+ If you happen to stumble upon an error while running the
+
+ command, there is an alternative one that you can use. The following command will run the ng build
+ --prod command with an increased memory size so your app can be built:
+
+ Tests will execute after a build is executed via
+ Karma, and it will automatically
+ watch your files for changes.
+
+ You can run tests a single time via
+ --watch=false
+ or
+ --single-run
+
+ Before running the tests make sure you are serving the app via
+ ng serve.
+
+ End-to-end tests are run via Protractor.
+
+ For more information about angular-cli commands, check the angular-cli.
+
+ While still in your work folder, run the following command in the console application:
+
+ And that's it. Angular CLI will take care everything and start the Fuse.
+
+ You can check out your console application to get further information about the server. By default, it
+ will run on http://localhost:4200 but it might change depending on your setup.
+
+ Also, there are other commands available in Fuse which may help you in your development. To see the complete
+ list of available npm commands, check the
+ package.json
+ file.
+
+ The
+ ng serve
+ command will watch your files and reload the page for you as you make changes.
+ But for some reason, if you need to manually restart the server, you can do it by pressing Ctrl +
+ C on your keyboard while in the console application and then run the following command once again:
+
+ For more information about angular-cli commands, check the
+ angular-cli.
+
+ Fuse comes with variety of different Theme Layouts which you can see and try them from the configuration
+ sidebar (Click on the animated, spinning cog button from the right side of your screen). These layouts are
+ accessible from /src/app/layouts directory and you can modify them however you like.
+
+ Each layout has its own options. Those options allow you to configure the layout elements such as Toolbar,
+ Footer and Navbar.
+
+ Inside the /layouts directory, you will find the following structure:
+
+ Each layout loads the layout elements from /components directory. That means, any modifications
+ you will make to those elements, will be avilable acrosss the layouts.
+
+ Fuse has a powerful layout system which allows you to configure and use a different layout per route. Each
+ route can have its own layout configuration meaning that it's very easy to have pages like login page where
+ there isn't any toolbar or navbar showing, without leaving the Fuse.
+
+ You can get more information about the Fuse Config Service and its usage from
+ Config documantation page.
+
+ Due to the nature of apps, we cannot give any set instructions for updating Fuse. It heavily depends on your
+ project and it's up to you to update your code. However, there are couple points that we want to put forward
+ which might help you to keep Fuse updated.
+ fusePerfectScrollbar
+
+ Accepts an optional boolean which you can control the Perfect Scrollbar. If provided false, Perfect
+ Scrollbar will be destroyed or won't be initialized.
+
+ fusePerfectScrollbarOptions
+
+ Accepts the Perfect
+ Scrollbar options. In addition to those options, there is also a custom updateOnRouteChange
+ option which updates the scrollbar on route changes. That's useful if your scrollbar wraps a
+ router-outlet.
+
+
+
+
+
+
+
+ Config
is a custom built Fuse service allows to have a granule control over the Fuse. It can be
- used for changing theme options (layout, color etc.) by component basis.
+ Config
is a custom built Fuse service allows to have a granular control over the Fuse. It can
+ be used for changing theme options (layout, color etc.) by component basis.
Usage
+ Splash screen
is a custom built Fuse service allows to have a fully controllable splash
- screen. It also has built state for application loading so it will always be available while the app
- loads.
+ Splash screen
is a custom Fuse service that allows to have a control on the splash screen.
Usage
-
+
+
+
+ Mail app is the only app that has translations for demonstration purposes. You can look at its source code
+ to see the usage.
+ i18n/en.ts
file inside the
+ apps/mail
folder.
+ *.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:
+ use
method from the
+ translate service:
+ toolbar.component.ts
+ file.
+
+
+
+
+
+
+