mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2024-11-16 14:57:35 +00:00
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:
parent
04cadac205
commit
bd29ffd43c
2 changed files with 17 additions and 2 deletions
|
@ -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']
|
||||
]
|
||||
];
|
13
index.php
13
index.php
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue