Skip to content

Commit

Permalink
Version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
syfxlin committed Feb 5, 2019
1 parent 669ce2a commit 70d7b3f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 23 deletions.
20 changes: 11 additions & 9 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,17 @@ window.onload = function() {
origami.post_index = function() {
var select = true;
if($(window).width() > 991) {
$('#toc-button').click(function() {
if(select) {
$('.toc').addClass('toc-show');
$('.toc').css('box-shadow','none');
select = false;
} else {
$('.toc').removeClass('toc-show');
$('.toc').css('box-shadow','0 0 20px #B6DFE9');
select = true;
$('#toc-button').click(function(e) {
if(e.target.className == "fa fa-indent fa-2x") {
if(select) {
$('.toc').addClass('toc-show');
$('.toc').css('box-shadow','none');
select = false;
} else {
$('.toc').removeClass('toc-show');
$('.toc').css('box-shadow','0 0 20px #B6DFE9');
select = true;
}
}
});
}
Expand Down
5 changes: 4 additions & 1 deletion page.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$thum_img = origami_get_other_thumbnail($post);
} ?>
<section class="featured-section" style="padding:0px;margin:0px;">
<div class="featured-slide " style="height:300px;background-image:url('<?php echo $thum_img; ?>');">
<div class="featured-slide" style="height:300px;background-image:url('<?php echo $thum_img; ?>');">
<div class="container">
<div class="featured-content-area featured-pos-center featured-align-center" style="max-width:70%;background-color:rgba(0,0,0,0.3);padding:25px;">
<h2 class="font-montserrat-reg" style="font-size:50px;line-height:100px;color:#fff;"><?php echo get_the_title(); ?></h2>
Expand All @@ -28,6 +28,9 @@
<div class="col-xlarge-8 col-medium-8 ">
<?php origami_breadcrumbs();?>
<article id="post-<?php the_ID(); ?>" <?php post_class("blog-post-content"); ?>>
<?php if(!get_post_thumbnail_id($post->ID) && !origami_get_other_thumbnail($post)) {
get_template_part('template-part/post-top-title');
} ?>
<div class="page-content clearfix">
<?php the_content(); ?>
</div>
Expand Down
36 changes: 30 additions & 6 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://blog.ixk.me/theme-origami.html
Author: Otstar Lin
Author URI: https://www.ixk.me
Description: 简约平面化风格的主题
Version: 1.0
Version: 1.0.1
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: black,cyan-blue,flat,responsive
Expand Down Expand Up @@ -891,6 +891,12 @@ ul {
text-align: center;
}

@media(max-width:991px) {
#header-search {
margin-right: 40px;
}
}

.header-style #header-nav {
float: right;
margin-top: 20px;
Expand Down Expand Up @@ -1782,8 +1788,8 @@ ul {
/* new-end */

.featured-content-area h2 {
font-size: 40px;
line-height: 55px;
font-size: 50px;
line-height: 100px;
color:#fff;
}

Expand Down Expand Up @@ -2791,8 +2797,8 @@ body:not(.boxed) .map-section.wide .container {
}

.featured-content-area h2 {
font-size: 40px !important;
line-height: 55px !important
font-size: 30px !important;
line-height: 40px !important
}

.featured-content-area p {
Expand Down Expand Up @@ -2904,6 +2910,23 @@ body:not(.boxed) .map-section.wide .container {
color: #f5f5f5;
}

.myblog-post-list-buttom .post-tags {
float: left !important;
margin-top: 2px !important;
overflow-x: auto;
width: 50%;
white-space:nowrap;
}

.myblog-post-list-buttom .post-tags::-webkit-scrollbar {
width: 2px !important;
height: 2px !important;
}

.myblog-post-list-buttom .post-tags li {
display: inline-block;
}

.myblog-post-list-button {
float: right;
z-index: 100;
Expand Down Expand Up @@ -3941,7 +3964,7 @@ img.responsively-lazy{
font-size: 1.5em;
color: #111;
text-align: center;
z-index: 10001;
z-index: 10002;
}

#search-section-close {
Expand All @@ -3959,6 +3982,7 @@ img.responsively-lazy{
outline: 0px;
border: 0px;
font-size: 18px;
z-index: 10001;
}

#search-content {
Expand Down
14 changes: 7 additions & 7 deletions template-part/content.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?php if(is_author()) {
$featured_title = get_the_author();
$featured_content = 'Author';
$featured_img_height = '382px';
$featured_img_height = '300px';
} else if(is_category()) {
$the_cat = get_the_category()[0];
$featured_title = '分类: '.$the_cat->name;
$featured_content = 'Category';
$featured_img_height = '382px';
$featured_img_height = '300px';
} else if(is_archive()) {
$featured_title = get_the_archive_title();
$featured_content = 'Archive';
$featured_img_height = '382px';
$featured_img_height = '300px';
} else if(is_tag()) {
$featured_title = get_the_tags();
$featured_content = 'Tags';
$featured_img_height = '382px';
$featured_img_height = '300px';
} else if(is_search()) {
$featured_title = '搜索:'.get_search_query();
$featured_content = 'Search';
$featured_img_height = '382px';
$featured_img_height = '300px';
}?>
<?php if(have_posts()){
$blog_post_array = array();
Expand Down Expand Up @@ -58,8 +58,8 @@
?>');">
<div class="container">
<div class="featured-content-area featured-pos-center featured-align-center" style="max-width:70%;background-color:rgba(0,0,0,0.3);padding:25px;">
<h2 class="font-montserrat-reg" style="font-size:50px;line-height:100px;color:#fff;"><?php echo $featured_title; ?></h2>
<p class="font-opensans-reg" style="color:#fff;"><?php echo $featured_content; ?></p>
<h2 class="font-montserrat-reg"><?php echo $featured_title; ?></h2>
<p class="font-opensans-reg"><?php echo $featured_content; ?></p>
</div>
</div>
</div>
Expand Down

0 comments on commit 70d7b3f

Please sign in to comment.