Skip to content

Commit ef5254b

Browse files
authored
feat(daffio): clean up doc article template UI (#3431)
1 parent f299a83 commit ef5254b

File tree

3 files changed

+29
-32
lines changed

3 files changed

+29
-32
lines changed
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<button class="daffio-doc-article__menu-button" (click)="open()">
2-
<fa-icon [icon]="faBars"></fa-icon>
3-
<div>Menu</div>
4-
</button>
5-
<div class="daffio-doc-article__grid">
6-
<div class="daffio-doc-article__content">
7-
<daff-article>
1+
<daff-container size="lg">
2+
<button class="daffio-doc-article__menu-button" (click)="open()">
3+
<fa-icon [icon]="faBars"></fa-icon>
4+
<div>Menu</div>
5+
</button>
6+
<div class="daffio-doc-article__grid">
7+
<div class="daffio-doc-article__content">
88
@if (breadcrumbs.length > 0) {
99
<nav aria-label="Breadcrumb">
1010
<ol daff-breadcrumb>
@@ -20,14 +20,15 @@
2020
</ol>
2121
</nav>
2222
}
23-
24-
<ng-content></ng-content>
25-
</daff-article>
26-
</div>
27-
@if (toc.length > 0) {
28-
<daffio-docs-table-of-contents
29-
class="daffio-doc-article__table-of-contents"
30-
[tableOfContents]="toc">
31-
</daffio-docs-table-of-contents>
32-
}
33-
</div>
23+
<daff-article>
24+
<ng-content></ng-content>
25+
</daff-article>
26+
</div>
27+
@if (toc.length > 0) {
28+
<daffio-docs-table-of-contents
29+
class="daffio-doc-article__table-of-contents"
30+
[tableOfContents]="toc">
31+
</daffio-docs-table-of-contents>
32+
}
33+
</div>
34+
</daff-container>

apps/daffio/src/app/docs/components/doc-article/component.scss

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,42 @@
22

33
:host {
44
display: block;
5-
max-width: 1340px;
6-
margin: 0 auto;
75
}
86

97
.daffio-doc-article {
108
&__grid {
11-
padding: 24px;
9+
padding: 1.5rem;
1210

1311
@include daff.breakpoint(small-laptop) {
14-
display: flex;
15-
justify-content: space-between;
16-
gap: 64px;
17-
padding: 48px;
12+
display: grid;
13+
grid-template-columns: 1fr 15rem;
14+
grid-gap: 4rem;
15+
padding: 3rem;
1816
}
1917

2018
@include daff.breakpoint(desktop) {
21-
padding: 48px 0;
19+
padding: 3rem 0;
2220
}
2321
}
2422

2523
&__content {
26-
flex-grow: 1;
2724
display: flex;
2825
flex-direction: column;
29-
gap: 24px;
26+
gap: 1.5rem;
3027
}
3128

3229
&__table-of-contents {
3330
display: none;
3431

3532
@include daff.breakpoint(small-laptop) {
3633
display: block;
37-
max-width: 240px;
38-
width: 100%;
3934
}
4035
}
4136

4237
&__menu-button {
4338
@include daff.clickable();
4439
display: flex;
45-
gap: 8px;
40+
gap: 0.5rem;
4641
align-items: center;
4742
justify-content: center;
4843
background: var(--daff-theme);
@@ -51,7 +46,7 @@
5146
border-bottom: 1px solid rgb(var(--daff-theme-contrast-rgb), 0.1);
5247
color: var(--daff-theme-contrast);
5348
overflow: auto;
54-
padding: 16px 24px;
49+
padding: 1rem 1.5rem;
5550
position: sticky;
5651
top: var(--daff-sidebar-side-fixed-top-shift);
5752
width: 100%;

apps/daffio/src/app/docs/components/doc-article/module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { DaffioDocsTableOfContentsModule } from '../table-of-contents/table-of-c
3535
DaffBreadcrumbItemDirective,
3636
FontAwesomeModule,
3737
RouterLink,
38+
DaffContainerModule,
3839
],
3940
})
4041
export class DaffioDocArticleModule { }

0 commit comments

Comments
 (0)