添加前端demo库
parent
7d63bc535d
commit
a208aaf6bf
|
@ -114,9 +114,6 @@ class ArticleTree extends Controller
|
|||
}
|
||||
}
|
||||
function articleAction(){
|
||||
// $baseDir = dirname($vendorDir);
|
||||
|
||||
// var_dump($vendorDir,$baseDir);
|
||||
$redis = new \Redis();
|
||||
$redis->connect(\App\Config::RedisServer(), 6379);
|
||||
//查看服务是否运行
|
||||
|
|
|
@ -169,8 +169,8 @@ class NewUi extends Controller
|
|||
$doc_all = $docModel->getArticlesTree($doc[0]["id"]);
|
||||
$doc_vers = $docModel->DocVersTime($id);
|
||||
|
||||
$markdown = new \ParsedownToC();
|
||||
$doc[0]['content'] = $markdown->body($doc[0]['content']);
|
||||
// $markdown = new \ParsedownToC();
|
||||
// $doc[0]['content'] = $markdown->body($doc[0]['content']);
|
||||
|
||||
$typedocs = $docModel->getAllTypeDocs();
|
||||
$doccoment = $commentModel->DocComments($id);
|
||||
|
@ -178,7 +178,11 @@ class NewUi extends Controller
|
|||
$top5 = $docModel->top5Doc();
|
||||
$groups = $docModel->getGroups();
|
||||
$groupstype = $docModel->GetAllGroupType();
|
||||
|
||||
foreach ($doc as $key => $value) {
|
||||
$str = str_replace(array("\r", "\n"), array('', '\n'), addslashes($value['content']));
|
||||
$doc[$key]['content'] = $str;
|
||||
}
|
||||
|
||||
if (\App\Config::$DEBUG)
|
||||
View::renderTemplate("/blog/article.html",
|
||||
[
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
|
||||
<!-- 前端渲染 -->
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<!-- <script>
|
||||
var katex_config = {
|
||||
delimiters:
|
||||
|
@ -161,6 +159,11 @@
|
|||
个人作品
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#visual" data-toggle="tab">
|
||||
前端工具
|
||||
</a>
|
||||
</li>
|
||||
<li style="margin-top: 12px;">文章搜索</li>
|
||||
<li style="margin-top: 12px" id="search">
|
||||
<form style="margin-left: 5px;">
|
||||
|
@ -253,6 +256,8 @@ function expandNode(e) {
|
|||
$("#expandAllBtn").bind("click", {type:"expandAll"}, expandNode);
|
||||
htmlText = ""
|
||||
{% for doc in docs %}
|
||||
console.log(htmlText)
|
||||
|
||||
htmlText = marked.parse('{{ doc.content | raw }}')
|
||||
document.getElementById('render_{{doc.id}}').innerHTML = htmlText
|
||||
{% endfor %}
|
||||
|
@ -384,7 +389,9 @@ function expandNode(e) {
|
|||
<div class="tab-pane fade " id="work">
|
||||
{% include '/blog/template/work.html' %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade " id="visual">
|
||||
{% include '/blog/template/visual.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<script src="/api/App/Views/blog/js/bootstrap-treeview.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
个人作品
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#visual" data-toggle="tab">
|
||||
前端工具
|
||||
</a>
|
||||
</li>
|
||||
<li style="margin-top: 12px;">标题搜索</li>
|
||||
<li style="margin-top: 12px" id="search">
|
||||
<form style="margin-left: 5px;">
|
||||
|
@ -74,7 +79,9 @@
|
|||
<div class="tab-pane fade " id="work">
|
||||
{% include '/blog/template/work.html' %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade " id="visual">
|
||||
{% include '/blog/template/visual.html' %}
|
||||
</div>
|
||||
<script src="/api/App/Views/blog/js/bootstrap-treeview.js"></script>
|
||||
<script type="text/javascript">
|
||||
globalposx = 0;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<h4 class="media-heading">耕耘领域:</h4>
|
||||
<p>服务端开发</p>
|
||||
<p>嵌入式开发</p>
|
||||
<p><a href="http://zcy421593.wicp.net:2541/zcy">git</a></p>>
|
||||
<p><a href="http://hdrtc.net:2541/zcy">git</a></p>>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2022-01-09 06:52:46
|
||||
* @LastEditTime: 2022-03-17 23:28:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \api\App\Views\blog\template\work.html
|
||||
-->
|
||||
{% block article %}
|
||||
<div id="container">
|
||||
<iframe src="https://testingcloud.club/visual/index.html" style="width: 100%;height: 1024px;">
|
||||
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue