-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(addon-doc): move language switcher to page from header (#9155)
- Loading branch information
Showing
10 changed files
with
76 additions
and
56 deletions.
There are no files selected for viewing
69 changes: 40 additions & 29 deletions
69
projects/addon-doc/components/language-switcher/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,40 @@ | ||
<button | ||
appearance="whiteblock" | ||
iconStart="@tui.languages" | ||
size="s" | ||
tuiButtonSelect | ||
tuiIconButton | ||
type="button" | ||
[formControl]="language" | ||
> | ||
Language | ||
<tui-data-list *tuiTextfieldDropdown> | ||
<tui-opt-group label="Language of components"> | ||
<button | ||
*ngFor="let name of names" | ||
tuiOption | ||
type="button" | ||
[value]="name | titlecase" | ||
(click)="setLang(name)" | ||
> | ||
<img | ||
alt="" | ||
class="t-flag" | ||
[src]="flags.get(name) | tuiFlag" | ||
/> | ||
{{ name | titlecase }} | ||
</button> | ||
</tui-opt-group> | ||
</tui-data-list> | ||
</button> | ||
<tui-badged-content> | ||
<img | ||
*ngIf="flags.get(language.value ?? '') | tuiFlag as flag" | ||
alt="" | ||
size="s" | ||
tuiBadge | ||
tuiSlot="bottom" | ||
[src]="flag" | ||
/> | ||
|
||
<button | ||
appearance="whiteblock" | ||
iconStart="@tui.languages" | ||
size="s" | ||
tuiButtonSelect | ||
tuiIconButton | ||
type="button" | ||
[formControl]="language" | ||
> | ||
Language | ||
<tui-data-list *tuiTextfieldDropdown> | ||
<tui-opt-group label="Language of components"> | ||
<button | ||
*ngFor="let name of names" | ||
tuiOption | ||
type="button" | ||
[value]="name | titlecase" | ||
(click)="setLang(name)" | ||
> | ||
<img | ||
alt="" | ||
class="t-flag" | ||
[src]="flags.get(name) | tuiFlag" | ||
/> | ||
{{ name | titlecase }} | ||
</button> | ||
</tui-opt-group> | ||
</tui-data-list> | ||
</button> | ||
</tui-badged-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ | |
justify-content: flex-start; | ||
gap: 0.5rem; | ||
} | ||
|
||
img { | ||
box-shadow: inset 0 0 0 1px var(--tui-border-normal); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ | |
class="app-christmas" | ||
/> | ||
|
||
<tui-doc-language-switcher /> | ||
|
||
<tui-algolia-search /> | ||
|
||
<button | ||
|