Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Requirement Formalization Tool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thodoris Nestoridis
Requirement Formalization Tool
Commits
48f8ff50
Commit
48f8ff50
authored
Feb 18, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navigation bar and side nav (completed)
parent
362d388c
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
145 additions
and
347 deletions
+145
-347
app.component.html
reqtool/ReqmanAngular11/src/app/app.component.html
+15
-1
app.component.scss
reqtool/ReqmanAngular11/src/app/app.component.scss
+9
-0
app.module.ts
reqtool/ReqmanAngular11/src/app/app.module.ts
+8
-5
nav.component.html
...ReqmanAngular11/src/app/components/nav/nav.component.html
+0
-92
nav.component.scss
...ReqmanAngular11/src/app/components/nav/nav.component.scss
+0
-20
nav.component.spec.ts
...manAngular11/src/app/components/nav/nav.component.spec.ts
+0
-25
nav.component.ts
...l/ReqmanAngular11/src/app/components/nav/nav.component.ts
+0
-21
navigation-bar.component.html
...p/components/navigation-bar/navigation-bar.component.html
+0
-96
navigation-bar.component.scss
...p/components/navigation-bar/navigation-bar.component.scss
+0
-20
navigation-bar.component.spec.ts
...omponents/navigation-bar/navigation-bar.component.spec.ts
+0
-25
navigation-bar.component.ts
...app/components/navigation-bar/navigation-bar.component.ts
+0
-40
header.component.html
...Angular11/src/app/navigation/header/header.component.html
+20
-0
header.component.scss
...Angular11/src/app/navigation/header/header.component.scss
+20
-0
header.component.ts
...anAngular11/src/app/navigation/header/header.component.ts
+19
-0
sidenav-list.component.html
...c/app/navigation/sidenav-list/sidenav-list.component.html
+19
-0
sidenav-list.component.scss
...c/app/navigation/sidenav-list/sidenav-list.component.scss
+13
-0
sidenav-list.component.ts
...src/app/navigation/sidenav-list/sidenav-list.component.ts
+17
-0
styles.scss
reqtool/ReqmanAngular11/src/styles.scss
+5
-2
No files found.
reqtool/ReqmanAngular11/src/app/app.component.html
View file @
48f8ff50
<app-nav></app-nav>
<mat-sidenav-container>
<mat-sidenav
#
sidenav
role=
"navigation"
>
<!--this is a place for us to add side-nav code-->
<app-sidenav-list
(
sidenavClose
)="
sidenav
.
close
()"
></app-sidenav-list>
</mat-sidenav>
<mat-sidenav-content>
<!--in here all the content must reside. We will add a navigation header as well-->
<mat-sidenav-content>
<app-header
(
sidenavToggle
)="
sidenav
.
toggle
()"
></app-header>
<main>
<router-outlet></router-outlet>
</main>
</mat-sidenav-content>
</mat-sidenav-content>
</mat-sidenav-container>
reqtool/ReqmanAngular11/src/app/app.component.scss
View file @
48f8ff50
mat-sidenav-container
,
mat-sidenav-content
,
mat-sidenav
{
height
:
100%
;
}
mat-sidenav
{
width
:
250px
;
}
main
{
padding
:
10px
;
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/app.module.ts
View file @
48f8ff50
...
...
@@ -19,11 +19,13 @@ import { AddPrefixComponent } from './components/add-prefix/add-prefix.component
import
{
PrefixDetailsComponent
}
from
'./components/prefix-details/prefix-details.component'
;
import
{
PrefixListComponent
}
from
'./components/prefix-list/prefix-list.component'
;
import
{
NotifierModule
}
from
"angular-notifier"
;
import
{
NavigationBarComponent
}
from
'./components/navigation-bar/navigation-bar.component'
;
import
{
BrowserAnimationsModule
}
from
'@angular/platform-browser/animations'
;
import
{
MaterialModule
}
from
'./mat-module'
;
import
{
NavComponent
}
from
'./components/nav/nav.component'
;
import
{
MaterialModule
}
from
'./mat-module'
;
import
{
FlexLayoutModule
}
from
'@angular/flex-layout'
;
import
{
HeaderComponent
}
from
'./navigation/header/header.component'
;
import
{
SidenavListComponent
}
from
'./navigation/sidenav-list/sidenav-list.component'
;
...
...
@@ -38,8 +40,8 @@ import { NavComponent } from './components/nav/nav.component';
AddPrefixComponent
,
PrefixDetailsComponent
,
PrefixListComponent
,
NavigationBa
rComponent
,
Nav
Component
,
Heade
rComponent
,
SidenavList
Component
,
],
imports
:
[
BrowserModule
,
...
...
@@ -50,6 +52,7 @@ import { NavComponent } from './components/nav/nav.component';
NotifierModule
,
BrowserAnimationsModule
,
MaterialModule
,
FlexLayoutModule
,
],
providers
:
[
AuthService
,
...
...
reqtool/ReqmanAngular11/src/app/components/nav/nav.component.html
deleted
100644 → 0
View file @
362d388c
<app-navigation-bar></app-navigation-bar>
<mat-sidenav-container
autosize
>
<mat-sidenav
#
navigationSidenav
mode=
"over"
role=
"navigation"
>
<mat-toolbar>
<mat-toolbar-row>
<h2
class=
"toolbar-title"
>
APP
</h2>
</mat-toolbar-row>
</mat-toolbar>
<!-- <mat-nav-list dense> -->
<mat-nav-list>
<h2
matSubheader
>
WORK
</h2>
<a
mat-list-item
routerLink=
"/"
style=
"height: 0;"
></a>
<!-- <mat-divider></mat-divider> -->
<h2
matSubheader
>
CUSTOMER
</h2>
<!--
<ng-container *ngIf="salesRoutes">
<h2 matSubheader> {{ 'SALES_SUB_HEADER' | translate }} </h2>
<a *ngFor="let item of salesRoutes"
mat-list-item
(click)="navigationSidenav.close()"
[routerLink]="[item.route]"
routerLinkActive="list-item-active">
<mat-icon matListIcon class="nav-list-icon"> {{ item.icon }} </mat-icon>
{{item.title}}
</a>
</ng-container>
<ng-container *ngIf="collateralRoutes">
<h2 matSubheader> {{ 'COLLATERAL_SUB_HEADER' | translate }} </h2>
<a *ngFor="let item of collateralRoutes"
mat-list-item
(click)="navigationSidenav.close()"
[routerLink]="[item.route]"
routerLinkActive="list-item-active">
<mat-icon matListIcon class="nav-list-icon"> {{ item.icon }} </mat-icon>
{{item.title}}
</a>
</ng-container>
-->
<h2
matSubheader
>
SALES
</h2>
<h2
matSubheader
>
COL
</h2>
<h2
matSubheader
>
MARKETING
</h2>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav
#
commandbarSidenav
position=
"end"
mode=
"side"
class=
"crm-command-bar-sidenav"
>
<mat-list
style=
"padding: 10px;"
>
</mat-list>
</mat-sidenav>
<mat-sidenav-content
role=
"main"
>
<!--
<crm-navigation-bar *ngIf="isAuthenticated()" (toggleSidenav)="navigationSidenav.toggle()">
</crm-navigation-bar>
-->
<router-outlet></router-outlet>
</mat-sidenav-content>
</mat-sidenav-container>
reqtool/ReqmanAngular11/src/app/components/nav/nav.component.scss
deleted
100644 → 0
View file @
362d388c
@mixin
crm-nav-theme
(
$theme
)
{
$nav-list-icon-padding
:
12px
!
default
;
$toolbar-title-padding
:
16px
!
default
;
.list-item-active
{
font-weight
:
bold
;
color
:
mat-color
(
map-get
(
$theme
,
accent
)
,
darker
)
!
important
;
background
:
rgba
(
0
,
0
,
0
,
0
.04
);
}
.nav-list-icon
{
margin
:
0
$nav-list-icon-padding
0
$nav-list-icon-padding
;
}
.toolbar-title
{
margin
:
0
$toolbar-title-padding
0
$toolbar-title-padding
;
}
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/components/nav/nav.component.spec.ts
deleted
100644 → 0
View file @
362d388c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
NavComponent
}
from
'./nav.component'
;
describe
(
'NavComponent'
,
()
=>
{
let
component
:
NavComponent
;
let
fixture
:
ComponentFixture
<
NavComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
NavComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
NavComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
reqtool/ReqmanAngular11/src/app/components/nav/nav.component.ts
deleted
100644 → 0
View file @
362d388c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AuthService
}
from
'./../../services/auth.service'
;
@
Component
({
selector
:
'app-nav'
,
templateUrl
:
'./nav.component.html'
,
styleUrls
:
[
'./nav.component.scss'
]
})
export
class
NavComponent
implements
OnInit
{
constructor
(
private
authService
:
AuthService
,)
{
}
ngOnInit
():
void
{
}
public
isAuthenticated
()
{
this
.
authService
.
isLoggedIn
();
}
}
reqtool/ReqmanAngular11/src/app/components/navigation-bar/navigation-bar.component.html
deleted
100644 → 0
View file @
362d388c
<mat-toolbar
color=
"primary"
class=
"app-navigation-bar"
>
<mat-toolbar-row>
<span
class=
"toolbar-title"
>
{{ 'APP_TOOLBAR_TITLE'}}
</span>
<div
fxFlex
fxLayout
fxLayoutAlign=
"flex-end"
>
<ul
fxLayout
fxLayoutGap=
"20px"
class=
"navigation-items"
>
<li
fxHide
.
xs
>
<button
mat-icon-button
>
<mat-icon>
settings
</mat-icon>
</button>
</li>
<li
fxHide
.
xs
>
<button
mat-icon-button
>
<mat-icon>
help_outline
</mat-icon>
</button>
</li>
<li>
<button
mat-icon-button
[
matMenuTriggerFor
]="
auth
"
>
<mat-icon>
person
</mat-icon>
</button>
<mat-menu
#
auth=
"matMenu"
>
<mat-divider></mat-divider>
<button
mat-menu-item
(
click
)="
logout
()"
>
<mat-icon>
exit_to_app
</mat-icon>
<span>
{{ 'SIGN_OUT_NAVIGATION_BAR_BUTTON' }}
</span>
</button>
</mat-menu>
</li>
</ul>
</div>
</mat-toolbar-row>
</mat-toolbar>
<div
fxFlex
fxLayout
fxLayoutAlign=
"flex-end"
fxHide
.
xs
>
<div
fxFlex
fxLayout
fxLayoutAlign=
"flex-end"
fxHide
.
xs
>
<mat-icon
class=
"toolbar-icon"
>
settings
</mat-icon>
<mat-icon
class=
"toolbar-icon"
>
help_outline
</mat-icon>
<button
mat-icon-button
[
matMenuTriggerFor
]="
auth
"
>
<mat-icon>
person_outline
</mat-icon>
</button>
<mat-menu
#
auth=
"matMenu"
>
<button
mat-menu-item
>
<mat-icon>
exit_to_app
</mat-icon>
<span>
Sign out
</span>
</button>
</mat-menu>
</div>
<button
mat-icon-button
[
matMenuTriggerFor
]="
menu
"
>
<mat-icon>
more_vert
</mat-icon>
</button>
<mat-menu
#
menu=
"matMenu"
>
<button
mat-menu-item
>
<mat-icon>
dialpad
</mat-icon>
<span>
Redial
</span>
</button>
<button
mat-menu-item
disabled
>
<mat-icon>
voicemail
</mat-icon>
<span>
Check voicemail
</span>
</button>
<button
mat-menu-item
>
<mat-icon>
notifications_off
</mat-icon>
<span>
Disable alerts
</span>
</button>
</mat-menu>
<div
fxFlex
fxLayout
fxLayoutAlign=
"flex-end"
fxHide
.
xs
>
<ul
fxLayout
fxLayoutGap=
"20px"
class=
"navigation-items"
>
<li>
<a>
<mat-icon
class=
"toolbar-icon"
>
settings
</mat-icon>
</a>
</li>
<li>
<a
>
<mat-icon
class=
"toolbar-icon"
>
help_outline
</mat-icon>
</a>
</li>
<li>
<a>
<mat-icon
class=
"toolbar-icon"
>
person_outline
</mat-icon>
</a>
</li>
</ul>
</div>
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/components/navigation-bar/navigation-bar.component.scss
deleted
100644 → 0
View file @
362d388c
$toolbar-title-padding
:
16px
!
default
;
.toolbar-title
{
margin
:
0
$toolbar-title-padding
0
$toolbar-title-padding
;
}
.navigation-items
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
cursor
:
pointer
;
}
.app-navigation-bar
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
z-index
:
998
;
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/components/navigation-bar/navigation-bar.component.spec.ts
deleted
100644 → 0
View file @
362d388c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
NavigationBarComponent
}
from
'./navigation-bar.component'
;
describe
(
'NavigationBarComponent'
,
()
=>
{
let
component
:
NavigationBarComponent
;
let
fixture
:
ComponentFixture
<
NavigationBarComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
NavigationBarComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
NavigationBarComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
reqtool/ReqmanAngular11/src/app/components/navigation-bar/navigation-bar.component.ts
deleted
100644 → 0
View file @
362d388c
import
{
Component
,
EventEmitter
,
Output
}
from
'@angular/core'
;
import
{
NavigationEnd
,
Router
}
from
'@angular/router'
;
import
{
AuthService
}
from
'./../../services/auth.service'
;
@
Component
({
selector
:
'app-navigation-bar'
,
templateUrl
:
'./navigation-bar.component.html'
,
styleUrls
:
[
'./navigation-bar.component.scss'
]
})
export
class
NavigationBarComponent
{
@
Output
()
toggleSidenav
=
new
EventEmitter
<
void
>
();
private
returnUrl
=
'/'
;
constructor
(
private
authService
:
AuthService
,
private
router
:
Router
)
{
this
.
router
.
events
.
subscribe
((
event
)
=>
{
if
(
event
instanceof
NavigationEnd
)
{
this
.
returnUrl
=
event
.
url
;
}
});
}
public
onProfile
()
{
this
.
router
.
navigate
([
'users/profile'
]);
}
public
logout
()
{
this
.
authService
.
logout
();
}
}
reqtool/ReqmanAngular11/src/app/navigation/header/header.component.html
0 → 100644
View file @
48f8ff50
<mat-toolbar
color=
"primary"
>
<div
fxHide
.
gt-xs
>
<button
mat-icon-button
(
click
)="
onToggleSidenav
()"
>
<mat-icon>
menu
</mat-icon>
</button>
</div>
<div>
<a
routerLink=
"/boilerplates"
>
Boilerplates
</a>
</div>
<div
fxFlex
fxLayout
fxHide
.
xs
fxLayoutAlign=
"end"
>
<ul
fxLayout
fxLayoutGap=
"15px"
class=
"navigation-items"
>
<li>
<a
routerLink=
"/add-boilerplate"
>
Add Boilepate
</a>
</li>
<li>
<a
routerLink=
"/account"
>
Account Actions
</a>
</li>
</ul>
</div>
</mat-toolbar>
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/navigation/header/header.component.scss
0 → 100644
View file @
48f8ff50
a
{
text-decoration
:
none
;
color
:
white
;
}
a
:hover
,
a
:active
{
color
:
lightgray
;
}
.navigation-items
{
list-style-type
:
none
;
padding
:
0
;
margin
:
0
;
}
mat-toolbar
{
border-radius
:
3px
;
}
@media
(
max-width
:
959px
){
mat-toolbar
{
border-radius
:
0px
;
}
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/navigation/header/header.component.ts
0 → 100644
View file @
48f8ff50
import
{
Component
,
OnInit
,
Output
,
EventEmitter
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-header'
,
templateUrl
:
'./header.component.html'
,
styleUrls
:
[
'./header.component.scss'
]
})
export
class
HeaderComponent
implements
OnInit
{
@
Output
()
public
sidenavToggle
=
new
EventEmitter
();
constructor
()
{
}
ngOnInit
():
void
{
}
public
onToggleSidenav
=
()
=>
{
this
.
sidenavToggle
.
emit
();
}
}
reqtool/ReqmanAngular11/src/app/navigation/sidenav-list/sidenav-list.component.html
0 → 100644
View file @
48f8ff50
<mat-nav-list>
<a
mat-list-item
routerLink=
"#"
(
click
)="
onSidenavClose
()"
>
<mat-icon>
home
</mat-icon>
<span
class=
"nav-caption"
>
Home
</span>
</a>
<a
mat-list-item
routerLink=
"#"
(
click
)="
onSidenavClose
()"
>
<mat-icon>
assignment_ind
</mat-icon>
<span
class=
"nav-caption"
>
Owner Actions
</span>
</a>
<a
mat-list-item
routerLink=
"#"
(
click
)="
onSidenavClose
()"
>
<mat-icon>
account_balance
</mat-icon><span
class=
"nav-caption"
>
Account Actions
</span>
</a>
<mat-list-item
[
matMenuTriggerFor
]="
menu
"
>
<mat-icon>
unfold_more
</mat-icon>
<a
matline
>
Example
</a>
</mat-list-item>
<mat-menu
#
menu=
"matMenu"
>
<button
mat-menu-item
(
click
)="
onSidenavClose
()"
>
View profile
</button>
<button
mat-menu-item
(
click
)="
onSidenavClose
()"
>
Add contact
</button>
</mat-menu>
</mat-nav-list>
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/navigation/sidenav-list/sidenav-list.component.scss
0 → 100644
View file @
48f8ff50
a
{
text-decoration
:
none
;
color
:
white
;
}
a
:hover
,
a
:active
{
color
:
lightgray
;
}
.nav-caption
{
display
:
inline-block
;
padding-left
:
6px
;
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/navigation/sidenav-list/sidenav-list.component.ts
0 → 100644
View file @
48f8ff50
import
{
Component
,
OnInit
,
Output
,
EventEmitter
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-sidenav-list'
,
templateUrl
:
'./sidenav-list.component.html'
,
styleUrls
:
[
'./sidenav-list.component.scss'
]
})
export
class
SidenavListComponent
implements
OnInit
{
@
Output
()
sidenavClose
=
new
EventEmitter
();
constructor
()
{
}
ngOnInit
()
{
}
public
onSidenavClose
=
()
=>
{
this
.
sidenavClose
.
emit
();
}
}
reqtool/ReqmanAngular11/src/styles.scss
View file @
48f8ff50
...
...
@@ -7,5 +7,8 @@
/* Import angular-notifier. */
@import
'~angular-notifier/styles'
;
html
,
body
{
height
:
100%
;
}
body
{
margin
:
0
;
font-family
:
Roboto
,
"Helvetica Neue"
,
sans-serif
;
}
/* for sidenav to take a whole page */
html
,
body
{
margin
:
0
;
height
:
100%
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment