2017 © Pedro Peláez
 

library themes

多主题管理

image

trendsoft/themes

多主题管理

  • Tuesday, December 26, 2017
  • by hu19891110
  • Repository
  • 2 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Themes

主题管理,读取指定目录下的主题目录,并通过简单的方式获取对应主题的资源文件., (*1)

Build Status Latest Stable Version Latest Unstable Version StyleCI Scrutinizer Code Quality Code Coverage Build Status License Total Downloads Monthly Downloads Daily Downloads, (*2)

要求

  • PHP >= 7.0
  • Composer

安装

$ composer require "trendsoft/themes" -vvv

使用示例

$theme = new Theme($config);
$theme->asset('app.js'); //获取资源
$theme->all(); //获取所有主题列表
$theme->path('assets/app.css'); //获取主题目录assets目录下的app.css文件

配置文件

return array('active' => 'default', 'paths'  => [ 'absolute' => $this->getAbsolute(), 'base' => 'themes', 'assets' => 'assets' ]);
  • active:默认使用的主题slug
  • paths:
    • absolute:绝对路径
    • base:主题目录uri相对路径
    • assets:资源目录

创建主题

在absolute对应的目录中创建一个以主题slug命名的目录,并在此目录中创建theme.json文件,theme.json文件格式如下:, (*3)

{
  "slug": "bootstrap",
  "name": "Bootstrap",
  "author": "Jabber",
  "description": "is a bootstrap theme",
  "version": "0.1.0"
}

主题列表

$theme->all();

应用主题

$theme->active('vue'); //or $theme->setCurrent('vue');

Contribution

Contribution Guide, (*4)

License

MIT, (*5)

The Versions

26/12 2017

dev-master

9999999-dev http://www.trendsoft.org

多主题管理

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

php theme

26/12 2017

dev-develop

dev-develop http://www.trendsoft.org

多主题管理

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

php theme

26/12 2017

0.1.0

0.1.0.0 http://www.trendsoft.org

多主题管理

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

php theme