Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Move CLUE mode selector buttons into header/navbar and apply theme accordingly #209

Merged
merged 2 commits into from
Jun 11, 2021
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
24 changes: 24 additions & 0 deletions dist/scss/base/_base.scss

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions dist/wrapper/ACLUEWrapper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/wrapper/ACLUEWrapper.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/wrapper/CLUEWrapper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/wrapper/CLUEWrapper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions src/scss/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,30 @@ header.clue-modeselector {
top: -40px;
}

.phovea-navbar.navbar-dark .clue-modeselector {
label.clue-E,
label.clue-A,
label.clue-P {
color: map-get($theme-colors, "white");

&.active {
background-color: map-get($theme-colors, "gray-6"); // phovea_ui color

&:hover,
&.focus {
background-color: map-get($theme-colors, "gray-7"); // phovea_ui color
color: map-get($theme-colors, "white");
}
}

&:hover,
&.focus {
background-color: map-get($theme-colors, "gray-7"); // phovea_ui color
color: map-get($theme-colors, "white");
}
}
}

// #player_duration{
// put to the left of aside provenance

Expand Down
3 changes: 0 additions & 3 deletions src/wrapper/ACLUEWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import {EP_PHOVEA_CLUE_PROVENANCE_GRAPH, IProvenanceGraphEPDesc, IProvenanceGrap
import {ResolveNow} from 'phovea_core';

const getTemplate = () => `<div class="box">
<header>

</header>
<div class="content">
<main data-anchor="main"></main>
<!--annotation toolbar-->
Expand Down
6 changes: 3 additions & 3 deletions src/wrapper/CLUEWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ export class CLUEWrapper extends ACLUEWrapper {
const provenanceMenu = new ProvenanceGraphMenu(clueManager, body, false);
this.header.insertCustomRightMenu(provenanceMenu.node);

const modeSelector = body.querySelector('header');
modeSelector.className += 'clue-modeselector';
const phoveaNavbar = document.body.querySelector('.phovea-navbar');
const modeSelector = phoveaNavbar.appendChild(document.createElement('header'));
modeSelector.classList.add('clue-modeselector');
ButtonModeSelector.createButton(modeSelector, {
size: 'sm'
});
Expand Down Expand Up @@ -202,4 +203,3 @@ export class CLUEWrapper extends ACLUEWrapper {
};
}
}