no message

deploy
DESKTOP-4RNDQIC\29019 2020-05-07 13:52:37 +08:00
parent 9727c386f4
commit 3984e83396
3 changed files with 150 additions and 148 deletions

View File

@ -28,9 +28,9 @@ class Blog extends Controller
array_push($firstpagedocs,$obj);
}
if(\App\Config::$DEBUG)
View::renderTemplate("/blog/basic.html",['docs'=>$firstpagedocs,'index'=>true,'debug'=>true,"typedocs" => $typedocs]);
View::renderTemplate("/blog/basic.html",['type'=>'artile','docs'=>$firstpagedocs,'index'=>true,'debug'=>true,"typedocs" => $typedocs]);
else{
View::renderTemplate("/blog/basic.html",['docs'=>$firstpagedocs,'index'=>true,'debug'=>false,"typedocs" => $typedocs]);
View::renderTemplate("/blog/basic.html",['type'=>'artile','docs'=>$firstpagedocs,'index'=>true,'debug'=>false,"typedocs" => $typedocs]);
}
}
function articleAction() {
@ -47,19 +47,22 @@ class Blog extends Controller
echo '</pre>';
if(\App\Config::$DEBUG)
View::renderTemplate("/blog/basic.html",
['title'=>rawurldecode($this->querys['title']),
'index'=>false,
'content'=>$content,
'type' => $this->querys['type'],
'debug' => true,
'article'=>true,
"typedocs" => $typedocs,
"comments" => $doccoment,
"comment_count" => count($doccoment),
"docid"=>$id,
[
'type'=>'artile',
'title'=>rawurldecode($this->querys['title']),
'index'=>false,
'content'=>$content,
'type' => $this->querys['type'],
'debug' => true,
'article'=>true,
"typedocs" => $typedocs,
"comments" => $doccoment,
"comment_count" => count($doccoment),
"docid"=>$id,
]);
else
View::renderTemplate("/blog/basic.html",[
'type'=>'artile',
'title'=>rawurldecode($this->querys['title']),
'article'=>true,
'content'=>$content,

View File

@ -151,6 +151,7 @@ ul li a{
</style>
<body style="background: #eee">
<div id="top">
<div style="display: inline;float: right;"></div>
<div id="sidebar">
@ -170,133 +171,14 @@ ul li a{
</ul>
</div>
</div>
<div id="container" >
<div id="left">
<!--包裹层-->
<div class="navMenuBox" >
<!--一级菜单-->
<ul class="navMenu" id="navMenu">
{% for key,docs in typedocs %}
<li id="doc_type_{{ docs.key }}">
<a href="#" id="arrow' + '">{{ key }}</a>
<ul class="subMenu" style="display: none;font-size: 25px;text-align: center;" >
{% for doc in docs.arr %}
<li><a href="https://www.testingcloud.club/wapi/Blog/article?title={{doc.title}}&type={{ docs.key }}"> {{ doc.title }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
<?php echo {{ type }} ?>
<!--菜单项-->
</ul>
</div>
</div>
<div id="right" >
{% if index == true %}
{% for doc in docs %}
<div style="width: 100%; height: 220px; margin: 5px 5px 5px 0px; overflow:hidden;padding-bottom: 4px;background: seashell;border: #0b3e6f 4px solid;">
<div class="title" style="font-size: 18px;font-weight: bold">
<p style="display: inline;margin-left: 5px;">2019-08-04 </p>
{% if debug == true %}
<p style="display: inline;margin-left: 5px;"><a href="/api/public/Blog/article?title={{doc.title}}&type={{doc.type}}">{{doc.title}}</a></p>
{%else%}
<p style="display: inline;margin-left: 5px;"><a href="/wapi/Blog/article?title={{doc.title}}&type={{doc.type}}">{{doc.title}}</a></p>
{% endif %}
<p style="display: inline;margin:0px;float: right; margin-right: 20px">管理員</p>
</div>
<div style="width: 100%;height: 220px;font-size: 14px;margin-top: 10px;" >
{{ doc.content | raw}}
</div>
<p style="vertical-align: bottom;font-size: 12px;">read more</p>
</div>
{% endfor %}
{% endif %}
{% if article == true %}
<div style="width: 100%; height: 100%; margin: 5px 5px 5px 5px;">
<p style="display: block;font-size: 20px ; font-family: 宋体 bold ;text-align: center;">
<br>{{ title }}</br>
</p>
<div id="content" style="width: 100%;height: auto;
display: block;font-size: 16px;text-align: left;
word-break: break-all; word-wrap:break-word;">
{{ content | raw}}
</div>
<div class="comment-filed">
<!--发表评论区begin-->
<div>
<div class="comment-num">
<span>{{comment_count}}条评论</span>
</div>
<div>
<div>
<textarea class="txt-commit" replyid="0"></textarea>
</div>
<div class="div-txt-submit">
<a class="comment-submit" parent_id="0" style="" href="javascript:void(0);"><span style=''>发表评论</span></a>
</div>
</div>
</div>
<!--发表评论区end-->
<!--评论列表显示区begin-->
<!-- {$commentlist} -->
<div class="comment-filed-list" >
<div><span>全部评论</span></div>
<div class="comment-list" >
<!--一级评论列表begin-->
<ul class="comment-ul">
<volist name="commlist" id="data">
{% for comment in comments %}
<li comment_id="{{comment.id}}">
<div >
<div>
<img class="head-pic" src="/api/App/Views/blog/res/pic/default.jpg" alt="">
</div>
<div class="cm">
<div class="cm-header">
<span>{{comment.author}}</span>
<span>{{comment.time}}</span>
</div>
<div class="cm-content">
<p>
{{comment.content}}
</p>
</div>
<div class="cm-footer">
<a class="comment-reply" comment_id="{$data.id}" href="javascript:void(0);">回复</a>
</div>
</div>
</div>
</li>
{% endfor %}
</volist>
</ul>
<!--一级评论列表end-->
</div>
</div>
<!--评论列表显示区end-->
</div>
</div>
{% endif %}
{% if donate == true %}
<img src="/api/App/Views/blog/res/pic/ali.jpg"
style="width: 300px;height: 420px;margin-left: 25%;">
{% endif %}
</div>
<span id="page">
<ul id="page_ul">
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f;text-align: left;">P</a></li>
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f;text-align: left;">1</a></li>
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f;text-align: left;">2</a></li>
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f; text-align: left;">N</a></li>
</ul>
</span>
<div id="footer">
<p style="font-size: 5px;margin: auto;width: 250px;text-align: center">个人网站,备案号: 闽ICP备19002644号-1</p>
<p style="font-size: 5px;margin: auto;width: 150px;text-align: center">testingcloud.club</p>
<p style="font-size: 5px;margin: auto;width: 150px;text-align: center">联系方式290198252@qq.com</p>
</div>
</div>
{% if type == article %}
{% use '/blog/template/article.html' %}
{% endif %}
{% if type == "funding" %}
{% include '/blog/template/article.html' %}
{% endif %}
<script type="text/javascript" async>
firstinit = false;
setTimeout( function(){
@ -312,5 +194,4 @@ ul li a{
console.log({{type}});
},1000);
</script>
</body>

View File

@ -1,10 +1,128 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title</title>
</head>
<body>
<div id="container" >
<div id="left">
<!--包裹层-->
<div class="navMenuBox" >
<!--一级菜单-->
<ul class="navMenu" id="navMenu">
{% for key,docs in typedocs %}
<li id="doc_type_{{ docs.key }}">
<a href="#" id="arrow' + '">{{ key }}</a>
<ul class="subMenu" style="display: none;font-size: 25px;text-align: center;" >
{% for doc in docs.arr %}
<li><a href="https://www.testingcloud.club/wapi/Blog/article?title={{doc.title}}&type={{ docs.key }}"> {{ doc.title }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</body>
</html>
<!--菜单项-->
</ul>
</div>
</div>
<div id="right" >
{% if index == true %}
{% for doc in docs %}
<div style="width: 100%; height: 220px; margin: 5px 5px 5px 0px; overflow:hidden;padding-bottom: 4px;background: seashell;border: #0b3e6f 4px solid;">
<div class="title" style="font-size: 18px;font-weight: bold">
<p style="display: inline;margin-left: 5px;">2019-08-04 </p>
{% if debug == true %}
<p style="display: inline;margin-left: 5px;"><a href="/api/public/Blog/article?title={{doc.title}}&type={{doc.type}}">{{doc.title}}</a></p>
{%else%}
<p style="display: inline;margin-left: 5px;"><a href="/wapi/Blog/article?title={{doc.title}}&type={{doc.type}}">{{doc.title}}</a></p>
{% endif %}
<p style="display: inline;margin:0px;float: right; margin-right: 20px">管理員</p>
</div>
<div style="width: 100%;height: 220px;font-size: 14px;margin-top: 10px;" >
{{ doc.content | raw}}
</div>
<p style="vertical-align: bottom;font-size: 12px;">read more</p>
</div>
{% endfor %}
{% endif %}
{% if article == true %}
<div style="width: 100%; height: 100%; margin: 5px 5px 5px 5px;">
<p style="display: block;font-size: 20px ; font-family: 宋体 bold ;text-align: center;">
<br>{{ title }}</br>
</p>
<div id="content" style="width: 100%;height: auto;
display: block;font-size: 16px;text-align: left;
word-break: break-all; word-wrap:break-word;">
{{ content | raw}}
</div>
<div class="comment-filed">
<!--发表评论区begin-->
<div>
<div class="comment-num">
<span>{{comment_count}}条评论</span>
</div>
<div>
<div>
<textarea class="txt-commit" replyid="0"></textarea>
</div>
<div class="div-txt-submit">
<a class="comment-submit" parent_id="0" style="" href="javascript:void(0);"><span style=''>发表评论</span></a>
</div>
</div>
</div>
<!--发表评论区end-->
<!--评论列表显示区begin-->
<!-- {$commentlist} -->
<div class="comment-filed-list" >
<div><span>全部评论</span></div>
<div class="comment-list" >
<!--一级评论列表begin-->
<ul class="comment-ul">
<volist name="commlist" id="data">
{% for comment in comments %}
<li comment_id="{{comment.id}}">
<div >
<div>
<img class="head-pic" src="/api/App/Views/blog/res/pic/default.jpg" alt="">
</div>
<div class="cm">
<div class="cm-header">
<span>{{comment.author}}</span>
<span>{{comment.time}}</span>
</div>
<div class="cm-content">
<p>
{{comment.content}}
</p>
</div>
<div class="cm-footer">
<a class="comment-reply" comment_id="{$data.id}" href="javascript:void(0);">回复</a>
</div>
</div>
</div>
</li>
{% endfor %}
</volist>
</ul>
<!--一级评论列表end-->
</div>
</div>
<!--评论列表显示区end-->
</div>
</div>
{% endif %}
{% if donate == true %}
<img src="/api/App/Views/blog/res/pic/ali.jpg"
style="width: 300px;height: 420px;margin-left: 25%;">
{% endif %}
</div>
<span id="page">
<ul id="page_ul">
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f;text-align: left;">P</a></li>
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f;text-align: left;">1</a></li>
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f;text-align: left;">2</a></li>
<li><a href="/api/public/Blog/index" style="font-size: 25px; text-decoration: none; background: #20375f; text-align: left;">N</a></li>
</ul>
</span>
<div id="footer">
<p style="font-size: 5px;margin: auto;width: 250px;text-align: center">个人网站,备案号: 闽ICP备19002644号-1</p>
<p style="font-size: 5px;margin: auto;width: 150px;text-align: center">testingcloud.club</p>
<p style="font-size: 5px;margin: auto;width: 150px;text-align: center">联系方式290198252@qq.com</p>
</div>
</div>