mirror of
https://gitlab.unicamp.br/infimecc_drupal11_modules/site_tools.git
synced 2026-05-03 19:20:42 -03:00
Adiciona ícone 'home' à extensão Twig de ícones acadêmicos
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,6 +126,7 @@ A função `site_tools_academic_icon(name)` retorna o SVG inline do ícone solic
|
||||
|
||||
| Nome | Plataforma | Cor |
|
||||
|------|------------|-----|
|
||||
| `home` | Página pessoal | sem fill (definir via CSS) |
|
||||
| `lattes` | Plataforma Lattes (CNPq) | `#005195` |
|
||||
| `orcid` | ORCID | `#a6ce39` |
|
||||
| `mathscinet` | MathSciNet (AMS) | `#0f4f96` |
|
||||
|
||||
@@ -43,6 +43,7 @@ class AcademicIconsExtension extends AbstractExtension {
|
||||
*/
|
||||
public function renderIcon(string $name): MarkupInterface {
|
||||
return Markup::create(match ($name) {
|
||||
'home' => $this->iconHome(),
|
||||
'lattes' => $this->iconLattes(),
|
||||
'orcid' => $this->iconOrcid(),
|
||||
'mathscinet' => $this->iconMathSciNet(),
|
||||
@@ -50,6 +51,17 @@ class AcademicIconsExtension extends AbstractExtension {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Ícone de página pessoal (casinha).
|
||||
*/
|
||||
protected function iconHome(): string {
|
||||
return <<<'SVG'
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
</svg>
|
||||
SVG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ícone da Plataforma Lattes (CNPq).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user