Skip to content

Commit 76365ce

Browse files
committed
Merge branch '7.8'
2 parents 9023f25 + c867eba commit 76365ce

File tree

9 files changed

+44
-15
lines changed

9 files changed

+44
-15
lines changed

ci_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ prepare_for_release() {
736736
./* \
737737
--exclude '*/stroom-docs-v*.zip' \
738738
--exclude '*/stroom-docs-v*.pdf'
739+
739740
popd
740741

741742
echo -e "${GREEN}Dumping contents of ${BLUE}${RELEASE_ARTEFACTS_DIR}${NC}"

config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ latexDashes = true
9191

9292
# Custom stroom-docs param. Don't use remote CDNs for js libs
9393
# so the site works with no internet connection
94+
# If we wanted this true for the zipped sites and false for gh-pages
95+
# we would have to buiild the whole thing twice as these params are build
96+
# time, not runtime.
9497
offline_site = true
9598

9699
# Custom stroom-docs param to be set at build time by ci_build.sh

layouts/partials/head.html

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818
<meta name="robots" content="noindex, nofollow">
1919
{{ end -}}
2020

21+
<!-- STROOM: Pre-load the font files as they will be needed as soon as main.css gets loaded -->
22+
<link rel="preload" href="/fonts/google_open_sans_300.ttf" as="font" type="font/ttf" crossorigin >
23+
<link rel="preload" href="/fonts/google_open_sans_300i.ttf" as="font" type="font/ttf" crossorigin >
24+
<link rel="preload" href="/fonts/google_open_sans_400.ttf" as="font" type="font/ttf" crossorigin >
25+
<link rel="preload" href="/fonts/google_open_sans_400i.ttf" as="font" type="font/ttf" crossorigin >
26+
<link rel="preload" href="/fonts/google_open_sans_700.ttf" as="font" type="font/ttf" crossorigin >
27+
<link rel="preload" href="/fonts/google_open_sans_700i.ttf" as="font" type="font/ttf" crossorigin >
28+
<link rel="preload" href="/webfonts/fa-brands-400.ttf" as="font" type="font/ttf" crossorigin >
29+
<link rel="preload" href="/webfonts/fa-brands-400.woff2" as="font" type="font/woff2" crossorigin >
30+
<!--<link rel="preload" href="/webfonts/fa-regular-400.ttf" as="font" type="font/ttf" crossorigin >-->
31+
<!--<link rel="preload" href="/webfonts/fa-regular-400.woff2" as="font" type="font/woff2" crossorigin >-->
32+
<link rel="preload" href="/webfonts/fa-solid-900.ttf" as="font" type="font/ttf" crossorigin >
33+
<link rel="preload" href="/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin >
34+
<!--<link rel="preload" href="/webfonts/fa-v4compatibility.ttf" as="font" type="font/ttf" crossorigin >-->
35+
<!--<link rel="preload" href="/webfonts/fa-v4compatibility.woff2" as="font" type="font/woff2" crossorigin >-->
2136

2237
<!-- STROOM: Add a canonical link so google indexing knows to ignore the old versions -->
2338
{{ if .Site.Params.archived_version }}
@@ -47,25 +62,22 @@
4762
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
4863
crossorigin="anonymous"></script>
4964
{{ end }}
50-
{{ if .Site.Params.offlineSearch -}}
51-
{{ if .Site.Params.offline_site }}
52-
<script src='{{ "/js/lunr.min.js" | relURL }}'></script>
53-
{{ else }}
54-
<script
55-
src="https://unpkg.com/[email protected]/lunr.min.js"
56-
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
57-
crossorigin="anonymous"></script>
58-
{{ end }}
59-
{{ end -}}
65+
66+
<!-- STROOM - Lunr has been moved to partials/scripts.html so that it gets loaded at the end of the page. -->
6067

6168
{{ if .Site.Params.prism_syntax_highlighting -}}
6269
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/>
6370
{{ end -}}
6471

65-
<link rel="stylesheet" href="{{ "/css/stroom-ui/icon-colours.css" | relURL }}"/>
66-
<link rel="stylesheet" href="{{ "/css/stroom-ui/material_design_colors.css" | relURL }}"/>
67-
<link rel="stylesheet" href="{{ "/css/stroom-ui/theme-root.css" | relURL }}"/>
68-
<link rel="stylesheet" href="{{ "/css/stroom-ui/theme-dark.css" | relURL }}"/>
72+
<!-- Minify all the stroom css files -->
73+
{{ $icon_colours_css := resources.Get "css/stroom-ui/icon-colours.css" | minify | fingerprint }}
74+
<link rel="stylesheet" href="{{ $icon_colours_css.RelPermalink }}" integrity="{{ $icon_colours_css.Data.Integrity }}">
75+
{{ $material_design_colors_css := resources.Get "css/stroom-ui/material_design_colors.css" | minify | fingerprint }}
76+
<link rel="stylesheet" href="{{ $material_design_colors_css.RelPermalink }}" integrity="{{ $material_design_colors_css.Data.Integrity }}">
77+
{{ $theme_root_css := resources.Get "css/stroom-ui/theme-root.css" | minify | fingerprint }}
78+
<link rel="stylesheet" href="{{ $theme_root_css.RelPermalink }}" integrity="{{ $theme_root_css.Data.Integrity }}">
79+
{{ $theme_dark_css := resources.Get "css/stroom-ui/theme-dark.css" | minify | fingerprint }}
80+
<link rel="stylesheet" href="{{ $theme_dark_css.RelPermalink }}" integrity="{{ $theme_dark_css.Data.Integrity }}">
6981

7082
{{/*
7183
{{ $fonts_css := resources.Get "/css/fonts.css" | minify }}

layouts/partials/scripts.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" integrity="sha512-JERecFUBbsm75UpkVheAuDOE8NdHjQBrPACfEQYPwvPG+fjgCpHAz1Jw2ci9EXmd3DdfiWth3O3CQvcfEg8gsA==" crossorigin="anonymous"></script>
1919
{{ end }}
2020

21+
<!-- STROOM - This was moved here from head.html to delay its loading -->
22+
{{ if .Site.Params.offlineSearch -}}
23+
{{ if .Site.Params.offline_site }}
24+
<script src='{{ "/js/lunr.min.js" | relURL }}'></script>
25+
{{ else }}
26+
<script
27+
src="https://unpkg.com/[email protected]/lunr.min.js"
28+
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
29+
crossorigin="anonymous"></script>
30+
{{ end }}
31+
{{ end -}}
32+
2133
{{ if .Site.Params.markmap.enable }}
2234
<style>
2335
.markmap > svg {

update_stroom_icons.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ main() {
111111
local images_base_dir="${stroom_app_resources_ui_dir}/images"
112112
local css_base_dir="${stroom_app_resources_ui_dir}/css"
113113
local images_dest_dir="./assets/images/stroom-ui"
114-
local css_dest_dir="./static/css/stroom-ui"
114+
# Have to go in ./assets/ so they can be minified by hugo
115+
local css_dest_dir="./assets/css/stroom-ui"
115116

116117
if [ ! -d "${stroom_repo_root}" ]; then
117118
echo -e "${RED}ERROR${NC}: Can't find stroom repo root ${BLUE}${stroom_repo_root}${NC}"

0 commit comments

Comments
 (0)