定制 trejjam/texy-fshl 二次开发

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

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

trejjam/texy-fshl

最新稳定版本:v0.5

Composer 安装命令:

composer require trejjam/texy-fshl

包简介

Nette texy! fshl extension

README 文档

README

Library for integration FSHL into Texy! in Nette

Based on:

Require

Installation

The best way to install Trejjam/Texy-fshl is using Composer:

$ composer require trejjam/texy-fshl:0.5

Configuration

.neon

extensions:
	texyFshl: Trejjam\TexyFshl\DI\TexyFshlExtension

texyFshl:

Usage

Presenter:

function renderDefault() {
	$template = $this->template;
	$template->texy = '';
	
	$template->texy .= 'Colored block of code';
	//all possible blocks: code, cpp, python, php, neon, config, sh, texy, java, javascript, js, css, sql, html, htmlcb
	$template->texy .= '/--php';
    $template->texy .= 'function foo() {';
    $template->texy .= '	$hello=\'\';';
    $template->texy .= '	echo $helo;';
    $template->texy .= '}';
    $template->texy .= '\--';
    
    $template->texy .= 'Base block of code';
    $template->texy .= '/--code';
    $template->texy .= 'function foo() {';
    $template->texy .= '	$hello=\'\';';
    $template->texy .= '	echo $helo;';
    $template->texy .= '}';
    $template->texy .= '\--';
}

default.latte:

    <div class="texy">
	    {$texy|texy}
	</div>

LESS:

.texy {
    @import "bootstrap/reset.less";
    @import "bootstrap/code.less";

    .prettyprint {
        padding: 8px;
        background-color: #f7f7f9;
        border: 1px solid #e1e1e8;
        //line-height: 0 !important;
    }
    .prettyprint.linenums {
        -webkit-box-shadow: inset 45px 0 0 #fbfbfc, inset 46px 0 0 #ececf0;
        -moz-box-shadow: inset 45px 0 0 #fbfbfc, inset 46px 0 0 #ececf0;
        box-shadow: inset 45px 0 0 #fbfbfc, inset 46px 0 0 #ececf0;
    }
    ol.linenums {
        margin: 0 0 0 43px; /* IE indents via margin-left */
        padding-left: 0px;
    }
    ol.linenums li {
        padding-left: 6px;
        color: #bebec5;
        line-height: 20px;
        text-shadow: 0 1px 0 #fff;
    }
    ol.linenums li > span {
        color: black;
    }

    a {
        .font(Arial, 16px, @base);

        &:hover {
            text-decoration: underline;
        }
    }
    p {
        .font(Arial, 16px, #000);
    }
    li {
        .font(Arial, 16px, #000);
    }

    @import (less) "/vendor/kukulich/fshl/style.css";
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-26