Ver código fonte

More API documentation formatting.

pull/24/head
Ben Kurtovic 10 anos atrás
pai
commit
df02763284
2 arquivos alterados com 15 adições e 2 exclusões
  1. +13
    -0
      static/api.css
  2. +2
    -2
      templates/api.mako

+ 13
- 0
static/api.css Ver arquivo

@@ -11,6 +11,14 @@ span.code {
font-family: monospace;
}

span.param-key {
color: #009;
}

span.param-val {
color: #900;
}

table.parameters {
margin: 1em 0;
}
@@ -39,3 +47,8 @@ table.parameters tr:nth-child(2n + 3) {
table.parameters tr:nth-child(2n + 4) {
background-color: #F0F0F0;
}

a:link { color: #373; text-decoration: none; }
a:visited { color: #373; text-decoration: none; }
a:hover { color: #040; text-decoration: underline; }
a:active { color: #404; text-decoration: underline; }

+ 2
- 2
templates/api.mako Ver arquivo

@@ -214,7 +214,7 @@
]
}</pre>
<h2>Example</h2>
<p>GET https://tools.wmflabs.org/copyvios/api.json?version=1&amp;action=search&amp;project=wikipedia&amp;lang=en&amp;title=User:The_Earwig/Sandbox/CopyvioExample</p>
<p><a href="https://tools.wmflabs.org/copyvios/api.json?version=1&amp;action=search&amp;project=wikipedia&amp;lang=en&amp;title=User:The_Earwig/Sandbox/CopyvioExample"><span class="code">https://tools.wmflabs.org/copyvios/api.json?<span class="param-key">version</span>=<span class="param-value">1</span>&amp;<span class="param-key">action</span>=<span class="param-value">search</span>&amp;<span class="param-key">project</span>=<span class="param-value">wikipedia</span>&amp;<span class="param-key">lang</span>=<span class="param-value">en</span>&amp;<span class="param-key">title</span>=<span class="param-value">User:The_Earwig/Sandbox/CopyvioExample</span></span></a></p>
<pre>
{
"status": "ok",
@@ -272,7 +272,7 @@
% if result:
<div id="result">
<p>You are using <span class="code">jsonfm</span> output mode, which renders JSON data as a formatted HTML document. This is intended for testing and debugging only.</p>
${walk_json(result)}
<pre>${walk_json(result)}</pre>
</div>
% endif
</body>


Carregando…
Cancelar
Salvar