Mudanças entre as edições de "Predefinição:Teste"

De Wiki Gla
Ir para navegação Ir para pesquisar
m
Etiqueta: Revertido
m
 
(37 revisões intermediárias por 2 usuários não estão sendo mostradas)
Linha 1: Linha 1:
<!-- Predefinição:GifThumb
<includeonly>{{#widget:Teste}}{{#invoke:Teste|main
    Uso:
| titulo = {{{titulo|Sem título}}}
      {{GifThumb
| texto = {{{texto|}}}
        | file = Baixandoglawindows.gif
}}</includeonly>
        | cap  = Isso é no Microsoft Edge, em outros navegadores...
<noinclude>
        | side = right            <!-- right | left | center -->
== Predefinição:Teste ==
        | width= 274              <!-- opcional, px -->
Exemplo didático: predefinição chama o widget (CSS/JS) e o módulo (HTML via Lua).
        | alt  = Download no Edge <!-- opcional -->
        | link = page            <!-- page | media | none (padrão: page) -->
      }}
-->


<!-- Normaliza alinhamento -->
=== Parâmetros ===
{{#vardefine:__side|{{lc:{{{side|right}}}}} }}
; titulo : Título da caixa (padrão: <code>Sem título</code>)
<!-- Normaliza link -->
; texto : Corpo em wikitext (links, negrito, etc.)
{{#vardefine:__link|{{lc:{{{link|page}}}}} }}


<div class="gtr-thumb thumb
=== Exemplo ===
{{#switch:{{#var:__side}}
<pre>
  |left=tleft
{{Teste|titulo=Notas da aula|texto=Conteúdo com '''negrito''' e [[link]].}}
  |center=tcenter
</pre>
  |right=tright
</noinclude>
  |#default=tright
}}">
  <div class="thumbinner" {{#if:{{{width|}}}|style="width: {{#expr: {{{width}}} + 2 }}px;"|}}>
    <!-- IMG com link condicional -->
    {{#switch:{{#var:__link}}
    | none =
        <img src="{{filepath:{{{file}}}}"
            {{#if:{{{width|}}}|width="{{{width}}}"|}}
            class="thumbimage"
            alt="{{{alt|}}}"
            loading="lazy"
            decoding="async" />
    | media =
        <a href="{{fullurl:Media:{{{file}}}}}">
          <img src="{{filepath:{{{file}}}}"
              {{#if:{{{width|}}}|width="{{{width}}}"|}}
              class="thumbimage"
              alt="{{{alt|}}}"
              loading="lazy"
              decoding="async" />
        </a>
    | #default =
        <a href="{{fullurl:Arquivo:{{{file}}}}}">
          <img src="{{filepath:{{{file}}}}"
              {{#if:{{{width|}}}|width="{{{width}}}"|}}
              class="thumbimage"
              alt="{{{alt|}}}"
              loading="lazy"
              decoding="async" />
        </a>
    }}
 
    <div class="thumbcaption">{{{cap|}}}</div>
  </div>
</div>
 
<!-- injeta CSS/JS do widget (não passa parâmetros) -->
<span style="display:none;">{{#widget:Teste}}</span>

Edição atual tal como às 00h24min de 1 de abril de 2026


Predefinição:Teste

Exemplo didático: predefinição chama o widget (CSS/JS) e o módulo (HTML via Lua).

Parâmetros

titulo
Título da caixa (padrão: Sem título)
texto
Corpo em wikitext (links, negrito, etc.)

Exemplo

{{Teste|titulo=Notas da aula|texto=Conteúdo com '''negrito''' e [[link]].}}