Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

we have too many layouts #3566

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,31 @@
</div>

<!-- Footer -->
<ngb-accordion #acc="ngbAccordion" type="primary" class="footer row no-gutters sticky-footer" activeIds="footerPanel"
*ngIf="layoutSvc.isFooterShown(router.url)">
<ngb-panel id="footerPanel">
<ng-template ngbPanelTitle>
<button id="footerExpanderButton" class="cset-footer-expand-button"
[ngClass]="{'cset-icons-chevron-down flex-11a': isFooterOpen(), 'cset-icons-chevron-up flex-00a': !isFooterOpen()}"></button>
</ng-template>
<ng-template ngbPanelContent>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
Agency cybersecurity information, exempt pursuant to Florida Statute Chapter 119 Section 119.0725
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" href="https://cyberflorida.org/">Cyber Florida</a>
<span class="mr-2 ml-2">|</span>
<a href="mailto:secureflorida@cyberflorida.org">Contact Cyber Florida at: secureflorida@cyberflorida.org</a>
</div>
<div ngbAccordion type="primary" class="footer row no-gutters sticky-footer"
*ngIf="layoutSvc.isFooterShown(this.router.url)">
<div ngbAccordionItem id="footerPanel" [collapsed]="footerClosed">
<h4 ngbAccordionHeader>

<button ngbAccordionButton id="footerExpanderButton" class="cset-footer-expand-button" (click)="isFooterOpen()"
[ngClass]="{'cset-icons-chevron-down flex-11a': !footerClosed, 'cset-icons-chevron-up flex-00a': footerClosed}"></button>
</h4>
<div ngbAccordionCollapse>
<div ngbAccordionBody>
<ng-template ngbPanelContent>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
Agency cybersecurity information, exempt pursuant to Florida Statute Chapter 119 Section 119.0725
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" href="https://cyberflorida.org/">Cyber Florida</a>
<span class="mr-2 ml-2">|</span>
<a href="mailto:secureflorida@cyberflorida.org">Contact Cyber Florida at: secureflorida@cyberflorida.org</a>
</div>
</div>
</ng-template>
</div>
</ng-template>
</ngb-panel>
</ngb-accordion>
</div>
</div>
</div>
</div>

<div class="bgc-white dhs-seal-background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,8 @@ label[required]::after {
}

.accordion-header {
padding: 0.2em;
padding-top: 0.2em;
margin-bottom:0;
}

.footer .bg-primary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap';
import { AggregationService } from '../../services/aggregation.service';
import { AssessmentService } from '../../services/assessment.service';
import { AuthenticationService } from '../../services/authentication.service';
Expand All @@ -46,8 +45,7 @@ export class CfLayoutMainComponent implements OnInit, AfterViewInit {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = true;

@ViewChild('acc') accordion: NgbAccordion;
footerClosed:boolean = true;

constructor(
public auth: AuthenticationService,
Expand Down Expand Up @@ -91,10 +89,10 @@ export class CfLayoutMainComponent implements OnInit, AfterViewInit {
}

isFooterOpen() {
if (!!this.accordion) {
return this.accordion.isExpanded('footerPanel');
if (!this.footerClosed) {
return this.footerClosed = true;
}
return false;
return this.footerClosed = false;
}

}
25 changes: 15 additions & 10 deletions CSETWebNg/src/app/layout/iod-layout/iod-layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@
</div>

<!-- Footer -->
<ngb-accordion #acc="ngbAccordion" type="primary" class="footer row no-gutters sticky-footer"
*ngIf="layoutSvc.isFooterShown(this.router.url)">
<ngb-panel id="footerPanel">
<ng-template ngbPanelTitle>
<button id="footerExpanderButton" class="cset-footer-expand-button"
[ngClass]="{'cset-icons-chevron-down flex-11a': isFooterOpen(), 'cset-icons-chevron-up flex-00a': !isFooterOpen()}"></button>
</ng-template>
<ng-template ngbPanelContent>
<div ngbAccordion type="primary" class="footer row no-gutters sticky-footer"
*ngIf="layoutSvc.isFooterShown(this.router.url)">
<div ngbAccordionItem id="footerPanel" [collapsed]="footerClosed">
<h4 ngbAccordionHeader>

<button ngbAccordionButton id="footerExpanderButton" class="cset-footer-expand-button" (click)="isFooterOpen()"
[ngClass]="{'cset-icons-chevron-down flex-11a': !footerClosed, 'cset-icons-chevron-up flex-00a': footerClosed}"></button>
</h4>
<div ngbAccordionCollapse>
<div ngbAccordionBody>
<ng-template>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<ng-container *ngIf="isRunningAnonymous()">
Expand Down Expand Up @@ -97,8 +100,10 @@
</div>
</div>
</ng-template>
</ngb-panel>
</ngb-accordion>
</div>
</div>
</div>
</div>
</div>

<div class="bgc-white dhs-seal-background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ label[required]::after {
}

.accordion-header {
padding: 0.2em;
padding-top: 0.2em;
margin-bottom: 0;

}

.footer .bg-primary {
Expand Down
10 changes: 4 additions & 6 deletions CSETWebNg/src/app/layout/iod-layout/iod-layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap';
import { AggregationService } from '../../services/aggregation.service';
import { AssessmentService } from '../../services/assessment.service';
import { AuthenticationService } from '../../services/authentication.service';
Expand All @@ -48,8 +47,7 @@ export class IodLayoutComponent implements OnInit, AfterViewInit {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;

@ViewChild('acc') accordion: NgbAccordion;
footerClosed: boolean = true;

constructor(
public auth: AuthenticationService,
Expand Down Expand Up @@ -91,10 +89,10 @@ export class IodLayoutComponent implements OnInit, AfterViewInit {
}

isFooterOpen() {
if (!!this.accordion) {
return this.accordion.isExpanded('footerPanel');
if (!this.footerClosed) {
return this.footerClosed = true;
}
return false;
return this.footerClosed = false;
}

isRunningAnonymous() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h4 ngbAccordionHeader>
</h4>
<div ngbAccordionCollapse>
<div ngbAccordionBody>
<ng-template ngbPanelContent>
<ng-template>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<ng-container *ngIf="isRunningAnonymous()">
Expand Down
Loading