-
Notifications
You must be signed in to change notification settings - Fork 33
/
header.phtml
162 lines (148 loc) · 7.99 KB
/
header.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<?php
$titleRSS = T_("Subscribe to RSS feed");
$titledonation = T_("Support the GnuCash project with a donation");
$titleuservoice = T_("Request or vote enhancements for GnuCash");
$titlefb = T_("GnuCash on facebook");
include("$top_dir/externals/global_params.php");
if (!isset($title)) { $title = $GLOBALS["default_title"]; };
$full_title = $title." | GnuCash";
if (!isset($description)) { $description = $default_description; };
# This function will create a link to the given page
# reusing the get parameters that were specified
# with the option to override the language
function make_lang_href ($page, $get_parms, $lang)
{
if (isset($lang) && $lang != "")
{
$get_parms["lang"] = $lang;
}
$url_get_query = http_build_query ($get_parms);
$lang_href = "$page"."?"."$url_get_query";
return $lang_href;
}
$get_parms = $_GET;
if (isset($locale)) {
if (substr($locale, 0, 2) != 'zh') {
$locale_str = substr($locale, 0, 2);
} else {
$locale_str = $locale == 'zh_TW' ? 'zh-Hant' : 'zh-Hans';
}
} else {
$locale_str = "en";
}
?>
<html prefix="og: https://ogp.me/ns#" lang="<?=$locale_str?>">
<head>
<?php // Primary Meta Tags
if (!isset($can_utf)) { $can_utf = true; }
if ($can_utf)
{ ?>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<?php } //if ($can_utf) ?>
<title><?=$full_title?></title>
<meta name="description" content="<?=strip_tags($description)?>"/>
<!--meta properties for facebook Open Graph-->
<meta property="og:locale" content="<?=$locale_str?>"/>
<?php // add og:locale:alternate(s)
foreach ($GLOBALS ["supported_languages"] as $key => $value) {
if ($value != $locale_str)
{ echo " <meta property=\"og:locale:alternate\" content=\"{$value}\"/>\n"; }
}
?>
<meta property="og:title" content="<?=$full_title?>"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="<?=\DEFAULT_URL.$page?>"/>
<meta property="og:image" content="<?=\DEFAULT_URL."externals/logo_w120.png"?>"/>
<meta property="og:site_name" content="GnuCash"/>
<meta property="og:description" content="<?=strip_tags($description)?>"/>
<?php // end of Open Graph properties ?>
<link rel="stylesheet" href="<?=$home?>/externals/gnucash.css" type="text/css" />
<?php // Device specific:
// Useful for mobile devices: Zoom out and allow scaling. ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<?php // FavIcons for many different devices ?>
<link rel="icon" href="<?=$home?>/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" sizes="180x180" href="<?=$home?>/apple-touch-icon.png?v=gAXA7A9nAq"/>
<link rel="icon" type="image/png" sizes="32x32" href="<?=$home?>/favicon-32x32.png?v=gAXA7A9nAq"/>
<link rel="icon" type="image/png" sizes="16x16" href="<?=$home?>/favicon-16x16.png?v=gAXA7A9nAq"/>
<link rel="manifest" href="<?=$home?>/site.webmanifest?v=gAXA7A9nAq"/>
<link rel="mask-icon" href="<?=$home?>/safari-pinned-tab.svg?v=gAXA7A9nAq"/>
<link rel="shortcut icon" href="<?=$home?>/favicon.ico?v=gAXA7A9nAq"/>
<meta name="msapplication-TileColor" content="#da532c"/>
<meta name="theme-color" content="#ffffff"/>
<?php
$current_page = array_key_exists('HTTP_HOST', $_SERVER) ? ($top_dir . "/" . basename($_SERVER["SCRIPT_NAME"])) : "";
if (isset($homepage)) { ?>
<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="<?=$home?>/atom.php" />
<?php } ?>
</head>
<body>
<div id="head">
<div id="branding">
<p><img src="<?=$top_dir?>/images/gnucash-vert.png" alt="GnuCash" /></p>
</div>
<?php /* FIXME: It does not conform to
https://curia.europa.eu/jcms/upload/docs/application/pdf/2019-07/cp190099en.pdf
potential fix: an improved version of
https://www.heise.de/ct/ausgabe/2014-26-Social-Media-Buttons-datenschutzkonform-nutzen-2463330.html
<div id="socialbuttons">
<!--facebook like button-->
<div style="padding:0 0 5px 0">
<div id="fb-root"></div>
<script type="text/javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-href="https://www.gnucash.org"
data-send="false" data-layout="box_count" data-width="60"
data-show-faces="true" data-font="verdana">
</div>
</div> <!-- facebook like button-->
</div> <!-- socialbuttons -->
*/ ?>
<?php // the icons on the top right: ?>
<div style="float:right;">
<ul id="navlist">
<li id="fb-icon"><a href="https://www.facebook.com/Gnucash" title="<?php echo T_($titlefb);?>"></a></li>
<li id="uservoice-icon"><a href="https://gnucash.uservoice.com/" title="<?php echo T_($titleuservoice);?>"></a></li>
<li id="donation-icon"><a href="https://gnucash.org/donate.phtml" title="<?php echo T_($titledonation);?>"></a></li>
<li id="rss-icon"><a href="<?=$home?>/atom.php" title="<?php echo T_($titleRSS);?>"></a></li>
</ul>
</div>
<div style="margin: 0px 0px 0 0;">
<a href="<?=$home?>/"><!--img src="<?=$home?>/externals/gnucash_logo1.png" alt="[GnuCash Logo]" id="gnclogo" width="179" height="45" border="0"/ -->
<img alt="banner" src="<?=$home?>/images/banner5.png" /></a>
<p style="font-style:italic; font-size:1.1em; margin: 0 0 0 10px; color: #08006d; text-shadow:0px 0px 9px white;"><?php echo T_("Free Accounting Software");?></p>
</div>
<span id="language">
<?= T_("Language"); ?>:
<a class="nav" href="<?= make_lang_href($current_page, $get_parms, "en_US"); ?>">English</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "ca"); ?>">Català</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "de_DE"); ?>">Deutsch</a>
<!--| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "es_ES"); ?>">Español</a>-->
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "fr_FR"); ?>">Français</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "hr_HR"); ?>">Hrvatski</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "he"); ?>">עִברִית</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "it_IT"); ?>">Italiano</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "ja_JP"); ?>">日本語</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "hu_HU"); ?>">Magyar</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "nl_NL"); ?>">Nederlands</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "nb_NO"); ?>">Norsk Bokmål</a>
<!--| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "pl_PL"); ?>">Polska</a> -->
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "pt_PT"); ?>">Português</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "zh_CN"); ?>">简体中文</a>
| <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "zh_TW"); ?>">繁體中文</a>
</span> <!-- language -->
<span id="location"> <?php /* The mirrors currently not exist
<?= _("Continent"); ?>:
(<a class="nav" href="<?=\DEFAULT_URL?>">US</a>)
(<a class="nav" href="http://www.at.gnucash.org/">EU</a>)
(<a class="nav" href="http://www.au.gnucash.org/">AU</a>) */ ?>
</span> <!-- Continent -->
</div> <!-- head -->