{"size": 1086, "ext": "js", "max_stars_repo_path": "source/src/page/blog.js", "max_stars_repo_name": "liquidliang/gulp-swblog", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "source/src/page/blog.js", "max_issues_repo_name": "liquidliang/gulp-swblog", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "source/src/page/blog.js", "max_forks_repo_name": "liquidliang/gulp-swblog", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.5789473684, "max_line_length": 114, "alphanum_fraction": 0.6252302026}
//针对导航的，没有侧边栏的内容展示

const c_mainContainer = require('card/common/main_container');
const c_footer = require('card/common/footer');
const m_config = require('model/config');
const m_article = require('model/article');
const m_initOption = require('helper/init_option');



module.exports = function(page) {
  let viewBody = $('<div class="container" style="min-height:'+((window.innerHeight||640) -200)+'px"/>').setView({
   name: 'blog/blog',
   delay: true,
   template: '<div data-on="?m=mkview"></div>'
 });

  let viewFoot = c_footer();
  page.setView({
    start: function(hasRender){
      if(hasRender && BCD.history.getCode()==-1){
        return m_initOption.notRender(hasRender);
      }
      let key = location.hash.replace('#!/', '');
      if(m_article.hasArticle(key)){
        m_article.getArticleContent(key).then((data)=>{
          page.setView({title: data.title});
          document.title = data.title;
          viewBody.reset(data);
        });
      }else{
        BCD.replaceHash(m_config.getIndex());
      }
    },
    viewList: [viewBody, viewFoot]
  })
};
