From 973d933aa9f7ac616a3f7dc09258c8a98641e15d Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 23 Nov 2024 21:01:37 +0100 Subject: [PATCH] Update website --- .htaccess | 1 + publi_bib.php | 26 +++++++++++-- views/publi_bib_html.mustache | 72 +++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 views/publi_bib_html.mustache diff --git a/.htaccess b/.htaccess index 54a7da7..8d9c5f1 100644 --- a/.htaccess +++ b/.htaccess @@ -2,6 +2,7 @@ RewriteEngine On RewriteRule ^(.*/)?\.git/ - [F,L] + RewriteRule ^(.*/)?\composer\.(.*) - [F,L] # Alternatively, you can use the following directive to deny access diff --git a/publi_bib.php b/publi_bib.php index 90ead00..8255b3f 100644 --- a/publi_bib.php +++ b/publi_bib.php @@ -22,10 +22,30 @@ try { $parser->parseFile('assets/bib/export-bibtex.bib'); $entries = $listener->export(); - print_r($entries); + $tpl = $m->loadTemplate("publi_bib_html"); + + +echo $tpl->render( + array( + 'ROOT_URL' => $iap_root, + 'title'=>'Guilhem Lavaux\'s publications', + 'publi'=>$entries, + 'configure_script'=>[ + 'MathJax = { + tex: { + inlineMath: [[\'$\', \'$\'], [\'\\\\(\', \'\\\\)\']] + } +}; + ' + ], + 'external_scripts'=>[ + 'src="https://polyfill.io/v3/polyfill.min.js?features=es6"', + 'id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"' + ], + 'bar' => 'baz')); + } catch (Exception $e) { - print_r($e); - print_r($e->getMessage()); + echo $e->getMessage()) . "
"; } diff --git a/views/publi_bib_html.mustache b/views/publi_bib_html.mustache new file mode 100644 index 0000000..fadb683 --- /dev/null +++ b/views/publi_bib_html.mustache @@ -0,0 +1,72 @@ +{{> public_header}} + + + +{{> generic_header}} + + +
+ +
+
+

List of publications

+

Usage: you may sort by year or by citations by clicking on the corresponding header in the table below (see dotted line under the respective header). You may also find my publications on ADS here

+
+ + + + + + + + + {{# publi }} + + + + + + + {{/ publi }} + +
Title
+ Authors
+ DOI +
YeararXivCitations
+ {{{ title }}}
+
+ {{# authors }} + {{ . }} + {{/ authors }} +
+ + {{#doi}}
{{journal}} ({{year}}) {{#volume}}{{.}}{{/volume}}{{#page}}, {{.}}{{/page}}
{{/doi}} +
{{ year }}{{ arxiv }}{{ citation_count }}
+
+
+
+ +
+ + +{{> public_footer}}