koka/phpixie-bootstrap3-bundle

PHPixie的bootstrap3组件包

dev-master 2015-10-21 12:08 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:21:20 UTC


README

phpixie3的bootstrap3组件包

  1. Bootstrap v3.3.5
  2. jQuery v2.1.4
  3. bootswatch的16个主题

安装

  1. 在项目中连接组件包
composer require koka/phpixie-bootstrap3-bundle:dev-master
  1. 为组件包的web目录创建链接
cd web/bundles
ln -s ../../vendor/koka/phpixie-bootstrap3-bundle/web bootstrap3Bundle
  1. 在项目中连接组件包
// src/Project/Framework/Bundles.php
    protected function buildBundles()
    {
        return array(
            new \Project\App($this->builder),
            new \Koka\Bootstrap3Bundle\App($this->builder)
        );
    }

使用方法

在我们的模板中连接需要的主题,要连接原始的bootstrap3,请使用default

<?php  include $this->resolve('bootstrap3Bundle:default');?>

并在需要的位置输出bootstrap-css和bootstrap-js以及jquery-js。以下是一个标准模板的示例。

<?php  include $this->resolve('bootstrap3Bundle:default');?>
<!DOCTYPE html>
<html>
	<head>
		<title>PHPixie 3.0</title>
		<?php $this->block('bootstrap-css');?>
		<?php $this->block('jquery-js');?>
	</head>
	<body>
        <h1>PHPixie 3.0</h1>
		<?php $this->childContent();?>
		<?php $this->block('bootstrap-js');?>
	</body>
</html>