Skip to content

Commit

Permalink
Merge pull request #926 from dchiller/update-css-handling
Browse files Browse the repository at this point in the history
Upgrade Bootstrap to version 5
  • Loading branch information
dchiller authored Jan 9, 2025
2 parents f4f6fda + f0e9044 commit 427669e
Show file tree
Hide file tree
Showing 332 changed files with 1,558 additions and 51,675 deletions.
81 changes: 33 additions & 48 deletions app/public/cantusdata/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<title>
{% block document_title %}Cantus Ultimus{% endblock %}
</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Language" content="en_US" />
{# Replace .no-js with .js before loading the CSS #}
<script>
Expand All @@ -14,64 +14,49 @@
html.className = html.className.replace(/\bno-js\b/g, 'js');
})(document.documentElement);
</script>
<link rel="stylesheet" type="text/css" href="/static/css/cantus-min.css">
<link rel="stylesheet" type="text/css" href="/static/css/cantus-min.css" />
{% block head %}{% endblock %}
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/ico" href="/static/img/favicon.ico">
<link rel="icon" type="image/ico" href="/static/img/favicon.ico" />
</head>
<body>
<div id="menu-sidenav"></div>
<div id="header-container">
<div id="page-header">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand">
<a class="primary-brand-component" href="/">Cantus Ultimus (v{{ APP_VERSION }})</a><!-- no space
--><span id="page-title">
<nav class="navbar navbar-default navbar-expand-lg bg-dark"
data-bs-theme="dark"
role="navigation">
<div class="container-fluid justify-content-start align-items-stretch">
<button class="navbar-toggler py-3"
type="button"
aria-controls="top-menu"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-brand py-3">
<a class="primary-brand-component" href="/">Cantus Ultimus (v{{ APP_VERSION }})</a><!-- no space--><span id="page-title">
{% block breadcrumb %}{% endblock %}
</span>
</div>
</div>
<div class="collapse navbar-collapse" id="top-menu">
<ul class="nav navbar-nav navbar-right">
<li>
<a style="font-weight:bold; font-size:larger" href="/manuscripts/">Manuscripts</a>
</li>
<div class="collapse navbar-collapse navbar-nav justify-content-end align-items-stretch"
id="top-menu">
<a class="nav-link py-3" href="/manuscripts/">Manuscripts</a>
{% if IS_DEVELOPMENT %}
<li>
<a href="/manifests/">IIIF Manifests</a>
</li>
<a class="nav-link py-3" href="/manifests/">IIIF Manifests</a>
{% endif %}
<li>
<a href="/about/">About</a>
</li>
<li>
<a href="/activities/">Activities</a>
</li>
<li>
<a href="/team/">Team</a>
</li>
<li>
<a href="/search/" class="search-modal-link">Search</a>
</li>
<li>
<a href="/admin/">Admin Page</a>
</li>
</ul>
<a class="nav-link py-3" href="/about/">About</a>
<a class="nav-link py-3" href="/activities/">Activities</a>
<a class="nav-link py-3" href="/team/">Team</a>
<a class="nav-link py-3" data-bs-toggle="modal" href="#searchModal">Search</a>
<a class="nav-link py-3" href="/admin/">Admin Page</a>
</div>
</div>
</div>
</nav>
<div id="search-modal"></div>
<div id="about-volpiano-modal"></div>
</nav>
<div id="search-modal"></div>
<div id="about-volpiano-modal"></div>
</div>
</div>
</div>
{% block body %}{% endblock %}
</body>
{% block body %}{% endblock %}
</body>
</html>
25 changes: 13 additions & 12 deletions app/public/cantusdata/templates/require.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{% extends "base.html" %}
{% block head %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-2371659-10', 'auto');
ga('send', 'pageview');
</script>
<script defer src="/static/js/app/cantus-min.js"></script>
{% endblock %}
{% block body %}
<noscript class="no-js-message">
<div class="container">
Expand All @@ -13,21 +25,10 @@
<div class="col-lg-12">
<img class="center-block logos"
alt="Combined logos: Social Sciences and Humanities Research Council of Canada; Schulich School of Music, McGill University; Distributed Digital Music Archives and Libraries Lab; Centre for Interdisciplinary Research in Music Media and Technology; Fonds de recherche du Québec – Société et culture"
src="/static/img/all_logos_sm.png">
src="/static/img/all_logos_sm.png" />
</div>
</div>
</div>
</noscript>
<div id="content-root"></div>
<script src="/static/js/app/cantus-min.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-2371659-10', 'auto');
ga('send', 'pageview');

</script>
{% endblock %}
17 changes: 6 additions & 11 deletions app/public/cantusdata/templates/staticpages/general.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
{% extends "base.html" %}

{% block document_title %}
Cantus Ultimus {% if title %}— {{ title }}{% endif %}
Cantus Ultimus
{% if title %}— {{ title }}{% endif %}
{% endblock %}

{% spaceless %}
{% block breadcrumb %}
{% if title %}
<a class="secondary-brand-component">{{ title }}</a>
{% endif %}
{% if title %}<a class="secondary-brand-component">{{ title }}</a>{% endif %}
{% endblock %}
{% endspaceless %}

{% block body %}
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="container mt-4">
<div class="row justify-content-center">
<div class="col-lg-10">
<h1 class="h2">{{ title }}</h1>
<div>{{ content|safe }}</div>
</div>
</div>
</div>

<script src="/static/js/app/cantus-static-min.js"></script>
{% endblock %}
142 changes: 68 additions & 74 deletions app/public/cantusdata/templates/staticpages/homepage.html
Original file line number Diff line number Diff line change
@@ -1,94 +1,88 @@
{% extends "base.html" %}

{% block body %}
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="container mt-4">
<div class="row justify-content-center">
<div class="col-lg-10">
<h1 class="h2">{{ title }}</h1>
<div>{{ content|safe }}</div>
</div>
</div>
</div>

<script src="/static/js/app/cantus-static-min.js"></script>
<style>
div.logo_map {
position: relative;
}

<style>
div.logo_map {
position: relative;
}

div.logo_map > img {
display: block;
max-width: 100%;
margin: 0 auto;
}

div.logo_map > a {
display: block;
position: absolute;
}
div.logo_map>img {
display: block;
max-width: 100%;
margin: 0 auto;
}

div.logo_map > a:hover {
background-color: rgba(255, 0, 0, .0);
}
div.logo_map>a {
display: block;
position: absolute;
}

div.logo_map > a.simssa {
top: 8%;
left: 20%;
width: 60%;
height: 27%;
}
div.logo_map>a:hover {
background-color: rgba(255, 0, 0, .0);
}

div.logo_map > a.sshrc {
top: 33%;
left: 20%;
width: 60%;
height: 20%;
}
div.logo_map>a.simssa {
top: 8%;
left: 20%;
width: 60%;
height: 27%;
}

div.logo_map > a.mcgill {
top: 53%;
left: 20%;
width: 34%;
height: 20%;
}
div.logo_map>a.sshrc {
top: 33%;
left: 20%;
width: 60%;
height: 20%;
}

div.logo_map > a.ddmal {
top: 53%;
left: 54%;
width: 26%;
height: 20%;
}
div.logo_map>a.mcgill {
top: 53%;
left: 20%;
width: 34%;
height: 20%;
}

div.logo_map > a.cirmmt {
top: 73%;
left: 20%;
width: 34%;
height: 23%;
}
div.logo_map > a.frqsc {
top: 73%;
left: 54%;
width: 26%;
height: 23%;
}
</style>
div.logo_map>a.ddmal {
top: 53%;
left: 54%;
width: 26%;
height: 20%;
}

div.logo_map>a.cirmmt {
top: 73%;
left: 20%;
width: 34%;
height: 23%;
}

<div class="logo_map">
<img src="/static/img/all_logos_scaled.png"/ border="0" style="max-width:60%">
<a href="https://simssa.ca" target="_blank" class="simssa"></a>
<a href="http://www.sshrc-crsh.gc.ca" target="_blank" class="sshrc"></a>
<a href="https://www.mcgill.ca/music" target="_blank" class="mcgill"></a>
<a href="http://ddmal.music.mcgill.ca/" target="_blank" class="ddmal"></a>
<a href="http://www.cirmmt.org" target="_blank" class="cirmmt"></a>
<a href="http://www.frqsc.gouv.qc.ca" target="_blank" class="frqsc"></a>
</div>

<!--
div.logo_map>a.frqsc {
top: 73%;
left: 54%;
width: 26%;
height: 23%;
}
</style>
<div class="logo_map">
<img src="/static/img/all_logos_scaled.png"/ border="0" style="max-width:60%" />
<a href="https://simssa.ca" target="_blank" class="simssa"></a>
<a href="http://www.sshrc-crsh.gc.ca" target="_blank" class="sshrc"></a>
<a href="https://www.mcgill.ca/music" target="_blank" class="mcgill"></a>
<a href="http://ddmal.music.mcgill.ca/" target="_blank" class="ddmal"></a>
<a href="http://www.cirmmt.org" target="_blank" class="cirmmt"></a>
<a href="http://www.frqsc.gouv.qc.ca" target="_blank" class="frqsc"></a>
</div>
<!--
<div class="row text-center">
<img src="/static/img/all_logos.png" border="0" style="max-width:60%">
<img src="/static/img/all_logos.png" border="0" style="max-width:60%" />
</div>
-->

{% endblock %}
{% endblock %}
4 changes: 2 additions & 2 deletions compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ services:
- "5432:5432"
healthcheck:
test: "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"
interval: 30s
interval: 10s
timeout: 30s
retries: 5
start_period: 30s
start_period: 10s

nginx:
container_name: cantus-nginx-1
Expand Down
4 changes: 2 additions & 2 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.16 AS frontend
FROM node:20.18 AS frontend
COPY ./public/node/frontend/package.json /code/frontend/
RUN npm install -g gulp

Expand All @@ -10,7 +10,7 @@ RUN unzip volpiano51_web.zip
RUN rm volpiano51_web.zip
RUN mv volpiano51_web/volpiano.woff ../static/fonts/volpiano.woff
COPY ./public/node/ /code/
RUN gulp build --release
RUN gulp build

FROM nginx:1.25
COPY ./nginx.conf /etc/nginx/nginx.conf
Expand Down
6 changes: 4 additions & 2 deletions nginx/public/node/frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["es2015"]
}
"presets": [
"env"
]
}
Loading

0 comments on commit 427669e

Please sign in to comment.