Example #1
0
<?php

use blog\components\StaticService;
use blog\components\UrlService;
use common\service\GlobalUrlService;
//https://github.com/yesmeck/jquery-jsonview
StaticService::includeStaticCss("/jquery/json_viewer/jquery.jsonview.min.css", \blog\assets\GameAsset::className());
StaticService::includeStaticJs("/jquery/json_viewer/jquery.jsonview.min.js", \blog\assets\GameAsset::className());
StaticService::includeAppJsStatic("/js/game/tools/index.js", \blog\assets\GameAsset::className());
echo Yii::$app->controller->renderPartial("/tools/tab.php", ['current' => 'json_format']);
?>
<style type="text/css">
    .jsonview .null {
        color: red;
    }

    .jsonview .bool {
        color: #fde3a7;
    }

    .jsonview .num {
        color: #bf55ec;
    }

    .jsonview .string {
        color: #00b16a;
        white-space: pre-wrap;
    }

    textarea[name=content]{
        height:450px;
Example #2
0
File: run.php Project: apanly/dream
<?php

use blog\components\StaticService;
use common\service\GlobalUrlService;
StaticService::includeStaticCss("/codemirror/lib/codemirror.css", \blog\assets\CodeMirrorAsset::className());
StaticService::includeStaticCss("/codemirror/theme/material.css", \blog\assets\CodeMirrorAsset::className());
StaticService::includeStaticJs("/codemirror/lib/codemirror.js", \blog\assets\CodeMirrorAsset::className());
StaticService::includeStaticJs("/codemirror/mode/xml/xml.js", \blog\assets\CodeMirrorAsset::className());
StaticService::includeStaticJs("/codemirror/mode/javascript/javascript.js", \blog\assets\CodeMirrorAsset::className());
StaticService::includeStaticJs("/codemirror/mode/css/css.js", \blog\assets\CodeMirrorAsset::className());
StaticService::includeStaticJs("/codemirror/mode/htmlmixed/htmlmixed.js", \blog\assets\CodeMirrorAsset::className());
StaticService::includeAppCssStatic("/css/web/code/run.css", \blog\assets\CodeMirrorAsset::className());
StaticService::includeAppJsStatic("/js/web/code/run.js", \blog\assets\CodeMirrorAsset::className());
?>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
    <div class="row" id="code-box">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <textarea id="code_html">
                <!doctype html>
                <html>
                <head>
                    <meta charset=utf-8>
                    <title>HTML5 canvas demo</title>
                    <style>p {font-family: monospace;}</style>
                </head>
                <body>
                <p>Canvas pane goes here:</p>
                <canvas id=pane width=300 height=200></canvas>
                <script>
                    var canvas = document.getElementById('pane');
                    var context = canvas.getContext('2d');
Example #3
0
<?php

use common\components\DataHelper;
use blog\components\StaticService;
use yii\helpers\Url;
use blog\components\UrlService;
use common\service\GlobalUrlService;
/*lightbox*/
//StaticService::includeStaticCss("/jquery/lightbox2/css/lightbox.css",\blog\assets\AppAsset::className());
//StaticService::includeStaticJs("/jquery/lightbox2/js/lightbox.min.js",\blog\assets\AppAsset::className());
/*fancy*/
StaticService::includeStaticCss("/jquery/fancy/jquery.fancybox.css", \blog\assets\AppAsset::className());
StaticService::includeStaticJs("/jquery/fancy/jquery.fancybox.pack.js", \blog\assets\AppAsset::className());
/*prettify*/
StaticService::includeStaticCss("/prettify/prettify.sons.css", \blog\assets\AppAsset::className());
StaticService::includeStaticJs("/prettify/prettify.js", \blog\assets\AppAsset::className());
StaticService::includeAppCssStatic("/css/web/default/info.css", \blog\assets\AppAsset::className());
StaticService::includeAppJsStatic("/js/web/default/info.js", \blog\assets\AppAsset::className());
StaticService::includeAppJsStatic("/js/duoshuo.js", \blog\assets\AppAsset::className());
StaticService::includeAppJsStatic("http://v3.jiathis.com/code/jia.js?uid=900964", \blog\assets\AppAsset::className());
?>
<main class="col-md-8 main-content">
    <article class="post tag-zhuti tag-static-page tag-customize-page">
        <header class="post-head">
            <h1 class="post-title"><?php 
echo $info['title'];
?>
</h1>
            <section class="post-meta">
                <span class="author">作者:<a
                        href="<?php