Skip to content

Commit

Permalink
Debian rules to unzip GCWeb theme files. Updated Dockerfile build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Ngai committed Apr 15, 2024
1 parent a4b54c6 commit f90cbf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ RUN cd msc-pygeoapi && \
pip3 install -U elasticsearch && \
# ensure cors enabled in config
sed -i 's^# cors: true^cors: true^' $BASEDIR/msc-pygeoapi/deploy/default/msc-pygeoapi-config.yml && \
# GCWeb theme files
wget -O ./themes-gcweb.zip https://github.com/wet-boew/GCWeb/releases/download/v14.6.0/themes-dist-14.6.0-gcweb.1.zip && \
unzip -o ./themes-gcweb.zip "*/GCWeb/*" -d theme/static && \
unzip -o ./themes-gcweb.zip "*/wet-boew/*" -d theme/static && \
mv ./theme/static/themes-dist-14.6.0-gcweb ./theme/static/themes-gcweb && \
rm -f ./themes-gcweb.zip && \
# install msc-pygeoapi
python3 setup.py install && \
# show version
Expand Down
3 changes: 2 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ MSC_PYGEOAPI_VERSION=$(shell dpkg-parsechangelog -SVersion)

sed -i "s/MSC_PYGEOAPI_VERSION/$(MSC_PYGEOAPI_VERSION)/" theme/templates/_base.html

wget -O themes-gcweb.zip https://github.com/wet-boew/GCWeb/releases/download/v14.6.0/themes-dist-14.6.0-gcweb.1.zip
wget -O ./themes-gcweb.zip https://github.com/wet-boew/GCWeb/releases/download/v14.6.0/themes-dist-14.6.0-gcweb.1.zip
&& unzip -o ./themes-gcweb.zip "*/GCWeb/*" -d theme/static
&& unzip -o ./themes-gcweb.zip "*/wet-boew/*" -d theme/static
&& mv ./theme/static/themes-dist-14.6.0-gcweb ./theme/static/themes-gcweb
&& rm -f ./themes-gcweb.zip

override_dh_auto_test:
Expand Down
4 changes: 2 additions & 2 deletions theme/templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- GCWeb theme -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link rel="stylesheet" href="{{ config['server']['url'] }}/static/GCWeb/css/theme.min.css">
<link rel="stylesheet" href="{{ config['server']['url'] }}/static/themes-gcweb/GCWeb/css/theme.min.css">

<link rel="stylesheet" href="{{ config['server']['url'] }}/static/css/default.css">
<!--[if lt IE 9]>
Expand Down Expand Up @@ -175,7 +175,7 @@ <h2 class="wb-inv">{% trans %}About this site{% endtrans %}</h2>
<a href="#wb-cont">{% trans %}Top of page{% endtrans %} <span class="glyphicon glyphicon-chevron-up"></span></a>
</div>
<div class="col-xs-6 col-md-3 col-lg-2 text-right">
<img src="{{ config['server']['url'] }}/static/GCWeb/assets/wmms-blk.svg" alt="{% trans %}Symbol of the Government of Canada{% endtrans %}" />
<img src="{{ config['server']['url'] }}/static/themes-gcweb/GCWeb/assets/wmms-blk.svg" alt="{% trans %}Symbol of the Government of Canada{% endtrans %}" />
</div>
</div>
</div>
Expand Down

0 comments on commit f90cbf5

Please sign in to comment.