Skip to content

Commit

Permalink
fix default theme & update to v3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mashirozx committed Jan 26, 2019
1 parent 7f912b2 commit 47ab81c
Show file tree
Hide file tree
Showing 17 changed files with 327 additions and 11 deletions.
269 changes: 268 additions & 1 deletion cdn/theme/sakura.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
display: block
}

.entry-content blockquote blockquote:before,.entry-content blockquote blockquote:after {
display: none
}

.entry-content .begin,
.single-begin {
float: left;
Expand All @@ -28,6 +32,11 @@
border-radius: 10px
}

.entry-content ul ul {
border: none;
padding: 15px 10px 15px 30px;
}

.entry-content ol {
list-style: decimal;
border: 1px dashed #E4E4E4;
Expand Down Expand Up @@ -121,4 +130,262 @@ h1.entry-title {
top: -30px;
font-size: 28px;
letter-spacing: .6em
}
}

.entry-content table {
border-collapse: collapse;
width: 100%;
border-radius: 5px
}

.entry-content th, .entry-content td {
padding: 8px;
}

.entry-content tr:nth-child(even){background-color: #f2f2f2}

.entry-content th {
color: white;
}

/*fix code block*/
.entry-content pre th, .entry-content pre td {
padding: 0;
}

.entry-content pre tr:nth-child(even){
background-color: transparent
}

.entry-content pre th {
background-color: transparent !important;
}

.highlight-wrap:before {
content: " ";
position: absolute;
-webkit-border-radius: 50%;
border-radius: 50%;
background: #fc625d;
width: 12px;
height: 12px;
left: 12px;
margin-top: -18px;
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
z-index: 2
}

.highlight-wrap {
position: relative;
background: #21252b;
border-radius: 5px;
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
line-height: 1.6;
margin-bottom: 1.6em;
max-width: 100%;
overflow: auto;
text-shadow: none;
color: #000;
padding-top: 30px;
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
}

.highlight-wrap .copy-code {
color: #fff;
position: absolute;
float: right;
right: 10px;
top: 0;
padding-top: 4px;
padding-right: 2px;
z-index: 2;
font-size: 16px;
}

.highlight-wrap .copy-code:hover {
color: rgba(255,255,255,.5);
}

.hljs-ln-line span::-moz-selection,
.hljs-ln-line::-moz-selection {
background: #fff;
color: #21252b
}

.hljs-ln-line span::selection,
.hljs-ln-line::selection {
background: #fff;
color: #21252b
}

.highlight-wrap code {
background: #1d1f21;
color: #fff;
word-break: break-word;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
padding: 2px;
text-shadow: none;
border-radius: 0 0 5px 5px;
cursor: url(https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/Sakura/cursor/texto.cur), auto
}

.highlight-wrap code[data-rel]:before {
color: #fff;
content: attr(data-rel);
height: 30px;
line-height: 30px;
background: #21252b;
font-size: 16px;
position: absolute;
margin-top: -30px;
left: 0;
width: 100%;
font-family: Ubuntu, sans-serif;
font-weight: 700;
padding: 0 80px;
text-indent: 15px;
text-align: center;
float: left;
z-index: 1;
border-radius: 5px 5px 0 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
pointer-events: none
}

.hljs {
display: block;
overflow-x: auto;
padding: .5em;
color: #abb2bf;
background: rgba(254, 250, 199, .5);
border-radius: 10px
}

.hljs-comment,
.hljs-quote {
color: #888f96;
font-style: italic
}

.hljs-doctag,
.hljs-formula,
.hljs-keyword {
color: #c678dd
}

.hljs-deletion,
.hljs-name,
.hljs-section,
.hljs-selector-tag,
.hljs-subst {
color: #e06c75
}

.hljs-literal {
color: #56b6c2
}

.hljs-addition,
.hljs-attribute,
.hljs-meta-string,
.hljs-regexp,
.hljs-string {
color: #98c379
}

.hljs-built_in,
.hljs-class .hljs-title {
color: #e6c07b
}

.hljs-attr,
.hljs-number,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-pseudo,
.hljs-template-variable,
.hljs-type,
.hljs-variable {
color: #d19a66
}

.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-symbol,
.hljs-title {
color: #61aeee
}

.hljs-emphasis {
font-style: italic
}

.hljs-strong {
font-weight: 700
}

.hljs-link {
text-decoration: underline
}

.hljs-ln {
margin: 6px 0 0 0 !important
}

td.hljs-ln-numbers {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
color: #888f96;
background: #1d1f21;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
vertical-align: top;
position: absolute;
left: 0;
width: 30px
}

.hljs-ln-code .hljs-ln-line {
margin-left: 25px;
padding-left: 5px
}

.hljs-ln-code .hljs-ln-line:hover {
background-color: rgba(255, 255, 255, .1)
}

.code-block-fullscreen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
min-width: 100%;
z-index: 9999999;
margin: 0;
animation: elastic 1s
}

.code-block-fullscreen code {
--widthA: 100%;
--widthB: calc(var(--widthA) - 30px);
height: var(--widthB);
min-height: 99%;
overflow-y: hidden;
overflow-x: auto;
height: auto
}

.code-block-fullscreen-html-scroll {
overflow: hidden
}
Binary file removed feature/gallery/(1).jpg
Binary file not shown.
Binary file removed feature/gallery/(2).jpg
Binary file not shown.
Binary file removed feature/gallery/(5).jpg
Binary file not shown.
Binary file removed feature/gallery/(6).jpg
Binary file not shown.
Binary file removed feature/gallery/(7).jpg
Binary file not shown.
Binary file removed feature/gallery/(8).jpg
Binary file not shown.
Binary file removed feature/gallery/(9).jpeg
Binary file not shown.
File renamed without changes
File renamed without changes
24 changes: 20 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @package Sakura
*/

define( 'SAKURA_VERSION', '3.1.2' );
define( 'SAKURA_VERSION', '3.1.3' );
define( 'JSDELIVR_VERSION', '3.6.7' );

//ini_set('display_errors', true);
Expand Down Expand Up @@ -173,10 +173,16 @@ function sakura_scripts() {
if(akina_option('jsdelivr_cdn_test')){
wp_enqueue_script( 'js_lib', get_template_directory_uri() . '/cdn/js/lib.js', array(), SAKURA_VERSION.akina_option('cookie_version', ''), true );
} else {
wp_enqueue_script( 'js_lib', 'https://cdn.jsdelivr.net/gh/moezx/cdn@' . JSDELIVR_VERSION . '/sakura/js/lib.min.js', array(), SAKURA_VERSION, true );
wp_enqueue_script( 'js_lib', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/cdn/js/lib.min.js', array(), SAKURA_VERSION, true );
}
wp_enqueue_style( 'saukra_css', get_stylesheet_uri(), array(), SAKURA_VERSION );
wp_enqueue_script( 'app', get_template_directory_uri() . '/js/sakura-app.js', array(), SAKURA_VERSION, true );
if (akina_option('app_no_jsdelivr_cdn')) {
wp_enqueue_style( 'saukra_css', get_stylesheet_uri(), array(), SAKURA_VERSION );
wp_enqueue_script( 'app', get_template_directory_uri() . '/js/sakura-app.js', array(), SAKURA_VERSION, true );
} else {
wp_enqueue_style( 'saukra_css', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/style.min.css', array(), SAKURA_VERSION );
wp_enqueue_script( 'app', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/js/sakura-app.min.js', array(), SAKURA_VERSION, true );
}

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
Expand Down Expand Up @@ -1464,4 +1470,14 @@ function change_avatar($avatar){
}
}

// default feature image
function DEFAULT_FEATURE_IMAGE() {
if ( empty( akina_option('default_feature_image' )) ) {
return get_template_directory_uri().'/feature/index.php?'.rand(1,1000);
//return 'https://api.mashiro.top/feature/?'.rand(1,1000);
} else {
return akina_option('default_feature_image').'?'.rand(1,1000);
}
}

//code end
8 changes: 7 additions & 1 deletion inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function customizer_css() { ?>
}

.site-top ul li a:after {
background-color: <?php echo akina_option('theme_skin'); ?>
background-color: <?php echo akina_option('theme_skin'); ?>
}

.scrollbar,.butterBar-message {
Expand All @@ -41,6 +41,12 @@ function customizer_css() { ?>
background: <?php echo akina_option('theme_skin'); ?>
}

<?php if(akina_option('entry_content_theme') == "sakura"){ ?>
.entry-content th {
background-color: <?php echo akina_option('theme_skin'); ?>
}
<?php } ?>

<?php } // theme-skin ?>
<?php // Custom style
if ( akina_option('site_custom_style') ) {
Expand Down
2 changes: 1 addition & 1 deletion inc/swicher.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function font_end_js_control() { ?>
<?php if(akina_option('jsdelivr_cdn_test')){ ?>
mashiro_option.jsdelivr_css_src = "<?php echo get_template_directory_uri() ?>/cdn/css/lib.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
<?php } else { ?>
mashiro_option.jsdelivr_css_src = "https://cdn.jsdelivr.net/gh/moezx/cdn@<?php echo JSDELIVR_VERSION; ?>/sakura/css/lib.min.css";
mashiro_option.jsdelivr_css_src = "https://cdn.jsdelivr.net/gh/mashirozx/Sakura@<?php echo SAKURA_VERSION; ?>/cdn/css/lib.min.css";
<?php } ?>
<?php if (akina_option('playlist_id', '')): ?>
mashiro_option.float_player_on = true;
Expand Down
Loading

0 comments on commit 47ab81c

Please sign in to comment.