Skip to content

Commit

Permalink
Migrate from Klaro
Browse files Browse the repository at this point in the history
This closes #378
  • Loading branch information
portableant committed May 22, 2022
1 parent 06b86bb commit 529b897
Show file tree
Hide file tree
Showing 14 changed files with 155 additions and 168 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ public/uv-dist-umd
public/uv.css
public/uv.html
public/images/svg/
cookieconsent.*
13 changes: 12 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production",
"copy": "npm run copy-uv-html && npm run copy-uv-css && npm run copy-icons",
"copy": "npm run copy-uv-html && npm run copy-uv-css && npm run copy-icons && npm run copy-cookie-css && npm run copy-cookie-js",
"copy-uv-html": "cp -R node_modules/universalviewer/dist/uv.html ./public",
"copy-uv-css": "cp -R node_modules/universalviewer/dist/uv.css ./public/",
"copy-uv-assets": "cp -R node_modules/universalviewer/dist/umd/ ./public/umd/",
"copy-icons": "cp -R node_modules/super-tiny-icons/images/svg/ ./public/images/svg/",
"copy-cookie-css": "cp -R node_modules/vanilla-cookieconsent/dist/*.css ./resources/css/",
"copy-cookie-js": "cp -R node_modules/vanilla-cookieconsent/dist/*.js ./resources/js/",
"postinstall": "npm run copy"
},
"devDependencies": {
Expand Down Expand Up @@ -47,6 +49,7 @@
"minimist": ">=1.2.6",
"popper.js": "^1.16.1",
"super-tiny-icons": "^0.4.0",
"universalviewer": "^4.0.0-pre.107"
"universalviewer": "^4.0.0-pre.107",
"vanilla-cookieconsent": "^2.8.0"
}
}
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/fitzwilliam.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

270 changes: 121 additions & 149 deletions public/js/config.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=20082aa7f47e21ac3abbec86f61683a3",
"/css/app.css": "/css/app.css?id=9846fa833154f382fb5cf2e1f6b8bfe1",
"/css/fitzwilliam.css": "/css/fitzwilliam.css?id=3c92412680b3a24991707362abeb7fa9"
"/js/app.js": "/js/app.js?id=b40b565a931380564c44af295f817e68",
"/css/app.css": "/css/app.css?id=65a0f55fda7de9065ce6acff8f51028f",
"/css/fitzwilliam.css": "/css/fitzwilliam.css?id=0bfba9852385067c85d3b8339d587492"
}
1 change: 0 additions & 1 deletion resources/views/includes/css/css.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<link rel="stylesheet" href="{{ mix('css/app.css') }}"/>

<link rel="stylesheet" href="{{ mix('css/fitzwilliam.css') }}" />

@hasSection('audio-guide')
<link href="https://cdnjs.cloudflare.com/ajax/libs/plyr/3.5.6/plyr.css" rel="stylesheet" media="screen">
@endif
Expand Down
7 changes: 4 additions & 3 deletions resources/views/includes/scripts/javascript.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script src="{{ mix('js/app.js') }}"></script>

<!-- Cookie management -->
<script defer type="text/javascript" src="{{ asset("/js/config.js")}}"></script>
<script defer type="text/javascript" src="{{ asset("/js/klaro.js")}}"></script>
{{--<script defer type="text/javascript" src="{{ asset("js/cookieconsent.js")}}"></script>--}}
<script defer type="text/javascript" src="{{ asset("js/config.js")}}"></script>
<!-- End of body -->

@hasSection('audio-guide')
Expand All @@ -21,7 +21,8 @@
});
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id={{ env('APP_GOOGLE_ANALYTICS') }}"></script>
<script>

<script type="text/plain" data-cookiecategory="analytics">
window.dataLayer = window.dataLayer || [];
function gtag() {
Expand Down
3 changes: 3 additions & 0 deletions resources/views/includes/structure/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
Code: GPL-V3
</a>
</li>
<li>
<a href="#" data-cc="c-settings">Cookie preferences</a>
</li>
</ul>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions resources/views/layouts/exhibitions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,5 @@
@hasSection('360')
@include('includes.scripts.photosphere-js')
@endif

@include('includes.scripts.fullscreen')

</body>
</html>
2 changes: 1 addition & 1 deletion resources/views/layouts/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@include('googletagmanager::head')

</head>
<body class="doc-body bg-grey">
<body class="doc-body bg-grey c_darkmode">
@include('googletagmanager::body')

@include('includes.structure.accessibility')
Expand Down
4 changes: 2 additions & 2 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ require('laravel-mix-purgecss');
|
*/

mix.styles(['resources/css/site.css','resources/css/top.css'], 'public/css/fitzwilliam.css').version();
mix.js(['resources/js/app.js','resources/js/backtotop.js'], 'public/js')
mix.styles(['resources/css/site.css','resources/css/top.css', 'resources/css/cookieconsent.css'], 'public/css/fitzwilliam.css').version();
mix.js(['resources/js/app.js','resources/js/backtotop.js','resources/js/cookieconsent.js'], 'public/js')
.sass('resources/sass/app.scss', 'public/css').purgeCss({safelist: { deep: [/carousel/] }}).version();
mix.webpackConfig({
stats: {
Expand Down

0 comments on commit 529b897

Please sign in to comment.