Skip to content
Open
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
7 changes: 4 additions & 3 deletions src/main/webapp/app/layouts/footer/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div class="footer">
<p jhiTranslate="footer">This is your footer</p>
</div>
<footer class="footer">
<p class="footer-text" jhiTranslate="footer">JHipster Sample Application — © 2026 Cognition Partner Workshops</p>
<a *jhiHasAnyAuthority="'ROLE_ADMIN'" class="footer-link" routerLink="/admin/docs" jhiTranslate="footerDocs">Documentation</a>
</footer>
30 changes: 30 additions & 0 deletions src/main/webapp/app/layouts/footer/footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';

/* ==========================================================================
Footer
========================================================================== */

.footer {
margin-top: 2rem;
padding: 1.25rem 1rem;
border-top: 1px solid $border-color;
text-align: center;
font-size: $font-size-sm;
color: $text-muted;

.footer-text {
margin-bottom: 0.25rem;
}

.footer-link {
color: $secondary;
text-decoration: none;

&:hover,
&:focus {
color: $body-color;
text-decoration: underline;
}
}
}
5 changes: 4 additions & 1 deletion src/main/webapp/app/layouts/footer/footer.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Component } from '@angular/core';
import { RouterLink } from '@angular/router';

import HasAnyAuthorityDirective from 'app/shared/auth/has-any-authority.directive';
import { TranslateDirective } from 'app/shared/language';

@Component({
selector: 'jhi-footer',
templateUrl: './footer.html',
imports: [TranslateDirective],
styleUrl: './footer.scss',
imports: [TranslateDirective, RouterLink, HasAnyAuthorityDirective],
})
export default class Footer {}
7 changes: 5 additions & 2 deletions src/main/webapp/app/layouts/main/main.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { beforeEach, describe, expect, it, vitest } from 'vitest';
import { DOCUMENT } from '@angular/common';
import { Component } from '@angular/core';
import { Component, signal } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Title } from '@angular/platform-browser';
import { Router, TitleStrategy } from '@angular/router';
import { Router, TitleStrategy, provideRouter } from '@angular/router';

import { InterpolatableTranslationObject, LangChangeEvent, TranslateModule, TranslateService } from '@ngx-translate/core';
import { Subject, of } from 'rxjs';
Expand All @@ -27,11 +27,14 @@ describe('Main', () => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
providers: [
provideRouter([]),
Title,
{
provide: AccountService,
useValue: {
identity: vitest.fn(() => of(null)),
trackCurrentAccount: vitest.fn(() => signal(null)),
hasAnyAuthority: vitest.fn(() => false),
},
},
{ provide: TitleStrategy, useClass: AppPageTitleStrategy },
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/i18n/en/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,6 @@
"not.image": "File was expected to be an image but was found to be \"{{ fileType }}\""
}
},
"footer": "This is your footer"
"footer": "JHipster Sample Application — © 2026 Cognition Partner Workshops",
"footerDocs": "Documentation"
}