├── inc ├── .DS_Store ├── images │ └── ico-delete.png ├── js │ ├── options-custom.js │ └── media-uploader.js ├── options-framework.php └── includes │ ├── class-options-framework.php │ ├── class-options-media-uploader.php │ ├── class-options-framework-admin.php │ ├── class-options-sanitization.php │ └── class-options-interface.php ├── screenshot.png ├── .gitattributes ├── static ├── images │ ├── demo1.jpg │ ├── demo2.jpg │ ├── demo3.jpg │ ├── demo4.jpg │ ├── demo5.jpg │ ├── demo6.jpg │ ├── favicon.ico │ └── blog-cover.jpg ├── picture │ ├── favicon.png │ └── ghost-transparent-for-dark-bg.png ├── iconfont │ ├── iconfont.eot │ ├── iconfont.ttf │ ├── iconfont.woff │ └── iconfont.svg ├── css │ ├── default.css │ ├── iconfont.css │ └── jquery.fancybox.min.css └── js │ ├── jquery.fitvids.js │ ├── input.min.js │ └── main.js ├── ajax-comment ├── ajax-comment.css └── do.php ├── page.php ├── page-about.php ├── README.md ├── footer.php ├── archive.php ├── index.php ├── comments.php ├── options.php ├── xzh.func.php ├── header.php ├── single.php └── style.css /inc/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/inc/.DS_Store -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/screenshot.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /inc/images/ico-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/inc/images/ico-delete.png -------------------------------------------------------------------------------- /static/images/demo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/demo1.jpg -------------------------------------------------------------------------------- /static/images/demo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/demo2.jpg -------------------------------------------------------------------------------- /static/images/demo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/demo3.jpg -------------------------------------------------------------------------------- /static/images/demo4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/demo4.jpg -------------------------------------------------------------------------------- /static/images/demo5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/demo5.jpg -------------------------------------------------------------------------------- /static/images/demo6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/demo6.jpg -------------------------------------------------------------------------------- /static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/favicon.ico -------------------------------------------------------------------------------- /static/picture/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/picture/favicon.png -------------------------------------------------------------------------------- /static/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/iconfont/iconfont.eot -------------------------------------------------------------------------------- /static/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /static/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/iconfont/iconfont.woff -------------------------------------------------------------------------------- /static/images/blog-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/images/blog-cover.jpg -------------------------------------------------------------------------------- /static/picture/ghost-transparent-for-dark-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ysnv1997/GitGhost/HEAD/static/picture/ghost-transparent-for-dark-bg.png -------------------------------------------------------------------------------- /ajax-comment/ajax-comment.css: -------------------------------------------------------------------------------- 1 | .hide{ 2 | display: none 3 | } 4 | #comment_message{ 5 | font-size:12px; 6 | background-color: #eee; 7 | padding: 5px; 8 | margin:10px 0; 9 | } 10 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 7 |
8 |
9 | 10 |
11 | 12 |
13 |

14 |
15 |
16 |
17 | 18 |
19 |
20 | 23 |
24 | 25 |
26 |
27 | 35 | -------------------------------------------------------------------------------- /page-about.php: -------------------------------------------------------------------------------- 1 | 7 |
8 |
9 | 10 |
11 | 12 |
13 |

14 |
15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 | 26 |
27 | 28 |
29 |
30 | 38 | 39 | -------------------------------------------------------------------------------- /static/css/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original highlight.js style (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #F0F0F0; 12 | } 13 | 14 | 15 | /* Base color: saturation 0; */ 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: #444; 20 | } 21 | 22 | .hljs-comment { 23 | color: #888888; 24 | } 25 | 26 | .hljs-keyword, 27 | .hljs-attribute, 28 | .hljs-selector-tag, 29 | .hljs-meta-keyword, 30 | .hljs-doctag, 31 | .hljs-name { 32 | font-weight: bold; 33 | } 34 | 35 | 36 | /* User color: hue: 0 */ 37 | 38 | .hljs-type, 39 | .hljs-string, 40 | .hljs-number, 41 | .hljs-selector-id, 42 | .hljs-selector-class, 43 | .hljs-quote, 44 | .hljs-template-tag, 45 | .hljs-deletion { 46 | color: #880000; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-section { 51 | color: #880000; 52 | font-weight: bold; 53 | } 54 | 55 | .hljs-regexp, 56 | .hljs-symbol, 57 | .hljs-variable, 58 | .hljs-template-variable, 59 | .hljs-link, 60 | .hljs-selector-attr, 61 | .hljs-selector-pseudo { 62 | color: #BC6060; 63 | } 64 | 65 | 66 | /* Language color: hue: 90; */ 67 | 68 | .hljs-literal { 69 | color: #78A960; 70 | } 71 | 72 | .hljs-built_in, 73 | .hljs-bullet, 74 | .hljs-code, 75 | .hljs-addition { 76 | color: #397300; 77 | } 78 | 79 | 80 | /* Meta color: hue: 200 */ 81 | 82 | .hljs-meta { 83 | color: #1f7199; 84 | } 85 | 86 | .hljs-meta-string { 87 | color: #4d99bf; 88 | } 89 | 90 | 91 | /* Misc effects */ 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitGhost 2 | WordPress blog theme GitGhost url www.stayma.cn 3 | 4 | [![](https://www.stayma.cn/wp-content/uploads/2018/11/screenshot.png)](https://www.stayma.cn/wp-content/uploads/2018/11/screenshot.png) 5 | ### 主题简介 6 | 7 | 本主题源于ghost主题、本人无耻的扒皮拆骨给移植到Wordpress了。 8 | 9 | 正如大家所见,本博客目前就在使用这套主题GitGhost。但是这套主题没有什么太多杂七杂八的功能,这是套专业写作的主题,所以功能少,但是它绝对能满足正常使用。如果功能太多,那就失去了博客的本意了。折腾30小时,写作3分钟?用的一手好复制粘贴?那样弄个博客有何意义??装X?没必要,这么弱智的建站技术加下载上传能力,智力正常的人十分钟就能学会,所以,各位,请专注于博客的本质---写作! 10 | 11 | ### 功能介绍 12 | V1.0.1: 13 | 1. 新增全站ajax 14 | 15 | v1.0.0: 16 | 1. HTML5+CSS3响应式自适应 17 | 2. ajax无缝平滑翻页 18 | 3. ajax无刷新评论 19 | 4. 代码高亮 20 | 5. 图片灯箱 21 | 6. 完整的SEO 22 | 7. 自带醒目提示框6个 23 | 8. 按钮两个 24 | 25 | ### 一些建议 26 | 本主题其实很好看,其中在于好看的文章缩略图。建议到[unsplash](https://unsplash.com/ "unsplash")获取美图!免费的哟~ 27 | 28 | ### 界面展示 29 | [![](https://i.loli.net/2018/11/08/5be40e74a96d9.png)](https://i.loli.net/2018/11/08/5be40e74a96d9.png) 30 | 31 | ### 关于主题更新 32 | 本主题是一款开源主题,所以不提供wordpress后台主题更新。本主题更新时间不固定,除非有大型bug或者多人要求才会更新,还有就是...本人心情好就会更新。 33 | 34 | 所以、获取主题最新版本请关注本页面,或者加QQ群获取动态。至于QQ群,还没建好。 35 | 36 | ### 主题使用说明 37 | 本主题采用了全站ajax,使网站跳转间更丝滑。由于ajax异步加载技术会导致一些第三方wordpress插件失效。如果你使用大量的第三方插件请勿使用本主题,或者你有良好的JavaScript基础,本主题留了一个钩子 38 | 请打开main.js ----> `ajaxreload_code()` 本函数会在每次执行ajax之前调用,你可以在这里来二次初始化第三方插件。 39 | 40 | 由于本主题在全站跳转之间都是无刷新的,所以可以很完美的开启全站播放的音乐插件。需要使用背景音乐的请在footer.php -----> `` 上一行添加 41 | ![blob.jpg](https://i.loli.net/2018/11/10/5be646d70d255.jpg) 42 | 也就是红框内,请勿修改上面的两个div。否则出错。 43 | ### 主题反馈 44 | 有问题请在[发布页面](https://www.stayma.cn/get-ghost-theme.html "发布页面") 下面评论 45 | 46 | 有BUG请在[发布页面](https://www.stayma.cn/get-ghost-theme.html "发布页面") 下面评论 47 | 48 | 有建议请在[发布页面](https://www.stayma.cn/get-ghost-theme.html "发布页面") 下面评论 -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 |
25 | 26 | 0% 27 |
28 |
29 | 30 | 42 |
43 |
44 | 45 | 46 | 47 | 48 | 49 |
50 |
51 | 52 |
53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /inc/js/options-custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | * Custom scripts needed for the colorpicker, image button selectors, 4 | 5 | * and navigation tabs. 6 | 7 | */ 8 | 9 | 10 | 11 | jQuery(document).ready(function($) { 12 | 13 | 14 | 15 | // Loads the color pickers 16 | 17 | $('.of-color').wpColorPicker(); 18 | 19 | 20 | 21 | // Image Options 22 | 23 | $('.of-radio-img-img').click(function(){ 24 | 25 | $(this).parent().parent().find('.of-radio-img-img').removeClass('of-radio-img-selected'); 26 | 27 | $(this).addClass('of-radio-img-selected'); 28 | 29 | }); 30 | 31 | 32 | 33 | $('.of-radio-img-label').hide(); 34 | 35 | $('.of-radio-img-img').show(); 36 | 37 | $('.of-radio-img-radio').hide(); 38 | 39 | 40 | 41 | // Loads tabbed sections if they exist 42 | 43 | if ( $('.nav-tab-wrapper').length > 0 ) { 44 | 45 | options_framework_tabs(); 46 | 47 | } 48 | 49 | 50 | 51 | function options_framework_tabs() { 52 | 53 | 54 | 55 | var $group = $('.group'), 56 | 57 | $navtabs = $('.nav-tab-wrapper a'), 58 | 59 | active_tab = ''; 60 | 61 | 62 | 63 | // Hides all the .group sections to start 64 | 65 | $group.hide(); 66 | 67 | 68 | 69 | // Find if a selected tab is saved in localStorage 70 | 71 | if ( typeof(localStorage) != 'undefined' ) { 72 | 73 | active_tab = localStorage.getItem('active_tab'); 74 | 75 | } 76 | 77 | 78 | 79 | // If active tab is saved and exists, load it's .group 80 | 81 | if ( active_tab != '' && $(active_tab).length ) { 82 | 83 | $(active_tab).fadeIn(); 84 | 85 | $(active_tab + '-tab').addClass('nav-tab-active'); 86 | 87 | } else { 88 | 89 | $('.group:first').fadeIn(); 90 | 91 | $('.nav-tab-wrapper a:first').addClass('nav-tab-active'); 92 | 93 | } 94 | 95 | 96 | 97 | // Bind tabs clicks 98 | 99 | $navtabs.click(function(e) { 100 | 101 | 102 | 103 | e.preventDefault(); 104 | 105 | 106 | 107 | // Remove active class from all tabs 108 | 109 | $navtabs.removeClass('nav-tab-active'); 110 | 111 | 112 | 113 | $(this).addClass('nav-tab-active').blur(); 114 | 115 | 116 | 117 | if (typeof(localStorage) != 'undefined' ) { 118 | 119 | localStorage.setItem('active_tab', $(this).attr('href') ); 120 | 121 | } 122 | 123 | 124 | 125 | var selected = $(this).attr('href'); 126 | 127 | 128 | 129 | $group.hide(); 130 | 131 | $(selected).fadeIn(); 132 | 133 | 134 | 135 | }); 136 | 137 | } 138 | 139 | // Image Options 140 | $('.optionsframework-radio-img-img').click(function(){ 141 | $(this).parent().parent().find('.optionsframework-radio-img-img').removeClass('optionsframework-radio-img-selected'); 142 | $(this).addClass('optionsframework-radio-img-selected'); 143 | }); 144 | 145 | $('.optionsframework-radio-img-label').hide(); 146 | $('.optionsframework-radio-img-img').show(); 147 | $('.optionsframework-radio-img-radio').hide(); 148 | 149 | }); -------------------------------------------------------------------------------- /inc/options-framework.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | * @license GPL-2.0+ 14 | 15 | * @link http://wptheming.com 16 | 17 | * @copyright 2010-2014 WP Theming 18 | 19 | * 20 | 21 | * @wordpress-plugin 22 | 23 | * Plugin Name: Options Framework 24 | 25 | * Plugin URI: http://wptheming.com 26 | 27 | * Description: A framework for building theme options. 28 | 29 | * Version: 1.8.0 30 | 31 | * Author: Devin Price 32 | 33 | * Author URI: http://wptheming.com 34 | 35 | * License: GPL-2.0+ 36 | 37 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 38 | 39 | * Text Domain: optionsframework 40 | 41 | * Domain Path: /languages 42 | 43 | */ 44 | 45 | // If this file is called directly, abort. 46 | 47 | if (!defined('WPINC')) { 48 | 49 | die; 50 | 51 | } 52 | 53 | // Don't load if optionsframework_init is already defined 54 | 55 | if (is_admin() && !function_exists('optionsframework_init')): 56 | 57 | function optionsframework_init() { 58 | 59 | // If user can't edit theme options, exit 60 | 61 | if (!current_user_can('edit_theme_options')) { 62 | return; 63 | } 64 | 65 | // Loads the required Options Framework classes. 66 | 67 | require plugin_dir_path(__FILE__) . 'includes/class-options-framework.php'; 68 | 69 | require plugin_dir_path(__FILE__) . 'includes/class-options-framework-admin.php'; 70 | 71 | require plugin_dir_path(__FILE__) . 'includes/class-options-interface.php'; 72 | 73 | require plugin_dir_path(__FILE__) . 'includes/class-options-media-uploader.php'; 74 | 75 | require plugin_dir_path(__FILE__) . 'includes/class-options-sanitization.php'; 76 | 77 | // Instantiate the main plugin class. 78 | 79 | $options_framework = new Options_Framework; 80 | 81 | $options_framework->init(); 82 | 83 | // Instantiate the options page. 84 | 85 | $options_framework_admin = new Options_Framework_Admin; 86 | 87 | $options_framework_admin->init(); 88 | 89 | // Instantiate the media uploader class 90 | 91 | $options_framework_media_uploader = new Options_Framework_Media_Uploader; 92 | 93 | $options_framework_media_uploader->init(); 94 | 95 | } 96 | 97 | add_action('init', 'optionsframework_init', 20); 98 | 99 | endif; 100 | 101 | /** 102 | 103 | * Helper function to return the theme option value. 104 | 105 | * If no value has been saved, it returns $default. 106 | 107 | * Needed because options are saved as serialized strings. 108 | 109 | * 110 | 111 | * Not in a class to support backwards compatibility in themes. 112 | 113 | */ 114 | 115 | if (!function_exists('stayma')): 116 | 117 | function stayma($name, $default = false) { 118 | 119 | $config = get_option('optionsframework'); 120 | 121 | if (!isset($config['id'])) { 122 | 123 | return $default; 124 | 125 | } 126 | 127 | $options = get_option($config['id']); 128 | 129 | if (isset($options[$name])) { 130 | 131 | return $options[$name]; 132 | 133 | } 134 | 135 | return $default; 136 | 137 | } 138 | 139 | endif; -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 | 7 |
8 | 9 | 10 | 11 | 12 | 51 | 52 | 53 |

暂无内容,请阅读其他版块

54 | 55 | 56 |
57 |
58 |
')) ?> 59 |
60 | 61 |
62 | 71 | -------------------------------------------------------------------------------- /inc/js/media-uploader.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | 3 | var optionsframework_upload; 4 | var optionsframework_selector; 5 | 6 | function optionsframework_add_file(event, selector) { 7 | 8 | var upload = $(".uploaded-file"), frame; 9 | var $el = $(this); 10 | optionsframework_selector = selector; 11 | 12 | event.preventDefault(); 13 | 14 | // If the media frame already exists, reopen it. 15 | if ( optionsframework_upload ) { 16 | optionsframework_upload.open(); 17 | } else { 18 | // Create the media frame. 19 | optionsframework_upload = wp.media.frames.optionsframework_upload = wp.media({ 20 | // Set the title of the modal. 21 | title: $el.data('choose'), 22 | 23 | // Customize the submit button. 24 | button: { 25 | // Set the text of the button. 26 | text: $el.data('update'), 27 | // Tell the button not to close the modal, since we're 28 | // going to refresh the page when the image is selected. 29 | close: false 30 | } 31 | }); 32 | 33 | // When an image is selected, run a callback. 34 | optionsframework_upload.on( 'select', function() { 35 | // Grab the selected attachment. 36 | var attachment = optionsframework_upload.state().get('selection').first(); 37 | optionsframework_upload.close(); 38 | optionsframework_selector.find('.upload').val(attachment.attributes.url); 39 | if ( attachment.attributes.type == 'image' ) { 40 | optionsframework_selector.find('.screenshot').empty().hide().append('Remove').slideDown('fast'); 41 | } 42 | optionsframework_selector.find('.upload-button').unbind().addClass('remove-file').removeClass('upload-button').val(optionsframework_l10n.remove); 43 | optionsframework_selector.find('.of-background-properties').slideDown(); 44 | optionsframework_selector.find('.remove-image, .remove-file').on('click', function() { 45 | optionsframework_remove_file( $(this).parents('.section') ); 46 | }); 47 | }); 48 | 49 | } 50 | 51 | // Finally, open the modal. 52 | optionsframework_upload.open(); 53 | } 54 | 55 | function optionsframework_remove_file(selector) { 56 | selector.find('.remove-image').hide(); 57 | selector.find('.upload').val(''); 58 | selector.find('.of-background-properties').hide(); 59 | selector.find('.screenshot').slideUp(); 60 | selector.find('.remove-file').unbind().addClass('upload-button').removeClass('remove-file').val(optionsframework_l10n.upload); 61 | // We don't display the upload button if .upload-notice is present 62 | // This means the user doesn't have the WordPress 3.5 Media Library Support 63 | if ( $('.section-upload .upload-notice').length > 0 ) { 64 | $('.upload-button').remove(); 65 | } 66 | selector.find('.upload-button').on('click', function(event) { 67 | optionsframework_add_file(event, $(this).parents('.section')); 68 | }); 69 | } 70 | 71 | $('.remove-image, .remove-file').on('click', function() { 72 | optionsframework_remove_file( $(this).parents('.section') ); 73 | }); 74 | 75 | $('.upload-button').click( function( event ) { 76 | optionsframework_add_file(event, $(this).parents('.section')); 77 | }); 78 | 79 | }); -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 | 7 |
8 | 9 | 10 | 11 | 12 | 51 | 52 | 53 |

暂无内容,请阅读其他版块

54 | 55 | 56 |
57 |
58 |
59 |
')) ?> 60 |
')) ?> 61 |
62 | 63 | 64 |
65 | -------------------------------------------------------------------------------- /static/js/jquery.fitvids.js: -------------------------------------------------------------------------------- 1 | /*jshint browser:true */ 2 | /*! 3 | * FitVids 1.3 4 | * 5 | * 6 | * Copyright 2017, Chris Coyier + Dave Rupert + Ghost Foundation 7 | * This is an unofficial release, ported by John O'Nolan 8 | * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 9 | * Released under the MIT license 10 | * 11 | */ 12 | 13 | ;(function( $ ){ 14 | 15 | 'use strict'; 16 | 17 | $.fn.fitVids = function( options ) { 18 | var settings = { 19 | customSelector: null, 20 | ignore: null 21 | }; 22 | 23 | if(!document.getElementById('fit-vids-style')) { 24 | // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 25 | var head = document.head || document.getElementsByTagName('head')[0]; 26 | var css = '.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; 27 | var div = document.createElement("div"); 28 | div.innerHTML = '

x

'; 29 | head.appendChild(div.childNodes[1]); 30 | } 31 | 32 | if ( options ) { 33 | $.extend( settings, options ); 34 | } 35 | 36 | return this.each(function(){ 37 | var selectors = [ 38 | 'iframe[src*="player.vimeo.com"]', 39 | 'iframe[src*="youtube.com"]', 40 | 'iframe[src*="youtube-nocookie.com"]', 41 | 'iframe[src*="kickstarter.com"][src*="video.html"]', 42 | 'object', 43 | 'embed' 44 | ]; 45 | 46 | if (settings.customSelector) { 47 | selectors.push(settings.customSelector); 48 | } 49 | 50 | var ignoreList = '.fitvidsignore'; 51 | 52 | if(settings.ignore) { 53 | ignoreList = ignoreList + ', ' + settings.ignore; 54 | } 55 | 56 | var $allVideos = $(this).find(selectors.join(',')); 57 | $allVideos = $allVideos.not('object object'); // SwfObj conflict patch 58 | $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. 59 | 60 | $allVideos.each(function(){ 61 | var $this = $(this); 62 | if($this.parents(ignoreList).length > 0) { 63 | return; // Disable FitVids on this video. 64 | } 65 | if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 66 | if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) 67 | { 68 | $this.attr('height', 9); 69 | $this.attr('width', 16); 70 | } 71 | var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 72 | width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 73 | aspectRatio = height / width; 74 | if(!$this.attr('name')){ 75 | var videoName = 'fitvid' + $.fn.fitVids._count; 76 | $this.attr('name', videoName); 77 | $.fn.fitVids._count++; 78 | } 79 | $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); 80 | $this.removeAttr('height').removeAttr('width'); 81 | }); 82 | }); 83 | }; 84 | 85 | // Internal counter for unique video names. 86 | $.fn.fitVids._count = 0; 87 | 88 | // Works with either jQuery or Zepto 89 | })( window.jQuery || window.Zepto ); 90 | -------------------------------------------------------------------------------- /static/js/input.min.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(b,a){if(typeof exports==="object"&&typeof module==="object"){module.exports=a()}else{if(typeof define==="function"&&define.amd){define([],a)}else{if(typeof exports==="object"){exports.POWERMODE=a()}else{b.POWERMODE=a()}}}})(this,function(){return(function(c){var b={};function a(e){if(b[e]){return b[e].exports}var d=b[e]={exports:{},id:e,loaded:false};c[e].call(d.exports,d,d.exports,a);d.loaded=true;return d.exports}a.m=c;a.c=b;a.p="";return a(0)})([function(j,e,a){var b=document.createElement("canvas");b.width=window.innerWidth;b.height=window.innerHeight;b.style.cssText="position:fixed;top:0;left:0;pointer-events:none;z-index:999999";window.addEventListener("resize",function(){b.width=window.innerWidth;b.height=window.innerHeight});document.body.appendChild(b);var c=b.getContext("2d");var l=[];var k=0;m.shake=true;function h(o,n){return Math.random()*(n-o)+o}function g(n){if(m.colorful){var o=h(0,360);return"hsla("+h(o-10,o+10)+", 100%, "+h(50,80)+"%, "+1+")"}else{return window.getComputedStyle(n).color}}function f(){var o=document.activeElement;var n;if(o.tagName==="TEXTAREA"||(o.tagName==="INPUT"&&o.getAttribute("type")==="text")){var p=a(1)(o,o.selectionStart);n=o.getBoundingClientRect();return{x:p.left+n.left,y:p.top+n.top,color:g(o)}}var r=window.getSelection();if(r.rangeCount){var q=r.getRangeAt(0);var s=q.startContainer;if(s.nodeType===document.TEXT_NODE){s=s.parentNode}n=q.getBoundingClientRect();return{x:n.left,y:n.top,color:g(s)}}return{x:0,y:0,color:"transparent"}}function d(o,p,n){return{x:o,y:p,alpha:1,color:n,velocity:{x:-1+Math.random()*2,y:-3.5+Math.random()*2}}}function m(){var n=f();var p=5+Math.round(Math.random()*10);while(p--){l[k]=d(n.x,n.y,n.color);k=(k+1)%500}if(m.shake){var o=1+2*Math.random();var q=o*(Math.random()>0.5?-1:1);var r=o*(Math.random()>0.5?-1:1);document.body.style.marginLeft=q+"px";document.body.style.marginTop=r+"px";setTimeout(function(){document.body.style.marginLeft="";document.body.style.marginTop=""},75)}}m.colorful=false;function i(){requestAnimationFrame(i);c.clearRect(0,0,b.width,b.height);for(var n=0;nparseInt(f.height)){o.overflowY="scroll"}}else{o.overflow="hidden"}i.textContent=k.value.substring(0,m);if(k.nodeName==="INPUT"){i.textContent=i.textContent.replace(/\s/g,"\u00a0")}var n=document.createElement("span");n.textContent=k.value.substring(m)||".";i.appendChild(n);var g={top:n.offsetTop+parseInt(f.borderTopWidth),left:n.offsetLeft+parseInt(f.borderLeftWidth)};if(h){n.style.backgroundColor="#aaa"}else{document.body.removeChild(i)}return g}if(typeof b!="undefined"&&typeof b.exports!="undefined"){b.exports=c}else{window.getCaretCoordinates=c}}())}])}); -------------------------------------------------------------------------------- /inc/includes/class-options-framework.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2010-2014 WP Theming 8 | */ 9 | 10 | class Options_Framework { 11 | 12 | /** 13 | * Plugin version, used for cache-busting of style and script file references. 14 | * 15 | * @since 1.7.0 16 | * @type string 17 | */ 18 | const VERSION = '1.8.0'; 19 | 20 | /** 21 | * Initialize the plugin. 22 | * 23 | * @since 1.7.0 24 | */ 25 | public function init() { 26 | 27 | // Needs to run every time in case theme has been changed 28 | add_action( 'admin_init', array( $this, 'set_theme_option' ) ); 29 | 30 | } 31 | 32 | /** 33 | * Sets option defaults 34 | * 35 | * @since 1.7.0 36 | */ 37 | function set_theme_option() { 38 | 39 | // Load settings 40 | $optionsframework_settings = get_option( 'optionsframework' ); 41 | 42 | // Updates the unique option id in the database if it has changed 43 | if ( function_exists( 'optionsframework_option_name' ) ) { 44 | optionsframework_option_name(); 45 | } 46 | elseif ( has_action( 'optionsframework_option_name' ) ) { 47 | do_action( 'optionsframework_option_name' ); 48 | } 49 | // If the developer hasn't explicitly set an option id, we'll use a default 50 | else { 51 | $default_themename = get_option( 'stylesheet' ); 52 | $default_themename = preg_replace( "/\W/", "_", strtolower($default_themename ) ); 53 | $default_themename = 'optionsframework_' . $default_themename; 54 | if ( isset( $optionsframework_settings['id'] ) ) { 55 | if ( $optionsframework_settings['id'] == $default_themename ) { 56 | // All good, using default theme id 57 | } else { 58 | $optionsframework_settings['id'] = $default_themename; 59 | update_option( 'optionsframework', $optionsframework_settings ); 60 | } 61 | } 62 | else { 63 | $optionsframework_settings['id'] = $default_themename; 64 | update_option( 'optionsframework', $optionsframework_settings ); 65 | } 66 | } 67 | 68 | } 69 | 70 | /** 71 | * Wrapper for optionsframework_options() 72 | * 73 | * Allows for manipulating or setting options via 'of_options' filter 74 | * For example: 75 | * 76 | * 77 | * add_filter( 'of_options', function( $options ) { 78 | * $options[] = array( 79 | * 'name' => 'Input Text Mini', 80 | * 'desc' => 'A mini text input field.', 81 | * 'id' => 'example_text_mini', 82 | * 'std' => 'Default', 83 | * 'class' => 'mini', 84 | * 'type' => 'text' 85 | * ); 86 | * 87 | * return $options; 88 | * }); 89 | * 90 | * 91 | * Also allows for setting options via a return statement in the 92 | * options.php file. For example (in options.php): 93 | * 94 | * 95 | * return array(...); 96 | * 97 | * 98 | * @return array (by reference) 99 | */ 100 | static function &_optionsframework_options() { 101 | static $options = null; 102 | 103 | if ( !$options ) { 104 | // Load options from options.php file (if it exists) 105 | $location = apply_filters( 'options_framework_location', array( 'options.php' ) ); 106 | if ( $optionsfile = locate_template( $location ) ) { 107 | $maybe_options = require_once $optionsfile; 108 | if ( is_array( $maybe_options ) ) { 109 | $options = $maybe_options; 110 | } else if ( function_exists( 'optionsframework_options' ) ) { 111 | $options = optionsframework_options(); 112 | } 113 | } 114 | 115 | // Allow setting/manipulating options via filters 116 | $options = apply_filters( 'of_options', $options ); 117 | } 118 | 119 | return $options; 120 | } 121 | 122 | } -------------------------------------------------------------------------------- /inc/includes/class-options-media-uploader.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2010-2014 WP Theming 8 | */ 9 | 10 | class Options_Framework_Media_Uploader { 11 | 12 | /** 13 | * Initialize the media uploader class 14 | * 15 | * @since 1.7.0 16 | */ 17 | public function init() { 18 | add_action( 'admin_enqueue_scripts', array( $this, 'optionsframework_media_scripts' ) ); 19 | } 20 | 21 | /** 22 | * Media Uploader Using the WordPress Media Library. 23 | * 24 | * Parameters: 25 | * 26 | * string $_id - A token to identify this field (the name). 27 | * string $_value - The value of the field, if present. 28 | * string $_desc - An optional description of the field. 29 | * 30 | */ 31 | 32 | static function optionsframework_uploader( $_id, $_value, $_desc = '', $_name = '' ) { 33 | 34 | $optionsframework_settings = get_option( 'optionsframework' ); 35 | 36 | // Gets the unique option id 37 | $option_name = $optionsframework_settings['id']; 38 | 39 | $output = ''; 40 | $id = ''; 41 | $class = ''; 42 | $int = ''; 43 | $value = ''; 44 | $name = ''; 45 | 46 | $id = strip_tags( strtolower( $_id ) ); 47 | 48 | // If a value is passed and we don't have a stored value, use the value that's passed through. 49 | if ( $_value != '' && $value == '' ) { 50 | $value = $_value; 51 | } 52 | 53 | if ($_name != '') { 54 | $name = $_name; 55 | } 56 | else { 57 | $name = $option_name.'['.$id.']'; 58 | } 59 | 60 | if ( $value ) { 61 | $class = ' has-file'; 62 | } 63 | $output .= '' . "\n"; 64 | if ( function_exists( 'wp_enqueue_media' ) ) { 65 | if ( ( $value == '' ) ) { 66 | $output .= '' . "\n"; 67 | } else { 68 | $output .= '' . "\n"; 69 | } 70 | } else { 71 | $output .= '

' . __( 'Upgrade your version of WordPress for full media support.', 'textdomain' ) . '

'; 72 | } 73 | 74 | if ( $_desc != '' ) { 75 | $output .= '' . $_desc . '' . "\n"; 76 | } 77 | 78 | $output .= '
' . "\n"; 79 | 80 | if ( $value != '' ) { 81 | $remove = 'Remove'; 82 | $image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value ); 83 | if ( $image ) { 84 | $output .= '' . $remove; 85 | } else { 86 | $parts = explode( "/", $value ); 87 | for( $i = 0; $i < sizeof( $parts ); ++$i ) { 88 | $title = $parts[$i]; 89 | } 90 | 91 | // No output preview if it's not an image. 92 | $output .= ''; 93 | 94 | // Standard generic output if it's not an image. 95 | $title = __( 'View File', 'textdomain' ); 96 | $output .= ''; 97 | } 98 | } 99 | $output .= '
' . "\n"; 100 | return $output; 101 | } 102 | 103 | /** 104 | * Enqueue scripts for file uploader 105 | */ 106 | function optionsframework_media_scripts( $hook ) { 107 | 108 | $menu = Options_Framework_Admin::menu_settings(); 109 | 110 | if ( substr( $hook, -strlen( $menu['menu_slug'] ) ) !== $menu['menu_slug'] ) 111 | return; 112 | 113 | if ( function_exists( 'wp_enqueue_media' ) ) 114 | wp_enqueue_media(); 115 | 116 | wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ), Options_Framework::VERSION ); 117 | wp_enqueue_script( 'of-media-uploader' ); 118 | wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array( 119 | 'upload' => __( '上传', 'textdomain' ), 120 | 'remove' => __( '删除', 'textdomain' ) 121 | ) ); 122 | } 123 | } -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 22 |
23 | 24 |
25 |

26 |
27 | 28 | 29 | 30 |
31 |

全部评论:

32 |
加载中...
33 |
    34 | 35 |
36 | 1 && get_option( 'page_comments' ) ) : ?> 37 |
38 | &next_text='); ?> 39 |
40 | 41 | 42 |
43 | 44 | 45 |
46 |

发表评论

47 | 48 |

[ 登录 ] 才能发表留言!

49 | 50 |
51 | 52 |
53 |
你好,
54 |
55 | 56 |
57 |
58 | [ 资料修改 ] 59 |
60 |
61 | 62 | 63 | 64 | 65 |
66 |
67 |
68 | 69 | 70 |
71 |
72 | 73 | 74 |
75 |
76 | 77 | 78 |
79 |
80 |
81 | 82 |
83 |
84 |
85 | 86 |
87 |
88 |
89 | 90 | 91 | ID); ?> 92 |
93 | 94 |
95 | 96 |
97 | 98 |
99 | 100 |
-------------------------------------------------------------------------------- /static/css/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('../iconfont/iconfont.eot?t=1541814265044'); /* IE9*/ 4 | src: url('../iconfont/iconfont.eot?t=1541814265044#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAtwAAsAAAAAEVwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY+Nkp/Y21hcAAAAYAAAADGAAACcl6bXx9nbHlmAAACSAAABpoAAAlQHVO6NGhlYWQAAAjkAAAALwAAADYTN/XuaGhlYQAACRQAAAAcAAAAJAfeA5JobXR4AAAJMAAAAA8AAABERAAAAGxvY2EAAAlAAAAAJAAAACQSVhSsbWF4cAAACWQAAAAfAAAAIAEfAF1uYW1lAAAJhAAAAUUAAAJtPlT+fXBvc3QAAArMAAAAoQAAAOrfk/K/eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeH3jRy9zwv4EhhrmBoQEozAiSAwD3mg0zeJztkrsNwkAQROewMX9wAUTEtOF+qMHgkA6IqIQSSIkIdyX+FZi5G4RED+zqWbrRnX3aZwBdABlZkhwIewTE2jENKc8wTHmOFdclm/vtYCc728srb3zbtt/kwqRW8lMhnYw9Zy9S0uGbct6gQA99DPidEcaYYIoZ9yEU+Nc4PY+fVRnnLKIdOwlOEnYWyc5FRKN2FdG03QQnDrsLzh72ELQAewr6gL1E/AO8EnQEr0W8na8FvcE3ggbhjaBL+FagfAM2UlRJAAB4nGVWXWwc1RWec39nZv9/x3bstbO7M2tnd20zuztjJ7bXLqDUNg4kJailSbCaKtoAD3YTlaRVUxTRpA8FKtpQqITiF4qqIh4SGvGS2ApSJRAVUpTkoXlBAYUgVVUFKuqDPe6ZXf+k2v25d+495557vnO+e+4oVFHWL9Of0McUQ+lRhhUFTCsreRhSsWTagLTtwgTUYlWLcjNmhsAqQlb0+vMJx3+OAD3qvSviAhtNCvi+CPuN1Orebe827IJd3rNcdTmjZ3iU3yKMuyr/A7l9kpCTJCi9jIww7xvGIMQiEu7KoJe5fx/+cuzYXaGy96SEPFflp4pCFPzQFfKZklCeUBQzV7MKOSFTuTD43tTBsRKDUAiDxF8GjIrj+hrZQeJOQJ1MgOvYRgZ6CcqSYVIEXJs2Kjg/CGRhBuSYhBn0coGoZIGyK/mLjcbF/HcOAFk82C8BZH9XOR8HYvdb4VA5U/9jPVMOha0BGxK5cmdL4+AigQPXvvafvwaVvULpK0yFJw8tErJwON7Y68v9fRLmUGf/VEA3s7tTpVJqd9bUg1PFznIu0RTjjnsbPtwW5j/TupJVSpiZIbAKlogQIUW6F6RAPHUw0ghwCOG5jsWNgnQLdYwI/Y23yPVgh1z0AlIH7YMScNEZ/PxzXQ+HofSBJCTireevXs2/efPIkZuk17ynM6EG75lE6l365TVdD0rxwgscaCq0dlkNhFKf3jh69MaF3uXlXt8taPqmkzUlrigaWKIHkoYGfpd2wakSzxtnmoCG94bQGHwYhDdhnjI+p3LvS+9Lrs5hsGFez2zaIjdbtqBWtSSIJHLPGYdqQQOH3NSYNx4Mwodo0XsDGoL8yV/uLekZ3VtqWYVO6OSbfp0hL/q2TEAug0jvAdvVwO8c+nPvYiATaK6axVXd0M3VWc5ehnuhkNeFZIPz3mmpbmPcsAW5rNRa9G8dC8eiJ9GC94X3RdMCokHDPkjyovROw3mJwq5QCO5xtMaatuaRv3HFVEaUWbSIGRuCbGojjUjhgt8aaacO1Zz0iY05RlZHoGBFQPhDzLtdMy1/RkQgWdnIfQGyJUr5kpYAjRXPCV5k7A4X54pMg4S2xCktnWPsP9vCcy11r6dNify+RB8cF7lwtvQ3zXt/25ZurF9vU9rAfIJ88wDmdjQRaCHFY7wJvg4tWEj4TaSJ9mDB+TY8D3rd8utW28zZtkiRV9vQ3Eq02f6kfcq73xarbd40yFdKZ/NsNDloVLBIxdJ+YYoZSMUJoD/23te7de99pOJ+ye80D/8dLvdzBs/AmUDAO8tVEKtrf/crCqmsClD9mrC+QlfopBJQ8OxAq9o1yxjNZYcwjshQC8NjYzwFUa6tcb52rdkGh6L68eN6dAi5egnL3CXK6OSmENu1f4Reey2k8m8p/danrI9j/V90P40qAzjA8DsWFlhD+vXHr5x4QYT9jLkZn8oFvCfQFTxio8FInv3spfOnWD4S7CBqtEILAx2ujF+xH7oSlyPGQIFWoiqBHab19KtXGVt++WnLPDDDprn5VF70xMOEcxKO94j8UyafZjNbMV0iNxQbB0Li9kIOApZ/mTSw8IsUemMVUuiByGUL2KHE7ytO3K3WHLo0WN1h6fbujklzeh7Yc3+dNAZyxSw8NpY2YtH4wdHS82Op5OhL0//8L9jkbEpEhzM9wc4eMj+dTMjDjxeGyjMGSZD6D0OCVqdI1gJq9muw61IgmFf+Ly+PtPKCObcdzAv3nai1LqfNXOFzbhBc/1pKG467s1ap5fA/7LiVVCWVS1WENNJQi5Zj5cph91hx7Dl4ffZ7WsdWun56fWL8nT21s3tPTY8Ei33V383tiHsfLV2/zvR9KytvGaWHe+EIhEOlY6w+ksl+tyP5yNwWF+D5Q8aj3VPT4sJMpEsNdHfZe3pH+p4IwuG+kUOzHcGN3H+MeKrK2BbL0k6hJqwC+u0YfsoRh1t1LaeJwUZgOCvTqbRA5R7YhEqU5VVO3v5VlMOPbBrtV8u19HhK6zr+DAyHwqw8ze1f2vqju1g49BDMH48ngem/fofwVVrlq9cu3B1mMW2ffDyWTuvG/m4m8p3JE/tmRwcfljAgwmEtD3JqcHR234lkfHDHIl52w3dfX17duD/X/01/i/yNYP1RYGdW+G81lZ2247/RSCSPkarIXAy/GPwJqNhpgy6s9YXjSMHPsH120uyAU9HGLxoNeHLvzopGo/Hwtvwr6OuaO+19DM7pH8wdoLjf/wDUqKMzAAB4nGNgZGBgAOJ04fVZ8fw2Xxm4WRhA4AZPxE8E/X8zCwOzD5DLwcAEEgUAEwIJvQB4nGNgZGBgbvjfwBDDwgACQJKRARUIAgBHFwJ6eJxjYWBgYKEQAwAJ1ABFAAAAAAAAVADOARwBQgFoAY4BtAIuAqoC2AMOA1QDpAQMBG4EqHicY2BkYGAQZAhkYGEAASYg5gJCBob/YD4DABJaAX0AeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicbYlRDoIwEAX7EEVBULwHh/EIpWxl48aSsg16e6N+6IfzNZMxmflQmv+0yLBCjjU2KLDFDiUq7FGjwQFHtDiZdrae9OEoKnt2VqlxEtLQDWG5SbBDPquN68iXUXMhr1ma8tcrfRKZXSS6Hb7a0Z21sDGGJU1NmjrH0Ql1nkWy87nQhVUpnqzwZB+/t7qwjql/e+2toz6E67uMeQJmbjz5AAAA') format('woff'), 6 | url('../iconfont/iconfont.ttf?t=1541814265044') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('../iconfont/iconfont.svg?t=1541814265044#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-safetycertificate:before { content: "\e7c0"; } 19 | 20 | .icon-cloud-download:before { content: "\e7d9"; } 21 | 22 | .icon-star:before { content: "\e7df"; } 23 | 24 | .icon-right:before { content: "\e7eb"; } 25 | 26 | .icon-left:before { content: "\e7ec"; } 27 | 28 | .icon-up:before { content: "\e7ed"; } 29 | 30 | .icon-down:before { content: "\e7ee"; } 31 | 32 | .icon-fullscreen:before { content: "\e7ef"; } 33 | 34 | .icon-fullscreen-exit:before { content: "\e7f0"; } 35 | 36 | .icon-arrowup:before { content: "\e7f1"; } 37 | 38 | .icon-up-circle-fill:before { content: "\e845"; } 39 | 40 | .icon-QQ:before { content: "\e882"; } 41 | 42 | .icon-twitter:before { content: "\e883"; } 43 | 44 | .icon-alipay-circle-fill:before { content: "\e884"; } 45 | 46 | .icon-github-fill:before { content: "\e885"; } 47 | 48 | .icon-facebook-fill:before { content: "\e88d"; } 49 | 50 | -------------------------------------------------------------------------------- /options.php: -------------------------------------------------------------------------------- 1 | ID] = $page->post_title; 32 | } 33 | // Pull all the cateries into an array 34 | $options_categories = array(); 35 | $options_categories_obj = get_categories(); 36 | foreach ($options_categories_obj as $category) { 37 | $options_categories[$category->cat_ID] = $category->cat_name; 38 | } 39 | 40 | $options_links = array(); 41 | $options_links_obj = get_terms( 'link_category' ); 42 | foreach ($options_links_obj as $link) { 43 | $options_links[$link->term_id] = $link->name; 44 | } 45 | 46 | $imagepath = get_template_directory_uri() . '/img/themestyle/'; 47 | 48 | $options = array(); 49 | 50 | /*****基本设置*****/ 51 | $options[] = array( 52 | 'name' => __('基本设置'), 53 | 'type' => 'heading'); 54 | 55 | $options[] = array( 56 | 'name' => __('网站标题'), 57 | 'desc' => __('网站标题'), 58 | 'id' => 'stayma_info_title', 59 | 'type' => 'text'); 60 | 61 | $options[] = array( 62 | 'name' => __('描述一句话'), 63 | 'desc' => __('一句话描述网站'), 64 | 'id' => 'stayma_info_text', 65 | 'type' => 'text'); 66 | 67 | $options[] = array( 68 | 'name' => __('网站左侧表述语'), 69 | 'desc' => __('请勿太长,否则丑爆!'), 70 | 'id' => 'stayma_left_text', 71 | 'type' => 'text'); 72 | 73 | 74 | $options[] = array( 75 | 'name' => __('网站关键字'), 76 | 'desc' => __('请设置关键字,建议6-10个,请用英文逗号,隔开!'), 77 | 'id' => 'stayma_info_keywords', 78 | 'type' => 'text'); 79 | 80 | 81 | $options[] = array( 82 | 'name' => __('网站描述信息'), 83 | 'desc' => __('请设置描述信息,建议80-100字。'), 84 | 'id' => 'stayma_info_description', 85 | 'type' => 'text'); 86 | 87 | $options[] = array( 88 | 'name' => __('首页大图'), 89 | 'desc' => __('请上传信息展示区背景图片'), 90 | 'id' => 'stayma_index_img', 91 | 'type' => 'upload'); 92 | 93 | $options[] = array( 94 | 'name' => __('备案号'), 95 | 'desc' => __('请设置首页首屏较小文字信息。'), 96 | 'id' => 'stayma_index_icp', 97 | 'class' => 'mini', 98 | 'type' => 'text'); 99 | 100 | 101 | $options[] = array( 102 | 'name' => __('建站时间'), 103 | 'desc' => __('请设置建站日期,格式为:2018-5-2'), 104 | 'id' => 'stayma_info_time', 105 | 'class' => 'mini', 106 | 'type' => 'text'); 107 | 108 | 109 | 110 | $options[] = array( 111 | 'name' => __('页尾设置'), 112 | 'type' => 'heading'); 113 | 114 | $options[] = array( 115 | 'name' => __('微博地址'), 116 | 'desc' => __('请输入你的微博地址(请不要忘记http)'), 117 | 'id' => 'social_weibo', 118 | 'type' => 'text'); 119 | 120 | $options[] = array( 121 | 'name' => __('github'), 122 | 'desc' => __('请输入你的github地址(请不要忘记http)'), 123 | 'id' => 'social_github', 124 | 'type' => 'text'); 125 | 126 | $options[] = array( 127 | 'name' => __('twitter'), 128 | 'desc' => __('请输入你的twitter地址(请不要忘记http)'), 129 | 'id' => 'social_twitter', 130 | 'type' => 'text'); 131 | $options[] = array( 132 | 'name' => __('尾部自定义JavaScript区域'), 133 | 'desc' => __('该内容请填写JavaScript代码,请带上script标签,建议放统计代码等等'), 134 | 'id' => 'footer_diy', 135 | 'type' => 'textarea'); 136 | 137 | 138 | $options[] = array( 139 | 'name' => __('百度熊掌号', 'haoui'), 140 | 'type' => 'heading' ); 141 | 142 | $options[] = array( 143 | 'name' => __('百度熊掌号', 'haoui'), 144 | 'id' => 'xzh_on', 145 | 'std' => false, 146 | 'desc' => ' 开启', 147 | 'type' => 'checkbox'); 148 | 149 | $options[] = array( 150 | 'name' => '百度熊掌号 Appid', 151 | 'id' => 'xzh_appid', 152 | 'std' => '', 153 | 'type' => 'text'); 154 | 155 | $options[] = array( 156 | 'name' => '百度熊掌号 推送密钥 token', 157 | 'id' => 'xzh_post_token', 158 | 'std' => '', 159 | 'type' => 'text'); 160 | 161 | $options[] = array( 162 | 'name' => __('粉丝关注', 'haoui'), 163 | 'id' => 'xzh_render_head', 164 | 'std' => false, 165 | 'desc' => ' 吸顶bar', 166 | 'type' => 'checkbox'); 167 | 168 | $options[] = array( 169 | 'class' => 'op-multicheck', 170 | 'id' => 'xzh_render_body', 171 | 'std' => true, 172 | 'desc' => ' 文章段落间bar', 173 | 'type' => 'checkbox'); 174 | 175 | $options[] = array( 176 | 'class' => 'op-multicheck', 177 | 'id' => 'xzh_render_tail', 178 | 'std' => true, 179 | 'desc' => ' 底部bar', 180 | 'type' => 'checkbox'); 181 | 182 | $options[] = array( 183 | 'name' => __('添加JSON_LD数据', 'haoui'), 184 | 'id' => 'xzh_jsonld_single', 185 | 'std' => true, 186 | 'desc' => ' 文章页', 187 | 'type' => 'checkbox'); 188 | 189 | $options[] = array( 190 | 'class' => 'op-multicheck', 191 | 'id' => 'xzh_jsonld_page', 192 | 'std' => false, 193 | 'desc' => ' 页面', 194 | 'type' => 'checkbox'); 195 | 196 | $options[] = array( 197 | 'name' => __('添加JSON_LD数据 - 不添加图片', 'haoui'), 198 | 'id' => 'xzh_jsonld_img', 199 | 'std' => false, 200 | 'desc' => ' 开启', 201 | 'type' => 'checkbox'); 202 | 203 | $options[] = array( 204 | 'name' => __('新增文章实时推送', 'haoui'), 205 | 'id' => 'xzh_post_on', 206 | 'std' => false, 207 | 'desc' => ' 开启 (使用此功能,你还需要开启本页中的 百度熊掌号 和 Appid以及token的设置)', 208 | 'type' => 'checkbox'); 209 | 210 | return $options; 211 | } -------------------------------------------------------------------------------- /ajax-comment/do.php: -------------------------------------------------------------------------------- 1 | post_author; 9 | if ( empty($post->comment_status) ) { 10 | do_action('comment_id_not_found', $comment_post_ID); 11 | ajax_comment_err('Invalid comment status.'); 12 | } 13 | $status = get_post_status($post); 14 | $status_obj = get_post_status_object($status); 15 | if ( !comments_open($comment_post_ID) ) { 16 | do_action('comment_closed', $comment_post_ID); 17 | ajax_comment_err('对不起,本文评论已关闭。'); 18 | } elseif ( 'trash' == $status ) { 19 | do_action('comment_on_trash', $comment_post_ID); 20 | ajax_comment_err('未知错误。'); 21 | } elseif ( !$status_obj->public && !$status_obj->private ) { 22 | do_action('comment_on_draft', $comment_post_ID); 23 | ajax_comment_err('未知错误。'); 24 | } elseif ( post_password_required($comment_post_ID) ) { 25 | do_action('comment_on_password_protected', $comment_post_ID); 26 | ajax_comment_err('密码保护中'); 27 | } else { 28 | do_action('pre_comment_on_post', $comment_post_ID); 29 | } 30 | $comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; 31 | $comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; 32 | $comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; 33 | $comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; 34 | $user = wp_get_current_user(); 35 | if ( $user->exists() ) { 36 | if ( empty( $user->display_name ) ) 37 | $user->display_name=$user->user_login; 38 | $comment_author = esc_sql($user->display_name); 39 | $comment_author_email = esc_sql($user->user_email); 40 | $comment_author_url = esc_sql($user->user_url); 41 | $user_ID = esc_sql($user->ID); 42 | if ( current_user_can('unfiltered_html') ) { 43 | if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { 44 | kses_remove_filters(); 45 | kses_init_filters(); 46 | } 47 | } 48 | } else { 49 | if ( get_option('comment_registration') || 'private' == $status ) 50 | ajax_comment_err('

抱歉,您必须登录后才能发表评论。

'); 51 | } 52 | $comment_type = ''; 53 | if ( get_option('require_name_email') && !$user->exists() ) { 54 | if ( 6 > strlen($comment_author_email) || '' == $comment_author ) 55 | ajax_comment_err( '

错误:请填写必须的选项(姓名,电子邮件)。

' ); 56 | elseif ( !is_email($comment_author_email)) 57 | ajax_comment_err( '

错误:请输入有效的电子邮件地址。

' ); 58 | } 59 | if ( '' == $comment_content ) 60 | ajax_comment_err( '

说点什么?

' ); 61 | $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' "; 62 | if ( $comment_author_email ) $dupe .= "OR comment_author_email = '$comment_author_email' "; 63 | $dupe .= ") AND comment_content = '$comment_content' LIMIT 1"; 64 | if ( $wpdb->get_var($dupe) ) { 65 | ajax_comment_err('

aha~似乎说过这句话?

'); 66 | } 67 | if ( $lasttime = $wpdb->get_var( $wpdb->prepare("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author = %s ORDER BY comment_date DESC LIMIT 1", $comment_author) ) ) { 68 | $time_lastcomment = mysql2date('U', $lasttime, false); 69 | $time_newcomment = mysql2date('U', current_time('mysql', 1), false); 70 | $flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment); 71 | if ( $flood_die ) { 72 | ajax_comment_err('

你回复太快啦。慢慢来。

'); 73 | } 74 | } 75 | $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; 76 | $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); 77 | $comment_id = wp_new_comment( $commentdata ); 78 | $comment = get_comment($comment_id); 79 | do_action('set_comment_cookies', $comment, $user); 80 | $comment_depth = 1; 81 | $tmp_c = $comment; 82 | while($tmp_c->comment_parent != 0){ 83 | $comment_depth++; 84 | $tmp_c = get_comment($tmp_c->comment_parent); 85 | } 86 | $GLOBALS['comment'] = $comment; 87 | //这里修改成你的评论结构 88 | ?> 89 |
  • id="li-comment-"> 90 |
    91 |
    92 |
    93 |
    94 | 95 | user_id == 1) echo "官方"; ?> 96 | 97 |
    98 |
    99 | 100 | comment_approved == '0' ) : ?> 101 | 您的评论正在等待审核中... 102 | 103 |
    104 | 105 |
    106 |
    107 | some Chinese word (like \"你好\"),您的评论中必须包含汉字!

    " ); 120 | } 121 | return( $incoming_comment ); 122 | } 123 | 124 | add_filter('preprocess_comment', 'scp_comment_post'); 125 | 126 | function check_comment_data( $commnet_data ) { 127 | // 禁止含有链接的评论 128 | if(strpos($commnet_data['comment_content'],'http://') !== false || strpos($commnet_data['comment_content'],'www') !== false ||strpos($commnet_data['comment_content'],'您的评论中不能包含链接!

    " ); 131 | } 132 | return $commnet_data; 133 | } 134 | 135 | add_filter('preprocess_comment', 'check_comment_data'); 136 | -------------------------------------------------------------------------------- /xzh.func.php: -------------------------------------------------------------------------------- 1 | ID, 'is_original', true); 14 | if( stayma('xzh_on') && $isoriginal ){ 15 | return true; 16 | } 17 | return false; 18 | } 19 | 20 | // 熊掌号 粉丝关注 声明 21 | function tb_xzh_head_var(){ 22 | echo (tb_xzh_on()&&(stayma('xzh_render_head')||stayma('xzh_render_body')||stayma('xzh_render_tail'))) ? '' : ''; 23 | } 24 | 25 | // 熊掌号 粉丝关注 吸顶bar 26 | function tb_xzh_render_head(){ 27 | echo (tb_xzh_on()&&stayma('xzh_render_head')) ? "
    " : ''; 28 | } 29 | 30 | // 熊掌号 粉丝关注 文章段落间bar 31 | function tb_xzh_render_body(){ 32 | echo (tb_xzh_on()&&stayma('xzh_render_body')) ? "
    " : ''; 33 | } 34 | 35 | // 熊掌号 粉丝关注 底部bar 36 | function tb_xzh_render_tail(){ 37 | echo (tb_xzh_on()&&stayma('xzh_render_tail')) ? "
    " : ''; 38 | } 39 | 40 | 41 | // 熊掌号 添加JSON_LD数据 42 | add_action('wp_head', 'tb_xzh_jsonld', 20, 1); 43 | function tb_xzh_jsonld() { 44 | if ( stayma('xzh_on') && stayma('xzh_appid') && ((is_single()&&stayma('xzh_jsonld_single')) || (is_page()&&stayma('xzh_jsonld_page'))) ){ 45 | echo ''."\n"; 56 | } 57 | } 58 | function get_the_subtitle($span=true){ 59 | global $post; 60 | $post_ID = $post->ID; 61 | $subtitle = get_post_meta($post_ID, 'subtitle', true); 62 | 63 | if( !empty($subtitle) ){ 64 | if( $span ){ 65 | return ' '.$subtitle.''; 66 | }else{ 67 | return ' '.$subtitle; 68 | } 69 | }else{ 70 | return false; 71 | } 72 | } 73 | // 熊掌号 获取文章摘要 74 | function tb_xzh_post_excerpt($len=120){ 75 | global $post; 76 | $post_content = ''; 77 | if ($post->post_excerpt) { 78 | $post_content = $post->post_excerpt; 79 | } else { 80 | if(preg_match('/

    (.*)<\/p>/iU',trim(strip_tags($post->post_content,"

    ")),$result)){ 81 | $post_content = $result['1']; 82 | } else { 83 | $post_content_r = explode("\n",trim(strip_tags($post->post_content))); 84 | $post_content = $post_content_r['0']; 85 | } 86 | } 87 | $excerpt = preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,0}'.'((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s','$1',$post_content); 88 | return str_replace(array("\r\n", "\r", "\n"), "", $excerpt); 89 | } 90 | 91 | // 熊掌号 获取文章图片 92 | function tb_xzh_post_imgs(){ 93 | if( stayma('xzh_jsonld_img') ) return ''; 94 | global $post; 95 | $src = ''; 96 | $content = $post->post_content; 97 | preg_match_all('//', $content, $strResult, PREG_PATTERN_ORDER); 98 | $n = count($strResult[1]); 99 | if($n >= 3){ 100 | $src = $strResult[1][0].'","'.$strResult[1][1].'","'.$strResult[1][2]; 101 | $src = '"'.$src.'"'; 102 | }elseif($n >= 1){ 103 | $src = $strResult[1][0]; 104 | $src = '"'.$src.'"'; 105 | } 106 | return $src; 107 | } 108 | 109 | // 熊掌号 新文章发布时实时推送 110 | add_action('publish_post', 'tb_xzh_post_to_baidu'); 111 | function tb_xzh_post_to_baidu() { 112 | if( stayma('xzh_on') && stayma('xzh_appid') && stayma('xzh_post_on') && stayma('xzh_post_token') ){ 113 | global $post; 114 | $plink = get_permalink($post->ID); 115 | if( 'publish' !== $post->post_status && $plink ){ 116 | $isoriginal = get_post_meta($post->ID, 'is_original', true); 117 | $urls = array(); 118 | $urls[] = $plink; 119 | $api = 'http://data.zz.baidu.com/urls?appid='. stayma('xzh_appid') .'&token='. stayma('xzh_post_token') .'&type=realtime'; 120 | if( $isoriginal ){ 121 | $api .= ',original'; 122 | } 123 | $ch = curl_init(); 124 | $options = array( 125 | CURLOPT_URL => $api, 126 | CURLOPT_POST => true, 127 | CURLOPT_RETURNTRANSFER => true, 128 | CURLOPT_POSTFIELDS => implode("\n", $urls), 129 | CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), 130 | ); 131 | curl_setopt_array($ch, $options); 132 | $result = curl_exec($ch); 133 | $result = json_decode($result); 134 | $result_text = '成功'; 135 | if( $result->error ){ 136 | $result_text = '失败 '.$result->message; 137 | } 138 | update_post_meta($post->ID, 'xzh_tui_back', $result_text); 139 | } 140 | } 141 | }$postmeta_xzh = array( 142 | array( 143 | "title" => "原创文章", 144 | "name" => "is_original", 145 | "std" => true 146 | ) 147 | ); 148 | 149 | if( stayma('xzh_on') ){ 150 | add_action('admin_menu', 'hui_postmeta_xzh_create'); 151 | add_action('save_post', 'hui_postmeta_xzh_save'); 152 | } 153 | 154 | function hui_postmeta_xzh() { 155 | global $post, $postmeta_xzh; 156 | foreach($postmeta_xzh as $meta_box) { 157 | $meta_box_value = get_post_meta($post->ID, $meta_box['name'], true); 158 | if($meta_box_value == "") 159 | $meta_box_value = $meta_box['std']; 160 | echo '

    '; 161 | } 162 | $tui = get_post_meta($post->ID, 'xzh_tui_back', true); 163 | if( $tui ) echo '

    实时推送结果:'.$tui.'

    '; 164 | 165 | echo ''; 166 | } 167 | 168 | function hui_postmeta_xzh_create() { 169 | global $theme_name; 170 | if ( function_exists('add_meta_box') ) { 171 | add_meta_box( 'postmeta_xzh_boxes', __('百度熊掌号设置', 'haoui'), 'hui_postmeta_xzh', 'post', 'normal', 'high' ); 172 | } 173 | } 174 | 175 | function hui_postmeta_xzh_save( $post_id ) { 176 | global $postmeta_xzh; 177 | 178 | if ( !wp_verify_nonce( isset($_POST['post_newmetaboxes_noncename'])?$_POST['post_newmetaboxes_noncename']:'', plugin_basename(__FILE__) )) 179 | return; 180 | 181 | if ( !current_user_can( 'edit_posts', $post_id )) 182 | return; 183 | 184 | foreach($postmeta_xzh as $meta_box) { 185 | $data = $_POST[$meta_box['name']]; 186 | if(get_post_meta($post_id, $meta_box['name']) == "") 187 | add_post_meta($post_id, $meta_box['name'], $data, true); 188 | elseif($data != get_post_meta($post_id, $meta_box['name'], true)) 189 | update_post_meta($post_id, $meta_box['name'], $data); 190 | elseif($data == "") 191 | delete_post_meta($post_id, $meta_box['name'], get_post_meta($post_id, $meta_box['name'], true)); 192 | } 193 | } -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <?php if (is_home()) { 12 | bloginfo('name'); 13 | echo " - "; 14 | bloginfo('description'); 15 | } elseif (is_category()) { 16 | single_cat_title(); 17 | echo " - "; 18 | bloginfo('name').''; 19 | } elseif (is_single() || is_page()) { 20 | single_post_title(); 21 | echo " - "; 22 | bloginfo('name'); 23 | } elseif (is_404()) { 24 | echo '页面未找到!'; 25 | echo " - "; 26 | bloginfo('name'); 27 | } else { 28 | wp_title('', true); 29 | echo " - "; 30 | bloginfo('name'); 31 | }?> 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
    46 | 47 |
    48 | 49 | 50 | -------------------------------------------------------------------------------- /static/iconfont/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 5 |
    6 |
    7 |
    8 |
    9 | 10 | / 11 |
    12 |

    13 |
    14 | 15 |
    16 |
    17 | 18 |
    19 |
    20 | 21 | --EOF-- 22 |
    23 |
    24 | 25 | 26 |
    27 | 28 |
    29 | 30 |
    31 |

    32 |

    33 |
    34 |
    35 |
    36 | Read More 37 |
    38 | 39 |
    40 | 41 | 44 | 45 |
    46 | 47 |
    48 |
    49 | 50 | 134 | 135 |
    136 | 141 | 142 |
    143 |
    144 |
    Share this 145 | 146 | 147 |
    148 | 149 | 150 | 151 | 152 | 153 | 154 |
    155 | 156 |
    157 | 158 |
    159 |
    160 |
    161 | 169 | -------------------------------------------------------------------------------- /inc/includes/class-options-framework-admin.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2010-2014 WP Theming 8 | */ 9 | 10 | class Options_Framework_Admin { 11 | 12 | /** 13 | * Page hook for the options screen 14 | * 15 | * @since 1.7.0 16 | * @type string 17 | */ 18 | protected $options_screen = null; 19 | 20 | /** 21 | * Hook in the scripts and styles 22 | * 23 | * @since 1.7.0 24 | */ 25 | public function init() { 26 | 27 | // Gets options to load 28 | $options = &Options_Framework::_optionsframework_options(); 29 | 30 | // Checks if options are available 31 | if ($options) { 32 | 33 | // Add the options page and menu item. 34 | add_action('admin_menu', array($this, 'add_custom_options_page')); 35 | 36 | // Add the required scripts and styles 37 | add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles')); 38 | add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts')); 39 | 40 | // Settings need to be registered after admin_init 41 | add_action('admin_init', array($this, 'settings_init')); 42 | 43 | // Adds options menu to the admin bar 44 | add_action('wp_before_admin_bar_render', array($this, 'optionsframework_admin_bar')); 45 | 46 | } 47 | 48 | } 49 | 50 | /** 51 | * Registers the settings 52 | * 53 | * @since 1.7.0 54 | */ 55 | function settings_init() { 56 | 57 | // Load Options Framework Settings 58 | $optionsframework_settings = get_option('optionsframework'); 59 | 60 | // Registers the settings fields and callback 61 | register_setting('optionsframework', $optionsframework_settings['id'], array($this, 'validate_options')); 62 | 63 | // Displays notice after options save 64 | add_action('optionsframework_after_validate', array($this, 'save_options_notice')); 65 | 66 | } 67 | 68 | /* 69 | * Define menu options 70 | * 71 | * Examples usage: 72 | * 73 | * add_filter( 'optionsframework_menu', function( $menu ) { 74 | * $menu['page_title'] = 'The Options'; 75 | * $menu['menu_title'] = 'The Options'; 76 | * return $menu; 77 | * }); 78 | * 79 | * @since 1.7.0 80 | * 81 | */ 82 | static function menu_settings() { 83 | 84 | $menu = array( 85 | 86 | // Modes: submenu, menu 87 | 'mode' => 'submenu', 88 | 89 | // Submenu default settings 90 | 'page_title' => __('主题选项', 'textdomain'), 91 | 'menu_title' => __('主题选项', 'textdomain'), 92 | 'capability' => 'edit_theme_options', 93 | 'menu_slug' => 'options-framework', 94 | 95 | // Menu default settings 96 | 'icon_url' => 'dashicons-admin-generic', 97 | 'position' => '61', 98 | 99 | ); 100 | 101 | return apply_filters('optionsframework_menu', $menu); 102 | } 103 | 104 | /** 105 | * Add a subpage called "Theme Options" to the appearance menu. 106 | * 107 | * @since 1.7.0 108 | */ 109 | function add_custom_options_page() { 110 | 111 | $menu = $this->menu_settings(); 112 | 113 | // If you want a top level menu, see this Gist: 114 | // https://gist.github.com/devinsays/884d6abe92857a329d99 115 | 116 | // Code removed because it conflicts with .org theme check. 117 | 118 | $this->options_screen = add_menu_page( 119 | 120 | $menu['page_title'], 121 | $menu['menu_title'], 122 | $menu['capability'], 123 | $menu['menu_slug'], 124 | array($this, 'options_page') 125 | ); 126 | 127 | } 128 | 129 | /** 130 | * Loads the required stylesheets 131 | * 132 | * @since 1.7.0 133 | */ 134 | 135 | function enqueue_admin_styles($hook) { 136 | 137 | if ($this->options_screen != $hook) { 138 | return; 139 | } 140 | 141 | wp_enqueue_style('optionsframework', OPTIONS_FRAMEWORK_DIRECTORY . 'css/optionsframework.css', array(), Options_Framework::VERSION); 142 | wp_enqueue_style('wp-color-picker'); 143 | } 144 | 145 | /** 146 | * Loads the required javascript 147 | * 148 | * @since 1.7.0 149 | */ 150 | function enqueue_admin_scripts($hook) { 151 | 152 | if ($this->options_screen != $hook) { 153 | return; 154 | } 155 | 156 | // Enqueue custom option panel JS 157 | wp_enqueue_script('options-custom', OPTIONS_FRAMEWORK_DIRECTORY . 'js/options-custom.js', array('jquery', 'wp-color-picker'), Options_Framework::VERSION); 158 | 159 | // Inline scripts from options-interface.php 160 | add_action('admin_head', array($this, 'of_admin_head')); 161 | } 162 | 163 | function of_admin_head() { 164 | // Hook to add custom scripts 165 | do_action('optionsframework_custom_scripts'); 166 | } 167 | 168 | /** 169 | * Builds out the options panel. 170 | * 171 | * If we were using the Settings API as it was intended we would use 172 | * do_settings_sections here. But as we don't want the settings wrapped in a table, 173 | * we'll call our own custom optionsframework_fields. See options-interface.php 174 | * for specifics on how each individual field is generated. 175 | * 176 | * Nonces are provided using the settings_fields() 177 | * 178 | * @since 1.7.0 179 | */ 180 | function options_page() {?> 181 | 182 |
    183 | 184 | menu_settings();?> 185 |

    186 |

    GitGhost 1.0 专注于WordPress主题定制开发 本主题不提供在线更新服务 最新版请到 STAYMA博客下载

    187 | 190 | 191 | 192 | 193 |
    194 | 195 |
    196 |
    197 | 198 | 199 |
    200 | 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 | 208 |
    209 | 210 | get_default_values(); 234 | } 235 | 236 | /* 237 | * Update Settings 238 | * 239 | * This used to check for $_POST['update'], but has been updated 240 | * to be compatible with the theme customizer introduced in WordPress 3.4 241 | */ 242 | 243 | $clean = array(); 244 | $options = &Options_Framework::_optionsframework_options(); 245 | foreach ($options as $option) { 246 | 247 | if (!isset($option['id'])) { 248 | continue; 249 | } 250 | 251 | if (!isset($option['type'])) { 252 | continue; 253 | } 254 | 255 | $id = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($option['id'])); 256 | 257 | // Set checkbox to false if it wasn't sent in the $_POST 258 | if ('checkbox' == $option['type'] && !isset($input[$id])) { 259 | $input[$id] = false; 260 | } 261 | 262 | // Set each item in the multicheck to false if it wasn't sent in the $_POST 263 | if ('multicheck' == $option['type'] && !isset($input[$id])) { 264 | foreach ($option['options'] as $key => $value) { 265 | $input[$id][$key] = false; 266 | } 267 | } 268 | 269 | // For a value to be submitted to database it must pass through a sanitization filter 270 | if (has_filter('of_sanitize_' . $option['type'])) { 271 | $clean[$id] = apply_filters('of_sanitize_' . $option['type'], $input[$id], $option); 272 | } 273 | } 274 | 275 | // Hook to run after validation 276 | do_action('optionsframework_after_validate', $clean); 277 | 278 | return $clean; 279 | } 280 | 281 | /** 282 | * Display message when options have been saved 283 | */ 284 | 285 | function save_options_notice() { 286 | add_settings_error('options-framework', 'save_options', __('设置已保存。', 'textdomain'), 'updated fade'); 287 | } 288 | 289 | /** 290 | * Get the default values for all the theme options 291 | * 292 | * Get an array of all default values as set in 293 | * options.php. The 'id','std' and 'type' keys need 294 | * to be defined in the configuration array. In the 295 | * event that these keys are not present the option 296 | * will not be included in this function's output. 297 | * 298 | * @return array Re-keyed options configuration array. 299 | * 300 | */ 301 | 302 | function get_default_values() { 303 | $output = array(); 304 | $config = &Options_Framework::_optionsframework_options(); 305 | foreach ((array) $config as $option) { 306 | if (!isset($option['id'])) { 307 | continue; 308 | } 309 | if (!isset($option['std'])) { 310 | continue; 311 | } 312 | if (!isset($option['type'])) { 313 | continue; 314 | } 315 | if (has_filter('of_sanitize_' . $option['type'])) { 316 | $output[$option['id']] = apply_filters('of_sanitize_' . $option['type'], $option['std'], $option); 317 | } 318 | } 319 | return $output; 320 | } 321 | 322 | /** 323 | * Add options menu item to admin bar 324 | */ 325 | 326 | function optionsframework_admin_bar() { 327 | 328 | $menu = $this->menu_settings(); 329 | 330 | global $wp_admin_bar; 331 | 332 | if ('menu' == $menu['mode']) { 333 | $href = admin_url('admin.php?page=' . $menu['menu_slug']); 334 | } else { 335 | $href = admin_url('themes.php?page=' . $menu['menu_slug']); 336 | } 337 | 338 | $args = array( 339 | 'parent' => 'appearance', 340 | 'id' => 'of_theme_options', 341 | 'title' => $menu['menu_title'], 342 | 'href' => $href, 343 | ); 344 | 345 | $wp_admin_bar->add_menu(apply_filters('optionsframework_admin_bar', $args)); 346 | } 347 | 348 | } 349 | -------------------------------------------------------------------------------- /inc/includes/class-options-sanitization.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2010-2014 WP Theming 8 | */ 9 | 10 | /* Text */ 11 | 12 | add_filter( 'of_sanitize_text', 'sanitize_text_field' ); 13 | 14 | /* Password */ 15 | 16 | add_filter( 'of_sanitize_password', 'sanitize_text_field' ); 17 | 18 | /* Textarea */ 19 | 20 | function of_sanitize_textarea( $input) { 21 | global $allowedposttags; 22 | //$output = wp_kses( $input, $allowedposttags); 23 | return $input; 24 | } 25 | 26 | add_filter( 'of_sanitize_textarea', 'of_sanitize_textarea' ); 27 | 28 | /* Select */ 29 | 30 | add_filter( 'of_sanitize_select', 'of_sanitize_enum', 10, 2 ); 31 | 32 | /* Radio */ 33 | 34 | add_filter( 'of_sanitize_radio', 'of_sanitize_enum', 10, 2 ); 35 | 36 | /* Images */ 37 | 38 | add_filter( 'of_sanitize_images', 'of_sanitize_enum', 10, 2 ); 39 | add_filter( 'of_sanitize_colorradio', 'of_sanitize_enum', 10, 2); 40 | 41 | /* Checkbox */ 42 | 43 | function of_sanitize_checkbox( $input ) { 44 | if ( $input ) { 45 | $output = '1'; 46 | } else { 47 | $output = false; 48 | } 49 | return $output; 50 | } 51 | add_filter( 'of_sanitize_checkbox', 'of_sanitize_checkbox' ); 52 | 53 | /* Multicheck */ 54 | 55 | function of_sanitize_multicheck( $input, $option ) { 56 | $output = ''; 57 | if ( is_array( $input ) ) { 58 | foreach( $option['options'] as $key => $value ) { 59 | $output[$key] = false; 60 | } 61 | foreach( $input as $key => $value ) { 62 | if ( array_key_exists( $key, $option['options'] ) && $value ) { 63 | $output[$key] = "1"; 64 | } 65 | } 66 | } 67 | return $output; 68 | } 69 | add_filter( 'of_sanitize_multicheck', 'of_sanitize_multicheck', 10, 2 ); 70 | 71 | /* Color Picker */ 72 | 73 | add_filter( 'of_sanitize_color', 'of_sanitize_hex' ); 74 | 75 | /* Uploader */ 76 | 77 | function of_sanitize_upload( $input ) { 78 | $output = ''; 79 | $filetype = wp_check_filetype( $input ); 80 | if ( $filetype["ext"] ) { 81 | $output = esc_url( $input ); 82 | } 83 | return $output; 84 | } 85 | add_filter( 'of_sanitize_upload', 'of_sanitize_upload' ); 86 | 87 | /* Editor */ 88 | 89 | function of_sanitize_editor( $input ) { 90 | if ( current_user_can( 'unfiltered_html' ) ) { 91 | $output = $input; 92 | } 93 | else { 94 | global $allowedtags; 95 | $output = wpautop(wp_kses( $input, $allowedtags)); 96 | } 97 | return $output; 98 | } 99 | add_filter( 'of_sanitize_editor', 'of_sanitize_editor' ); 100 | 101 | /* Allowed Tags */ 102 | 103 | function of_sanitize_allowedtags( $input ) { 104 | global $allowedtags; 105 | $output = wpautop( wp_kses( $input, $allowedtags ) ); 106 | return $output; 107 | } 108 | 109 | /* Allowed Post Tags */ 110 | 111 | function of_sanitize_allowedposttags( $input ) { 112 | global $allowedposttags; 113 | $output = wpautop( wp_kses( $input, $allowedposttags) ); 114 | return $output; 115 | } 116 | add_filter( 'of_sanitize_info', 'of_sanitize_allowedposttags' ); 117 | 118 | /* Check that the key value sent is valid */ 119 | 120 | function of_sanitize_enum( $input, $option ) { 121 | $output = ''; 122 | if ( array_key_exists( $input, $option['options'] ) ) { 123 | $output = $input; 124 | } 125 | return $output; 126 | } 127 | 128 | /* Background */ 129 | 130 | function of_sanitize_background( $input ) { 131 | $output = wp_parse_args( $input, array( 132 | 'color' => '', 133 | 'image' => '', 134 | 'repeat' => 'repeat', 135 | 'position' => 'top center', 136 | 'attachment' => 'scroll' 137 | ) ); 138 | 139 | $output['color'] = apply_filters( 'of_sanitize_hex', $input['color'] ); 140 | $output['image'] = apply_filters( 'of_sanitize_upload', $input['image'] ); 141 | $output['repeat'] = apply_filters( 'of_background_repeat', $input['repeat'] ); 142 | $output['position'] = apply_filters( 'of_background_position', $input['position'] ); 143 | $output['attachment'] = apply_filters( 'of_background_attachment', $input['attachment'] ); 144 | 145 | return $output; 146 | } 147 | add_filter( 'of_sanitize_background', 'of_sanitize_background' ); 148 | 149 | function of_sanitize_background_repeat( $value ) { 150 | $recognized = of_recognized_background_repeat(); 151 | if ( array_key_exists( $value, $recognized ) ) { 152 | return $value; 153 | } 154 | return apply_filters( 'of_default_background_repeat', current( $recognized ) ); 155 | } 156 | add_filter( 'of_background_repeat', 'of_sanitize_background_repeat' ); 157 | 158 | function of_sanitize_background_position( $value ) { 159 | $recognized = of_recognized_background_position(); 160 | if ( array_key_exists( $value, $recognized ) ) { 161 | return $value; 162 | } 163 | return apply_filters( 'of_default_background_position', current( $recognized ) ); 164 | } 165 | add_filter( 'of_background_position', 'of_sanitize_background_position' ); 166 | 167 | function of_sanitize_background_attachment( $value ) { 168 | $recognized = of_recognized_background_attachment(); 169 | if ( array_key_exists( $value, $recognized ) ) { 170 | return $value; 171 | } 172 | return apply_filters( 'of_default_background_attachment', current( $recognized ) ); 173 | } 174 | add_filter( 'of_background_attachment', 'of_sanitize_background_attachment' ); 175 | 176 | 177 | /* Typography */ 178 | 179 | function of_sanitize_typography( $input, $option ) { 180 | 181 | $output = wp_parse_args( $input, array( 182 | 'size' => '', 183 | 'face' => '', 184 | 'style' => '', 185 | 'color' => '' 186 | ) ); 187 | 188 | if ( isset( $option['options']['faces'] ) && isset( $input['face'] ) ) { 189 | if ( !( array_key_exists( $input['face'], $option['options']['faces'] ) ) ) { 190 | $output['face'] = ''; 191 | } 192 | } 193 | else { 194 | $output['face'] = apply_filters( 'of_font_face', $output['face'] ); 195 | } 196 | 197 | $output['size'] = apply_filters( 'of_font_size', $output['size'] ); 198 | $output['style'] = apply_filters( 'of_font_style', $output['style'] ); 199 | $output['color'] = apply_filters( 'of_sanitize_color', $output['color'] ); 200 | return $output; 201 | } 202 | add_filter( 'of_sanitize_typography', 'of_sanitize_typography', 10, 2 ); 203 | 204 | function of_sanitize_font_size( $value ) { 205 | $recognized = of_recognized_font_sizes(); 206 | $value_check = preg_replace('/px/','', $value); 207 | if ( in_array( (int) $value_check, $recognized ) ) { 208 | return $value; 209 | } 210 | return apply_filters( 'of_default_font_size', $recognized ); 211 | } 212 | add_filter( 'of_font_size', 'of_sanitize_font_size' ); 213 | 214 | 215 | function of_sanitize_font_style( $value ) { 216 | $recognized = of_recognized_font_styles(); 217 | if ( array_key_exists( $value, $recognized ) ) { 218 | return $value; 219 | } 220 | return apply_filters( 'of_default_font_style', current( $recognized ) ); 221 | } 222 | add_filter( 'of_font_style', 'of_sanitize_font_style' ); 223 | 224 | 225 | function of_sanitize_font_face( $value ) { 226 | $recognized = of_recognized_font_faces(); 227 | if ( array_key_exists( $value, $recognized ) ) { 228 | return $value; 229 | } 230 | return apply_filters( 'of_default_font_face', current( $recognized ) ); 231 | } 232 | add_filter( 'of_font_face', 'of_sanitize_font_face' ); 233 | 234 | /** 235 | * Get recognized background repeat settings 236 | * 237 | * @return array 238 | * 239 | */ 240 | function of_recognized_background_repeat() { 241 | $default = array( 242 | 'no-repeat' => __( 'No Repeat', 'textdomain' ), 243 | 'repeat-x' => __( 'Repeat Horizontally', 'textdomain' ), 244 | 'repeat-y' => __( 'Repeat Vertically', 'textdomain' ), 245 | 'repeat' => __( 'Repeat All', 'textdomain' ), 246 | ); 247 | return apply_filters( 'of_recognized_background_repeat', $default ); 248 | } 249 | 250 | /** 251 | * Get recognized background positions 252 | * 253 | * @return array 254 | * 255 | */ 256 | function of_recognized_background_position() { 257 | $default = array( 258 | 'top left' => __( 'Top Left', 'textdomain' ), 259 | 'top center' => __( 'Top Center', 'textdomain' ), 260 | 'top right' => __( 'Top Right', 'textdomain' ), 261 | 'center left' => __( 'Middle Left', 'textdomain' ), 262 | 'center center' => __( 'Middle Center', 'textdomain' ), 263 | 'center right' => __( 'Middle Right', 'textdomain' ), 264 | 'bottom left' => __( 'Bottom Left', 'textdomain' ), 265 | 'bottom center' => __( 'Bottom Center', 'textdomain' ), 266 | 'bottom right' => __( 'Bottom Right', 'textdomain') 267 | ); 268 | return apply_filters( 'of_recognized_background_position', $default ); 269 | } 270 | 271 | /** 272 | * Get recognized background attachment 273 | * 274 | * @return array 275 | * 276 | */ 277 | function of_recognized_background_attachment() { 278 | $default = array( 279 | 'scroll' => __( 'Scroll Normally', 'textdomain' ), 280 | 'fixed' => __( 'Fixed in Place', 'textdomain') 281 | ); 282 | return apply_filters( 'of_recognized_background_attachment', $default ); 283 | } 284 | 285 | /** 286 | * Sanitize a color represented in hexidecimal notation. 287 | * 288 | * @param string Color in hexidecimal notation. "#" may or may not be prepended to the string. 289 | * @param string The value that this function should return if it cannot be recognized as a color. 290 | * @return string 291 | * 292 | */ 293 | 294 | function of_sanitize_hex( $hex, $default = '' ) { 295 | if ( of_validate_hex( $hex ) ) { 296 | return $hex; 297 | } 298 | return $default; 299 | } 300 | 301 | /** 302 | * Get recognized font sizes. 303 | * 304 | * Returns an indexed array of all recognized font sizes. 305 | * Values are integers and represent a range of sizes from 306 | * smallest to largest. 307 | * 308 | * @return array 309 | */ 310 | 311 | function of_recognized_font_sizes() { 312 | $sizes = range( 9, 71 ); 313 | $sizes = apply_filters( 'of_recognized_font_sizes', $sizes ); 314 | $sizes = array_map( 'absint', $sizes ); 315 | return $sizes; 316 | } 317 | 318 | /** 319 | * Get recognized font faces. 320 | * 321 | * Returns an array of all recognized font faces. 322 | * Keys are intended to be stored in the database 323 | * while values are ready for display in in html. 324 | * 325 | * @return array 326 | * 327 | */ 328 | function of_recognized_font_faces() { 329 | $default = array( 330 | 'arial' => 'Arial', 331 | 'verdana' => 'Verdana, Geneva', 332 | 'trebuchet' => 'Trebuchet', 333 | 'georgia' => 'Georgia', 334 | 'times' => 'Times New Roman', 335 | 'tahoma' => 'Tahoma, Geneva', 336 | 'palatino' => 'Palatino', 337 | 'helvetica' => 'Helvetica*' 338 | ); 339 | return apply_filters( 'of_recognized_font_faces', $default ); 340 | } 341 | 342 | /** 343 | * Get recognized font styles. 344 | * 345 | * Returns an array of all recognized font styles. 346 | * Keys are intended to be stored in the database 347 | * while values are ready for display in in html. 348 | * 349 | * @return array 350 | * 351 | */ 352 | function of_recognized_font_styles() { 353 | $default = array( 354 | 'normal' => __( 'Normal', 'textdomain' ), 355 | 'italic' => __( 'Italic', 'textdomain' ), 356 | 'bold' => __( 'Bold', 'textdomain' ), 357 | 'bold italic' => __( 'Bold Italic', 'textdomain' ) 358 | ); 359 | return apply_filters( 'of_recognized_font_styles', $default ); 360 | } 361 | 362 | /** 363 | * Is a given string a color formatted in hexidecimal notation? 364 | * 365 | * @param string Color in hexidecimal notation. "#" may or may not be prepended to the string. 366 | * @return bool 367 | * 368 | */ 369 | 370 | function of_validate_hex( $hex ) { 371 | $hex = trim( $hex ); 372 | /* Strip recognized prefixes. */ 373 | if ( 0 === strpos( $hex, '#' ) ) { 374 | $hex = substr( $hex, 1 ); 375 | } 376 | elseif ( 0 === strpos( $hex, '%23' ) ) { 377 | $hex = substr( $hex, 3 ); 378 | } 379 | /* Regex match. */ 380 | if ( 0 === preg_match( '/^[0-9a-fA-F]{6}$/', $hex ) ) { 381 | return false; 382 | } 383 | else { 384 | return true; 385 | } 386 | } -------------------------------------------------------------------------------- /static/css/jquery.fancybox.min.css: -------------------------------------------------------------------------------- 1 | body.compensate-for-scrollbar{overflow:hidden}.fancybox-active{height:auto}.fancybox-is-hidden{left:-9999px;margin:0;position:absolute!important;top:-9999px;visibility:hidden}.fancybox-container{-webkit-backface-visibility:hidden;height:100%;left:0;outline:none;position:fixed;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-transform:translateZ(0);transform:translateZ(0);width:100%;z-index:99992}.fancybox-container *{box-sizing:border-box}.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-stage{bottom:0;left:0;position:absolute;right:0;top:0}.fancybox-outer{-webkit-overflow-scrolling:touch;overflow-y:auto}.fancybox-bg{background:#1e1e1e;opacity:0;transition-duration:inherit;transition-property:opacity;transition-timing-function:cubic-bezier(.47,0,.74,.71)}.fancybox-is-open .fancybox-bg{opacity:.9;transition-timing-function:cubic-bezier(.22,.61,.36,1)}.fancybox-caption,.fancybox-infobar,.fancybox-navigation .fancybox-button,.fancybox-toolbar{direction:ltr;opacity:0;position:absolute;transition:opacity .25s ease,visibility 0s ease .25s;visibility:hidden;z-index:99997}.fancybox-show-caption .fancybox-caption,.fancybox-show-infobar .fancybox-infobar,.fancybox-show-nav .fancybox-navigation .fancybox-button,.fancybox-show-toolbar .fancybox-toolbar{opacity:1;transition:opacity .25s ease 0s,visibility 0s ease 0s;visibility:visible}.fancybox-infobar{color:#ccc;font-size:13px;-webkit-font-smoothing:subpixel-antialiased;height:44px;left:0;line-height:44px;min-width:44px;mix-blend-mode:difference;padding:0 10px;pointer-events:none;top:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fancybox-toolbar{right:0;top:0}.fancybox-stage{direction:ltr;overflow:visible;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:99994}.fancybox-is-open .fancybox-stage{overflow:hidden}.fancybox-slide{-webkit-backface-visibility:hidden;display:none;height:100%;left:0;outline:none;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:absolute;text-align:center;top:0;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;white-space:normal;width:100%;z-index:99994}.fancybox-slide:before{content:"";display:inline-block;font-size:0;height:100%;vertical-align:middle;width:0}.fancybox-is-sliding .fancybox-slide,.fancybox-slide--current,.fancybox-slide--next,.fancybox-slide--previous{display:block}.fancybox-slide--image{overflow:hidden;padding:44px 0}.fancybox-slide--image:before{display:none}.fancybox-slide--html{padding:6px}.fancybox-content{background:#fff;display:inline-block;margin:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:relative;text-align:left;vertical-align:middle}.fancybox-slide--image .fancybox-content{-webkit-animation-timing-function:cubic-bezier(.5,0,.14,1);animation-timing-function:cubic-bezier(.5,0,.14,1);-webkit-backface-visibility:hidden;background:transparent;background-repeat:no-repeat;background-size:100% 100%;left:0;max-width:none;overflow:visible;padding:0;position:absolute;top:0;-webkit-transform-origin:top left;transform-origin:top left;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:99995}.fancybox-can-zoomOut .fancybox-content{cursor:zoom-out}.fancybox-can-zoomIn .fancybox-content{cursor:zoom-in}.fancybox-can-pan .fancybox-content,.fancybox-can-swipe .fancybox-content{cursor:-webkit-grab;cursor:grab}.fancybox-is-grabbing .fancybox-content{cursor:-webkit-grabbing;cursor:grabbing}.fancybox-container [data-selectable=true]{cursor:text}.fancybox-image,.fancybox-spaceball{background:transparent;border:0;height:100%;left:0;margin:0;max-height:none;max-width:none;padding:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.fancybox-spaceball{z-index:1}.fancybox-slide--iframe .fancybox-content,.fancybox-slide--map .fancybox-content,.fancybox-slide--pdf .fancybox-content,.fancybox-slide--video .fancybox-content{height:100%;overflow:visible;padding:0;width:100%}.fancybox-slide--video .fancybox-content{background:#000}.fancybox-slide--map .fancybox-content{background:#e5e3df}.fancybox-slide--iframe .fancybox-content{background:#fff}.fancybox-iframe,.fancybox-video{background:transparent;border:0;display:block;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.fancybox-iframe{left:0;position:absolute;top:0}.fancybox-error{background:#fff;cursor:default;max-width:400px;padding:40px;width:100%}.fancybox-error p{color:#444;font-size:16px;line-height:20px;margin:0;padding:0}.fancybox-button{background:rgba(30,30,30,.6);border:0;border-radius:0;box-shadow:none;cursor:pointer;display:inline-block;height:44px;margin:0;padding:10px;position:relative;transition:color .2s;vertical-align:top;visibility:inherit;width:44px}.fancybox-button,.fancybox-button:link,.fancybox-button:visited{color:#ccc}.fancybox-button:hover{color:#fff}.fancybox-button:focus{outline:none}.fancybox-button.fancybox-focus{outline:1px dotted}.fancybox-button[disabled],.fancybox-button[disabled]:hover{color:#888;cursor:default;outline:none}.fancybox-button div{height:100%}.fancybox-button svg{display:block;height:100%;overflow:visible;position:relative;width:100%}.fancybox-button svg path{fill:currentColor;stroke-width:0}.fancybox-button--fsenter svg:nth-child(2),.fancybox-button--fsexit svg:nth-child(1),.fancybox-button--pause svg:nth-child(1),.fancybox-button--play svg:nth-child(2){display:none}.fancybox-progress{background:#ff5268;height:2px;left:0;position:absolute;right:0;top:0;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0;transform-origin:0;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;transition-timing-function:linear;z-index:99998}.fancybox-close-small{background:transparent;border:0;border-radius:0;color:#ccc;cursor:pointer;opacity:.8;padding:8px;position:absolute;right:-12px;top:-44px;z-index:401}.fancybox-close-small:hover{color:#fff;opacity:1}.fancybox-slide--html .fancybox-close-small{color:currentColor;padding:10px;right:0;top:0}.fancybox-slide--image.fancybox-is-scaling .fancybox-content{overflow:hidden}.fancybox-is-scaling .fancybox-close-small,.fancybox-is-zoomable.fancybox-can-pan .fancybox-close-small{display:none}.fancybox-navigation .fancybox-button{background-clip:content-box;height:100px;opacity:0;position:absolute;top:calc(50% - 50px);width:70px}.fancybox-navigation .fancybox-button div{padding:7px}.fancybox-navigation .fancybox-button--arrow_left{left:0;padding:31px 26px 31px 6px}.fancybox-navigation .fancybox-button--arrow_right{padding:31px 6px 31px 26px;right:0}.fancybox-caption{bottom:0;color:#eee;font-size:14px;font-weight:400;left:0;line-height:1.5;padding:25px 44px;right:0;text-align:center;z-index:99996}.fancybox-caption:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAD6CAQAAADKSeXYAAAAYklEQVQoz42RwQ3AMAgDjfcfup8WoRykfBAK5mQHKSz5rbXJPis1hjiV3CIqgG0hLZPkVkA4p4x5oR1bVeDrdCLrW2Q0D5bcwY3TGMHbdw3mPRuOtaspYP1w//G1OIcW148H0DMCqI/3mMMAAAAASUVORK5CYII=);background-repeat:repeat-x;background-size:contain;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:-44px;z-index:-1}.fancybox-caption a,.fancybox-caption a:link,.fancybox-caption a:visited{color:#ccc;text-decoration:none}.fancybox-caption a:hover{color:#fff;text-decoration:underline}.fancybox-loading{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent;border:4px solid #888;border-bottom-color:#fff;border-radius:50%;height:50px;left:50%;margin:-25px 0 0 -25px;opacity:.7;padding:0;position:absolute;top:50%;width:50px;z-index:99999}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fancybox-animated{transition-timing-function:cubic-bezier(0,0,.25,1)}.fancybox-fx-slide.fancybox-slide--previous{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.fancybox-fx-slide.fancybox-slide--next{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.fancybox-fx-slide.fancybox-slide--current{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}.fancybox-fx-fade.fancybox-slide--next,.fancybox-fx-fade.fancybox-slide--previous{opacity:0;transition-timing-function:cubic-bezier(.19,1,.22,1)}.fancybox-fx-fade.fancybox-slide--current{opacity:1}.fancybox-fx-zoom-in-out.fancybox-slide--previous{opacity:0;-webkit-transform:scale3d(1.5,1.5,1.5);transform:scale3d(1.5,1.5,1.5)}.fancybox-fx-zoom-in-out.fancybox-slide--next{opacity:0;-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5)}.fancybox-fx-zoom-in-out.fancybox-slide--current{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}.fancybox-fx-rotate.fancybox-slide--previous{opacity:0;-webkit-transform:rotate(-1turn);transform:rotate(-1turn)}.fancybox-fx-rotate.fancybox-slide--next{opacity:0;-webkit-transform:rotate(1turn);transform:rotate(1turn)}.fancybox-fx-rotate.fancybox-slide--current{opacity:1;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.fancybox-fx-circular.fancybox-slide--previous{opacity:0;-webkit-transform:scale3d(0,0,0) translate3d(-100%,0,0);transform:scale3d(0,0,0) translate3d(-100%,0,0)}.fancybox-fx-circular.fancybox-slide--next{opacity:0;-webkit-transform:scale3d(0,0,0) translate3d(100%,0,0);transform:scale3d(0,0,0) translate3d(100%,0,0)}.fancybox-fx-circular.fancybox-slide--current{opacity:1;-webkit-transform:scaleX(1) translateZ(0);transform:scaleX(1) translateZ(0)}.fancybox-fx-tube.fancybox-slide--previous{-webkit-transform:translate3d(-100%,0,0) scale(.1) skew(-10deg);transform:translate3d(-100%,0,0) scale(.1) skew(-10deg)}.fancybox-fx-tube.fancybox-slide--next{-webkit-transform:translate3d(100%,0,0) scale(.1) skew(10deg);transform:translate3d(100%,0,0) scale(.1) skew(10deg)}.fancybox-fx-tube.fancybox-slide--current{-webkit-transform:translateZ(0) scale(1);transform:translateZ(0) scale(1)}@media (max-height:576px){.fancybox-caption{padding:12px}.fancybox-slide{padding-left:6px;padding-right:6px}.fancybox-slide--image{padding:6px 0}.fancybox-close-small{right:-6px}.fancybox-slide--image .fancybox-close-small{background:#4e4e4e;color:#f2f4f6;height:36px;opacity:1;padding:6px;right:0;top:0;width:36px}}.fancybox-share{background:#f4f4f4;border-radius:3px;max-width:90%;padding:30px;text-align:center}.fancybox-share h1{color:#222;font-size:35px;font-weight:700;margin:0 0 20px}.fancybox-share p{margin:0;padding:0}.fancybox-share__button{border:0;border-radius:3px;display:inline-block;font-size:14px;font-weight:700;line-height:40px;margin:0 5px 10px;min-width:130px;padding:0 15px;text-decoration:none;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.fancybox-share__button:link,.fancybox-share__button:visited{color:#fff}.fancybox-share__button:hover{text-decoration:none}.fancybox-share__button--fb{background:#3b5998}.fancybox-share__button--fb:hover{background:#344e86}.fancybox-share__button--pt{background:#bd081d}.fancybox-share__button--pt:hover{background:#aa0719}.fancybox-share__button--tw{background:#1da1f2}.fancybox-share__button--tw:hover{background:#0d95e8}.fancybox-share__button svg{height:25px;margin-right:7px;position:relative;top:-1px;vertical-align:middle;width:25px}.fancybox-share__button svg path{fill:#fff}.fancybox-share__input{background:transparent;border:0;border-bottom:1px solid #d7d7d7;border-radius:0;color:#5d5b5b;font-size:14px;margin:10px 0 0;outline:none;padding:10px 15px;width:100%}.fancybox-thumbs{background:#ddd;bottom:0;display:none;margin:0;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;padding:2px 2px 4px;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;width:212px;z-index:99995}.fancybox-thumbs-x{overflow-x:auto;overflow-y:hidden}.fancybox-show-thumbs .fancybox-thumbs{display:block}.fancybox-show-thumbs .fancybox-inner{right:212px}.fancybox-thumbs__list{font-size:0;height:100%;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;position:relative;white-space:nowrap;width:100%}.fancybox-thumbs-x .fancybox-thumbs__list{overflow:hidden}.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar{width:7px}.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-track{background:#fff;border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:10px}.fancybox-thumbs__list a{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:rgba(0,0,0,.1);background-position:50%;background-repeat:no-repeat;background-size:cover;cursor:pointer;float:left;height:75px;margin:2px;max-height:calc(100% - 8px);max-width:calc(50% - 4px);outline:none;overflow:hidden;padding:0;position:relative;-webkit-tap-highlight-color:transparent;width:100px}.fancybox-thumbs__list a:before{border:6px solid #ff5268;bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:all .2s cubic-bezier(.25,.46,.45,.94);z-index:99991}.fancybox-thumbs__list a:focus:before{opacity:.5}.fancybox-thumbs__list a.fancybox-thumbs-active:before{opacity:1}@media (max-width:576px){.fancybox-thumbs{width:110px}.fancybox-show-thumbs .fancybox-inner{right:110px}.fancybox-thumbs__list a{max-width:calc(100% - 10px)}} -------------------------------------------------------------------------------- /inc/includes/class-options-interface.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2010-2014 WP Theming 8 | */ 9 | 10 | class Options_Framework_Interface { 11 | 12 | /** 13 | * Generates the tabs that are used in the options menu 14 | */ 15 | static function optionsframework_tabs() { 16 | $counter = 0; 17 | $options = & Options_Framework::_optionsframework_options(); 18 | $menu = ''; 19 | 20 | foreach ( $options as $value ) { 21 | // Heading for Navigation 22 | if ( $value['type'] == "heading" ) { 23 | $counter++; 24 | $class = ''; 25 | $class = ! empty( $value['id'] ) ? $value['id'] : $value['name']; 26 | $class = preg_replace( '/[^a-zA-Z0-9._\-]/', '', strtolower($class) ) . '-tab'; 27 | $menu .= '' . esc_html( $value['name'] ) . ''; 28 | } 29 | } 30 | 31 | return $menu; 32 | } 33 | 34 | /** 35 | * Generates the options fields that are used in the form. 36 | */ 37 | static function optionsframework_fields() { 38 | 39 | global $allowedtags; 40 | $optionsframework_settings = get_option( 'optionsframework' ); 41 | 42 | // Gets the unique option id 43 | if ( isset( $optionsframework_settings['id'] ) ) { 44 | $option_name = $optionsframework_settings['id']; 45 | } 46 | else { 47 | $option_name = 'optionsframework'; 48 | }; 49 | 50 | $settings = get_option($option_name); 51 | $options = & Options_Framework::_optionsframework_options(); 52 | 53 | $counter = 0; 54 | $menu = ''; 55 | 56 | foreach ( $options as $value ) { 57 | 58 | $val = ''; 59 | $select_value = ''; 60 | $output = ''; 61 | 62 | // Wrap all options 63 | if ( ( $value['type'] != "heading" ) && ( $value['type'] != "info" ) ) { 64 | 65 | // Keep all ids lowercase with no spaces 66 | $value['id'] = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($value['id']) ); 67 | 68 | $id = 'section-' . $value['id']; 69 | 70 | $class = 'section'; 71 | if ( isset( $value['type'] ) ) { 72 | $class .= ' section-' . $value['type']; 73 | } 74 | if ( isset( $value['class'] ) ) { 75 | $class .= ' ' . $value['class']; 76 | } 77 | 78 | $output .= '
    '."\n"; 79 | if ( isset( $value['name'] ) ) { 80 | $output .= '

    ' . esc_html( $value['name'] ) . '

    ' . "\n"; 81 | } 82 | if ( $value['type'] != 'editor' ) { 83 | $output .= '
    ' . "\n" . '
    ' . "\n"; 84 | } 85 | else { 86 | $output .= '
    ' . "\n" . '
    ' . "\n"; 87 | } 88 | } 89 | 90 | // Set default value to $val 91 | if ( isset( $value['std'] ) ) { 92 | $val = $value['std']; 93 | } 94 | 95 | // If the option is already saved, override $val 96 | if ( ( $value['type'] != 'heading' ) && ( $value['type'] != 'info') ) { 97 | if ( isset( $settings[($value['id'])]) ) { 98 | $val = $settings[($value['id'])]; 99 | // Striping slashes of non-array options 100 | if ( !is_array($val) ) { 101 | $val = stripslashes( $val ); 102 | } 103 | } 104 | } 105 | 106 | // If there is a description save it for labels 107 | $explain_value = ''; 108 | if ( isset( $value['desc'] ) ) { 109 | $explain_value = $value['desc']; 110 | } 111 | 112 | // Set the placeholder if one exists 113 | $placeholder = ''; 114 | if ( isset( $value['placeholder'] ) ) { 115 | $placeholder = ' placeholder="' . esc_attr( $value['placeholder'] ) . '"'; 116 | } 117 | 118 | if ( has_filter( 'optionsframework_' . $value['type'] ) ) { 119 | $output .= apply_filters( 'optionsframework_' . $value['type'], $option_name, $value, $val ); 120 | } 121 | 122 | 123 | switch ( $value['type'] ) { 124 | 125 | // Basic text input 126 | case 'text': 127 | $output .= ''; 128 | break; 129 | 130 | // Password input 131 | case 'password': 132 | $output .= ''; 133 | break; 134 | 135 | // Textarea 136 | case 'textarea': 137 | $rows = '6'; 138 | 139 | if ( isset( $value['settings']['rows'] ) ) { 140 | $custom_rows = $value['settings']['rows']; 141 | if ( is_numeric( $custom_rows ) ) { 142 | $rows = $custom_rows; 143 | } 144 | } 145 | 146 | $val = stripslashes( $val ); 147 | $output .= ''; 148 | break; 149 | 150 | 151 | // Select Box 152 | case 'select': 153 | $output .= ''; 159 | break; 160 | 161 | // colorradio Selectors 162 | case "colorradio": 163 | $name = $option_name .'['. $value['id'] .']'; 164 | foreach ( $value['options'] as $key=>$key ) { 165 | $selected = ''; 166 | $checked = ''; 167 | if ( $val != '' ) { 168 | if ( $val == $key ) { 169 | $selected = ' optionsframework-radio-img-selected'; 170 | $checked = ' checked="checked"'; 171 | } 172 | } 173 | $output .= ''; 174 | $output .= '
    ' . esc_html( $key ) . '
    '; 175 | $output .= ''; 176 | } 177 | break; 178 | 179 | // Radio Box 180 | case "radio": 181 | $name = $option_name .'['. $value['id'] .']'; 182 | foreach ($value['options'] as $key => $option) { 183 | $id = $option_name . '-' . $value['id'] .'-'. $key; 184 | $output .= ''; 185 | } 186 | break; 187 | 188 | // Image Selectors 189 | case "images": 190 | $name = $option_name .'['. $value['id'] .']'; 191 | foreach ( $value['options'] as $key => $option ) { 192 | $selected = ''; 193 | if ( $val != '' && ($val == $key) ) { 194 | $selected = ' of-radio-img-selected'; 195 | } 196 | $output .= ''; 197 | $output .= '
    ' . esc_html( $key ) . '
    '; 198 | $output .= '' .$option .''; 199 | } 200 | break; 201 | 202 | 203 | 204 | // Checkbox 205 | case "checkbox": 206 | 207 | $output .= ''; 208 | $output .= '
    '; 209 | $output .= '
    ' . wp_kses( $explain_value, $allowedtags ) . '
    '."\n"; 210 | break; 211 | 212 | // Multicheck 213 | case "multicheck": 214 | foreach ($value['options'] as $key => $option) { 215 | $checked = ''; 216 | $label = $option; 217 | $option = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($key)); 218 | 219 | $id = $option_name . '-' . $value['id'] . '-'. $option; 220 | $name = $option_name . '[' . $value['id'] . '][' . $option .']'; 221 | 222 | if ( isset($val[$option]) ) { 223 | $checked = checked($val[$option], 1, false); 224 | } 225 | 226 | $output .= ''; 227 | } 228 | break; 229 | 230 | // Color picker 231 | case "color": 232 | $default_color = ''; 233 | if ( isset($value['std']) ) { 234 | if ( $val != $value['std'] ) 235 | $default_color = ' data-default-color="' .$value['std'] . '" '; 236 | } 237 | $output .= ''; 238 | 239 | break; 240 | 241 | // Uploader 242 | case "upload": 243 | $output .= Options_Framework_Media_Uploader::optionsframework_uploader( $value['id'], $val, null ); 244 | 245 | break; 246 | 247 | // Typography 248 | case 'typography': 249 | 250 | unset( $font_size, $font_style, $font_face, $font_color ); 251 | 252 | $typography_defaults = array( 253 | 'size' => '', 254 | 'face' => '', 255 | 'style' => '', 256 | 'color' => '' 257 | ); 258 | 259 | $typography_stored = wp_parse_args( $val, $typography_defaults ); 260 | 261 | $typography_options = array( 262 | 'sizes' => of_recognized_font_sizes(), 263 | 'faces' => of_recognized_font_faces(), 264 | 'styles' => of_recognized_font_styles(), 265 | 'color' => true 266 | ); 267 | 268 | if ( isset( $value['options'] ) ) { 269 | $typography_options = wp_parse_args( $value['options'], $typography_options ); 270 | } 271 | 272 | // Font Size 273 | if ( $typography_options['sizes'] ) { 274 | $font_size = ''; 281 | } 282 | 283 | // Font Face 284 | if ( $typography_options['faces'] ) { 285 | $font_face = ''; 291 | } 292 | 293 | // Font Styles 294 | if ( $typography_options['styles'] ) { 295 | $font_style = ''; 301 | } 302 | 303 | // Font Color 304 | if ( $typography_options['color'] ) { 305 | $default_color = ''; 306 | if ( isset($value['std']['color']) ) { 307 | if ( $val != $value['std']['color'] ) 308 | $default_color = ' data-default-color="' .$value['std']['color'] . '" '; 309 | } 310 | $font_color = ''; 311 | } 312 | 313 | // Allow modification/injection of typography fields 314 | $typography_fields = compact( 'font_size', 'font_face', 'font_style', 'font_color' ); 315 | $typography_fields = apply_filters( 'of_typography_fields', $typography_fields, $typography_stored, $option_name, $value ); 316 | $output .= implode( '', $typography_fields ); 317 | 318 | break; 319 | 320 | // Background 321 | case 'background': 322 | 323 | $background = $val; 324 | 325 | // Background Color 326 | $default_color = ''; 327 | if ( isset( $value['std']['color'] ) ) { 328 | if ( $val != $value['std']['color'] ) 329 | $default_color = ' data-default-color="' .$value['std']['color'] . '" '; 330 | } 331 | $output .= ''; 332 | 333 | // Background Image 334 | if ( !isset($background['image']) ) { 335 | $background['image'] = ''; 336 | } 337 | 338 | $output .= Options_Framework_Media_Uploader::optionsframework_uploader( $value['id'], $background['image'], null, esc_attr( $option_name . '[' . $value['id'] . '][image]' ) ); 339 | 340 | $class = 'of-background-properties'; 341 | if ( '' == $background['image'] ) { 342 | $class .= ' hide'; 343 | } 344 | $output .= '
    '; 345 | 346 | // Background Repeat 347 | $output .= ''; 354 | 355 | // Background Position 356 | $output .= ''; 363 | 364 | // Background Attachment 365 | $output .= ''; 372 | $output .= '
    '; 373 | 374 | break; 375 | 376 | // Editor 377 | case 'editor': 378 | $output .= '
    ' . wp_kses( $explain_value, $allowedtags ) . '
    '."\n"; 379 | echo $output; 380 | $textarea_name = esc_attr( $option_name . '[' . $value['id'] . ']' ); 381 | $default_editor_settings = array( 382 | 'textarea_name' => $textarea_name, 383 | 'media_buttons' => false, 384 | 'tinymce' => array( 'plugins' => 'wordpress' ) 385 | ); 386 | $editor_settings = array(); 387 | if ( isset( $value['settings'] ) ) { 388 | $editor_settings = $value['settings']; 389 | } 390 | $editor_settings = array_merge( $default_editor_settings, $editor_settings ); 391 | wp_editor( $val, $value['id'], $editor_settings ); 392 | $output = ''; 393 | break; 394 | 395 | // Info 396 | case "info": 397 | $id = ''; 398 | $class = 'section'; 399 | if ( isset( $value['id'] ) ) { 400 | $id = 'id="' . esc_attr( $value['id'] ) . '" '; 401 | } 402 | if ( isset( $value['type'] ) ) { 403 | $class .= ' section-' . $value['type']; 404 | } 405 | if ( isset( $value['class'] ) ) { 406 | $class .= ' ' . $value['class']; 407 | } 408 | 409 | $output .= '
    ' . "\n"; 410 | if ( isset($value['name']) ) { 411 | $output .= '

    ' . esc_html( $value['name'] ) . '

    ' . "\n"; 412 | } 413 | if ( isset( $value['desc'] ) ) { 414 | $output .= apply_filters('of_sanitize_info', $value['desc'] ) . "\n"; 415 | } 416 | $output .= '
    ' . "\n"; 417 | break; 418 | 419 | // Heading for Navigation 420 | case "heading": 421 | $counter++; 422 | if ( $counter >= 2 ) { 423 | $output .= '
    '."\n"; 424 | } 425 | $class = ''; 426 | $class = ! empty( $value['id'] ) ? $value['id'] : $value['name']; 427 | $class = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($class) ); 428 | 429 | $output .= '
    '; 430 | $output .= '

    ' . esc_html( $value['name'] ) . '

    ' . "\n"; 431 | 432 | break; 433 | } 434 | 435 | if ( ( $value['type'] != "heading" ) && ( $value['type'] != "info" ) ) { 436 | $output .= '
    '; 437 | if ( ( $value['type'] != "checkbox" ) && ( $value['type'] != "editor" ) ) { 438 | $output .= '
    ' . wp_kses( $explain_value, $allowedtags) . '
    '."\n"; 439 | } 440 | $output .= '
    '."\n"; 441 | } 442 | 443 | echo $output; 444 | } 445 | 446 | // Outputs closing div if there tabs 447 | if ( Options_Framework_Interface::optionsframework_tabs() != '' ) { 448 | echo '
    '; 449 | } 450 | } 451 | 452 | } -------------------------------------------------------------------------------- /static/js/main.js: -------------------------------------------------------------------------------- 1 | $(window).ready(function(){ 2 | var ajaxhome = document.domain; 3 | var ajaxcontent = 'ajax-content'; 4 | var ajaxsearch_class = 'searchform'; 5 | var ajaxignore_string = new String('#, /wp-, .pdf, .zip, .rar, /goto'); 6 | var ajaxignore = ajaxignore_string.split(', '); 7 | var ajaxloading_code = '
    '; 8 | var ajaxloading_error_code = 'error'; 9 | var ajaxreloadDocumentReady = false; 10 | var ajaxtrack_analytics = false; 11 | var ajaxscroll_top = true; 12 | var ajaxisLoad = false; 13 | var ajaxstarted = false; 14 | var ajaxsearchPath = null; 15 | var ajaxua = jQuery.browser; 16 | jQuery(document).ready(function() { 17 | ajaxloadPageInit(""); 18 | }); 19 | window.onpopstate = function(event) { 20 | if (ajaxstarted === true && ajaxcheck_ignore(document.location.toString()) == true) { 21 | ajaxloadPage(document.location.toString(), 1); 22 | } 23 | }; 24 | 25 | function ajaxloadPageInit(scope) { 26 | jQuery(scope + "a").click(function(event) { 27 | if (this.href.indexOf(ajaxhome) >= 0 && ajaxcheck_ignore(this.href) == true) { 28 | event.preventDefault(); 29 | this.blur(); 30 | var caption = this.title || this.name || ""; 31 | var group = this.rel || false; 32 | try { 33 | ajaxclick_code(this); 34 | } catch (err) { 35 | console.log(err) 36 | } 37 | ajaxloadPage(this.href); 38 | } 39 | }); 40 | jQuery('.' + ajaxsearch_class).each(function(index) { 41 | if (jQuery(this).attr("action")) { 42 | ajaxsearchPath = jQuery(this).attr("action");; 43 | jQuery(this).submit(function() { 44 | submitSearch(jQuery(this).serialize()); 45 | return false; 46 | }); 47 | } 48 | }); 49 | if (jQuery('.' + ajaxsearch_class).attr("action")) {} else {} 50 | } 51 | 52 | function ajaxloadPage(url, push, getData) { 53 | if (!ajaxisLoad) { 54 | if (ajaxscroll_top == true) { 55 | jQuery('html,body').animate({ scrollTop: 0 }, 500); 56 | } 57 | ajaxisLoad = true; 58 | ajaxstarted = true; 59 | nohttp = url.replace("http://", "").replace("https://", ""); 60 | firstsla = nohttp.indexOf("/"); 61 | pathpos = url.indexOf(nohttp); 62 | path = url.substring(pathpos + firstsla); 63 | if (push != 1) { 64 | if (typeof window.history.pushState == "function") { 65 | var stateObj = { foo: 1000 + Math.random() * 1001 }; 66 | history.pushState(stateObj, "ajax page loaded...", path); 67 | } else {} 68 | } 69 | if (!jQuery('#' + ajaxcontent)) {} 70 | jQuery('#' + ajaxcontent).append(ajaxloading_code); 71 | jQuery('#' + ajaxcontent).fadeTo("slow", 0.4, function() { 72 | jQuery('#' + ajaxcontent).fadeIn("slow", function() { 73 | jQuery.ajax({ 74 | type: "GET", 75 | url: url, 76 | data: getData, 77 | cache: false, 78 | dataType: "html", 79 | success: function(data) { 80 | ajaxisLoad = false; 81 | datax = data.split(''); 82 | titlesx = data.split(''); 83 | if (datax.length == 2 || titlesx.length == 2) { 84 | data = data.split('')[1]; 85 | titles = data.split('')[0]; 86 | jQuery(document).attr('title', (jQuery("
    ").html(titles).text())); 87 | } else {} 88 | if (ajaxtrack_analytics == true) { 89 | if (typeof _gaq != "undefined") { 90 | if (typeof getData == "undefined") { 91 | getData = ""; 92 | } else { 93 | getData = "?" + getData; 94 | } 95 | _gaq.push(['_trackPageview', path + getData]); 96 | } 97 | } 98 | data = data.split('id="' + ajaxcontent + '"')[1]; 99 | data = data.substring(data.indexOf('>') + 1); 100 | var depth = 1; 101 | var output = ''; 102 | while (depth > 0) { 103 | temp = data.split('
    ')[0]; 104 | i = 0; 105 | pos = temp.indexOf("')[0] + '
    '; 112 | data = data.substring(data.indexOf('
    ') + 6); 113 | } 114 | document.getElementById(ajaxcontent).innerHTML = output; 115 | jQuery('#' + ajaxcontent).css("position", "absolute"); 116 | jQuery('#' + ajaxcontent).css("left", "20000px"); 117 | jQuery('#' + ajaxcontent).show(); 118 | ajaxloadPageInit("#" + ajaxcontent + " "); 119 | if (ajaxreloadDocumentReady == true) { 120 | jQuery(document).trigger("ready"); 121 | } 122 | try { 123 | ajaxreload_code(); 124 | } catch (err) {} 125 | jQuery('#' + ajaxcontent).hide(); 126 | jQuery('#' + ajaxcontent).css("position", ""); 127 | jQuery('#' + ajaxcontent).css("left", ""); 128 | jQuery('#' + ajaxcontent).fadeTo("slow", 1, function() {}); 129 | }, 130 | error: function(jqXHR, textStatus, errorThrown) { 131 | ajaxisLoad = false; 132 | document.title = "Error loading requested page!"; 133 | document.getElementById(ajaxcontent).innerHTML = ajaxloading_error_code; 134 | } 135 | }); 136 | }); 137 | }); 138 | } 139 | } 140 | 141 | function submitSearch(param) { 142 | if (!ajaxisLoad) { 143 | ajaxloadPage(ajaxsearchPath, 0, param); 144 | } 145 | } 146 | 147 | function ajaxcheck_ignore(url) { 148 | for (var i in ajaxignore) { 149 | if (url.indexOf(ajaxignore[i]) >= 0) { 150 | return false; 151 | } 152 | } 153 | return true; 154 | } 155 | 156 | function ajaxreload_code() { 157 | lody() 158 | } 159 | 160 | function ajaxclick_code(thiss) { 161 | jQuery('ul.nav li').each(function() { 162 | jQuery(this).removeClass('current-menu-item'); 163 | }); 164 | jQuery(thiss).parents('li').addClass('current-menu-item'); 165 | } 166 | 167 | 168 | function lody() { 169 | 170 | // FancyBox 171 | $(document).ready(function() { 172 | $(".fancybox").fancybox(); 173 | POWERMODE.colorful = true; // make power mode colorful 174 | POWERMODE.shake = false; // turn off shake 175 | document.body.addEventListener('input', POWERMODE); 176 | $('pre code').each(function(i, block) { 177 | hljs.highlightBlock(block); 178 | }); 179 | $(window).scroll(function() { 180 | var height = $(window).height(); 181 | var scrollTop = $(window).scrollTop(); 182 | var scrollPercent = Math.round((scrollTop) / ($(document).height() - height) * 100); 183 | $("#scroll-percent").text(scrollPercent + "%"); 184 | if (scrollTop > height) { 185 | $(".back-to-top").addClass("back-to-top-on"); 186 | } else { 187 | $(".back-to-top").removeClass("back-to-top-on"); 188 | } 189 | 190 | }); 191 | 192 | 193 | $('.back-to-top').click(function() { 194 | $('body,html').animate({ 195 | scrollTop: '0px' 196 | }, 1000); 197 | }); 198 | 199 | }); 200 | 201 | $(function() { 202 | // // ajax翻页 203 | // $('.section-load-more > a').on('click', function() { 204 | // let this_url = this.href 205 | // $.ajax({ 206 | // type: "GET", 207 | // url: this_url, 208 | // dataType: "html", 209 | // success: function(response) { 210 | // let new_post = $(response).find('.post-card'), 211 | // new_next_url = $(response).find('.section-load-more > a').attr('href'); 212 | // $('.post-feed').append(new_post.fadeIn(3000)); 213 | // if (new_next_url != undefined) { 214 | // $('.section-load-more > a').attr('href', new_next_url); 215 | // } else { 216 | // $('.section-load-more > a').hide(); 217 | // } 218 | // }, 219 | // error: function(error) { 220 | // console.log(error); 221 | // } 222 | // }); 223 | // return false 224 | // }) 225 | 226 | 227 | // 评论框收缩 228 | if ($('#toggle-comment-author-info').length) { 229 | $('#comment-author-info').hide(); 230 | } 231 | $('#toggle-comment-author-info').on('click', function() { 232 | var changeMsg = "[ 资料修改 ]"; 233 | var closeMsg = "[ 收起来 ]"; 234 | $('#comment-author-info').slideToggle('slow', function() { 235 | if ($('#comment-author-info').css('display') == 'none') { 236 | $('#toggle-comment-author-info').html(changeMsg); 237 | } else { 238 | $('#toggle-comment-author-info').html(closeMsg); 239 | } 240 | }); 241 | return false 242 | }) 243 | 244 | // Enter 监听 245 | $(document).keypress(function(e) { 246 | if (e.ctrlKey && e.which == 13 || e.which == 10) { 247 | $("#submit").click(); 248 | document.body.focus(); 249 | } else if (e.shiftKey && e.which == 13 || e.which == 10) { 250 | $("#submit").click(); 251 | } 252 | }) 253 | // ajax评论分页 254 | comAjax() 255 | 256 | function comAjax() { 257 | var com_nav = $('#comments-navi'), 258 | com_nav_but = $('#comments-navi > a'), 259 | com_list = $('.commentlist'), 260 | loading = $('#loading-comments'); 261 | com_nav_but.on('click', function() { 262 | $.ajax({ 263 | url: $(this).attr('href'), 264 | type: 'GET', 265 | dataType: 'html', 266 | beforeSend: function() { 267 | loading.show(); 268 | com_list.fadeOut(300); 269 | com_nav.remove(); 270 | }, 271 | success: function(data) { 272 | loading.hide(); 273 | var new_list = $(data).find('.commentlist'), 274 | new_nav = $(data).find('#comments-navi'); 275 | loading.after(new_list.fadeIn(300)); 276 | new_list.after(new_nav.fadeIn(300)); 277 | comAjax(); 278 | $(document).scrollTop($('.comment-box').offset().top) 279 | } 280 | }) 281 | 282 | return false; 283 | }) 284 | } 285 | }) 286 | 287 | 288 | 289 | // ajax评论 290 | 291 | var $commentform = jQuery('#commentform'), 292 | $comments = jQuery('#comments-title'), 293 | $cancel = jQuery('#cancel-comment-reply-link'), 294 | cancel_text = "取消回复"; 295 | jQuery('#comment').after(''); 296 | jQuery('#commentform').on("submit", function(e) { 297 | jQuery('#comment_message').slideDown().html("

    评论提交中....

    "); 298 | jQuery('#submit').addClass("disabled").val("发表评论").attr("disabled", "disabled"); 299 | jQuery.ajax({ 300 | url: stayma_url.url_ajax, 301 | data: jQuery(this).serialize() + "&action=ajax_comment", 302 | type: jQuery(this).attr('method'), 303 | error: function(request) { 304 | jQuery('#comment_message').addClass('comt-error').html(request.responseText); 305 | setTimeout("jQuery('#submit').removeClass('disabled').val('发表评论').attr('disabled',false)", 2000); 306 | setTimeout("jQuery('#comment_message').slideUp()", 2000); 307 | setTimeout("jQuery('#comment_message').removeClass('comt-error')", 3000); 308 | }, 309 | success: function(data) { 310 | jQuery('textarea').each(function() { 311 | this.value = '' 312 | }); 313 | var t = addComment, 314 | cancel = t.I('cancel-comment-reply-link'), 315 | temp = t.I('wp-temp-form-div'), 316 | respond = t.I(t.respondId), 317 | post = t.I('comment_post_ID').value, 318 | parent = t.I('comment_parent').value; 319 | if (parent != '0') { 320 | jQuery('#respond').before('
      ' + data + '
    '); 321 | } else if (jQuery('.commentlist').length != '0') { 322 | jQuery('.commentlist').append(data); 323 | //jQuery('#respond').before('
      ' + data + '
    ');//comment-list is your comments wrapper,check your container ul or ol 324 | } else { 325 | jQuery('.commentlist').append(data); // your comments wrapper 326 | } 327 | 328 | jQuery('#comment_message').html("

    评论提交成功

    "); 329 | setTimeout("jQuery('#submit').removeClass('disabled').val('发表评论').attr('disabled',false)", 2000); 330 | setTimeout("jQuery('#comment_message').slideUp()", 2000); 331 | cancel.style.display = 'none'; 332 | cancel.onclick = null; 333 | t.I('comment_parent').value = '0'; 334 | if (temp && respond) { 335 | temp.parentNode.insertBefore(respond, temp); 336 | temp.parentNode.removeChild(temp) 337 | } 338 | } 339 | }); 340 | return false; 341 | }); 342 | addComment = { 343 | moveForm: function(commId, parentId, respondId) { 344 | var t = this, 345 | div, 346 | comm = t.I(commId), 347 | respond = t.I(respondId), 348 | cancel = t.I('cancel-comment-reply-link'), 349 | parent = t.I('comment_parent'), 350 | post = t.I('comment_post_ID'); 351 | $cancel.text(cancel_text); 352 | t.respondId = respondId; 353 | if (!t.I('wp-temp-form-div')) { 354 | div = document.createElement('div'); 355 | div.id = 'wp-temp-form-div'; 356 | div.style.display = 'none'; 357 | respond.parentNode.insertBefore(div, respond) 358 | }!comm ? (temp = t.I('wp-temp-form-div'), t.I('comment_parent').value = '0', temp.parentNode.insertBefore(respond, temp), temp.parentNode.removeChild(temp)) : comm.parentNode.insertBefore(respond, comm.nextSibling); 359 | jQuery("body").animate({ 360 | scrollTop: jQuery('#respond').offset().top - 180 361 | }, 362 | 400); 363 | parent.value = parentId; 364 | cancel.style.display = ''; 365 | cancel.onclick = function() { 366 | var t = addComment, 367 | temp = t.I('wp-temp-form-div'), 368 | respond = t.I(t.respondId); 369 | t.I('comment_parent').value = '0'; 370 | if (temp && respond) { 371 | temp.parentNode.insertBefore(respond, temp); 372 | temp.parentNode.removeChild(temp); 373 | } 374 | this.style.display = 'none'; 375 | this.onclick = null; 376 | return false; 377 | }; 378 | try { 379 | t.I('comment').focus(); 380 | } catch (e) {} 381 | return false; 382 | }, 383 | I: function(e) { 384 | return document.getElementById(e); 385 | } 386 | }; 387 | 388 | if ($('.post-full-title').length != 0) { 389 | // Start fitVids 390 | var $postContent = $(".post-full-content"); 391 | $postContent.fitVids(); 392 | // End fitVids 393 | 394 | var progressBar = document.querySelector('#reading-progress'); 395 | var header = document.querySelector('.floating-header'); 396 | var title = document.querySelector('.post-full-title'); 397 | 398 | var lastScrollY = window.scrollY; 399 | var lastWindowHeight = window.innerHeight; 400 | var lastDocumentHeight = $(document).height(); 401 | var ticking = false; 402 | 403 | function onScroll() { 404 | lastScrollY = window.scrollY; 405 | requestTick(); 406 | } 407 | 408 | function onResize() { 409 | lastWindowHeight = window.innerHeight; 410 | lastDocumentHeight = $(document).height(); 411 | requestTick(); 412 | } 413 | 414 | function requestTick() { 415 | if (!ticking) { 416 | requestAnimationFrame(update); 417 | } 418 | ticking = true; 419 | } 420 | 421 | function update() { 422 | var trigger = title.getBoundingClientRect().top + window.scrollY; 423 | var triggerOffset = title.offsetHeight + 35; 424 | var progressMax = lastDocumentHeight - lastWindowHeight; 425 | 426 | // show/hide floating header 427 | if (lastScrollY >= trigger + triggerOffset) { 428 | header.classList.add('floating-active'); 429 | } else { 430 | header.classList.remove('floating-active'); 431 | } 432 | 433 | progressBar.setAttribute('max', progressMax); 434 | progressBar.setAttribute('value', lastScrollY); 435 | 436 | ticking = false; 437 | } 438 | 439 | window.addEventListener('scroll', onScroll, { 440 | passive: true 441 | }); 442 | window.addEventListener('resize', onResize, false); 443 | 444 | update(); 445 | 446 | } 447 | 448 | } 449 | 450 | lody(); 451 | console.log("%c 本主题来源于: %c stayma.cn %c STAYMA 博客", "color:red","","color:orange;font-weight:bold") 452 | 453 | 454 | }) -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: GitGhost 3 | Theme URI: https://stayma.cn 4 | Description: 哒哒哒~~~ 5 | Version: 1.0.1 6 | Author: STAYMA 7 | Author URI: https://stayma.cn 8 | Tags: GitGhost,Minimalism,Responsive,Ajax,Write,Free 9 | License: GNU General Public License v2 or later 10 | License URI: https://www.stayma.cn/Get-Ghost-Theme.html 11 | */ 12 | 13 | .copyright { 14 | text-align: center 15 | } 16 | 17 | #default-loading { 18 | position: fixed; 19 | width: 100%; 20 | height: 100%; 21 | top: 0; 22 | left: 0; 23 | background-color: #eaeaea; 24 | z-index: 9999999999; 25 | -kthml-opacity: 1; 26 | -moz-opacity: 1; 27 | opacity: 1; 28 | -webkit-transition: .2s; 29 | -moz-transition: .2s; 30 | -o-transition: .2s; 31 | transition: .2s; 32 | pointer-events: none; 33 | visibility: visible; 34 | } 35 | 36 | #default-loading.all-aboard { 37 | -webkit-transition: .4s; 38 | -moz-transition: .4s; 39 | -o-transition: .4s; 40 | transition: .4s; 41 | -kthml-opacity: 0; 42 | -moz-opacity: 0; 43 | opacity: 1; 44 | } 45 | 46 | #default-loading:before { 47 | content: ""; 48 | position: absolute; 49 | top: 0; 50 | right: 0; 51 | bottom: 0; 52 | left: 0; 53 | border: solid 3px rgba(0,0,0, 0.3); 54 | border-top-color: #000000; 55 | margin: auto; 56 | width: 24px; 57 | height: 24px; 58 | -webkit-border-radius: 100%; 59 | -moz-border-radius: 100%; 60 | -o-border-radius: 100%; 61 | border-radius: 100%; 62 | -webkit-animation: loading .6s infinite linear; 63 | -moz-animation: loading .6s infinite linear; 64 | -o-animation: loading .6s infinite linear; 65 | animation: loading .6s infinite linear; 66 | } 67 | 68 | @-webkit-keyframes loading { 69 | 100% { 70 | -webkit-transform: rotate(360deg); 71 | -moz-transform: rotate(360deg); 72 | -ms-transform: rotate(360deg); 73 | -o-transform: rotate(360deg); 74 | transform: rotate(360deg) 75 | } 76 | } 77 | 78 | @-moz-keyframes loading { 79 | 100% { 80 | -webkit-transform: rotate(360deg); 81 | -moz-transform: rotate(360deg); 82 | -ms-transform: rotate(360deg); 83 | -o-transform: rotate(360deg); 84 | transform: rotate(360deg) 85 | } 86 | } 87 | 88 | @-o-keyframes loading { 89 | 100% { 90 | -webkit-transform: rotate(360deg); 91 | -moz-transform: rotate(360deg); 92 | -ms-transform: rotate(360deg); 93 | -o-transform: rotate(360deg); 94 | transform: rotate(360deg) 95 | } 96 | } 97 | 98 | @keyframes loading { 99 | 100% { 100 | -webkit-transform: rotate(360deg); 101 | -moz-transform: rotate(360deg); 102 | -ms-transform: rotate(360deg); 103 | -o-transform: rotate(360deg); 104 | transform: rotate(360deg) 105 | } 106 | } 107 | 108 | /* 文章页面内容样式 */ 109 | 110 | .post-full-content { 111 | position: relative; 112 | margin: 0 auto; 113 | padding: 40px 60px 50px; 114 | min-height: 230px; 115 | font-size: 2.2rem; 116 | line-height: 1.6em; 117 | box-shadow: 0px 14px 38px rgba(39, 44, 49, .06), 1px 3px 8px rgba(39, 44, 49, .03); 118 | background: #fff; 119 | } 120 | 121 | @media (max-width:1170px) { 122 | .post-full-content { 123 | padding: 5vw 7vw 0 124 | } 125 | } 126 | 127 | @media (max-width:800px) { 128 | .post-full-content { 129 | font-size: 1.9rem 130 | } 131 | } 132 | 133 | .post-full-content:before { 134 | left: -5px; 135 | transform: rotate(-5deg) 136 | } 137 | 138 | .post-full-content:after, 139 | .post-full-content:before { 140 | content: ""; 141 | position: absolute; 142 | top: 15px; 143 | z-index: -1; 144 | display: block; 145 | width: 20px; 146 | height: 200px; 147 | background: rgba(39, 44, 49, .15); 148 | filter: blur(5px) 149 | } 150 | 151 | .post-full-content:after { 152 | right: -5px; 153 | transform: rotate(5deg) 154 | } 155 | 156 | .footnotes, 157 | .post-full-comments, 158 | .post-full-content blockquote, 159 | .post-full-content dl, 160 | .post-full-content h1, 161 | .post-full-content h2, 162 | .post-full-content h3, 163 | .post-full-content h4, 164 | .post-full-content h5, 165 | .post-full-content h6, 166 | .post-full-content ol, 167 | .post-full-content p, 168 | .post-full-content pre, 169 | .post-full-content ul { 170 | min-width: 100% 171 | } 172 | 173 | .post-full-content li { 174 | word-break: break-word 175 | } 176 | 177 | .post-full-content li p { 178 | margin: 0 179 | } 180 | 181 | .post-full-content a { 182 | color: #000; 183 | word-break: break-word; 184 | box-shadow: inset 0 -1px 0 #3eb0ef; 185 | text-decoration: none; 186 | } 187 | 188 | .post-full-content em, 189 | .post-full-content strong { 190 | color: #090a0b 191 | } 192 | 193 | .post-full-content small { 194 | display: inline-block; 195 | line-height: 1.6em 196 | } 197 | 198 | .post-full-content li:first-child { 199 | margin-top: 0 200 | } 201 | 202 | .post-full-content img, 203 | .post-full-content video { 204 | display: block; 205 | margin: 1.5em auto; 206 | max-width: 100%; 207 | height: auto 208 | } 209 | 210 | .post-full-content img { 211 | box-shadow: rgba(0, 0, 0, 0.5) 0 0.625rem 1.125rem; 212 | -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0.625rem 1.125rem; 213 | } 214 | 215 | .post-full-content pre { 216 | max-width: 100%; 217 | } 218 | 219 | .post-full-content pre code { 220 | padding: 17px; 221 | word-break: break-all; 222 | } 223 | 224 | code { 225 | padding: 2px 4px; 226 | font-size: 13px; 227 | color: #c7254e; 228 | background-color: #f9f2f4; 229 | border-radius: 3px; 230 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 231 | } 232 | 233 | @media (max-width:1040px) { 234 | 235 | .post-full-content img, 236 | .post-full-content video { 237 | width: 100% 238 | } 239 | } 240 | 241 | .post-full-content img[src$="#full"] { 242 | max-width: none; 243 | width: 100vw 244 | } 245 | 246 | .post-full-content img+br+small { 247 | display: block; 248 | margin-top: -3em; 249 | margin-bottom: 1.5em; 250 | text-align: center 251 | } 252 | 253 | .post-full-content iframe { 254 | margin: 0 auto !important 255 | } 256 | 257 | .post-full-content blockquote { 258 | margin: 0 0 1.5em; 259 | padding: 0 1.5em; 260 | border-left: 3px solid #3eb0ef 261 | } 262 | 263 | .post-full-content blockquote p { 264 | margin: 0 0 1em; 265 | color: inherit; 266 | font-size: inherit; 267 | line-height: inherit; 268 | font-style: italic 269 | } 270 | 271 | .post-full-content blockquote p:last-child { 272 | margin-bottom: 0 273 | } 274 | 275 | .post-full-content .fluid-width-video-wrapper { 276 | margin: 1.5em 0 3em 277 | } 278 | 279 | .post-full-content hr { 280 | margin: 4vw 0 281 | } 282 | 283 | .post-full-content hr:after { 284 | content: ""; 285 | position: absolute; 286 | top: -15px; 287 | left: 50%; 288 | display: block; 289 | margin-left: -10px; 290 | width: 1px; 291 | height: 30px; 292 | background: #e3e9ed; 293 | box-shadow: 0 0 0 5px #fff; 294 | transform: rotate(45deg) 295 | } 296 | 297 | .post-full-content h1, 298 | .post-full-content h2, 299 | .post-full-content h3, 300 | .post-full-content h4, 301 | .post-full-content h5, 302 | .post-full-content h6 { 303 | color: #090a0b; 304 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, sans-serif 305 | } 306 | 307 | .post-full-content h1 { 308 | margin: .5em 0 .2em; 309 | font-size: 4.6rem; 310 | font-weight: 700 311 | } 312 | 313 | @media (max-width:500px) { 314 | .post-full-content h1 { 315 | font-size: 2.8rem 316 | } 317 | } 318 | 319 | .post-full-content h2 { 320 | margin: .5em 0 .2em; 321 | font-size: 3.6rem; 322 | font-weight: 700 323 | } 324 | 325 | @media (max-width:500px) { 326 | .post-full-content h2 { 327 | font-size: 2.6rem 328 | } 329 | } 330 | 331 | .post-full-content h3 { 332 | margin: .5em 0 .2em; 333 | font-size: 2.8rem; 334 | font-weight: 700 335 | } 336 | 337 | @media (max-width:500px) { 338 | .post-full-content h3 { 339 | font-size: 2.2rem 340 | } 341 | } 342 | 343 | .post-full-content h4 { 344 | margin: .5em 0 .2em; 345 | font-size: 2.8rem; 346 | font-weight: 700 347 | } 348 | 349 | @media (max-width:500px) { 350 | .post-full-content h4 { 351 | font-size: 2.2rem 352 | } 353 | } 354 | 355 | .post-full-content h5 { 356 | display: block; 357 | margin: .5em 0; 358 | padding: 1em 0 1.5em; 359 | border: 0; 360 | color: #3eb0ef; 361 | font-family: Georgia, serif; 362 | font-size: 3.2rem; 363 | line-height: 1.35em; 364 | text-align: center 365 | } 366 | 367 | @media (min-width:1180px) { 368 | .post-full-content h5 { 369 | max-width: 1060px; 370 | width: 100vw 371 | } 372 | } 373 | 374 | @media (max-width:500px) { 375 | .post-full-content h5 { 376 | padding: 0 0 .5em; 377 | font-size: 2.2rem 378 | } 379 | } 380 | 381 | .post-full-content h6 { 382 | margin: .5em 0 .2em; 383 | font-size: 2.3rem; 384 | font-weight: 700 385 | } 386 | 387 | @media (max-width:500px) { 388 | .post-full-content h6 { 389 | font-size: 2rem 390 | } 391 | } 392 | 393 | .post-content { 394 | display: -ms-flexbox; 395 | display: flex; 396 | -ms-flex-direction: column; 397 | flex-direction: column; 398 | -ms-flex-align: center; 399 | align-items: center; 400 | max-width: 100%; 401 | font-family: '微软雅黑'; 402 | font-size: 16px; 403 | line-height: 1.32; 404 | overflow: hidden; 405 | } 406 | 407 | .post-content div { 408 | max-width: 100% 409 | } 410 | 411 | .post-content #sc-notice { 412 | color: #42B983; 413 | border: 1px solid #42B983; 414 | overflow: hidden; 415 | margin: 10px 0; 416 | width: 100%; 417 | padding: 15px 15px 15px 35px; 418 | } 419 | 420 | .post-content #sc-error { 421 | color: #FF7D7D; 422 | border: 1px solid #FF7D7D; 423 | overflow: hidden; 424 | margin: 10px 0; 425 | padding: 15px 15px 15px 35px; 426 | width: 100%; 427 | } 428 | 429 | .post-content #sc-warn { 430 | color: #FFBE5B; 431 | border: 1px solid#FFBE5B; 432 | overflow: hidden; 433 | margin: 10px 0; 434 | width: 100%; 435 | padding: 15px 15px 15px 35px; 436 | } 437 | 438 | .post-content #sc-tips { 439 | color: #2B394E; 440 | border: 1px solid#2B394E; 441 | overflow: hidden; 442 | margin: 10px 0; 443 | width: 100%; 444 | padding: 15px 15px 15px 35px; 445 | } 446 | 447 | .post-content #sc-blue { 448 | color: #1BA1E2; 449 | border: 1px solid#1BA1E2; 450 | overflow: hidden; 451 | margin: 10px 0; 452 | width: 100%; 453 | padding: 15px 15px 15px 35px; 454 | } 455 | 456 | .post-content #sc-black { 457 | color: #333333; 458 | border: 1px solid#333333; 459 | overflow: hidden; 460 | margin: 10px 0; 461 | width: 100%; 462 | padding: 15px 15px 15px 35px; 463 | } 464 | 465 | .post-content p { 466 | margin: 0 0 16px 0; 467 | line-height: 1.6; 468 | } 469 | 470 | .post-content h2 { 471 | border-left: 4px solid #42B983; 472 | padding-left: 16px; 473 | margin: 16px -20px; 474 | color: #333333; 475 | font-size: 20px; 476 | } 477 | 478 | .post-content h3 { 479 | border-left: 4px solid #33b1ff; 480 | padding-left: 16px; 481 | position: relative; 482 | margin: 20px 0; 483 | font-weight: 500; 484 | font-size: 17px; 485 | } 486 | 487 | .post-content .btn { 488 | border: none; 489 | background-color: #42B983; 490 | color: #FFFFFF; 491 | padding: 6px 12px; 492 | cursor: pointer; 493 | display: inline-block; 494 | margin: 5px 0; 495 | } 496 | 497 | .btn:hover, 498 | .btn:active { 499 | background-color: #35495E; 500 | } 501 | 502 | .post-content .btn a { 503 | color: #fff; 504 | box-shadow: 0 0 0; 505 | } 506 | 507 | .btn, 508 | .btn a .btn:hover, 509 | .btn:active { 510 | transition: all 0.2s; 511 | } 512 | 513 | 514 | /* Back To Top */ 515 | 516 | .back-to-top { 517 | position: fixed; 518 | bottom: -30px; 519 | right: 30px; 520 | z-index: 2018; 521 | background-color: #33b1ff; 522 | color: #FFFFFF; 523 | padding: 5px 5px; 524 | cursor: pointer; 525 | font-size: 0.85em; 526 | transition: bottom 0.2s; 527 | transition: all 0.2s; 528 | } 529 | 530 | .back-to-top-on { 531 | bottom: 30px; 532 | transition: all 0.2s; 533 | } 534 | 535 | .back-to-top i { 536 | font-size: 14px; 537 | } 538 | 539 | .back-to-top:hover, 540 | .back-to-top:active { 541 | background-color: #35495E; 542 | transition: all 0.2s; 543 | } 544 | 545 | @media (max-width: 768px) { 546 | .back-to-top { 547 | display: none; 548 | } 549 | } 550 | 551 | @media (min-width: 768px) { 552 | .back-to-top { 553 | display: block; 554 | } 555 | } 556 | 557 | @keyframes bottom20 { 558 | 0% { 559 | opacity: 0; 560 | transform: translateY(20px) 561 | } 562 | 563 | 100% { 564 | opacity: 1; 565 | transform: translateY(0) 566 | } 567 | } 568 | 569 | #commentform { 570 | animation: bottom20 500ms; 571 | } 572 | 573 | .single_post_list { 574 | color: #fff; 575 | text-align: center; 576 | margin: 0 auto; 577 | } 578 | 579 | .comment-box { 580 | padding: 25px; 581 | background: #fff; 582 | margin-top: 20px; 583 | max-width: 100%; 584 | overflow-x: hidden 585 | } 586 | 587 | #comments { 588 | position: relative 589 | } 590 | 591 | .related-post h3, 592 | .comments-title { 593 | font-size: 20px; 594 | color: #282828; 595 | font-weight: 600; 596 | margin: 0; 597 | margin-bottom: 30px; 598 | text-transform: uppercase; 599 | padding-bottom: 20px; 600 | position: relative 601 | } 602 | 603 | .related-post h3::after, 604 | .comments-title::after { 605 | content: ""; 606 | background-color: #282828; 607 | left: 0; 608 | width: 60px; 609 | height: 2px; 610 | bottom: -2px; 611 | position: absolute; 612 | -webkit-transition: 0.5s; 613 | -moz-transition: 0.5s; 614 | -ms-transition: 0.5s; 615 | -o-transition: 0.5s; 616 | transition: 0.5s 617 | } 618 | 619 | .related-post:hover h3::after, 620 | .comments-box:hover .comments-title::after, 621 | .respond-box:hover .comments-title::after { 622 | width: 75px 623 | } 624 | 625 | .comments-title #cancel-comment-reply { 626 | margin-left: 10px; 627 | font-size: 14px; 628 | color: #ddd 629 | } 630 | 631 | #loading-comments { 632 | display: none; 633 | text-align: center; 634 | font-size: 18px; 635 | color: #929292; 636 | margin-bottom: 20px 637 | } 638 | 639 | .commentlist { 640 | padding: 0 0 20px 0; 641 | clear: both 642 | } 643 | 644 | .commentlist li { 645 | clear: both; 646 | margin: 15px 0; 647 | border-bottom: 1px solid #c7c8ca; 648 | margin-left: 0; 649 | position: relative; 650 | padding-bottom: 5px; 651 | margin-bottom: 20px; 652 | list-style: none 653 | } 654 | 655 | .commentlist li .comment-avatar { 656 | position: relative; 657 | float: left; 658 | } 659 | 660 | .commentlist li .comment-avatar .avatar { 661 | border-radius: 3px; 662 | -moz-border-radius: 3px; 663 | -webkit-border-radius: 3px; 664 | width: 40px; 665 | height: 40px 666 | } 667 | 668 | .label { 669 | font-size: 60% 670 | } 671 | .commentlist li .comment-body{ 672 | margin-left: 55px; 673 | } 674 | .commentlist li .comment_author { 675 | position: relative; 676 | } 677 | 678 | .commentlist li .comment_author .name { 679 | line-height: 1.3; 680 | font-weight: 500; 681 | color: #000; 682 | font-size: 16px; 683 | } 684 | 685 | .commentlist li .comment_author .name a { 686 | line-height: 1.3; 687 | font-weight: 500; 688 | color: #000; 689 | font-size: 16px; 690 | } 691 | 692 | .commentlist li .comment_author .name-ua { 693 | color: #A8A8A8; 694 | font-size: 12px; 695 | font-style: normal; 696 | } 697 | 698 | .subscribe-form p { 699 | margin-bottom: 0px; 700 | } 701 | 702 | .commentlist li .comment_author .comment_floor { 703 | position: absolute; 704 | right: 0; 705 | top: 0; 706 | font-size: 12px; 707 | color: rgba(0, 0, 0, .4) 708 | } 709 | 710 | .commentlist li .comment_author .comment_floor span { 711 | font-size: 14px; 712 | color: rgba(0, 0, 0, .4) 713 | } 714 | 715 | .commentlist li .comment_author .comment_floor span.floor_first { 716 | padding: 2px 5px; 717 | color: #FFF; 718 | font-size: 13px; 719 | background: #EF5E63 720 | } 721 | 722 | .commentlist li .comment_author .comment_floor span.floor_second { 723 | background: #FFA41F 724 | } 725 | 726 | .commentlist li .comment_author .comment_floor span.floor_third { 727 | background: #6698DE 728 | } 729 | 730 | .commentlist li .comment-text { 731 | padding: 10px 0; 732 | color: #282828; 733 | font-size: 16px; 734 | } 735 | 736 | .commentlist li .comment-text p { 737 | font-size: 16px; 738 | } 739 | 740 | .commentlist li .comment_reply { 741 | display: block; 742 | text-align: right; 743 | margin: 0; 744 | font-size: 12px; 745 | color: #757e91 746 | } 747 | 748 | .commentlist li ul { 749 | padding: 10px 0 0 0 750 | } 751 | 752 | .commentlist li ul.children li { 753 | margin-left: 0; 754 | padding: 12px; 755 | padding-left: 0; 756 | border-bottom-width: 0; 757 | border-radius: 2px; 758 | margin-bottom: 10px; 759 | margin-top: 0 760 | } 761 | 762 | .commentlist li ul.children li .comment-avatar { 763 | position: relative; 764 | left: initial; 765 | float: left 766 | } 767 | 768 | .commentlist li ul.children li .comment-avatar .avatar { 769 | width: 40px; 770 | height: 40px 771 | } 772 | 773 | .commentlist li ul.children li .comment-body { 774 | border-bottom-width: 0; 775 | margin: 0 0 0 55px; 776 | padding: 0 0 10px; 777 | position: relative 778 | } 779 | 780 | .commentlist li ul.children li .comment-body .comment_reply { 781 | position: absolute; 782 | right: 0; 783 | top: 0 784 | } 785 | 786 | .commentlist li ul.children li .comment-body .comment-text { 787 | padding: 10px 0 0 0 788 | } 789 | 790 | .commentlist em { 791 | padding-left: 6px; 792 | color: #A8A8A8; 793 | font-size: 12px; 794 | font-style: normal 795 | } 796 | 797 | #comments-navi { 798 | text-align: center; 799 | padding: 0 30px; 800 | padding-bottom: 30px 801 | } 802 | 803 | #comments-navi .prev { 804 | padding: 4px 4px !important 805 | } 806 | 807 | #comments-navi .page-numbers { 808 | margin: 0 1px 2px 1px; 809 | padding: 4px 10px; 810 | color: #5F5F5F; 811 | white-space: nowrap; 812 | display: inline-block; 813 | font-size: 14px; 814 | background-color: #eff0f1; 815 | border-radius: 2px 816 | } 817 | 818 | #comments-navi .page-numbers.dots { 819 | background-color: transparent; 820 | padding: 0 821 | } 822 | 823 | #comments-navi .page-numbers.current, 824 | #comments-navi .page-numbers:hover { 825 | color: #FFF; 826 | background-color: #19B5FE 827 | } 828 | 829 | #respond p { 830 | margin: 0 0 15px 831 | } 832 | 833 | #respond p.logged-in-as { 834 | color: #ccc 835 | } 836 | 837 | #respond p.logged-in-as i { 838 | color: #0068d2 839 | } 840 | 841 | #respond p.logged-in-as img { 842 | float: left; 843 | padding-right: 6px 844 | } 845 | 846 | #respond p.logged-in-as a { 847 | color: #666 848 | } 849 | 850 | #respond p.logged-in-as a:hover { 851 | color: #E00 852 | } 853 | 854 | #respond #error, 855 | #respond #loading { 856 | margin-top: 5px; 857 | color: #666 858 | } 859 | 860 | #respond #error { 861 | color: #e00 862 | } 863 | 864 | #edita { 865 | padding: 8px 15px; 866 | font-size: 14px; 867 | font-weight: 700; 868 | color: #f60; 869 | background: #fff1df 870 | } 871 | 872 | #respond p.tips { 873 | margin: 0 0 20px; 874 | padding: 10% 10px; 875 | border: 2px solid #efefef; 876 | background: #F7F7F7; 877 | text-align: center 878 | } 879 | 880 | #respond p label { 881 | padding-right: 1px; 882 | color: #000 883 | } 884 | 885 | #respond em { 886 | font-size: 11px; 887 | font-style: normal; 888 | color: #999 889 | } 890 | 891 | .commentlist li #respond { 892 | margin: 0 auto; 893 | padding: 15px; 894 | background: #f5f6f9; 895 | margin: 10px 0; 896 | box-shadow: none 897 | } 898 | 899 | #commentform p em { 900 | padding-left: 5px; 901 | color: red 902 | } 903 | 904 | #commentform #author, 905 | #commentform #email, 906 | #commentform #url { 907 | width: 100%; 908 | margin-bottom: 20px; 909 | margin-top: 5px; 910 | padding: 10px 14px; 911 | border: 1px solid #eaeaea 912 | } 913 | 914 | #commentform .logged-in-as { 915 | margin-bottom: 10px 916 | } 917 | 918 | #commentform .logged-in-as a i { 919 | font-style: normal; 920 | color: #989898 921 | } 922 | 923 | #commentform .comment-form-textarea { 924 | margin-bottom: 20px 925 | } 926 | 927 | #commentform .comment-textarea-box { 928 | position: relative; 929 | margin-bottom: 15px 930 | } 931 | 932 | #commentform .comment-textarea-box textarea { 933 | display: block; 934 | padding: 18px 14px; 935 | color: #ccc; 936 | box-sizing: border-box; 937 | width: 100%; 938 | height: 100px; 939 | padding: 10px 14px; 940 | line-height: 1.5; 941 | -moz-box-sizing: border-box; 942 | box-sizing: border-box; 943 | border-color: #efefef; 944 | max-width: 100%; 945 | min-width: 100% 946 | } 947 | 948 | #commentform #author:focus, 949 | #commentform #author:hover, 950 | #commentform #comment:focus, 951 | #commentform #comment:hover, 952 | #commentform #email:focus, 953 | #commentform #email:hover, 954 | #commentform #url:hover, 955 | #url:focus { 956 | color: #666; 957 | -webkit-appearance: none 958 | } 959 | 960 | #commentform .form-submit { 961 | position: relative; 962 | text-align: right; 963 | } 964 | 965 | #commentform .form-submit button { 966 | font-size: 14px; 967 | padding: 0; 968 | border-radius: 0 969 | } 970 | 971 | #commentform .form-submit .comment-form-smilies { 972 | width: 300px; 973 | margin-top: 10px 974 | } 975 | 976 | #commentform .form-submit .btn-comment { 977 | -webkit-appearance: none; 978 | border-radius: 2px; 979 | background: #33b1ff; 980 | color: #fff; 981 | padding: 14px 0; 982 | border: 0; 983 | font-size: 16px; 984 | font-weight: bold; 985 | width: 120px; 986 | line-height: 1; 987 | height: auto; 988 | letter-spacing: .1em; 989 | text-transform: uppercase; 990 | -webkit-transition: color .2s ease-out, background .2s ease-out, border-color .2s ease-out; 991 | -moz-transition: color .2s ease-out, background .2s ease-out, border-color .2s ease-out; 992 | transition: color .2s ease-out, background .2s ease-out, border-color .2s ease-out; 993 | cursor: pointer 994 | } 995 | 996 | #commentform .form-submit .btn-comment:hover { 997 | background: #282828 998 | } 999 | 1000 | img.wp-smiley { 1001 | width: 25px !important; 1002 | height: auto !important; 1003 | max-height: none !important 1004 | } 1005 | 1006 | .comment-form-smilies .smilies-box { 1007 | padding: 10px 1008 | } 1009 | 1010 | .comment-form-smilies .smilies-box a { 1011 | cursor: pointer; 1012 | height: 30px; 1013 | width: 30px; 1014 | text-align: center; 1015 | display: inline-block; 1016 | background: #FFF 1017 | } 1018 | 1019 | .comment-form-smilies .smilies-box a:hover { 1020 | position: relative; 1021 | z-index: 2 1022 | } 1023 | 1024 | .comment_admin { 1025 | background: #999898; 1026 | padding: 1px 5px; 1027 | color: #fff; 1028 | border-radius: 2px; 1029 | margin-left: 5px; 1030 | line-height: 1; 1031 | font-size: 12px 1032 | } 1033 | 1034 | #comment-author-info label { 1035 | color: #888; 1036 | font-size: 14px 1037 | } 1038 | 1039 | #comment-author-info { 1040 | margin-top: 20px 1041 | } 1042 | 1043 | .comment_reply_but { 1044 | font-size: 14px; 1045 | visibility: hidden; 1046 | } 1047 | 1048 | .comment:hover .comment_reply_but { 1049 | visibility: visible 1050 | } 1051 | 1052 | #comment-author-info .required { 1053 | color: #ff4b33; 1054 | font-weight: 700; 1055 | margin-left: 3px; 1056 | vertical-align: middle 1057 | } 1058 | 1059 | .hide { 1060 | display: none 1061 | } 1062 | 1063 | #comment_message { 1064 | position: absolute; 1065 | top: 0; 1066 | left: 0; 1067 | background: #F9F9F9; 1068 | z-index: 2; 1069 | text-align: center; 1070 | font-size: 18px; 1071 | color: #F74840; 1072 | width: 100%; 1073 | height: 100px; 1074 | overflow: hidden 1075 | } 1076 | 1077 | #comment_message p { 1078 | margin-top: 6%; 1079 | transform: translateY(-50%) 1080 | } 1081 | 1082 | .blog-description { 1083 | font-size: 13px; 1084 | font-weight: 700; 1085 | position: fixed; 1086 | z-index: 999; 1087 | top: 0; 1088 | bottom: 0; 1089 | left: 0; 1090 | max-width: 90vh; 1091 | height: 30px; 1092 | margin: auto; 1093 | -webkit-transform: rotate(-90deg) translate(-50%, 50%); 1094 | transform: rotate(-90deg) translate(-50%, 50%); 1095 | -webkit-transform-origin: 0 50%; 1096 | transform-origin: 0 50%; 1097 | text-align: center; 1098 | letter-spacing: 2.5px; 1099 | text-transform: uppercase; 1100 | color: rgba(18, 22, 50, .95); 1101 | -webkit-box-align: center; 1102 | -ms-flex-align: center; 1103 | align-items: center; 1104 | -webkit-box-pack: center; 1105 | -ms-flex-pack: center; 1106 | justify-content: center; 1107 | display: -webkit-box; 1108 | display: -ms-flexbox; 1109 | display: flex; 1110 | -ms-flex-wrap: wrap; 1111 | flex-wrap: wrap; 1112 | } 1113 | 1114 | @media(max-width:900px) { 1115 | .blog-description { 1116 | display: none; 1117 | } 1118 | } 1119 | 1120 | 1121 | .section-load-more { 1122 | margin: 20px auto 16vh; 1123 | text-align: center; 1124 | height: 50px; 1125 | 1126 | } 1127 | 1128 | .section-load-more > div{ 1129 | display: flex; 1130 | text-align: center; 1131 | width: 120px; 1132 | margin: 0 auto; 1133 | justify-content: center; 1134 | } 1135 | .section-load-more > div >a{ 1136 | text-decoration: none; 1137 | } 1138 | .section-load-more > div >a:nth-child(1){ 1139 | margin: 0 20px 0 0; 1140 | } 1141 | .section-load-more > div >a:nth-child(2){ 1142 | margin: 0 0 0 20px; 1143 | } 1144 | .load-more { 1145 | height: 50px; 1146 | width: 50px; 1147 | -webkit-box-sizing: border-box; 1148 | box-sizing: border-box; 1149 | cursor: pointer; 1150 | -webkit-transition: all .3s ease; 1151 | transition: all .3s ease; 1152 | border-radius: 100px; 1153 | outline: none; 1154 | background-color: rgba(0,0,0,0.1); 1155 | display: flex !important; 1156 | justify-content: center; 1157 | align-items: center; 1158 | } 1159 | 1160 | .load-more:hover { 1161 | -webkit-transition: .3s cubic-bezier(.39, .07, .68, 1.7); 1162 | transition: .3s cubic-bezier(.39, .07, .68, 1.7); 1163 | -webkit-transform: scale(.65); 1164 | transform: scale(.65); 1165 | background-color:#0005ff; 1166 | } 1167 | .load-more:hover i{ 1168 | color: #fff; 1169 | } 1170 | 1171 | 1172 | .load-more >i{ 1173 | color: rgba(0,0,0,0.3); 1174 | font-size: 30px; 1175 | font-weight: 900; 1176 | } 1177 | /* 新版文章页头 */ --------------------------------------------------------------------------------