index.tpl 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>搜索 - Powered by MinDoc</title>
  8. <meta name="keywords" content="MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Keyword}}">
  9. <meta name="description" content="MinDoc文档在线管理系统 {{.site_description}}">
  10. <!-- Bootstrap -->
  11. <link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
  12. <link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
  13. <link href="{{cdncss "/static/css/main.css" "version"}}" rel="stylesheet">
  14. </head>
  15. <body>
  16. <div class="manual-reader manual-container manual-search-reader">
  17. {{template "widgets/header.tpl" .}}
  18. <div class="container manual-body">
  19. <div class="search-head">
  20. <strong class="search-title">显示"{{.Keyword}}"的搜索结果</strong>
  21. </div>
  22. <div class="row">
  23. <div class="manual-list">
  24. {{range $index,$item := .Lists}}
  25. <div class="search-item">
  26. <div class="title">
  27. {{if eq $item.SearchType "document"}}
  28. <span class="label mark-doc">文档</span>
  29. <a href="{{urlfor "DocumentController.Read" ":key" $item.BookIdentify ":id" $item.Identify}}" title="{{$item.DocumentName}}" target="_blank">{{str2html $item.DocumentName}}</a>
  30. {{else if eq $item.SearchType "book"}}
  31. <span class="label mark-book">项目</span>
  32. <a href="{{urlfor "DocumentController.Index" ":key" $item.Identify}}" title="{{$item.BookName}}" target="_blank"> {{str2html $item.DocumentName}}</a>
  33. {{else}}
  34. <span class="label mark-blog">文章</span>
  35. <a href="{{urlfor "BlogController.Index" ":id" $item.DocumentId}}" title="{{$item.DocumentName}}" target="_blank"> {{str2html $item.DocumentName}}</a>
  36. {{end}}
  37. </div>
  38. <div class="description">
  39. {{str2html $item.Description}}
  40. </div>
  41. <div class="source">
  42. {{if eq $item.SearchType "document"}}
  43. <span class="item">来自项目:<a href="{{urlfor "DocumentController.Index" ":key" $item.BookIdentify}}" target="_blank">{{$item.BookName}}</a></span>
  44. {{else if eq $item.SearchType "book"}}
  45. <span class="item">项目:<a href="{{urlfor "DocumentController.Index" ":key" $item.Identify}}" target="_blank">{{$item.BookName}}</a></span>
  46. {{else}}
  47. <span class="item">来自文章:<a href="{{urlfor "BlogController.Index" ":id" $item.DocumentId}}" target="_blank">{{$item.BookName}}</a></span>
  48. {{end}}
  49. <span class="item">作者:{{$item.Author}}</span>
  50. <span class="item">更新时间:{{date_format $item.ModifyTime "2006-01-02 15:04:05"}}</span>
  51. </div>
  52. </div>
  53. {{else}}
  54. <div class="search-empty">
  55. <img src="{{cdnimg "/static/images/search_empty.png"}}" class="empty-image">
  56. <span class="empty-text">暂无相关搜索结果</span>
  57. </div>
  58. {{end}}
  59. <nav class="pagination-container">
  60. {{.PageHtml}}
  61. </nav>
  62. <div class="clearfix"></div>
  63. </div>
  64. </div>
  65. </div>
  66. {{template "widgets/footer.tpl" .}}
  67. </div>
  68. <script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
  69. <script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
  70. {{.Scripts}}
  71. </body>
  72. </html>