Skip to content

Commit

Permalink
Improve styling
Browse files Browse the repository at this point in the history
  • Loading branch information
blabla1337 committed Oct 25, 2020
1 parent fcf5204 commit fbee2eb
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 111 deletions.
2 changes: 1 addition & 1 deletion Angular2/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'top' })],
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


<div class="navbar-brand-box">
<a href="/" class="logo logo-light">
<a href="/" class="logo logo-light">
<span class="logo-sm">
<img src="assets/images/logo.svg" alt="" height="22">
Security Knowledge Framework
Expand Down Expand Up @@ -78,7 +78,7 @@
<a class="dropdown-item" (click)='platformUpdate(item.id)'>{{item.name}}</a>
</div>
<div class="dropdown-divider"></div>
<a *ngIf="priv.includes('manage')" routerLink="/category/manage" class="dropdown-item text-center text-primary">Manage</a>
<a *ngIf="priv.includes('manage')" routerLink="/category/manage" class="dropdown-item text-center text-primary">Manage Types</a>
</div>
</div>

Expand Down
8 changes: 3 additions & 5 deletions Angular2/src/app/pages/auth/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ <h5 class="text-dark">Welcome Back !</h5>
</div>
<div class="card-body pt-0">
<div>
<a href="javascript: void(0)">
<div class="avatar-md profile-user-wid mb-4">
<span class="avatar-title rounded-circle">
<img src="assets/images/logo.svg" alt="SKF Logo" class="rounded-circle" height="65">
</span>
</div>
</a>
</div>
<div class="p-2" *ngIf="loginMethod == 'skfprovider'">
<ngb-alert type="danger" *ngIf="errormsg" [dismissible]="false">Username or Password is incorrect.</ngb-alert>
Expand All @@ -48,13 +46,13 @@ <h5 class="text-dark">Welcome Back !</h5>
</div>

<div class="mt-3">
<button (click)="onLogin()" class="btn btn-primary btn-block" type="submit">Log In</button>
<button (click)="onLogin()" class="btn btn-primary btn-block" type="submit">Login</button>
</div>

<!--
<div class="mt-4 text-center">
<a routerLink="javascript: void(0)" class="text-muted"><i class="mdi mdi-lock mr-1"></i> Forgot your
password?</a>
</div>
</div> -->
<div class="mt-3 text-center">
<a href="javascript: void(0)" (click)="onSkip()" class="text-muted"><i
class="mdi mdi-lock-open mr-1"></i> Skip Login</a>
Expand Down
167 changes: 85 additions & 82 deletions Angular2/src/app/pages/checklists/manage/manage.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,89 @@
</div>
<ul ngbNav joyrideStep="manageInfo" title="Checklists expert wizard" [stepContent]="manageInfo"
#nav="ngbNav" [activeId]="1" class="nav-tabs nav-tabs-custom mt-3">
<li [ngbNavItem]="1">

<li [ngbNavItem]="1">
<a ngbNavLink joyrideStep="manageReq" title="Checklists requirements" [stepContent]="manageReq">Requirements</a>
<ng-template ngbNavContent>
<div class="row mb-3 mt-4">
<div class="col-lg-12">
<div class="row mb-3">
<div class="col-7">
<p class="card-title">Manage Requirements</p>
</div>
<div class="col-5">
<a type="button" routerLink="/checklists/add-requirement" class="btn btn-primary float-right mb-2">Add
requirement</a>
</div>
</div>
<div class="table-responsive">
<table class="table table-centered table-nowrap table-hover">
<thead class="thead-light">
<tr>
<th scope="col">
<div class="text-center">Security controls / Security requirements</div>
</th>
<th scope="col">
<div class="text-center">Action</div>
</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of checklistData.items">
<td style="width: 60%">
<div class="mt-2">
<h6 class="text-dark">{{item.checklist_items_checklist_id}}
{{item.checklist_items_content |slice:0:130}}...</h6>
</div>
</td>
<td style="width: 40%">
<ul class="list-inline mb-0 text-center">
<li class="list-inline-item">
<a type="button" [routerLink]="['/checklists/update-requirement', item.id]"
class="btn btn-success btn-sm">Update</a>
</li>
<li class="list-inline-item">
<button (click)="centerModal(controlDelete)" type="button"
class="btn btn-danger btn-sm ml-2">Delete</button>
</li>
</ul>
</td>

<!-- Deletion modal-->
<ng-template #controlDelete let-modal>
<div class="modal-header">
<h5 class="modal-title mt-0">Delete Requirement</h5>
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Close click')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="delete">Type <b class="text-danger">DELETE</b> to delete the Requirement
item</label>
<input autocomplete="off" [(ngModel)]="delete" type="text" class="form-control" id="delete"
name="delete" placeholder="Type DELETE" onfocus="this.placeholder = ''"
onblur="this.placeholder = 'Type DELETE'">
</div>
<button (click)="deleteRequirement(item.id); modal.dismiss('Cross click')"
class="btn btn-danger">Delete</button>
</form>
</div>
</ng-template>
<!-- END Project Delete Modal -->

</tr>
</tbody>
</table>
</div>
</div>
<!-- end col-->
</div>
</ng-template>
</li>

<li [ngbNavItem]="2">
<a ngbNavLink joyrideStep="manageConfig" title="Checklists config" [stepContent]="manageConfig">Config questionnaire</a>
<ng-template ngbNavContent>
<div class="card mt-3 shadow-none">
Expand Down Expand Up @@ -50,7 +132,7 @@
</p>
</div>
<div class="col-2">
<i class="bx bx-plus font-size-15 py-3 float-right"></i>
<i class="fas fa-pencil-alt text-success mr-1 float-right"> Add</i>
</div>
</div>
</button>
Expand All @@ -77,7 +159,7 @@
</p>
</div>
<div class="col-2">
<i class="bx bx-minus font-size-15 py-3 float-right"></i>
<i class="fas fa-trash-alt text-danger mr-1 float-right">Remove</i>
</div>
</div>
</button>
Expand All @@ -91,86 +173,7 @@
</ng-template>
</li>

<li [ngbNavItem]="2">
<a ngbNavLink joyrideStep="manageReq" title="Checklists requirements" [stepContent]="manageReq">Requirements</a>
<ng-template ngbNavContent>
<div class="row mb-3 mt-4">
<div class="col-lg-12">
<div class="row mb-3">
<div class="col-7">
<p class="card-title">Manage Requirements</p>
</div>
<div class="col-5">
<a type="button" routerLink="/checklists/add-requirement" class="btn btn-primary float-right mb-2">Add
requirement</a>
</div>
</div>
<div class="table-responsive">
<table class="table table-centered table-nowrap table-hover">
<thead class="thead-light">
<tr>
<th scope="col">
<div class="text-center">Security controls / Security requirements</div>
</th>
<th scope="col">
<div class="text-center">Action</div>
</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of checklistData.items">
<td style="width: 60%">
<div class="mt-2">
<h6 class="text-dark">{{item.checklist_items_checklist_id}}
{{item.checklist_items_content |slice:0:130}}...</h6>
</div>
</td>
<td style="width: 40%">
<ul class="list-inline mb-0 text-center">
<li class="list-inline-item">
<a type="button" [routerLink]="['/checklists/update-requirement', item.id]"
class="btn btn-success btn-sm">Update</a>
</li>
<li class="list-inline-item">
<button (click)="centerModal(controlDelete)" type="button"
class="btn btn-danger btn-sm ml-2">Delete</button>
</li>
</ul>
</td>

<!-- Deletion modal-->
<ng-template #controlDelete let-modal>
<div class="modal-header">
<h5 class="modal-title mt-0">Delete Requirement</h5>
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Close click')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="delete">Type <b class="text-danger">DELETE</b> to delete the Requirement
item</label>
<input autocomplete="off" [(ngModel)]="delete" type="text" class="form-control" id="delete"
name="delete" placeholder="Type DELETE" onfocus="this.placeholder = ''"
onblur="this.placeholder = 'Type DELETE'">
</div>
<button (click)="deleteRequirement(item.id); modal.dismiss('Cross click')"
class="btn btn-danger">Delete</button>
</form>
</div>
</ng-template>
<!-- END Project Delete Modal -->

</tr>
</tbody>
</table>
</div>
</div>
<!-- end col-->
</div>
</ng-template>
</li>

<li [ngbNavItem]="3">
<a ngbNavLink joyrideStep="manageQuestions" title="Checklists questions" [stepContent]="manageQuestions">Questions</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h4 class="mb-5">Update Checklist</h4>
</div>
</div>

<button [routerLink]="['/checklists/manage', checklistId]" class="btn btn-danger float-right ml-3"
<button [routerLink]="['/checklists/manage/'+checklistId]" fragment="2" class="btn btn-danger float-right ml-3"
type="button">Cancel</button>
<button (click)="UpdateChecklistItem()" class="btn btn-success float-right"
type="submit">Submit</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class UpdateRequirementComponent implements OnInit

this._checklistService
.updateChecklistItem(this.validationform.value, this.id)
.subscribe(() => this.router.navigate(['/checklists/manage', this.checklistId]));
.subscribe(() => this.router.navigate(['/checklists/manage', this.checklistId], { fragment: '2' }));
}

get form()
Expand Down
4 changes: 2 additions & 2 deletions Angular2/src/app/pages/code-example/view/view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ <h4 class="card-title text-primary">{{code.code_lang}} - {{code.title}}</h4>
</div> -->
<div class="row mt-4">
<div class="col-sm-6">
<a routerLink="/" class="btn text-muted d-none d-sm-inline-block btn-link">
<i class="mdi mdi-arrow-left mr-1"></i> Learn More</a>
<!--<a routerLink="/" class="btn text-muted d-none d-sm-inline-block btn-link">
<i class="mdi mdi-arrow-left mr-1"></i> Learn More</a>-->
</div> <!-- end col -->
<div class="col-sm-6">
<div *ngIf="loggedIn()" class="text-sm-right">
Expand Down
29 changes: 15 additions & 14 deletions Angular2/src/app/pages/dashboard/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ <h4 class="mb-0 font-size-18 head-four">Dashboard</h4>
</div>

<div class="row justify-content-center">
<div class="col-md-3 d-flex align-items-stretch">
<div class="card mt-4 maintenance-box">
<div class="card-body d-flex flex-column">
<i class="bx bx-code-alt mb-4 h1 text-primary"></i>
<h5 class="font-size-15 text-primary text-uppercase">Code examples</h5>
<p class="mb-0">The code examples show how to approach some common functionalities and how to apply the secure coding principles!
We have secure code examples in different languages.</p>
<div class="mt-auto pt-3">
<button type="button" routerLink="/code-example/view" class="btn btn-primary btn-sm">Learn More</button>
</div>
</div>
</div>
</div>
<div class="col-md-3 d-flex align-items-stretch">
<div class="card mt-4 maintenance-box">
<div class="card-body d-flex flex-column">
Expand All @@ -57,26 +70,14 @@ <h5 class="font-size-15 text-primary text-uppercase">Knowledge Base</h5>
</div>
</div>
</div>
<div class="col-md-3 d-flex align-items-stretch">
<div class="card mt-4 maintenance-box">
<div class="card-body d-flex flex-column">
<i class="bx bx-code-alt mb-4 h1 text-primary"></i>
<h5 class="font-size-15 text-primary text-uppercase">Code examples</h5>
<p class="mb-0">The code examples show how to approach some common functionalities and how to apply the secure coding principles!
We have secure code examples in different languages.</p>
<div class="mt-auto pt-3">
<button type="button" routerLink="/code-example/view" class="btn btn-primary btn-sm">Learn More</button>
</div>
</div>
</div>
</div>

<div class="col-md-3 d-flex align-items-stretch">
<div class="card mt-4 maintenance-box">
<div class="card-body d-flex flex-column">
<i class="bx bxs-flask mb-4 h1 text-primary"></i>
<h5 class="font-size-15 text-primary text-uppercase">
SKF Labs</h5>
<p class="mb-0">We created in SKF Labs for Developers and security specialist to train their security testing skills.
<p class="mb-0">We created SKF Labs for Developers and security specialist to train their security testing skills.
Also provided are write-ups for the labs to teach the correct testing methodology.</p>
<div class="mt-auto pt-3">
<button type="button" routerLink="/labs/view" class="btn btn-primary btn-sm">Learn More</button>
Expand Down
4 changes: 2 additions & 2 deletions Angular2/src/assets/scss/_variables-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $sidebar-menu-item-color: #545a6d;
$sidebar-menu-sub-item-color: #545a6d;
$sidebar-menu-item-icon-color: #7f8387;
$sidebar-menu-item-hover-color: #383c40;
$sidebar-menu-item-active-color: #556ee6;
$sidebar-menu-item-active-color: #451cb7;
$sidebar-width: 250px;
$sidebar-collapsed-width: 70px;
$sidebar-width-sm: 160px;
Expand Down Expand Up @@ -75,7 +75,7 @@ $chart-text-color: #343a40;
// Buttons
$btn-bg: #ae85d9;
$btn-color: #fff;
$btn-hover: #ae85d9;
$btn-hover: #8263a3;


// Variables
Expand Down
4 changes: 4 additions & 0 deletions Angular2/src/assets/scss/app-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ aw-wizard {

.badge {
color: #000000;
}

.logo {
color: #ffffff;
}
6 changes: 5 additions & 1 deletion Angular2/src/assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@

.badge {
color: #ffffff;
}
}

.loading {
color: #ffffff;
}
1 change: 1 addition & 0 deletions Angular2/src/assets/scss/custom/structure/_topbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

.logo-sm {
display: none;

}
}

Expand Down

0 comments on commit fbee2eb

Please sign in to comment.