Skip to content

Commit

Permalink
更改文件夹结构
Browse files Browse the repository at this point in the history
  • Loading branch information
KotoriK committed Apr 29, 2021
1 parent fb1f5d5 commit 88c04aa
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 33 deletions.
20 changes: 1 addition & 19 deletions cdn/do.py → _helper/do.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,13 @@
localtime = time.asctime( time.localtime(time.time()) )
print (localtime)

patchall = './'
pathJS = patchall + 'js/src/'
pathJSroot = patchall + 'js/'
patchall = '../'
pathCSS = patchall + 'css/src/'
pathCSSroot = patchall + 'css/'

jsfiles = [f for f in listdir(pathJS) if isfile(join(pathJS, f))]
cssfiles = [f for f in listdir(pathCSS) if isfile(join(pathCSS, f))]

strJS = '/*! Generate by mirai-mamori. ' + localtime + '*/'
strCSS = '/*! Generate by mirai-mamori. ' + localtime + '*/'

for f in jsfiles:
with codecs.open(pathJS + f, 'r', encoding='utf-8') as file:
data = file.read()
strJS = strJS + data
print(f)

JSminified = jsmin(strJS)

with codecs.open(pathJSroot + "lib.js", "w", encoding='utf-8') as text_file:
print(JSminified, file=text_file)


print('------------------JS Done------------------')

for f in cssfiles:
with codecs.open(pathCSS + f, 'r', encoding='utf-8') as file:
Expand Down
6 changes: 0 additions & 6 deletions cdn/css/src/baguetteBox.min.css

This file was deleted.

2 changes: 0 additions & 2 deletions cdn/js/src/08.lazyload.min.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ function sakura_scripts()
if (iro_opt('local_global_library')) {
//wp_enqueue_script('js_lib', get_template_directory_uri() . '/cdn/js/lib.js', array(), SAKURA_VERSION . iro_opt('cookie_version', ''), true);
if (iro_opt('smoothscroll_option')) {
wp_enqueue_script('SmoothScroll', get_template_directory_uri() . '/cdn/js/smoothscroll.js', array(), SAKURA_VERSION . iro_opt('cookie_version', ''), true);
wp_enqueue_script('SmoothScroll', get_template_directory_uri() . '/js/smoothscroll.js', array(), SAKURA_VERSION . iro_opt('cookie_version', ''), true);
}
} elseif (iro_opt('smoothscroll_option')) {
wp_enqueue_script('SmoothScroll', 'https://cdn.jsdelivr.net/combine/gh/mirai-mamori/Sakurairo@' . SAKURA_VERSION . '/cdn/js/smoothscroll.js', array(), SAKURA_VERSION . iro_opt('cookie_version', ''), true);
wp_enqueue_script('SmoothScroll', 'https://cdn.jsdelivr.net/combine/gh/mirai-mamori/Sakurairo@' . SAKURA_VERSION . '/js/smoothscroll.js', array(), SAKURA_VERSION . iro_opt('cookie_version', ''), true);
//wp_enqueue_script('js_lib', 'https://cdn.jsdelivr.net/combine/gh/mirai-mamori/Sakurairo@' . SAKURA_VERSION . '/cdn/js/lib.min.js,gh/mirai-mamori/Sakurairo@' . SAKURA_VERSION . '/cdn/js/smoothscroll.js', array(), SAKURA_VERSION, true);
}/* else {
wp_enqueue_script('js_lib', 'https://cdn.jsdelivr.net/gh/mirai-mamori/Sakurairo@' . SAKURA_VERSION . '/cdn/js/lib.min.js', array(), SAKURA_VERSION, true);
Expand Down
8 changes: 4 additions & 4 deletions inc/swicher.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ function font_end_js_control() { ?>
clipboardCopyright:<?php echo iro_opt('clipboard_copyright') == "0" ? 'false':'true' ?>,

<?php if(iro_opt('entry_content_style') == "sakurairo"){ ?>
entry_content_style_src:"<?php echo get_template_directory_uri() ?>/cdn/theme/sakura.css?<?php echo SAKURA_VERSION.iro_opt('cookie_version', ''); ?>",
entry_content_style_src:"<?php echo get_template_directory_uri() ?>/css/theme/sakura.css?<?php echo SAKURA_VERSION.iro_opt('cookie_version', ''); ?>",
<?php }elseif(iro_opt('entry_content_style') == "github") {?>
entry_content_style_src:"<?php echo get_template_directory_uri() ?>/cdn/theme/github.css?<?php echo SAKURA_VERSION.iro_opt('cookie_version', ''); ?>",
entry_content_style_src:"<?php echo get_template_directory_uri() ?>/css/theme/github.css?<?php echo SAKURA_VERSION.iro_opt('cookie_version', ''); ?>",
<?php } ?>
entry_content_style:"<?php echo iro_opt('entry_content_style'); ?>",

<?php if(iro_opt('local_global_library')){ ?>
jsdelivr_css_src:"<?php echo get_template_directory_uri() ?>/cdn/css/lib.css?<?php echo SAKURA_VERSION.iro_opt('cookie_version', ''); ?>",
jsdelivr_css_src:"<?php echo get_template_directory_uri() ?>/css/lib.css?<?php echo SAKURA_VERSION.iro_opt('cookie_version', ''); ?>",
<?php } else { ?>
jsdelivr_css_src:"https://cdn.jsdelivr.net/gh/mirai-mamori/Sakurairo@<?php echo SAKURA_VERSION; ?>/cdn/css/lib.min.css",
jsdelivr_css_src:"https://cdn.jsdelivr.net/gh/mirai-mamori/Sakurairo@<?php echo SAKURA_VERSION; ?>/css/lib.min.css",
<?php } ?>
<?php if (iro_opt('aplayer_server') != 'off'): ?>
float_player_on:true,
Expand Down
File renamed without changes.

0 comments on commit 88c04aa

Please sign in to comment.