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

Update ejs theme href variables to target the current theme #2033

Merged
merged 1 commit into from
Jun 14, 2024
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
10 changes: 7 additions & 3 deletions src/api/models/front.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export const renderPublic = (themeId, data) => {
},
theme: {
cssVariable,
base: { href: data.themesHost ?? '' },
base: {
href: `${data.themesHost ?? ''}/themes/${themeId ?? 'default'}`,
},
},
};

Expand Down Expand Up @@ -142,7 +144,9 @@ export const renderAdmin = (data) => {
},
theme: {
cssVariable,
base: { href: data.themesHost ?? '' },
base: {
href: `${data.themesHost ?? ''}/themes/default`,
},
},
};

Expand All @@ -169,7 +173,7 @@ export const renderRootAdmin = (data) => {
},
theme: {
cssVariable,
base: { href: data.themesHost ?? '' },
base: { href: `${data.themesHost ?? ''}/themes/default` },
},
};

Expand Down
12 changes: 6 additions & 6 deletions src/app/custom/themes/default/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/themes/default/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/themes/default/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/themes/default/favicon-16x16.png"/>
<link rel="manifest" href="<%= theme.base.href %>/themes/default/site.webmanifest"/>
<link rel="mask-icon" href="<%= theme.base.href %>/themes/default/safari-pinned-tab.svg" color="#ffc40d"/>
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/favicon-16x16.png"/>
<link rel="manifest" href="<%= theme.base.href %>/site.webmanifest"/>
<link rel="mask-icon" href="<%= theme.base.href %>/safari-pinned-tab.svg" color="#ffc40d"/>
<meta name="msapplication-TileColor" content="#ffc40d"/>
<meta name="theme-color" content="#ffc40d"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Quicksand:400,500"/>
<link rel="stylesheet" href="<%= theme.base.href %>/themes/default/css/styles.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/css/styles.css"/>
<style><%= theme.cssVariable %></style>
</head>
<body>
Expand Down
16 changes: 8 additions & 8 deletions src/app/custom/themes/inist/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/themes/inist/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/themes/inist/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/themes/inist/favicon-16x16.png">
<link rel="manifest" href="<%= theme.base.href %>/themes/inist/site.webmanifest">
<link rel="mask-icon" href="<%= theme.base.href %>/themes/inist/safari-pinned-tab.svg" color="#ffc40d">
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/favicon-16x16.png">
<link rel="manifest" href="<%= theme.base.href %>/site.webmanifest">
<link rel="mask-icon" href="<%= theme.base.href %>/safari-pinned-tab.svg" color="#ffc40d">
<meta name="msapplication-TileColor" content="#ffc40d">
<meta name="theme-color" content="#ffc40d">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/themes/inist/styles.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/themes/inist/css/inist-styles.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/styles.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/css/inist-styles.css"/>
<style><%= theme.cssVariable %></style>
</head>
<body>
<header>
<div class="container">
<div id="logos">
<a class="logo logocnrs" href="https://www.cnrs.fr">
<img src="<%= theme.base.href %>/themes/inist/img/cnrs-blanc.svg" alt="CNRS"/>
<img src="<%= theme.base.href %>/img/cnrs-blanc.svg" alt="CNRS"/>
</a>
<a class="logo logoinist" href="https://www.inist.fr" aria-label="accueil du site">
<span>Inist</span>
Expand Down
24 changes: 12 additions & 12 deletions src/app/custom/themes/istex-legacy/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
<meta name="keywords" content="istex, semantic web, linked data" />
<meta name="description" content="Site on semantic web approch to ISTEX data" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/themes/istex-legacy/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/themes/istex-legacy/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/themes/istex-legacy/favicon-16x16.png" />
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/favicon-16x16.png" />
<link rel="alternate" type="application/atom+xml" href="/api/export/atom" />
<link rel="manifest" href="<%= theme.base.href %>/themes/istex-legacy/manifest.json" />
<link rel="mask-icon" href="<%= theme.base.href %>/themes/istex-legacy/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="manifest" href="<%= theme.base.href %>/manifest.json" />
<link rel="mask-icon" href="<%= theme.base.href %>/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Montserrat&amp;subset=latin,latin-ext" type="text/css" />
<link rel="stylesheet" href="<%= theme.base.href %>/themes/istex-legacy/css/style.css" />
<link rel="stylesheet" href="<%= theme.base.href %>/themes/istex-legacy/css/istex.css?ver2.0" />
<link rel="stylesheet" href="<%= theme.base.href %>/css/style.css" />
<link rel="stylesheet" href="<%= theme.base.href %>/css/istex.css?ver2.0" />

<title></title>
</head>
<body>
<header class="banniereIstex">
<div class="inner-banniereIstex container">
<a class="logo" href="https://www.istex.fr">
<img class="logo-istex" src="<%= theme.base.href %>/themes/istex-legacy/img/header/istex_logo.svg" alt="ISTEX">
<img class="logo-istex" src="<%= theme.base.href %>/img/header/istex_logo.svg" alt="ISTEX">
<span class="baseline">Le socle de la bibliothèque scientifique numérique nationale</span>
</a>
<div class="interactions">
Expand Down Expand Up @@ -83,7 +83,7 @@
</nav>
<div id="pageHead">
<a href="https://data.istex.fr/">
<img src="<%= theme.base.href %>/themes/istex-legacy/img/ic_Data_ISTEX.svg" class="dataLogo" alt="" />
<img src="<%= theme.base.href %>/img/ic_Data_ISTEX.svg" class="dataLogo" alt="" />
</a>
<div id="pageText" class="pageHead-texte">
<div id="pageTitle">
Expand Down Expand Up @@ -117,9 +117,9 @@
</div>
</footer>
<!-- Footer - bloc-8 END -->
<script src="<%= theme.base.href %>/themes/istex/js/jquery-3.6.0.min.js"></script>
<script src="<%= theme.base.href %>/themes/istex/js/responsiveMenu.js"></script>
<script src="<%= theme.base.href %>/themes/istex/js/tooltip.js"></script>
<script src="<%= theme.base.href %>/../istex/js/jquery-3.6.0.min.js"></script>
<script src="<%= theme.base.href %>/../istex/js/responsiveMenu.js"></script>
<script src="<%= theme.base.href %>/../istex/js/tooltip.js"></script>
<script>
window.__PRELOADED_STATE__ = <%- lodex.preload %>;
window.__TENANT__ = '<%= lodex.tenant %>';
Expand Down
24 changes: 12 additions & 12 deletions src/app/custom/themes/istex/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
<meta name="keywords" content="istex, semantic web, linked data"/>
<meta name="description" content="Site on semantic web approch to ISTEX data"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/themes/istex/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/themes/istex/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/themes/istex/favicon-16x16.png"/>
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.base.href %>/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="<%= theme.base.href %>/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="<%= theme.base.href %>/favicon-16x16.png"/>
<link rel="alternate" type="application/atom+xml" href="/api/export/atom"/>
<link rel="manifest" href="<%= theme.base.href %>/themes/istex/manifest.json"/>
<link rel="mask-icon" href="<%= theme.base.href %>/themes/istex/safari-pinned-tab.svg" color="#5bbad5"/>
<link rel="stylesheet" href="<%= theme.base.href %>/themes/istex/css/style.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/themes/istex/css/istex.css?ver2.0"/>
<link rel="manifest" href="<%= theme.base.href %>/manifest.json"/>
<link rel="mask-icon" href="<%= theme.base.href %>/safari-pinned-tab.svg" color="#5bbad5"/>
<link rel="stylesheet" href="<%= theme.base.href %>/css/style.css"/>
<link rel="stylesheet" href="<%= theme.base.href %>/css/istex.css?ver2.0"/>
<style><%= theme.cssVariable %></style>
</head>

<body>
<header>
<nav class="menuIstex zutile flexrow" aria-label="Menu Istex">
<a href="https://www.istex.fr" target="blank" class="accesIstex" title="accès Istex (lien externe)">
<img src="<%= theme.base.href %>/themes/istex/img/header/leftarrow.png" alt=""> Accès
<img src="<%= theme.base.href %>/img/header/leftarrow.png" alt=""> Accès
Istex.fr
</a>
<ul class="menu-haut flexrow">
Expand All @@ -47,7 +47,7 @@
<div class="banner">
<div class="zutile">
<a href="/">
<img src="<%= theme.base.href %>/themes/istex/img/header/istex.png" alt="logo Istex">
<img src="<%= theme.base.href %>/img/header/istex.png" alt="logo Istex">
<h1 class="siteTitle">
<%= custom.title %>
</h1>
Expand Down Expand Up @@ -99,9 +99,9 @@
</div>
</footer>
<!-- Footer - bloc-8 END -->
<script src="<%= theme.base.href %>/themes/istex/js/jquery-3.6.0.min.js"></script>
<script src="<%= theme.base.href %>/themes/istex/js/responsiveMenu.js"></script>
<script src="<%= theme.base.href %>/themes/istex/js/tooltip.js"></script>
<script src="<%= theme.base.href %>/js/jquery-3.6.0.min.js"></script>
<script src="<%= theme.base.href %>/js/responsiveMenu.js"></script>
<script src="<%= theme.base.href %>/js/tooltip.js"></script>
<script>
window.__PRELOADED_STATE__ = <%- lodex.preload %>;
window.__TENANT__ = '<%= lodex.tenant %>';
Expand Down
Loading