mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 07:23:44 +08:00
53b96638c5
This new navbar component is used for every navbar in chat, full page or drawer, and any screen. This commit also uses this opportunity to correctly decouple drawer-routes from full page routes. This will avoid having this kind of properties in components: `@includeHeader={{false}}`. The header is now defined in the parent template using a navbar. Each route has now its own template wrapped in a div of the name of the route, eg: `<div class="c-routes-threads">..</div>`. The navbar API: ```gjs <Navbar as |navbar|> <navbar.BackButton /> <navbar.Title @title="Foo" /> <navbar.ChannelTitle @channel={{@channel}} /> <navbar.Actions as |action|> <action.CloseThreadButton /> </navbar.Actions> </navbar> ``` The full list of components is listed in `plugins/chat/assets/javascripts/discourse/components/navbar/index.gjs` and `plugins/chat/assets/javascripts/discourse/components/navbar/actions.gjs`. Visually the header is not changing much, only in drawer mode the background has been removed. This commit also introduces a `<List />` component to facilitate rendering lists in chat plugin.
103 lines
1.7 KiB
SCSS
103 lines
1.7 KiB
SCSS
.chat-browse-view {
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
padding: 1rem 1rem env(safe-area-inset-bottom) 1rem;
|
|
|
|
&__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
&__title {
|
|
box-sizing: border-box;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
&__content_wrapper {
|
|
box-sizing: border-box;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
&__cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
grid-gap: 2rem;
|
|
|
|
@include breakpoint(tablet) {
|
|
grid-template-columns: repeat(1, 1fr);
|
|
grid-gap: 1.5rem;
|
|
}
|
|
}
|
|
|
|
&__actions {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: end;
|
|
|
|
@include breakpoint(tablet) {
|
|
flex-direction: column;
|
|
|
|
.dc-filter-input-container {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.dc-filter-input-container,
|
|
nav {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
&__filters {
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 0;
|
|
&:before {
|
|
content: none; //there is a strange thing applied on nav-pills and this resets it
|
|
}
|
|
|
|
@include breakpoint(mobile-large) {
|
|
justify-content: space-between;
|
|
}
|
|
}
|
|
|
|
&__filter {
|
|
display: inline;
|
|
margin-right: 1em;
|
|
|
|
&:last-of-type {
|
|
margin-right: 0;
|
|
}
|
|
|
|
@include breakpoint(mobile-large) {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
&__filter-link,
|
|
&__filter-link:visited {
|
|
color: var(--primary);
|
|
font-size: var(--font-up-2);
|
|
padding: 0 0.25rem;
|
|
|
|
@include breakpoint(tablet) {
|
|
font-size: var(--font-up-1);
|
|
}
|
|
}
|
|
|
|
.chat-channel-card {
|
|
.chat-channel-card__leave-btn {
|
|
padding: 0;
|
|
&:hover,
|
|
&:focus {
|
|
background: none;
|
|
}
|
|
|
|
&:focus {
|
|
@include default-focus;
|
|
}
|
|
}
|
|
}
|
|
}
|