diff --git a/src/@noctua.announcement/@noctua.announcement.module.ts b/src/@noctua.announcement/@noctua.announcement.module.ts new file mode 100644 index 00000000..9ce5bb48 --- /dev/null +++ b/src/@noctua.announcement/@noctua.announcement.module.ts @@ -0,0 +1,25 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AnnouncementPanelComponent } from './components/announcement-panel/announcement-panel.component'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { NoctuaSharedModule } from '@noctua/shared.module'; + +@NgModule({ + imports: [ + CommonModule, + MatIconModule, + MatButtonModule, + MatSidenavModule, + FlexLayoutModule, + NoctuaSharedModule + ], + exports: [ + AnnouncementPanelComponent + ], + declarations: [ + AnnouncementPanelComponent], +}) +export class NoctuaAnnouncementModule { } diff --git a/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.html b/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.html new file mode 100644 index 00000000..bcb4fee5 --- /dev/null +++ b/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.html @@ -0,0 +1,20 @@ +
\ No newline at end of file diff --git a/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.scss b/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.scss new file mode 100644 index 00000000..33293d51 --- /dev/null +++ b/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.scss @@ -0,0 +1,46 @@ +@use "@angular/material" as mat; +@import "src/@noctua/scss/noctua"; +@import "src/@noctua.common/scss/noctua.common"; + +:host { + //width: 100%; // display: block; + + background-color: white; + @include mat.elevation(4); + + .noc-cam-form { + @include deep-width(500px); + } + + .noc-header { + @include deep-height(40px); + background-color: #eee; + border-bottom: #ccc solid 1px; + + mat-icon-button { + @include deep-height(40px); + @include deep-width(40px); + line-height: 40px; + } + + .noc-title { + font-size: 10px; + padding: 0 14px; + } + } + + .noc-body { + padding: 0 14px 14px 14px; + } + + .noc-item { + @include deep-width(100%); + font-size: 12px; + + .noc-title { + font-weight: bold; + margin-right: 8px; + color: #999; + } + } +} diff --git a/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.ts b/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.ts new file mode 100644 index 00000000..e6040ea9 --- /dev/null +++ b/src/@noctua.announcement/components/announcement-panel/announcement-panel.component.ts @@ -0,0 +1,54 @@ +import { Component, Input, OnInit, OnDestroy } from '@angular/core'; +import { MatDrawer, MatSidenav } from '@angular/material/sidenav'; +import { Subject } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; +import { + NoctuaFormMenuService +} from '@geneontology/noctua-form-base'; +import { NoctuaSearchMenuService } from '@noctua.search/services/search-menu.service'; +import { NoctuaAnnouncementService } from '@noctua.announcement/services/cam.service'; +import { Announcement } from '@noctua.announcement/models/announcement'; + + +@Component({ + selector: 'noc-announcement-panel', + templateUrl: './announcement-panel.component.html', + styleUrls: ['./announcement-panel.component.scss'], +}) + +export class AnnouncementPanelComponent implements OnInit, OnDestroy { + + @Input('sidenav') sidenav: MatSidenav; + announcements: Announcement[]; + + private _unsubscribeAll: Subject