<div class="modal-con {{className}}"> <h3>{{h1}}</h3> <span class="close" title="关闭">×</span> <div class="modal-box"> <p class="loading">载入中...</p> </div> </div> <div id="sites-box"> <div class="box-info"> <h2>控制台</h2> <p>网站设定、新建</p> </div> <ul class="sites-ul"> {{#.}} <li data-sid="{{sid}}"> <h5><!-- <img src="http://{{url}}/favicon.ico"> -->{{title}}</h5> <p class="sites-description">{{des}}</p> <p class="sites-num none"> <span>{{postsNum}}</span> <span>{{cmtsNum}}</span> </p> <p class="sites-ctrl"> <!-- <a href="#!site/{{sid}}">管理评论</a> --> <a href="#!site/{{sid}}/settings">设置</a> <a href="#!site/{{sid}}/domains">域名</a> <a href="#!site/{{sid}}/codes">获取代码</a> </p> </li> {{/.}} <li class="sites-add-btn"> 新建评论框 + </li> </ul> </div> <form action="sites" method="post" class="board-add"> <label class="input-item"> <b>名称</b> <input class="ui-text" name="title" placeholder="博客/网站名称"> </label> <label class="input-item"> <b>简介</b> <!-- <input name="url" placeholder="地址"> --> <textarea class="ui-text" name="description" placeholder="文字简介" autocapitalize="off" rows="5" cols="30"></textarea> </label> <div class="input-item"> <button class="btn" type="submit">提交</button> </div> </form> <div class="box-info" id="sid-{{sid}}"> <h2>{{title}}</h2> <p>{{des}}</p> </div> <div class="box-nav"> <!-- <a href="#!site/{{sid}}/comments">评论</a> --> <!-- <a href="#!site/{{sid}}/threads">文章</a> <a href="#!site/{{sid}}/stats">统计</a> --> <a href="#!site/{{sid}}/settings">设置</a> <a href="#!site/{{sid}}/domains">域名</a> <a href="#!site/{{sid}}/codes">获取代码</a> </div> <div class="box-con"></div> <!-- <h3>{{title}}</h3> <span>{{url}}</span> <span>{{postsNum}}</span> <span>{{cmtsNum}}</span> <p>{{des}}</p> --> <div class="site-settings"> <h3>评论框信息</h3> <form action="sites/{{sid}}" method="put"> <label class="input-item"> <b>名称</b> <input class="ui-text" name="title" value="{{title}}" placeholder="名称"> </label> <label class="input-item"> <b>简介</b> <textarea class="ui-text" name="description" placeholder="文字简介" autocapitalize="off" rows="5" cols="30">{{description}}</textarea> </label> <!-- <label class="input-item"> <b>域名</b> <textarea class="ui-text" name="domains" placeholder="域名们" autocapitalize="off" rows="7" cols="30">{{domains}}</textarea> </label> --> <div class="input-item"> <button class="btn" type="submit">确认修改</button> </div> </form> <h3>删除评论框</h3> <form action="sites/{{sid}}" method="delete"> <p>删除后评论框将无法展示</p> <button type="submit" class="btn min red">删除数据</button> </form> </div> 统计部分 文章 评论 <div class="site-settings"> <h3>评论框展示域设置</h3> <p>萌评论依照 <code>/^域名(:端口)?$/</code>(不包括协议部分) 作为网站区分,<br>在这里设置允许就意味着在这些域下可以通过前端发布评论。</p> <p>例子:<code>comment.moe</code>、<code>vscam.co:1024</code>、<code>233.233.233.233:1024</code></p> <form action="domains/{{sid}}" method="put"> <label class="input-item"> <b>域名</b> <textarea class="ui-text" name="domains" placeholder="域名们" autocapitalize="off" rows="7" cols="30">{{domains}}</textarea> </label> <div class="input-item"> <button class="btn" type="submit">确认修改</button> </div> </form> </div> <div class="site-codes"> <link rel="stylesheet" type="text/css" href="http://new.host.mouto.org:1024/i/md/monokai_sublime.css"> <h3>普通的评论框代码</h3> <pre><code class="HTML hljs xml"><span class="hljs-comment">&lt;!-- 在需要展示评论框处插入 --&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">"cm-article"</span> <span class="hljs-attribute">data-key</span>=<span class="hljs-value">"文章唯一id"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span> <span class="hljs-comment">&lt;!-- &lt;/body&gt; 标签结束前插入 --&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-title">link</span> <span class="hljs-attribute">rel</span>=<span class="hljs-value">"stylesheet"</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"//comment.moe/dest/static/css/plus.css"</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">"//comment.moe/dest/static/js/build.js"</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">"UTF-8"</span>&gt;</span><span class="javascript"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span> </code></pre> <h3>单页应用的情况如何唤醒评论框</h3> <pre><code class="JavaScript hljs ">萌评.运转();</code></pre> <h3>例子</h3> <p><a href="demo.html" target="_blank">评论框演示</a></p> </div>