First properly working version.
This commit is contained in:
@ -291,7 +291,7 @@ function runPDF($folder, $texFilename, $filename, $title, $lang = "de", $debug =
|
||||
chdir("./tmp/$uniqid");
|
||||
|
||||
// Right now, pdflatex needs to be used. Once new packages are available, xelatex is to be preferred.
|
||||
exec("pdflatex -interaction nonstopmode $texFilename.tex");
|
||||
exec("pdflatex -interaction nonstopmode -pdf -pv $texFilename.tex");
|
||||
|
||||
ensureDir(__DIR__ . "/pdf/$lang");
|
||||
|
||||
@ -313,14 +313,15 @@ function runPDF($folder, $texFilename, $filename, $title, $lang = "de", $debug =
|
||||
/**
|
||||
* Function getHTMLHead returns the HTML for the top of the page.
|
||||
*
|
||||
* @param string $title Title of the page.
|
||||
* @param string $contents Page contents.
|
||||
* @param string $lang Language. Optional
|
||||
* @param string $descriptions Page description. Optional.
|
||||
* @param string $title Title of the page.
|
||||
* @param string $contents Page contents.
|
||||
* @param string $lang Language. Optional
|
||||
* @param array $availableLangs Page description. Optional.
|
||||
* @param string $descriptions Page description. Optional.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function printHTMLPage(string $title, string $contents, string $lang = "en", string $descriptions = "") {
|
||||
function printHTMLPage(string $title, string $contents, string $lang = "en", array $availableLangs = ["en"], string $descriptions = "") {
|
||||
|
||||
$output = '<!DOCTYPE html>
|
||||
<html lang="' . $lang . '">
|
||||
@ -330,8 +331,8 @@ function printHTMLPage(string $title, string $contents, string $lang = "en", str
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
<link rel="shortcut icon" sizes="16x16 32x32" href="./db_images_gestaltung/mdlogo-32px.png" />
|
||||
<link rel="shortcut icon" sizes="64x64" href="./db_images_gestaltung/mdlogo-64px.png" /><link rel="stylesheet" type="text/css" href="css/main.css">
|
||||
<link rel="shortcut icon" sizes="16x16 32x32" href="./media/mdlogo-32px.png" />
|
||||
<link rel="shortcut icon" sizes="64x64" href="./media/mdlogo-64px.png" /><link rel="stylesheet" type="text/css" href="css/main.css">
|
||||
|
||||
<meta name="twitter:title" content="' . $title. '" />
|
||||
<meta property="og:title" content="' . $title. '" />
|
||||
@ -357,6 +358,26 @@ function printHTMLPage(string $title, string $contents, string $lang = "en", str
|
||||
<footer id="bottom">
|
||||
<a href="pdf/' . $lang . '/brochure.pdf" class="buttonLike">PDF</a>
|
||||
</footer>
|
||||
|
||||
<footer id="optionsFooter">
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<ul id="optionsLangs">
|
||||
';
|
||||
|
||||
foreach ($availableLangs as $tLang) {
|
||||
$output .= "
|
||||
<li><a href='./?lang=$tLang'>$tLang</a></li>
|
||||
";
|
||||
}
|
||||
|
||||
$output .= '
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</html>';
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user