<?php

$view
->fetch('title',                    '<{isset($title) ? $title . "_" . Dever::load("main/content.config#name") : Dever::load("main/content.config#name")}>')
->fetch('meta[name="Keywords"]@content',                    '<{isset($keywords) ? Dever::load("main/content.config#keywords") . "," . $keywords : Dever::load("main/content.config#keywords")}>')
->fetch('meta[name="Description"]@content',                    '<{isset($info) ? Dever::load("main/content.config#info") . "," . $info : Dever::load("main/content.config#info")}>')
->fetch('.logo img@src',                    'main/content.config#logo')
->fetch('.logo img@style',                    'width:100px')

# 登录
//->fetch('.menu', 'main/content.user')

# 联系方式
->fetch('.user-layer .icon-weibo@href', '<{Dever::load("main/content.config#weibo")}>')
->fetch('.user-layer .icon-weixin@data-qrcode', '<{Dever::load("main/content.config#weixin_qrcode")}>')
->fetch('.user-layer .icon-weixin@href', '#')
->fetch('.user-layer .icon-link@href', '<{Dever::load("main/content.config#contact")}>')

# 搜索
->fetch('.search-layer input@id', 'search')
->fetch('.search-layer a@href', 'javascript:;')
->fetch('.search-layer a@onclick', 'main/content.search')

->fetch('.m-search-layer input@id', 'msearch')
->fetch('.m-search-layer .icon-search@onclick', 'main/content.msearch')

# 菜单
->loop
(
    '.menu-layer li',
    'main/content.menu',
    array
    (
        'a' => array
        (
            'href' => '$v.link',
            'html' => '$v.name',
        ),

        'self' => array
        (
            'class' => '$v.class',
        ),
    )
)

->loop
(
    '.nav-wrapper li',
    'main/content.menu',
    array
    (
        'a' => array
        (
            'href' => '$v.link',
            'html' => '$v.name',
        ),

        'self' => array
        (
            'class' => '$v.class',
        ),
    )
)

->append('head',    '<script><{Dever::script()}></script>');
//->append('head',    '<script><{Dever::script()}>config.uid=<{Dever::load("passport/user.data") ? Dever::load("passport/user.data#id") : -1}></script>');