Browse Source

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
master
Frederik Möllers 2 weeks ago
parent
commit
63dc0d58bb
  1. 39
      bibtexbrowser.css
  2. 2
      bibtexbrowser.german.php
  3. 25
      bibtexbrowser.local.php
  4. 4
      makehtml.sh
  5. 53
      static/TeX-AMS_HTML.V2.7.1.js
  6. BIN
      static/fonts/manrope-v19-latin_latin-ext-200.woff2
  7. BIN
      static/fonts/manrope-v19-latin_latin-ext-300.woff2
  8. BIN
      static/fonts/manrope-v19-latin_latin-ext-500.woff2
  9. BIN
      static/fonts/manrope-v19-latin_latin-ext-600.woff2
  10. BIN
      static/fonts/manrope-v19-latin_latin-ext-700.woff2
  11. BIN
      static/fonts/manrope-v19-latin_latin-ext-800.woff2
  12. BIN
      static/fonts/manrope-v19-latin_latin-ext-regular.woff2
  13. 62
      static/fonts/manrope.css
  14. 20
      static/iframe-resizer.child.js
  15. 20
      static/iframe-resizer.parent.js
  16. 2
      static/jquery-3.6.4.min.js
  17. BIN
      static/loading.gif
  18. 1
      static/tex-mml-chtml.js

39
bibtexbrowser.css

@ -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;
}

2
bibtexbrowser.german.php

@ -16,4 +16,4 @@ $BIBTEXBROWSER_LANG['Refereed Conference Papers'] = "Konferenzbeiträge";
$BIBTEXBROWSER_LANG['Refereed Workshop Papers'] = "Workshopbeiträge";
$BIBTEXBROWSER_LANG['Technical report'] = "Technischer Bericht";
@define('LAST_AUTHOR_SEPARATOR',' und ');
?>
?>

25
bibtexbrowser.local.php

@ -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
}
?>

4
makehtml.sh

@ -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"
@ -54,4 +54,4 @@ done
# Clean up
rm -rf "temp"
rm bibtexbrowser_*.dat
rm bibtexbrowser_*.dat

53
static/TeX-AMS_HTML.V2.7.1.js
File diff suppressed because it is too large
View File

BIN
static/fonts/manrope-v19-latin_latin-ext-200.woff2

BIN
static/fonts/manrope-v19-latin_latin-ext-300.woff2

BIN
static/fonts/manrope-v19-latin_latin-ext-500.woff2

BIN
static/fonts/manrope-v19-latin_latin-ext-600.woff2

BIN
static/fonts/manrope-v19-latin_latin-ext-700.woff2

BIN
static/fonts/manrope-v19-latin_latin-ext-800.woff2

BIN
static/fonts/manrope-v19-latin_latin-ext-regular.woff2

62
static/fonts/manrope.css

@ -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+ */
}

20
static/iframe-resizer.child.js
File diff suppressed because it is too large
View File

20
static/iframe-resizer.parent.js
File diff suppressed because it is too large
View File

2
static/jquery-3.6.4.min.js
File diff suppressed because it is too large
View File

BIN
static/loading.gif

After

Width: 31  |  Height: 31  |  Size: 2.5 KiB

1
static/tex-mml-chtml.js
File diff suppressed because it is too large
View File

Loading…
Cancel
Save