定制 erykai/template 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

erykai/template

最新稳定版本:v1.1.5

Composer 安装命令:

composer require erykai/template

包简介

Populate template

README 文档

README

Populate template

Maintainer Source Code PHP from Packagist Latest Version Software License Quality Score Total Downloads

create config.php

$path =  __DIR__ . '/public/theme';
define('TEMPLATE_PATH', $path);
const TEMPLATE_URL = 'https://lvh.me';
const TEMPLATE_CLIENT = 'client';
const TEMPLATE_DEFAULT = 'default';
const TEMPLATE_DASHBOARD = 'admin';
const TEMPLATE_REGEX_GLOBAL = '/{{([A-Z_]+)}}/';
const TEMPLATE_REGEX_TEXT = '/{{([a-zA-Zà-úÀ-Ú0-9|-|_|?!.,\' ]+)}}/';
const TEMPLATE_REGEX_ROUTE = '/{{#(\/[a-z-]+[\/|[a-z])+#}}/';

create translate.php

const TRANSLATE_PATH = 'translate';
const TRANSLATE_API_KEY = null;
const TRANSLATE_API_URL = 'https://translate.erykia.com/api/v1';
const TRANSLATE_DEFAULT = 'pt-BR';

example create path "public/theme/admin/index.html" insert in index.html

<html lang="{{LANG}}">
<link rel="stylesheet" href="{{TEMPLATE_URL}}/public/theme/{{TEMPLATE_DASHBOARD}}/assets/css/style.css">
<script src="{{TEMPLATE_URL}}/public/theme/{{TEMPLATE_DASHBOARD}}/assets/script.js"></script>
<h1>{{Hello World}}</h1>
<a href="{{TEMPLATE_URL}}{{#/about#}}">{{About}}</a>
<a href="{{TEMPLATE_URL}}{{#/client/login#}}">{{Login}}</a>\

and "public/theme/admin/pages/home.html" insert in home.html

<h2>{{Home}}</h2>
<a href="{{TEMPLATE_URL}}{{#/contact#}}">{{Contact}}</a>
require "config.php";
require "translate.php";
require "vendor/autoload.php";
use Erykai\Template\Template;
$T = new Template(TEMPLATE_DASHBOARD);

$T->nav("index","pages/home");
echo $T->getIndex();

Contribution

All contributions will be analyzed, if you make more than one change, make the commit one by one.

Support

If you find defaults send an email reporting to webav.com.br@gmail.com.

Credits

License

The MIT License (MIT). Please see License for more information.

统计信息

  • 总下载量: 51
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固