Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deactivate banner until further notice #73

Merged
merged 1 commit into from
Feb 13, 2025
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
7 changes: 5 additions & 2 deletions ui/static/js/jct.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jct.messages = {
}
};
jct.banner = {
from: new Date("2025-02-17"),
to: new Date("2025-03-22")
// from: new Date("2025-02-17"),
// to: new Date("2025-03-22")
};

// some convenience shortcuts
Expand All @@ -71,6 +71,9 @@ jct.banner_frag = (pos) => {
if (window.hasOwnProperty("JCT_WIDGET")) {
return banner;
}
if (!jct.banner.from) {
return banner;
}
let now = new Date();
if (now > jct.banner.from && now < jct.banner.to) {
banner = `<div class="col col--1of1 jct_banner_container" id="jct_banner_container_${pos}"><div id="jct_banner">${jct.getText("banner")}</div></div>`;
Expand Down
14 changes: 11 additions & 3 deletions ui/static/js/jct_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,12 @@ jct.messages = {
institution_placeholder: "By ROR or name",
no_affiliation: "No affiliation",
explain: 'Explain this result',
banner: '<a href="https://coalitions.typeform.com/JCT-survey-2025" target="_blank" rel="noopener">Make the JCT work better for you - Take our survey</a>'
banner: `<a href="https://coalitions.typeform.com/JCT-survey-2025" target="_blank" rel="noopener">
<img src="/img/icons/check_green.svg">
Make the JCT work better for you - Take our survey
<svg style="margin-left: 10px" width="16px" height="16px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill="none">
<path fill="#F47115" fill-rule="evenodd" d="M2.293 15.293a1 1 0 101.414 1.414l6-6a1 1 0 000-1.414l-6-6a1 1 0 00-1.414 1.414L7.586 10l-5.293 5.293zm8 0a1 1 0 101.414 1.414l6-6a1 1 0 000-1.414l-6-6a1 1 0 10-1.414 1.414L15.586 10l-5.293 5.293z"/>
</svg></a>`
},
fr: {
journal: "Revue",
Expand All @@ -481,8 +486,8 @@ jct.messages = {
}
};
jct.banner = {
from: new Date("2025-02-17"),
to: new Date("2025-03-22")
// from: new Date("2025-02-17"),
// to: new Date("2025-03-22")
};

// some convenience shortcuts
Expand All @@ -498,6 +503,9 @@ jct.banner_frag = (pos) => {
if (window.hasOwnProperty("JCT_WIDGET")) {
return banner;
}
if (!jct.banner.from) {
return banner;
}
let now = new Date();
if (now > jct.banner.from && now < jct.banner.to) {
banner = `<div class="col col--1of1 jct_banner_container" id="jct_banner_container_${pos}"><div id="jct_banner">${jct.getText("banner")}</div></div>`;
Expand Down