head.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. $view
  3. ->fetch('title', '<{isset($title) ? $title . "_" . Dever::load("main/content.config#name") : Dever::load("main/content.config#name")}>')
  4. ->fetch('meta[name="Keywords"]@content', '<{isset($keywords) ? Dever::load("main/content.config#keywords") . "," . $keywords : Dever::load("main/content.config#keywords")}>')
  5. ->fetch('meta[name="Description"]@content', '<{isset($info) ? Dever::load("main/content.config#info") . "," . $info : Dever::load("main/content.config#info")}>')
  6. ->fetch('.logo img@src', 'main/content.config#logo')
  7. ->fetch('.blogo img@src', 'main/content.config#logo')
  8. ->fetch('.logo img@data-wlogo', 'main/content.config#logo_black')
  9. ->fetch('.blogo img@data-wlogo', 'main/content.config#logo_black')
  10. ->fetch('.copyright img@src', 'main/content.config#weixin_qrcode')
  11. ->fetch('footer span', 'main/content.config#beian')
  12. //->fetch('.logo img@style', 'width:100px')
  13. # 登录
  14. //->fetch('.menu', 'main/content.user')
  15. # 联系方式
  16. ->fetch('.user-layer .icon-weibo@href', '<{Dever::load("main/content.config#weibo")}>')
  17. ->fetch('.share .icon-weibo@href', '<{Dever::load("main/content.config#weibo")}>')
  18. ->fetch('.qrcode img@src', '<{Dever::load("main/content.config#weixin_qrcode")}>')
  19. ->fetch('.user-layer .icon-weixin@href', '#')
  20. ->fetch('.share .icon-weixin@href', '#')
  21. ->fetch('.user-layer .icon-email@href', '<{Dever::load("main/content.config#contact")}>')
  22. # 搜索
  23. ->fetch('.search-layer input@id', 'search')
  24. ->fetch('.search-layer a@href', 'javascript:;')
  25. ->fetch('.search-layer a@onclick', 'main/content.search')
  26. ->fetch('.m-search-layer input@id', 'msearch')
  27. ->fetch('.m-search-layer .icon-search@onclick', 'main/content.msearch')
  28. # 菜单
  29. ->loop
  30. (
  31. '.menu-layer li',
  32. 'main/content.menu',
  33. array
  34. (
  35. 'a' => array
  36. (
  37. 'href' => '$v.link',
  38. 'html' => '$v.name',
  39. ),
  40. 'self' => array
  41. (
  42. 'class' => '$v.class',
  43. ),
  44. )
  45. )
  46. ->loop
  47. (
  48. '.nav-wrapper li',
  49. 'main/content.menu',
  50. array
  51. (
  52. 'self' => array
  53. (
  54. 'class' => '$v.class',
  55. 'html' => '$v.html',
  56. ),
  57. )
  58. )
  59. ->append('head', '<script><{Dever::script()}><{Dever::load("main/content.share")}></script>');
  60. //->append('head', '<script><{Dever::script()}>config.uid=<{Dever::load("passport/user.data") ? Dever::load("passport/user.data#id") : -1}></script>');