Skip to content

Commit

Permalink
fix(app): headings in not indexable content have a wrong margin
Browse files Browse the repository at this point in the history
  • Loading branch information
skoropadas committed Apr 11, 2023
1 parent 4254833 commit 82dbea1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions apps/ng-doc/src/app/docs/file-entities/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ the `*ContentApiTemplating` article.
If you would like to see what the output of the API looks like, you can look at the API example
for the following entities `NgDocPageEntity`, `NgDocApiPageEntity`.

{% index false %}

## Multiple API configurations

By default, NgDoc is configured to work only with one API configuration file, but if it is necessary
Expand All @@ -96,6 +94,8 @@ specify different value for the `route` field in the `ng-doc.api.ts` file otherw
get a conflict between two API pages, because the `route` property is optional and if you don't specify
it, NgDoc will use `api` as a default value.

{% index false %}

## See also

- `*EntitiesCategory`
Expand Down
5 changes: 2 additions & 3 deletions apps/ng-doc/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": [],
"target": "ES2020"
"target": "ES2020",

},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"],
Expand Down
2 changes: 1 addition & 1 deletion apps/ng-doc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"target": "es2020"
"target": "es2022"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
1 change: 1 addition & 0 deletions libs/app/components/page/page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</div>

<div
class="ng-doc-page-wrapper"
[innerHTML]="rootPage.pageContent | ngDocSanitizeHtml"
ngDocBlockquoteProcessor
ngDocLinkProcessor
Expand Down
16 changes: 9 additions & 7 deletions libs/app/styles/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ article {
transition: var(--ng-doc-transition);
}

&:first-child {
margin-top: 0;
}

}

.ng-doc-page-wrapper > {
@include headings {
&:first-child {
margin-top: 0;
}
}
}

section#{$class} {
margin-bottom: calc(var(--ng-doc-base-gutter) * 5);

@include headings {
//margin: calc(var(--ng-doc-base-gutter) * 3) 0;
}
}

header#{$class} {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"useDefineForClassFields": false,
"importHelpers": true,
"strict": true,
"target": "es2020",
"target": "es2022",
"module": "esnext",
"lib": ["es2019", "dom"],
"skipLibCheck": true,
Expand Down

0 comments on commit 82dbea1

Please sign in to comment.