wai-blue/adios-wireframe
Composer 安装命令:
composer require wai-blue/adios-wireframe
包简介
TWIG-based wireframing package for ADIOS applications
README 文档
README
Create an empty folder
Create an empty folder, e.g. my-adios-app-wireframe.
Composer
- Create
composer.jsonfile, see below - Run
composer installin that folder. - Create
config.phpfile, see below. - Create
index.phpfile, see below. - Copy a
logo.pngfile containing logo of your project. - For Apache web brower, create
.htaccessfile, see below. - Open the
index.phpin your browser. - Create
wireframesfolder and add your wireframes TWIG files. Start withindex.twig, see example below.
composer.json
{
"require": {
"wai-blue/adios-wireframe": "dev-main"
}
}
config.php
$config = []; $config['skin'] = 'wireframe'; // Optional. If empty, default skin will be used. Options: blue, cyan, green, wireframe $config['projectName'] = 'My ADIOS app'; $config['rewriteBase'] = '/my-adios-app-wireframe'; $config['sidebarItems'] = [ '' => ['text' => 'Home', 'icon' => 'fas fa-home'], 'contacts' => ['text' => 'Contacts', 'icon' => 'fas fa-user'], 'calendar' => ['text' => 'Calendar', 'icon' => 'fas fa-calendar'], ];
index.php
require('vendor/autoload.php'); require('config.php'); $wireframe = $_REQUEST['wireframe'] ?? 'index'; $options = [ 'wireframesDir' => __DIR__ . '/wireframes', 'isWindow' => (bool) ($_REQUEST['__IS_WINDOW__'] ?? false), ]; $loader = new \AdiosWireframe\Loader($options, $config); echo $loader->render($wireframe);
wireframes/index.twig
<div class="row"> <div class="col-6"> <div class="row"> {{ include('components/card.twig', { 'title': 'Most active contacts', 'content': include('components/table.twig', { 'columns': [ 'Given Name', 'Last Name', 'Age' ] }) }) }} </div> </div> <div class="col-6"> </div> </div>
.htaccess
RewriteEngine On
RewriteRule ^assets/(.*)$ vendor/wai-blue/adios-wireframe/src/assets/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?wireframe=$1&%{QUERY_STRING}
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-09