-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** @format */ | ||
import angular from "angular" | ||
|
||
export default angular.module("korpApp").component("frontpage", { | ||
template: /* HTML */ ` | ||
<div ng-if="!$ctrl.hasResult()" class="my-4 flex justify-center"> | ||
<div ng-if="$ctrl.showDescription" class="max-w-screen-md text-lg"> | ||
<div | ||
ng-if="$root._settings['description']" | ||
ng-bind-html="$root._settings['description'] | locObj:lang | trust" | ||
></div> | ||
<div ng-if="!$root._settings['description']">Default description</div> | ||
</div> | ||
</div> | ||
`, | ||
bindings: {}, | ||
controller: [ | ||
"$rootScope", | ||
"searches", | ||
function ($rootScope, searches) { | ||
const $ctrl = this | ||
|
||
$ctrl.hasResult = () => | ||
searches.activeSearch || | ||
$rootScope.compareTabs.length || | ||
$rootScope.graphTabs.length || | ||
$rootScope.mapTabs.length | ||
|
||
$ctrl.showDescription = false | ||
|
||
// Don't show the mode description until the inital corpora have been selected, to avoid text behind any modals | ||
$rootScope.$on("initialcorpuschooserchange", () => ($ctrl.showDescription = true)) | ||
}, | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters