Use self-hosted JavaScript libraries

Add iFrameResizer for when the publication lists are included via an
iframe.
Add self-hosted copies of jQuery and MathJax.
Fix some styling in the code and in the HTML via CSS
This commit is contained in:
Frederik Möllers
2025-08-14 01:03:54 +02:00
parent c0e8d54438
commit 63dc0d58bb
18 changed files with 224 additions and 4 deletions
+39
View File
@@ -0,0 +1,39 @@
@import url("/static/fonts/manrope.css");
body {
color: rgba(0, 0, 0, 0.8);
font-family: "Manrope",Arial,sans-serif;
font-weight: 500;
line-height: 1.8;
margin: 0;
}
.rheader {
display: none;
}
.sheader {
font-size: 1.5rem;
font-weight: 600;
padding-top: 1.5em;
padding-bottom: .5em;
}
.theader {
display: block;
font-size: 1.25rem;
font-weight: 600;
padding-top: .5em;
padding-bottom: .5em;
}
td.bibref {
display: none;
}
td.bibitem {
padding-left: 1.5rem;
display: block;
}
a {
color: #C01632;
text-decoration: underline;
outline: none;
}
a:hover {
text-decoration: none;
}
+23
View File
@@ -4,6 +4,10 @@ bibtexbrowser_configure('ABBRV_TYPE','key');
bibtexbrowser_configure('BIBTEXBROWSER_LAYOUT','table');
// URL to individual files
bibtexbrowser_configure('BIBTEXBROWSER_URL',"https://publications.zrd-saar.de/");
// URL to jQuery
bibtexbrowser_configure('JQUERY_URI', '/static/jquery-3.6.4.min.js');
// URL to MathJax
bibtexbrowser_configure('MATHJAX_URI', '/static/TeX-AMS_HTML.V2.7.1.js');
// target for links
bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_blank');
// use IEEE Transactions-like style, e.g. puts authors in front of title
@@ -37,4 +41,23 @@ bibtexbrowser_configure('BIBTEXBROWSER_URL_BUILDER', 'url_builder_static');
function url_builder_static($bibentry) {
return BIBTEXBROWSER_URL.'keys/'.$bibentry->getKey().'.html';
}
// A custom function for the MathJax footer to use the static URL instead of the CDN one
// Also include iframeResizer JS
function javascript_math() {
?>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
<script type="text/javascript" id="MathJax-script" async src="/static/tex-mml-chtml.js">
</script>
<script type="text/javascript" id="iFrameResizer" src="/static/iframe-resizer.child.js">
</script>
<?php
}
?>
+1 -1
View File
@@ -16,7 +16,7 @@ BIBTEX_URL="https://cloud.hiz-saarland.de/public.php/dav/files/Yj8FtZsTS9TkFWG"
# command to run BibtexBrowser
BIBTEXBROWSER="${PHP} -c \"php_cli.ini\" -f \"bibtexbrowser.php\""
# DELETEME
# remove any remaining artifacts and temporary files
rm -rf "artifacts" "temp"
# create output directories and download bibtex file
mkdir -p "artifacts/keys" "temp"
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+62
View File
@@ -0,0 +1,62 @@
/* manrope-200 - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 200;
src: url('/static/fonts/manrope-v19-latin_latin-ext-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-300 - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 300;
src: url('/static/fonts/manrope-v19-latin_latin-ext-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-regular - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 400;
src: url('/static/fonts/manrope-v19-latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-500 - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 500;
src: url('/static/fonts/manrope-v19-latin_latin-ext-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-600 - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 600;
src: url('/static/fonts/manrope-v19-latin_latin-ext-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-700 - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 700;
src: url('/static/fonts/manrope-v19-latin_latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-800 - latin_latin-ext */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Manrope';
font-style: normal;
font-weight: 800;
src: url('/static/fonts/manrope-v19-latin_latin-ext-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
View File
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

File diff suppressed because one or more lines are too long