mirror of https://github.com/kianby/blog
page comment option
parent
6469c911cd
commit
f8a10d9b70
@ -1,10 +1,64 @@
|
||||
<div class="comment-detail">
|
||||
<img src="https://www.gravatar.com/avatar/{{ avatar }}.jpg" style="float:left; margin-right:10px" height="32" width="32">
|
||||
<div class="comment-body">
|
||||
<span class="comment-author">{{ site_start }}{{ author }}{{ site_end }}</span>
|
||||
</span><span> - {{ date }}</span>
|
||||
<p>{{ content }}</p>
|
||||
</div>
|
||||
<div class="comment-separator"></div>
|
||||
|
||||
{{ comments }}
|
||||
|
||||
<div id="comment-form">
|
||||
<strong>Votre commentaire</strong>
|
||||
<form role="form" action="/newcomment" autocomplete="off" method="post">
|
||||
<fieldset>
|
||||
<input id="author" name="author" type="text" placeholder="Nom ou Surnom" required>
|
||||
<input id="site" name="site" type="text" placeholder="Site Web">
|
||||
<input style="display:none" id="email" name="email" type="text"
|
||||
placeholder="Adresse email pour Gravatar (non publié)" onchange="grabatar()">
|
||||
<img src="" id="gravatar" height="32" width="32" style="display:none">
|
||||
<input class="hidden" id="token" name="token" type="text" placeholder="Blog"
|
||||
value="{{ stacosys_token }}">
|
||||
<input class="hidden" id="url" name="url" type="text" placeholder="Article"
|
||||
value="/{{ post_url }}/">
|
||||
<label class="remarque">Remarque</label>
|
||||
<input class="remarque" name="remarque"
|
||||
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"
|
||||
placeholder="nom@domaine.com">
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<textarea id="message" name="message" rows="4"
|
||||
placeholder="Votre commentaire (texte simple ou Markdown)" required></textarea>
|
||||
<div id="preview-container" style="display:none">
|
||||
<p>Prévisualisation :</p>
|
||||
<div id="preview" class="preview-markdown"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<div>
|
||||
<em>Le site Web est optionel</em><br>
|
||||
<em>Le message peut être rédigé au format <a href="http://daringfireball.net/projects/markdown/"
|
||||
target="_blank">Markdown</a></em>
|
||||
</div>
|
||||
<div id="helpgravatar" style="display:none">
|
||||
<em>L'e-mail sert uniquement à retrouver votre <a href="https://fr.gravatar.com/">Gravatar</a></em>
|
||||
</div>
|
||||
</fieldset>
|
||||
<button type="submit" class="button--primary">Envoyer</button>
|
||||
<button id="markdown" style="display:none" onclick="preview_markdown(); return false"
|
||||
class="button--info">Prévisualiser</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
function grabatar() {
|
||||
var gravatar = document.getElementById("gravatar");
|
||||
var email = document.getElementById("email");
|
||||
var md5avatar = md5(email.value);
|
||||
gravatar.src = "http://www.gravatar.com/avatar/" + md5avatar + ".jpg";
|
||||
email.value = md5avatar;
|
||||
gravatar.style.display = '';
|
||||
}
|
||||
|
||||
function showbonus() {
|
||||
document.getElementById("email").style.display = '';
|
||||
document.getElementById("markdown").style.display = '';
|
||||
document.getElementById("helpgravatar").style.display = '';
|
||||
}
|
||||
|
||||
window.onload = showbonus;
|
||||
--></script>
|
||||
|
Loading…
Reference in New Issue