feat: add custom footer links to configuration

Introduced a new 'footer_links' configuration option allowing users to specify custom links to display in the footer. Each link includes 'text' and 'url'. This enhances the flexibility of the footer content, making it adaptable to various use cases.

Updated the index.php to dynamically generate these footer links if they are set in the configuration, ensuring they are rendered appropriately along with existing links.
This commit is contained in:
Kumi 2024-08-09 12:05:51 +02:00
parent 04cadac205
commit bd29ffd43c
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 17 additions and 2 deletions

View file

@ -1,5 +1,9 @@
<?php
return [
'servers_guru' => true, // Show the "Servers Guru" attribution link in the info text
'attribution' => '' // Custom attribution HTML to show in the info text
'attribution' => '', // Custom attribution HTML to show in the info text
'footer_links' => [ // Custom links to show in the footer
['text' => 'Clearnet', 'url' => 'https://calc.revuo-xmr.com'],
['text' => 'Tor', 'url' => 'http://calc.revuo75joezkbeitqmas4ab6spbrkr4vzbhjmeuv75ovrfqfp47mtjid.onion']
]
];

View file

@ -168,8 +168,19 @@ $attribution = isset($config['attribution']) ? $config['attribution'] : '';
echo $attribution; ?>
</small>
<hr />
<?php
$footer_links = "";
if (isset($config['footer_links']) && !empty($config['footer_links'])) {
foreach ($config['footer_links'] as $link) {
$footer_links .= '<a href="' . $link['url'] . '" class="text-white" target="_blank" rel="noopener noreferrer">' . $link['text'] . '</a> | ';
}
}
?>
<small class="cursor-default text-white" lang="<?php echo $lang_meta; ?>">
<?php echo $getmonero . $countrymonero; ?>
<?php echo $footer_links . $getmonero . $countrymonero; ?>
</small>
</div>