Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix formatting and errors #3248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed docs/articles/.gitkeep
Empty file.
5 changes: 2 additions & 3 deletions docs/articles/auth/custom-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ you configured routes to the out of the box auth components.
<div class="note note-info">
<div class="note-title">Note</div>
<div class="note-body">
In case your setup is based on the ngx-admin your configuration is a bit different - the Strategy is configured under `core.module`, which providers are imported into the `app.module`. This should be the only difference for this setup.
In case your setup is based on the ngx-admin your configuration is a bit different - the Strategy is configured under <code>core.module</code>, which providers are imported into the <code>app.module</code>. This should be the only difference for this setup.
</div>
</div>
<hr>
Expand Down Expand Up @@ -77,7 +77,6 @@ import {
})
export class NgxAuthModule {
}

```

A couple of required modules for future components. Also, notice how we imported the `NbAuthModule` but without the `forRoot` call.
Expand Down Expand Up @@ -256,7 +255,7 @@ Unfortunately, the library isn't distributed with the sources, so we need to cop
<div class="note note-info">
<div class="note-title">Note</div>
<div class="note-body">
Make sure are you copying sources from the same Nebular version as you have locally, and not from the `master` branch.
Make sure are you copying sources from the same Nebular version as you have locally, and not from the <code>master</code> branch.
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions docs/articles/auth/firebase-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The package provides the following strategies:
<div class="note note-info">
<div class="note-title">Note</div>
<div class="note-body">
The package connects firebase auth with nebular/auth so you need `firebase` and `@angular/fire` installed
The package connects firebase auth with nebular/auth so you need <code>firebase</code> and <code>@angular/fire</code> installed
and configured for your application. For more instructions please see [@angular/fire docs](https://github.com/angular/angularfire).
Also make sure you import AngularFireAuthModule.
</div>
Expand All @@ -23,9 +23,9 @@ The package provides the following strategies:

Install Nebular Auth and Nebular Firebase Auth.

```sh
npm i @nebular/auth @nebular/firebase-auth
```
```sh
npm i @nebular/auth @nebular/firebase-auth
```

Import the NbAuthModule with some firebase strategies, in that example we use NbFirebasePasswordStrategy.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/auth/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="note note-info section-end">
<div class="note-title">Note</div>
<div class="note-body">
If you use our [ngx-admin starter kit](docs/guides/install-based-on-starter-kit) then you already have the Auth module in place.
If you use our <a href="docs/guides/install-based-on-starter-kit">ngx-admin starter kit</a> then you already have the Auth module in place.
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions docs/articles/auth/oauth2.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ We also assigned a `name` - `google`. Later on, we will use this alias to call t

## Step 3. Configure

Let's fill in our strategy with some settings. We add the `client_id` obtained in Step 1. We don't need client_secret for this authentication flow, so we leave it empty.
Then we set `authorize` endpoint, response_type (which is `token` in our case) and [scope](https://tools.ietf.org/html/rfc6749#section-3.3) of the authentication:
Let's fill in our strategy with some settings. We add the `client_id` obtained in Step 1. We don't need `client_secret` for this authentication flow, so we leave it empty.
Then we set `authorize` endpoint, `response_type` (which is `token` in our case) and [scope](https://tools.ietf.org/html/rfc6749#section-3.3) of the authentication:

```ts
@NgModule({
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/auth/strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Now, let's add API endpoints. According to the [NbPasswordAuthStrategy documenta
});
```

Let's assume that our API is localed on a separate server `http://example.com/app-api/v1` and change the `baseEndpoint` accordingly:
Let's assume that our API is located on a separate server `http://example.com/app-api/v1` and change the `baseEndpoint` accordingly:

```typescript
{
Expand Down
67 changes: 30 additions & 37 deletions docs/articles/auth/token.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,22 @@ Let's tell Nebular that we are waiting for a JWT token instead of a simple strin
We just need to provide a respective class to do that. Open your `app.module.ts` and adjust your `Strategy` configuration:

```typescript

@NgModule({
imports: [
// ...
NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
token: {
class: NbAuthJWTToken,
}
}),
],
forms: {},
}),
// ...

NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',

token: {
class: NbAuthJWTToken,
}
}),
],
forms: {},
}),
],
});

Expand All @@ -58,25 +57,24 @@ By default `NbPasswordAuthStrategy` expects that your token is located under the
We'll assume that our API returns a token as just `{ token: 'some-jwt-token' }` not wrapping your response in `data` property, let's tell that to Nebular:

```typescript

@NgModule({
imports: [
// ...
NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
token: {
class: NbAuthJWTToken,
key: 'token', // this parameter tells where to look for the token
}
}),
],
forms: {},
}),
// ...

NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',

token: {
class: NbAuthJWTToken,

key: 'token', // this parameter tells where to look for the token
}
}),
],
forms: {},
}),
],
});

Expand All @@ -94,7 +92,6 @@ import { NbAuthJWTToken, NbAuthService } from '@nebular/auth';
Then, let's create a `user` variable, which will store the token payload inside of the component:

```typescript

@Component({
...
})
Expand All @@ -110,7 +107,6 @@ Then, let's inject the `NbAuthService` and subscribe to an `onTokenChange` metho
is up-to-date with the information received from the backend and there is no need to additionally refresh/request the data:

```typescript

@Component({
...
})
Expand All @@ -135,12 +131,9 @@ export class HeaderComponent {

Lastly, let's grab a `user` variable and put it in the template to show the user info. The `nb-user` component is a great fit for this:


```typescript

@Component({
template: `

<nb-layout-header fixed>
<nb-user [name]="user?.name" [picture]="user?.picture"></nb-user>
</nb-layout-header>
Expand Down
104 changes: 50 additions & 54 deletions docs/articles/auth/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Auth module comes with a list of authentication components:
Alongside with the strategies' configuration `AuthModule` also accepts a list of settings for UI side under the `forms` key:

```typescript

@NgModule({
imports: [
// ...
Expand All @@ -36,7 +35,6 @@ Alongside with the strategies' configuration `AuthModule` also accepts a list of
You can configure each specific form separately, here're the default values:

```typescript

export interface NbAuthSocialLink {
link?: string,
url?: string,
Expand Down Expand Up @@ -116,47 +114,46 @@ export const defaultSettings: any = {
So, for instance, to remove the redirectDelay setting and disable the success message, we can do the following:

```typescript

@NgModule({
imports: [
// ...

NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
}),
],
forms: {
login: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
register: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
requestPassword: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
resetPassword: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
logout: {
redirectDelay: 0,
},
},
}),
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
}),
],
forms: {
login: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
register: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
requestPassword: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
resetPassword: {
redirectDelay: 0,
showMessages: {
success: true,
},
},
logout: {
redirectDelay: 0,
},
},
}),
],
});

Expand All @@ -165,7 +162,6 @@ So, for instance, to remove the redirectDelay setting and disable the success me
If it looks a bit verbose, we can move the repeating part into a variable like this:

```typescript

const formSetting: any = {
redirectDelay: 0,
showMessages: {
Expand All @@ -178,21 +174,21 @@ const formSetting: any = {
// ...

NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
}),
],
forms: {
login: formSetting,
register: formSetting,
requestPassword: formSetting,
resetPassword: formSetting,
logout: {
redirectDelay: 0,
},
},
}),
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
}),
],
forms: {
login: formSetting,
register: formSetting,
requestPassword: formSetting,
resetPassword: formSetting,
logout: {
redirectDelay: 0,
},
},
}),
],
});

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/design-system/enable-customizable-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In order to be able to customize theme variables, scss files should be enabled.
<div class="note note-info section-end">
<div class="note-title">Note</div>
<div class="note-body">
You may already have this setup in place, if you used `ng add @nebular/theme` and selected customizable themes during the installation process.
You may already have this setup in place, if you used <code>ng add @nebular/theme</code> and selected customizable themes during the installation process.
</div>
</div>
<hr>
Expand Down
3 changes: 1 addition & 2 deletions docs/articles/design-system/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ text-caption-font-size: 0.75rem,
text-caption-font-weight: 400,
text-caption-line-height: 1rem,
```
<hr>

Adjust these styles to change text style of specific groups of elements.
<hr>

## General Theme Variables

Expand Down
4 changes: 2 additions & 2 deletions docs/articles/getting-started/where-to-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ This way you can get help from the community faster, sharing answers with others
## I'm new to Angular or web development in general

Quite often we receive emails and messages from people who ask us for the advice we can give them if they are completely new to software engineering and/or Angular in particular.
We can't say that there's some general way, unfortunately. Each advice should be aimed at a particular person, his current skills set and goals. T
hat's why we believe that each person knows better for himself. But in any case, there are multiple resources like https://www.coursera.org/ or https://egghead.io/ which focus on providing online education.
We can't say that there's some general way, unfortunately. Each advice should be aimed at a particular person, his current skills set and goals.
That's why we believe that each person knows better for himself. But in any case, there are multiple resources like <https://www.coursera.org/> or <https://egghead.io/> which focus on providing online education.
2 changes: 1 addition & 1 deletion docs/articles/guides/create-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ As a result, you should have a page with a simple layout on it looking similar t
<div class="note-title">Adding into existing page</div>
<div class="note-body">
In case you already have some code on your page and want to mix it with Nebular components you would need to place your page code inside of the Nebular layout.
`<nb-layout></nb-layout>` is a required root component for Nebular to work.
<code>&lt;nb-layout&gt;&lt;/nb-layout&gt;</code> is a required root component for Nebular to work.
</div>
</div>
<hr>
Expand Down
6 changes: 3 additions & 3 deletions docs/articles/guides/install-starter-kit.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ The Nebular team doesn't consider providing generic integration layer as a part

To install ngx-admin on your machine you need to have the following tools installed:
- Git - <a href="https://git-scm.com" target="_blank">https://git-scm.com</a>
- Node.js - <a href="https://nodejs.org" target="_blank">https://nodejs.org</a>. Please note the **version** should be **>=8**
- Npm - Node.js package manager, comes with Node.js. Please make sure npm **version** is **>=5**
- Node.js - <a href="https://nodejs.org" target="_blank">https://nodejs.org</a>. Please note the **version** should be **^18.13.0 || ^20.9.0**
- Npm - Node.js package manager, comes with Node.js. Please make sure npm **version** is **>=8.19**
- You might also need some specific native packages depending on your operating system like `build-essential` on Ubuntu

<div class="note note-info">
<div class="note-title">Warning!</div>
<div class="note-body">
Please note that **it is not possible** to build ngx-admin **without these tools** and it will not be possible because of the way how Angular is built.
Please note that <strong>it is not possible</strong> to build ngx-admin <strong>without these tools</strong> and it will not be possible because of the way how Angular is built.
</div>
</div>
<hr>
Expand Down
Loading