mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
get rid of flag cdn
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
/*!
|
||||
* No overrides for the default theme as it aligns with general.css
|
||||
*/
|
||||
|
||||
body {
|
||||
font-family: "Twemoji Country Flags", "Helvetica", "Comic Sans", serif;
|
||||
}
|
||||
|
||||
:root {
|
||||
--cl-border-btn-pwd: var(--bs-body-bg);
|
||||
}
|
||||
|
||||
@@ -77,6 +77,17 @@ function verify_log() {
|
||||
}
|
||||
}
|
||||
|
||||
function country2flag($code) {
|
||||
$code = strtoupper($code);
|
||||
|
||||
$offset = 0x1F1E6;
|
||||
$code_p1 = $offset + ord($code[0]) - ord('A');
|
||||
$code_p2 = $offset + ord($code[1]) - ord('A');
|
||||
|
||||
$flag = mb_chr($code_p1, 'UTF-8') . mb_chr($code_p2, 'UTF-8');
|
||||
return $flag;
|
||||
}
|
||||
|
||||
// Function to read the debug logfile
|
||||
function read_logfile() {
|
||||
if (verify_log()) {
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
location.reload();
|
||||
});
|
||||
</script>
|
||||
<script type="module" defer>
|
||||
import {
|
||||
polyfillCountryFlagEmojis
|
||||
} from "<?php echo base_url(); ?>../assets/js/country-flag-emoji-polyfill.js";
|
||||
polyfillCountryFlagEmojis();
|
||||
</script>
|
||||
<?php
|
||||
/**
|
||||
* Hidden field to be able to translate the language names
|
||||
|
||||
@@ -77,8 +77,7 @@ if (!file_exists('.lock')) {
|
||||
<ul style="list-style-type: none;">
|
||||
<?php foreach ($languages as $lang) { ?>
|
||||
<li>
|
||||
<img src="https://flagcdn.com/w20/<?php echo ($lang['code'] == 'en') ? 'gb' : $lang['flag']; ?>.png">
|
||||
<a href="?lang=<?php echo $lang['gettext']; ?>"><?php echo $lang['name_en']; ?></a>
|
||||
<?php echo country2flag($lang['flag']); ?> <a href="?lang=<?php echo $lang['gettext']; ?>"><?php echo $lang['name_en']; ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user