1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Add create wiki page button

This commit is contained in:
Steffo 2019-01-04 02:29:30 +01:00
parent 281c7ec6ce
commit 164482623b
2 changed files with 11 additions and 0 deletions

View file

@ -85,6 +85,10 @@ input[type="text"], input[type="password"] {
font-size: medium; font-size: medium;
font-family: sans-serif; font-family: sans-serif;
width: 100%; width: 100%;
&.half {
width: 50%;
}
} }
textarea { textarea {

View file

@ -1,3 +1,9 @@
<script>
function createpage() {
var key = document.getElementById("input-key").value;
window.location.href = `/wiki/${key}`;
}
</script>
<div class="box"> <div class="box">
<div class="upper-box"> <div class="upper-box">
Pagine Wiki Pagine Wiki
@ -8,5 +14,6 @@
<li><a href="/wiki/{{ page.key }}">{{ page.key }}</a></li> <li><a href="/wiki/{{ page.key }}">{{ page.key }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
oppure... <input id="input-key" name="key" type="text" placeholder="Nome pagina" class="half"><button onclick="createpage()">Crea</button>
</div> </div>
</div> </div>