mastodon et chapril dans social + icones svg
This commit is contained in:
parent
447fdc56f2
commit
a749624c59
|
@ -1630,6 +1630,7 @@ class common {
|
|||
*/
|
||||
private function showSocials($visibility) {
|
||||
$socials = '';
|
||||
$icon = 'fontello';
|
||||
foreach($this->getData(['config', 'social']) as $socialName => $socialId) {
|
||||
switch($socialName) {
|
||||
case 'facebookId':
|
||||
|
@ -1664,11 +1665,25 @@ class common {
|
|||
$socialUrl = 'https://www.github.com/';
|
||||
$title = 'Github';
|
||||
break;
|
||||
case 'mastodonId':
|
||||
$socialUrl = '';
|
||||
$title = 'Mastodon';
|
||||
$icon =' src="./site/file/source/icones/mastodon.svg" width="33px" height="33px" ';
|
||||
break;
|
||||
case 'chaprilId':
|
||||
$socialUrl = 'https://forge.chapril.org/';
|
||||
$title = 'Chapril';
|
||||
$icon =' src="./site/file/source/icones/chapril.svg" width="48px" height="33px" ';
|
||||
break;
|
||||
default:
|
||||
$socialUrl = '';
|
||||
}
|
||||
if($socialId !== '' && is_string($socialName) && is_string($socialUrl) && is_string($socialId) ) {
|
||||
$socials .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . template::ico(substr(str_replace('User','',$socialName), 0, -2)) . '</a>';
|
||||
if( $icon === 'fontello'){
|
||||
$socials .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . template::ico(substr(str_replace('User','',$socialName), 0, -2)) . '</a>';
|
||||
} else {
|
||||
$socials .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . '<img class="socialIconSvg" alt='. $title . $icon . '></a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if($socials !== '') {
|
||||
|
|
|
@ -135,7 +135,10 @@
|
|||
.blockFullWidth {
|
||||
margin: 0 -20px;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
.socialIconSvg {
|
||||
margin: 0 5px -12px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ecrans < 800px */
|
||||
|
@ -356,6 +359,9 @@
|
|||
.blockFullWidth {
|
||||
margin: 0 -10px;
|
||||
padding: 10px;
|
||||
}
|
||||
.socialIconSvg {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -500,6 +500,8 @@ class config extends common {
|
|||
'youtubeId' => $this->getInput('socialYoutubeId'),
|
||||
'youtubeUserId' => $this->getInput('socialYoutubeUserId'),
|
||||
'githubId' => $this->getInput('socialGithubId'),
|
||||
'mastodonId' => $this->getInput('socialMastodonId'),
|
||||
'chaprilId' => $this->getInput('socialChaprilId'),
|
||||
'headFacebook' => $this->getInput('socialHeadFacebook', helper::FILTER_BOOLEAN),
|
||||
'comment' => [
|
||||
'group' => $this->getInput('socialConfigGroup'),
|
||||
|
|
|
@ -207,6 +207,8 @@ $text['core_config_view']['social'][33] = 'This option allows you to respond dir
|
|||
$text['core_config_view']['social'][37] = 'Number of comments displayed on a page';
|
||||
$text['core_config_view']['social'][40] = 'Validate a captcha in order to submit the form';
|
||||
$text['core_config_view']['social'][21] = 'Texts should be put in the language of your visitors in the "Location" tab';
|
||||
$text['core_config_view']['social'][22] = 'Enter the full URL of your Mastodon page';
|
||||
$text['core_config_view']['social'][23] = 'Enter your Chapril ID: https://forge.chapril.org/[ID].';
|
||||
$text['core_config']['generateFiles'][0] = 'Updated sitemap and robots.txt files';
|
||||
$text['core_config']['generateFiles'][1] = 'Writing failure, site map not updated';
|
||||
$text['core_config']['backup'][0] = 'Save';
|
||||
|
|
|
@ -207,6 +207,8 @@ $text['core_config_view']['social'][33] = 'Esta opción le permite responder dir
|
|||
$text['core_config_view']['social'][37] = 'Número de comentarios mostrados en una página';
|
||||
$text['core_config_view']['social'][40] = 'Validar un captcha para enviar el formulario';
|
||||
$text['core_config_view']['social'][21] = 'Los textos deben colocarse en el idioma de sus visitantes en la pestaña "Localización"';
|
||||
$text['core_config_view']['social'][22] = 'Ingrese la URL completa de su página Mastodon';
|
||||
$text['core_config_view']['social'][23] = 'Ingrese su ID de Chapril: https://forge.chapril.org/[ID]';
|
||||
$text['core_config']['generateFiles'][0] = 'Mapa del sitio actualizado y archivos robots.txt';
|
||||
$text['core_config']['generateFiles'][1] = 'No se pudo escribir, el mapa del sitio no se actualizó';
|
||||
$text['core_config']['backup'][0] = 'Backup';
|
||||
|
|
|
@ -207,6 +207,10 @@ $text['core_config_view']['social'][33] = 'Cette option permet de répondre dire
|
|||
$text['core_config_view']['social'][37] = 'Nombre de commentaires affichés sur une page';
|
||||
$text['core_config_view']['social'][40] = 'Valider un captcha afin de soumettre le formulaire';
|
||||
$text['core_config_view']['social'][21] = 'Des textes sont à mettre dans la langue de vos visiteurs dans l\'onglet "Localisation"';
|
||||
|
||||
$text['core_config_view']['social'][22] = 'Saisissez l\'URL complet de votre page Mastodon';
|
||||
$text['core_config_view']['social'][23] = 'Saisissez votre ID Chapril : https://forge.chapril.org/[ID].';
|
||||
|
||||
$text['core_config']['generateFiles'][0] = 'Mises à jour des fichiers sitemap et robots.txt';
|
||||
$text['core_config']['generateFiles'][1] = 'Echec d\'écriture, le site map n\'a pas été mis à jour';
|
||||
$text['core_config']['backup'][0] = 'Sauvegarder';
|
||||
|
|
|
@ -204,6 +204,22 @@ include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdm
|
|||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::text('socialMastodonId', [
|
||||
'help' => $text['core_config_view']['social'][22],
|
||||
'label' => 'Mastodon',
|
||||
'value' => $this->getData(['config', 'social', 'mastodonId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::text('socialChaprilId', [
|
||||
'help' => $text['core_config_view']['social'][23],
|
||||
'label' => 'Chapril',
|
||||
'value' => $this->getData(['config', 'social', 'chaprilId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue