Besking主题支持代码高亮显示

原创
admin

Besking主题完美支持代码高亮显示

CSS代码

        
    
    pre[class="language-"]::-moz-selection, pre[class="language-"] ::-moz-selection,
        code[class="language-"]::-moz-selection, code[class="language-"] ::-moz-selection {
            text-shadow: none;
            background: #b3d4fc;
        }
    

HTML代码

    
       <!DOCTYPE html>
        <html>
        <head>
            <title>这是HTMl代码</title>
        </head>
        <body>
        这是内容
        </body>
        </html> 
    

JavaScript代码

    
       layui.use(['jquery', 'util'], function () {
    var $ = layui.jquery,
        util = layui.util;
    $(window).load(function () {
        $("#loading").fadeOut(500);
        new WOW().init();
    })
    util.fixbar();;
    $('.next').click(function () {
        $('html,body').animate({
            scrollTop: $('#section1').outerHeight() + 1
        }, 600);
    });
    $('#menu').on('click', function () {
        var mark = $(this).attr('data-mark');
        if (mark === 'false') {
            $(this).removeClass('menu_open').addClass('menu_close');
            //open
            $('#navgation').removeClass('navgation_close').addClass('navgation_open');
            $(this).attr({ 'data-mark': "true" });
        } else {
            $(this).removeClass('menu_close').addClass('menu_open');
            //close
            $('#navgation').removeClass('navgation_open').addClass('navgation_close');
            $(this).attr({ 'data-mark': "false" });
        }
        });
       });
    

PHP代码

    
    <?php 
    if (!defined('__TYPECHO_ROOT_DIR__')) exit;

    //后台设置
    function themeConfig($form) {

        $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', 
        array('ShowRecentPosts' => _t('显示最新文章'),
        'ShowRecentComments' => _t('显示最近回复'),
        'ShowArchive' => _t('显示归档'),
        'ShowTag' => _t('显示标签')),
        array('ShowRecentPosts', 'ShowRecentComments', 'ShowArchive', 'ShowTag'), _t('侧边栏显示'));

        $form->addInput($sidebarBlock->multiMode());

        $GoogleAnalytics = new Typecho_Widget_Helper_Form_Element_Textarea('GoogleAnalytics', NULL, NULL, _t('统计代码'), _t('填写你的各种跟踪统计代码,相当于页尾代码'));
        $form->addInput($GoogleAnalytics);
    }
    

版权协议须知!

本篇文章来源于 网络转载 ,如本文章侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意

none

1268 1 2020-05-28


分享:
icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif

1条评论

    ann Chrome Windows 10

    访客 二级 2020-09-09 10:15 回复

  • 默认
  • 护眼
  • 夜晚
  • 壁纸
  • 默认