codelego / phpfox-html

phpfox 框架的资产管理库(javascript、样式表、元数据等)

dev-master 2016-11-29 10:43 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:09:12 UTC


README

HTML 结构

{html}
    {directive}
    {header}
        {title}
        {keyword}
        {description}
        {meta}
        {link}
        {open_graph}
        {style}
        {inline_style}
        {script}
        {inline_script}
        {static_html}
    {body}
    {search_main}
    {search_nav}
    {search_form}
    {breadcrumb}
    {mainMenu}
    {subMenu}
    {category}
        Your Html Content Here  
    {footer
        {script}
        {inline_scripts}
        {static_html}
        
        

最佳实践

为了优化前端,请自行控制javascript/stylesheet。

  1. 将样式表资源放在 HEAD 标签中
  2. 将javascript资源放在BODY标签的末尾
  3. 减少请求数量
  4. 通过 requirejs 控制 javascript 的使用
  5. 通过 requirecss 控制 stylesheet 的使用