edit.blade.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
  4. @include('admin.layouts.alert')
  5. <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3 border-bottom">
  6. <h2 class="h2">设置</h2>
  7. <div class="btn-toolbar mb-2 mb-md-0">
  8. <button type="submit" class="btn btn-sm btn-primary mr-1"
  9. onclick="event.preventDefault();document.getElementById('edit-form').submit();">
  10. 提交
  11. </button>
  12. </div>
  13. </div>
  14. {{--<canvas class="my-4" id="myChart" width="900" height="380"></canvas>--}}
  15. <form action="{{ route('admin.switch.update') }}" id="edit-form" method="post">
  16. @csrf
  17. <h3>Carousel</h3>
  18. <div class="form-group">
  19. <div class="custom-control custom-switch">
  20. <input type="checkbox" class="custom-control-input"
  21. {{ $switches['sidebar']['carousel']['open'] == 1 ? "checked" : "" }}
  22. id="carousel-switch" name="carousel-switch">
  23. <label class="custom-control-label" for="carousel-switch">开关</label>
  24. </div>
  25. </div>
  26. <div class="form-row">
  27. <div class="form-group col-md-3">
  28. <label for="carousel-image-1">图片地址1</label>
  29. <input type="text" class="form-control" id="carousel-image-1" name="carousel-image-1"
  30. value="{{ $switches['sidebar']['carousel']['banners'][0]['image'] }}" required>
  31. </div>
  32. <div class="form-group col-md-3">
  33. <label for="carousel-url-1">跳转链接1</label>
  34. <input type="text" class="form-control" id="carousel-url-1" name="carousel-url-1"
  35. value="{{ $switches['sidebar']['carousel']['banners'][0]['url'] }}" required/>
  36. </div>
  37. <div class="form-group col-md-3">
  38. <label for="carousel-description-1">相关描述1</label>
  39. <input type="text" class="form-control" id="carousel-description-1" name="carousel-description-1"
  40. value="{{ $switches['sidebar']['carousel']['banners'][0]['description'] }}" required/>
  41. </div>
  42. </div>
  43. <div class="form-row">
  44. <div class="form-group col-md-3">
  45. <label for="carousel-image-2">图片地址2</label>
  46. <input type="text" class="form-control" id="carousel-image-2" name="carousel-image-2"
  47. value="{{ $switches['sidebar']['carousel']['banners'][1]['image'] }}" required>
  48. </div>
  49. <div class="form-group col-md-3">
  50. <label for="carousel-url-2">跳转链接2</label>
  51. <input type="text" class="form-control" id="carousel-url-2" name="carousel-url-2"
  52. value="{{ $switches['sidebar']['carousel']['banners'][1]['url'] }}" required/>
  53. </div>
  54. <div class="form-group col-md-3">
  55. <label for="carousel-description-2">相关描述2</label>
  56. <input type="text" class="form-control" id="carousel-description-2" name="carousel-description-2"
  57. value="{{ $switches['sidebar']['carousel']['banners'][1]['description'] }}" required/>
  58. </div>
  59. </div>
  60. <div class="form-row">
  61. <div class="form-group col-md-3">
  62. <label for="carousel-image-3">图片地址3</label>
  63. <input type="text" class="form-control" id="carousel-image-3" name="carousel-image-3"
  64. value="{{ $switches['sidebar']['carousel']['banners'][2]['image'] }}" required>
  65. </div>
  66. <div class="form-group col-md-3">
  67. <label for="carousel-url-3">跳转链接3</label>
  68. <input type="text" class="form-control" id="carousel-url-3" name="carousel-url-3"
  69. value="{{ $switches['sidebar']['carousel']['banners'][2]['url'] }}" required/>
  70. </div>
  71. <div class="form-group col-md-3">
  72. <label for="carousel-description-3">相关描述3</label>
  73. <input type="text" class="form-control" id="carousel-description-3" name="carousel-description-3"
  74. value="{{ $switches['sidebar']['carousel']['banners'][2]['description'] }}" required/>
  75. </div>
  76. </div>
  77. <h3>Motto</h3>
  78. <div class="form-group">
  79. <div class="custom-control custom-switch">
  80. <input type="checkbox" class="custom-control-input"
  81. {{ $switches['sidebar']['motto']['open'] == 1 ? "checked" : "" }}
  82. id="motto-switch" name="motto-switch">
  83. <label class="custom-control-label" for="motto-switch">开关</label>
  84. </div>
  85. </div>
  86. <div class="form-row">
  87. <div class="form-group col-md-4">
  88. <label for="motto-title">标题</label>
  89. <input type="text" class="form-control" id="motto-title" name="motto-title"
  90. value="{{ $switches['sidebar']['motto']['title'] }}" required>
  91. </div>
  92. <div class="form-group col-md-4">
  93. <label for="motto-content">内容</label>
  94. <input type="text" class="form-control" id="motto-content" name="motto-content"
  95. value="{{ $switches['sidebar']['motto']['content'] }}" required/>
  96. </div>
  97. </div>
  98. <h3>Tag</h3>
  99. <div class="form-group">
  100. <div class="custom-control custom-switch">
  101. <input type="checkbox" class="custom-control-input"
  102. {{ $switches['sidebar']['tag']['open'] == 1 ? "checked" : "" }}
  103. id="tag-switch" name="tag-switch">
  104. <label class="custom-control-label" for="tag-switch">开关</label>
  105. </div>
  106. </div>
  107. <div class="form-row">
  108. <div class="form-group col-md-4">
  109. <label for="tag-title">标题</label>
  110. <input type="text" class="form-control" id="tag-title" name="tag-title"
  111. value="{{ $switches['sidebar']['tag']['title'] }}" required>
  112. </div>
  113. <div class="form-group col-md-1">
  114. <label for="tag-count">数量</label>
  115. <input type="text" class="form-control" id="tag-count" name="tag-count"
  116. value="{{ $switches['sidebar']['tag']['count'] }}" required/>
  117. </div>
  118. </div>
  119. <h3>Category</h3>
  120. <div class="form-group">
  121. <div class="custom-control custom-switch">
  122. <input type="checkbox" class="custom-control-input"
  123. {{ $switches['sidebar']['category']['open'] == 1 ? "checked" : "" }}
  124. id="category-switch" name="category-switch">
  125. <label class="custom-control-label" for="category-switch">开关</label>
  126. </div>
  127. </div>
  128. <div class="form-row">
  129. <div class="form-group col-md-4">
  130. <label for="category-title">标题</label>
  131. <input type="text" class="form-control" id="category-title" name="category-title"
  132. value="{{ $switches['sidebar']['category']['title'] }}" required>
  133. </div>
  134. <div class="form-group col-md-1">
  135. <label for="category-count">数量</label>
  136. <input type="text" class="form-control" id="category-count" name="category-count"
  137. value="{{ $switches['sidebar']['category']['count'] }}" required/>
  138. </div>
  139. </div>
  140. <h3>Hot</h3>
  141. <div class="form-group">
  142. <div class="custom-control custom-switch">
  143. <input type="checkbox" class="custom-control-input"
  144. {{ $switches['sidebar']['hot']['open'] == 1 ? "checked" : "" }}
  145. id="hot-switch" name="hot-switch">
  146. <label class="custom-control-label" for="hot-switch">开关</label>
  147. </div>
  148. </div>
  149. <div class="form-row">
  150. <div class="form-group col-md-4">
  151. <label for="hot-title">标题</label>
  152. <input type="text" class="form-control" id="hot-title" name="hot-title"
  153. value="{{ $switches['sidebar']['hot']['title'] }}" required>
  154. </div>
  155. <div class="form-group col-md-1">
  156. <label for="hot-count">数量</label>
  157. <input type="text" class="form-control" id="hot-count" name="hot-count"
  158. value="{{ $switches['sidebar']['hot']['count'] }}" required/>
  159. </div>
  160. </div>
  161. <h3>Latest</h3>
  162. <div class="form-group">
  163. <div class="custom-control custom-switch">
  164. <input type="checkbox" class="custom-control-input"
  165. {{ $switches['sidebar']['latest']['open'] == 1 ? "checked" : "" }}
  166. id="latest-switch" name="latest-switch">
  167. <label class="custom-control-label" for="latest-switch">开关</label>
  168. </div>
  169. </div>
  170. <div class="form-row">
  171. <div class="form-group col-md-4">
  172. <label for="latest-title">标题</label>
  173. <input type="text" class="form-control" id="latest-title" name="latest-title"
  174. value="{{ $switches['sidebar']['latest']['title'] }}" required>
  175. </div>
  176. <div class="form-group col-md-1">
  177. <label for="latest-count">数量</label>
  178. <input type="text" class="form-control" id="latest-count" name="latest-count"
  179. value="{{ $switches['sidebar']['latest']['count'] }}" required/>
  180. </div>
  181. </div>
  182. <h3>Popular</h3>
  183. <div class="form-group">
  184. <div class="custom-control custom-switch">
  185. <input type="checkbox" class="custom-control-input"
  186. {{ $switches['sidebar']['popular']['open'] == 1 ? "checked" : "" }}
  187. id="popular-switch" name="popular-switch">
  188. <label class="custom-control-label" for="popular-switch">开关</label>
  189. </div>
  190. </div>
  191. <div class="form-row">
  192. <div class="form-group col-md-4">
  193. <label for="popular-title">标题</label>
  194. <input type="text" class="form-control" id="popular-title" name="popular-title"
  195. value="{{ $switches['sidebar']['popular']['title'] }}" required>
  196. </div>
  197. <div class="form-group col-md-1">
  198. <label for="popular-count">数量</label>
  199. <input type="text" class="form-control" id="popular-count" name="popular-count"
  200. value="{{ $switches['sidebar']['popular']['count'] }}" required/>
  201. </div>
  202. </div>
  203. <h3>Baidu</h3>
  204. <div class="form-group">
  205. <div class="custom-control custom-switch">
  206. <input type="checkbox" class="custom-control-input"
  207. {{ $switches['baidu_autopush'] == 1 ? "checked" : "" }}
  208. id="baidu_autopush-switch" name="baidu_autopush-switch">
  209. <label class="custom-control-label" for="baidu_autopush-switch">是否自动提交链接到百度搜索引擎</label>
  210. </div>
  211. </div>
  212. <div class="form-row">
  213. <div class="form-group col-md-2">
  214. <label for="baidupush-domain">手动推送 博客地址</label>
  215. <input type="text" class="form-control" id="baidupush-domain" name="baidupush-domain"
  216. value="{{ $switches['baidu_push']['domain'] }}" placeholder="示例: https://vienblog.com">
  217. </div>
  218. <div class="form-group col-md-4">
  219. <label for="baidupush-api">手动推送 百度API</label>
  220. <input type="text" class="form-control" id="baidupush-api" name="baidupush-api"
  221. value="{{ $switches['baidu_push']['api'] }}" placeholder="请到百度站长平台获取"/>
  222. </div>
  223. </div>
  224. <h3>AdSense</h3>
  225. <div class="form-group">
  226. <div class="custom-control custom-switch">
  227. <input type="checkbox" class="custom-control-input"
  228. {{ $switches['adsense']['open'] == 1 ? "checked" : "" }}
  229. id="adsense-switch" name="adsense-switch">
  230. <label class="custom-control-label" for="adsense-switch">开关</label>
  231. </div>
  232. </div>
  233. <div class="form-row">
  234. <div class="form-group col-md-6">
  235. <label for="adsense-script">谷歌AdSense代码</label>
  236. <textarea class="form-control" id="adsense-script" name="adsense-script"
  237. placeholder="谷歌AdSense代码" rows="5">
  238. {{ $switches['adsense']['script'] }}
  239. </textarea>
  240. </div>
  241. </div>
  242. <h3>Counter</h3>
  243. <div class="form-group">
  244. <div class="custom-control custom-switch">
  245. <input type="checkbox" class="custom-control-input"
  246. {{ $switches['counter']['open'] == 1 ? "checked" : "" }}
  247. id="counter-switch" name="counter-switch">
  248. <label class="custom-control-label" for="counter-switch">开关</label>
  249. </div>
  250. </div>
  251. <div class="form-row">
  252. <div class="form-group col-md-6">
  253. <label for="counter-script">流量统计代码</label>
  254. <textarea class="form-control" id="counter-script" name="counter-script"
  255. placeholder="流量统计代码" rows="5">
  256. {{ $switches['counter']['script'] }}
  257. </textarea>
  258. </div>
  259. </div>
  260. <button type="submit" class="mt-2 ml-3 btn btn-sm btn-primary">提交</button>
  261. </form>
  262. </main>
  263. @endsection