2017 © Pedro Peláez
 

library texy-fshl

Nette texy! fshl extension

image

trejjam/texy-fshl

Nette texy! fshl extension

  • Monday, August 24, 2015
  • by trejjam
  • Repository
  • 2 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Texy

Library for integration FSHL into Texy! in Nette, (*1)

Based on: - http://www.zeminem.cz/pouziti-texy-s-fshl - https://filip-prochazka.com/blog/hratky-s-texy-na-blog, (*2)

Require - https://github.com/lookyman/nette-texy, (*3)

Installation

The best way to install Trejjam/Texy-fshl is using Composer:, (*4)

$ composer require trejjam/texy-fshl:0.5

Configuration

.neon, (*5)

extensions:
    texyFshl: Trejjam\TexyFshl\DI\TexyFshlExtension

texyFshl:

Usage

Presenter:, (*6)

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:, (*7)

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

LESS:, (*8)

.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";
}

The Versions

24/08 2015

dev-master

9999999-dev

Nette texy! fshl extension

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jan Trejbal

nette texy fshl

24/08 2015

v0.5

0.5.0.0

Nette texy! fshl extension

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jan Trejbal

nette texy fshl