Sandbox: mudanças entre as edições
m (→Gráficos) |
m (→Símbolos) |
||
(34 revisões intermediárias por 3 usuários não estão sendo mostradas) | |||
Linha 1: | Linha 1: | ||
Página de testes | '''Página de testes''' de recursos e extensões deste wiki. O carregamento dos recursos desta página é uma prova de que as extensões estão devidamente instaladas. | ||
Para página de manutenção, ver [[Manutenção]]. | Para página de manutenção, ver [[Manutenção]]. | ||
Subpáginas: | |||
* [[Sandbox/Claiton]] | |||
== Título (2 =) == | == Título (2 =) == | ||
Linha 12: | Linha 16: | ||
====== Subtítulo 4 (6 =) ====== | ====== Subtítulo 4 (6 =) ====== | ||
== Formatação de textos == | |||
Pré-formatado (um espaço antes do parágrafo) | Pré-formatado (um espaço antes do parágrafo) | ||
<blockquote><nowiki><blockquote> Bloco de citação </blockquote></nowiki></blockquote> | <blockquote><nowiki><blockquote> Bloco de citação </blockquote></nowiki></blockquote> | ||
Linha 19: | Linha 25: | ||
<nowiki><nowiki> Desabilitar wiki markdown </nowiki></nowiki> | <nowiki><nowiki> Desabilitar wiki markdown </nowiki></nowiki> | ||
Bloco de código | === Bloco de código === | ||
Usando ''[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight syntaxhighlight]'': | |||
<syntaxhighlight lang="python" line> | ==== Python ==== | ||
Simples: | |||
<syntaxhighlight lang="python"> | |||
a=1 | |||
print(a) | |||
</syntaxhighlight> | |||
Com contador de linhas: | |||
<syntaxhighlight lang="python" line> | |||
def quick_sort(arr): | |||
less = [] | |||
pivot_list = [] | |||
more = [] | |||
if len(arr) <= 1: | |||
return arr | |||
</syntaxhighlight> | |||
Com contador de linhas, iniciando no 55: | |||
<syntaxhighlight lang="python" line start="55> | |||
def quick_sort(arr): | def quick_sort(arr): | ||
less = [] | less = [] | ||
Linha 32: | Linha 59: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="python" line> | Com contador de linhas, iniciando no 55, sendo realçadas linhas 1ª, 3ª, 6ª ao 8ª: | ||
<syntaxhighlight lang="python" line start="55" highlight="1,3,6-8"> | |||
def quick_sort(arr): | |||
less = [] | |||
pivot_list = [] | |||
more = [] | |||
if len(arr) <= 1: | |||
return arr | |||
else: | |||
pass | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Símbolos == | ==== Bash ==== | ||
Alfa: | |||
<math>\ | <syntaxhighlight lang="bash"> | ||
pandoc -f commonmark markdownfile.md -t mediawiki -o out.wiki | |||
pandoc -t mediawiki -f html SBIDE2022resumo1osmCodesMetodologia.html # = SPans e divs | |||
pandoc -f html -t markdown-raw_html-native_divs-native_spans SBIDE2022resumo1osmCodesMetodologia.html | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash" line> | |||
# teste bash: | |||
pandoc -f commonmark markdownfile.md -t mediawiki -o out.wiki | |||
pandoc -t mediawiki -f html SBIDE2022resumo1osmCodesMetodologia.html # = SPans e divs | |||
pandoc -f html -t markdown-raw_html-native_divs-native_spans SBIDE2022resumo1osmCodesMetodologia.html | |||
</syntaxhighlight> | |||
== Símbolos 2 fórmulas == | |||
Alfa: <math>\alpha</math> | |||
Beta: <math>\beta</math> | |||
Gama: <math>\gamma</math> | |||
Phi ou Fi: <math>\phi</math> | |||
Pi ao quadrado: <math>\pi^2</math> | |||
Sigma índice 5 mais x: <math>\sigma_5 + x</math> | |||
== Imagens == | == Imagens == | ||
Linha 79: | Linha 137: | ||
<br style="clear: both;" clear="all" /> | <br style="clear: both;" clear="all" /> | ||
[https://www.mediawiki.org/wiki/Extension:PageImages PageImages]: | [https://www.mediawiki.org/wiki/Extension:PageImages PageImages]: | ||
{{Por fazer|Escolher um exemplo.}} | |||
(sem exemplo, confirmar) | (sem exemplo, confirmar) | ||
SVG: | |||
{{Por fazer|Está com falha para renderizar textos. Ver https://github.com/AddressForAll/wiki-backup/issues/5.}} | |||
[[File:Reverse proxy h2g2bob.svg|thumb|nenhum]] | |||
== Vídeos == | == Vídeos == | ||
Linha 143: | Linha 210: | ||
Teste de gráficos com dados JSON. | Teste de gráficos com dados JSON. | ||
'''Gráfico de barras''' | |||
<graph> | |||
{ | |||
"width": 400, | |||
"height": 200, | |||
"padding": {"top": 10, "left": 30, "bottom": 30, "right": 10}, | |||
"data": [ | |||
{ | |||
"name": "table", | |||
"values": [ | |||
{"x": 1, "y": 28}, {"x": 2, "y": 55}, | |||
{"x": 3, "y": 43}, {"x": 4, "y": 91}, | |||
{"x": 5, "y": 81}, {"x": 6, "y": 53}, | |||
{"x": 7, "y": 19}, {"x": 8, "y": 87}, | |||
{"x": 9, "y": 52}, {"x": 10, "y": 48}, | |||
{"x": 11, "y": 24}, {"x": 12, "y": 49}, | |||
{"x": 13, "y": 87}, {"x": 14, "y": 66}, | |||
{"x": 15, "y": 17}, {"x": 16, "y": 27}, | |||
{"x": 17, "y": 68}, {"x": 18, "y": 16}, | |||
{"x": 19, "y": 49}, {"x": 20, "y": 15} | |||
] | |||
} | |||
], | |||
"scales": [ | |||
{ | |||
"name": "x", | |||
"type": "ordinal", | |||
"range": "width", | |||
"domain": {"data": "table", "field": "x"} | |||
}, | |||
{ | |||
"name": "y", | |||
"type": "linear", | |||
"range": "height", | |||
"domain": {"data": "table", "field": "y"}, | |||
"nice": true | |||
} | |||
], | |||
"axes": [ | |||
{"type": "x", "scale": "x"}, | |||
{"type": "y", "scale": "y"} | |||
], | |||
"marks": [ | |||
{ | |||
"type": "rect", | |||
"from": {"data": "table"}, | |||
"properties": { | |||
"enter": { | |||
"x": {"scale": "x", "field": "x"}, | |||
"width": {"scale": "x", "band": true, "offset": -1}, | |||
"y": {"scale": "y", "field": "y"}, | |||
"y2": {"scale": "y", "value": 0} | |||
}, | |||
"update": { | |||
"fill": {"value": "steelblue"} | |||
}, | |||
"hover": { | |||
"fill": {"value": "red"} | |||
} | |||
} | |||
} | |||
] | |||
} | |||
</graph> | |||
<br>'''Gráfico de áreas''' | |||
<graph> | |||
{ | |||
"width": 500, | |||
"height": 200, | |||
"padding": {"top": 10, "left": 30, "bottom": 30, "right": 10}, | |||
"data": [ | |||
{ | |||
"name": "table", | |||
"values": [ | |||
{"x": 1, "y": 28}, {"x": 2, "y": 55}, | |||
{"x": 3, "y": 43}, {"x": 4, "y": 91}, | |||
{"x": 5, "y": 81}, {"x": 6, "y": 53}, | |||
{"x": 7, "y": 19}, {"x": 8, "y": 87}, | |||
{"x": 9, "y": 52}, {"x": 10, "y": 48}, | |||
{"x": 11, "y": 24}, {"x": 12, "y": 49}, | |||
{"x": 13, "y": 87}, {"x": 14, "y": 66}, | |||
{"x": 15, "y": 17}, {"x": 16, "y": 27}, | |||
{"x": 17, "y": 68}, {"x": 18, "y": 16}, | |||
{"x": 19, "y": 49}, {"x": 20, "y": 15} | |||
] | |||
} | |||
], | |||
"scales": [ | |||
{ | |||
"name": "x", | |||
"type": "linear", | |||
"range": "width", | |||
"zero": false, | |||
"domain": {"data": "table", "field": "x"} | |||
}, | |||
{ | |||
"name": "y", | |||
"type": "linear", | |||
"range": "height", | |||
"nice": true, | |||
"domain": {"data": "table", "field": "y"} | |||
} | |||
], | |||
"axes": [ | |||
{"type": "x", "scale": "x", "ticks": 20}, | |||
{"type": "y", "scale": "y"} | |||
], | |||
"marks": [ | |||
{ | |||
"type": "area", | |||
"from": {"data": "table"}, | |||
"properties": { | |||
"enter": { | |||
"interpolate": {"value": "monotone"}, | |||
"x": {"scale": "x", "field": "x"}, | |||
"y": {"scale": "y", "field": "y"}, | |||
"y2": {"scale": "y", "value": 0}, | |||
"fill": {"value": "steelblue"} | |||
}, | |||
"update": { | |||
"fillOpacity": {"value": 1} | |||
}, | |||
"hover": { | |||
"fillOpacity": {"value": 0.5} | |||
} | |||
} | |||
} | |||
] | |||
} | |||
</graph> | |||
'''Gráfico de linhas'''<graph>{ | |||
"version": 2, | |||
"width": 400, | |||
"height": 200, | |||
"data": [ | |||
{ | |||
"name": "table", | |||
"values": [ | |||
{ | |||
"x": 0, | |||
"y": 1 | |||
}, | |||
{ | |||
"x": 1, | |||
"y": 3 | |||
}, | |||
{ | |||
"x": 2, | |||
"y": 2 | |||
}, | |||
{ | |||
"x": 3, | |||
"y": 4 | |||
} | |||
] | |||
} | |||
], | |||
"scales": [ | |||
{ | |||
"name": "x", | |||
"type": "linear", | |||
"range": "width", | |||
"zero": false, | |||
"domain": { | |||
"data": "table", | |||
"field": "x" | |||
} | |||
}, | |||
{ | |||
"name": "y", | |||
"type": "linear", | |||
"range": "height", | |||
"nice": true, | |||
"domain": { | |||
"data": "table", | |||
"field": "y" | |||
} | |||
} | |||
], | |||
"axes": [ | |||
{ | |||
"type": "x", | |||
"scale": "x" | |||
}, | |||
{ | |||
"type": "y", | |||
"scale": "y" | |||
} | |||
], | |||
"marks": [ | |||
{ | |||
"type": "line", | |||
"from": { | |||
"data": "table" | |||
}, | |||
"properties": { | |||
"enter": { | |||
"x": { | |||
"scale": "x", | |||
"field": "x" | |||
}, | |||
"y": { | |||
"scale": "y", | |||
"field": "y" | |||
}, | |||
"y2": { | |||
"scale": "y", | |||
"value": 0 | |||
}, | |||
"interpolate": { | |||
"value": "monotone" | |||
}, | |||
"stroke": { | |||
"value": "steelblue" | |||
}, | |||
"strokeWidth": { | |||
"value": 3 | |||
} | |||
} | |||
} | |||
} | |||
] | |||
}</graph> | |||
'''Gráfico interativo''' | |||
<graph mode=interactive> | |||
{ | |||
// We want to use Vega 2, and specify image size | |||
"version": 2, "width": 300, "height": 80, | |||
// Set padding to the same value on all sides | |||
"padding": 12, | |||
// By default the background is transparent | |||
"background": "#edf1f7", | |||
"marks": [ | |||
{ | |||
// Draw a horizontal line | |||
"name": "scrollLine", | |||
"type": "rule", | |||
"properties": { | |||
"enter": { | |||
"x": {"value": 0}, | |||
"y": {"value": 40}, | |||
"x2": {"value": 300}, | |||
"stroke": {"value": "#000"}, | |||
"strokeWidth": {"value": 2} | |||
} | |||
} | |||
}, | |||
{ | |||
// Draw a triangle shape with a hover effect | |||
// naming objects allows us to reference them later | |||
"name": "handle", | |||
"type": "path", | |||
"properties": { | |||
"enter": { | |||
"x": {"value": 200}, | |||
"y": {"value": 40}, | |||
// path syntax is the same as SVG's path tag | |||
"path": {"value": "m-5.5,-10l0,20l11.5,-10l-11.5,-10z"}, | |||
"stroke": {"value": "#880"}, | |||
"strokeWidth": {"value": 2.5} | |||
}, | |||
"update": {"fill": {"value": "#fff"} }, | |||
// Change fill color of the object on mouse hover | |||
"hover": {"fill": {"value": "#f00"} } | |||
} | |||
} | |||
] | |||
} | |||
</graph> | |||
=== Não funcionando === | === Não funcionando === | ||
Os gráficos não funcionam: PageViews, PageHistory, rect, stackedarea, pie, map etc. | Os gráficos não funcionam: PageViews, PageHistory, rect, stackedarea, pie, map etc. Ver exemplos na [[mediawikiwiki:Extension:Graph|documentação]]. | ||
Por ora, este tipos de gráficos não são necessários e são recursos cosméticos. Caso sejam num futuro, implementaremos as predefinições requeridas (usa [[mediawikiwiki:Extension:Scribunto|Scribunto]] e Lua). | |||
== Esquemas == | |||
Da extensão [[mediawikiwiki:Extension:Mermaid|Mermaid]]. | |||
{{Por fazer|Instalar a extensão Mermaid.}} | |||
'''Exemplo 1:''' | |||
{{#mermaid:sequenceDiagram | |||
participant Alice | |||
participant Bob | |||
Alice->John: Hello John, how are you? | |||
loop Healthcheck | |||
John->John: Fight against hypochondria | |||
end | |||
Note right of John: Rational thoughts <br/>prevail... | |||
John-->Alice: Great! | |||
John->Bob: How about you? | |||
Bob-->John: Jolly good! | |||
}} | |||
'''Exemplo 2''' adaptado de um vindo do GitHub: | |||
{{#mermaid:classDiagram | |||
Jurisdiction *-- "0..1" Jurisdiction_geom | |||
Donated_PackTpl "0..1" --> Jurisdiction: has scope | |||
Donated_PackTpl "*" --> Donor: has | |||
Donor "0..1" ..> Jurisdiction: has agg scope | |||
class Jurisdiction { osm_id bigint } | |||
class Jurisdiction_geom { osm_id bigint } | |||
class Donor { | |||
id integer | |||
scope_osm_id bigint | |||
} | |||
class Donated_PackTpl { | |||
id integer | |||
scope_osm_id bigint | |||
donor_id integer | |||
} | |||
}} | |||
== Mapas == | == Mapas == |
Edição atual tal como às 15h35min de 26 de maio de 2024
Página de testes de recursos e extensões deste wiki. O carregamento dos recursos desta página é uma prova de que as extensões estão devidamente instaladas.
Para página de manutenção, ver Manutenção.
Subpáginas:
Título (2 =)
Subtítulo 1 (3 =)
Subtítulo 2 (4 =)
Subtítulo 3 (5 =)
Subtítulo 4 (6 =)
Formatação de textos
Pré-formatado (um espaço antes do parágrafo)
<blockquote> Bloco de citação </blockquote>
<code> Código </code>
<nowiki> Desabilitar wiki markdown </nowiki>
Bloco de código
Usando syntaxhighlight:
Python
Simples:
a=1
print(a)
Com contador de linhas:
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
Com contador de linhas, iniciando no 55:
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
Com contador de linhas, iniciando no 55, sendo realçadas linhas 1ª, 3ª, 6ª ao 8ª:
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
Bash
pandoc -f commonmark markdownfile.md -t mediawiki -o out.wiki
pandoc -t mediawiki -f html SBIDE2022resumo1osmCodesMetodologia.html # = SPans e divs
pandoc -f html -t markdown-raw_html-native_divs-native_spans SBIDE2022resumo1osmCodesMetodologia.html
# teste bash:
pandoc -f commonmark markdownfile.md -t mediawiki -o out.wiki
pandoc -t mediawiki -f html SBIDE2022resumo1osmCodesMetodologia.html # = SPans e divs
pandoc -f html -t markdown-raw_html-native_divs-native_spans SBIDE2022resumo1osmCodesMetodologia.html
Símbolos 2 fórmulas
Alfa:
Beta:
Gama:
Phi ou Fi:
Pi ao quadrado:
Sigma índice 5 mais x:
Imagens
Lista de imagens: https://wiki.addressforall.org/doc/Especial:Lista_de_arquivos
Imagemap:
Galeria simples:
Galeria com legenda mousehover:
Tarefas: Escolher um exemplo. |
(sem exemplo, confirmar)
SVG:
Tarefas: Está com falha para renderizar textos. Ver https://github.com/AddressForAll/wiki-backup/issues/5. |
Vídeos
Com marquee:
<youtube>https://www.youtube.com/watch?v=tt2nHK0oaSg</youtube>
Com #evt:
{{#evt: service=youtube |id=https://www.youtube.com/watch?v=eAORm-8b1Eg |alignment=left }}
Tabelas
Tabela estática
Header text | Header text | Header text |
---|---|---|
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Tabela ordenável
Header text | Header text | Header text |
---|---|---|
Example 1 | Example C | Example / |
Example 2 | Example B | Example * |
Example 3 | Example A | Example - |
Tabela colapsável
Header text | Header text | Header text |
---|---|---|
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Gráficos
Funcionando
Teste de gráficos com dados JSON.
Gráfico de barras
Gráfico de áreas
Gráfico de linhas
Gráfico interativo
Não funcionando
Os gráficos não funcionam: PageViews, PageHistory, rect, stackedarea, pie, map etc. Ver exemplos na documentação.
Por ora, este tipos de gráficos não são necessários e são recursos cosméticos. Caso sejam num futuro, implementaremos as predefinições requeridas (usa Scribunto e Lua).
Esquemas
Da extensão Mermaid.
Tarefas: Instalar a extensão Mermaid. |
Exemplo 1:
{{#mermaid:sequenceDiagram
participant Alice
participant Bob
Alice->John: Hello John, how are you? loop Healthcheck John->John: Fight against hypochondria end Note right of John: Rational thoughts
prevail... John-->Alice: Great! John->Bob: How about you? Bob-->John: Jolly good!
}}
Exemplo 2 adaptado de um vindo do GitHub: {{#mermaid:classDiagram
Jurisdiction *-- "0..1" Jurisdiction_geom Donated_PackTpl "0..1" --> Jurisdiction: has scope Donated_PackTpl "*" --> Donor: has Donor "0..1" ..> Jurisdiction: has agg scope
class Jurisdiction { osm_id bigint } class Jurisdiction_geom { osm_id bigint } class Donor { id integer scope_osm_id bigint } class Donated_PackTpl { id integer scope_osm_id bigint donor_id integer }
}}
Mapas
Exemplo de arquivo .map: https://commons.wikimedia.org/wiki/Data:Brazil.map.
Não se descobriu como inserir arquivo .map do Commons nesta página. Neste caso, a extensão Kartographer pode servir.
Ver: https://en.wikipedia.org/wiki/Wikipedia:Maps_for_Wikipedia. Possui exemplos de mapas interativos e do OSM.
Coordenadas
Extensão GeoData. Permite que artigos especifiquem suas coordenadas geográficas e publiquem essas coordenadas por meio da API HTTP.
{{#coordinates:primary|40.775114|-73.968802|type:landmark_region:US-NY|name=Loeb Central Park Boathouse}}
Kartographer
Teste da extensão Kartographer.
Usando mapframe :
Funciona. Ver PDF original.
Exemplo de PDF do Commons inserido na página, com moldura.
Exemplo de PDF do Commons inserido na página, sem moldura, menor.
Misc
Input field:
Links para Wikipedia:
Referência-padrão:
Referências
Texto:
The Sun is pretty big.[1] The Moon, however, is not so big.[2]
... então segue-se as notas ou referências com a marquee <references /> ...
---