博客园simplememory主题自定义

说明:

博客园-主题:simplememory
主要参考连接:https://www.cnblogs.com/emacode/p/10303168.html

以下是主题simplememory自定义相关的代码,大部分来自网络,修改了一些bug,看着还可以,欢迎评论^_^。

1. 页面ccs代码

/* **********************
 * 整体布局
 * **********************/

/* 整体布局 */
body {
  background:#F6F6F6;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica
      Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif;
}

#home {
  max-width: 1140px;
  padding: 15px;
  background: transparent;
  box-shadow: none;
  margin-top: 0;
  width: auto;
}

#main {
  margin-top: 15px;
}

#mainContent .forFlow {
    padding-right: 20px;
}

/* 非阅读区域去掉白色背景 */
.newsItem,
.catListEssay,
.catListLink,
.catListNoteBook,
.catListTag,
.catListPostCategory,
.catListPostArchive,
.catListImageCategory,
.catListArticleArchive,
.catListView,
.catListFeedback,
.mySearch,
.catListComment,
.catListBlogRank,
.catList,
.catListArticleCategory {
  background-color: transparent;
}

/*阅读全文*/
.c_b_p_desc a{
text-decoration-line: underline;
}

/* **********************
 * 博客页首
 * **********************/

/* 隐藏系统标题 */
#blogTitle {
  /*display: none;*/
}

#blogTitle h1{
 margin: 20px;
}

/*顶部 */
.c-portrait {
  text-align: center;
  padding: 80px 0;
  background: #aaa9a7;
  color: #fff;
  margin-bottom: -40px;
}

/* 标题和签名 */
.c-portrait h1 {
  font-size: 25px;
  font-weight: bold;
  margin: 5px 0;
}

.c-portrait h1 a {
  color: #fff;
}

.c-portrait h2 {
  font-size: 16px;
  margin: 7px 0 10px;
  color: #ccc;
}

/* **********************
 * 导航栏
 * **********************/

#navigator {
  padding: 0 10px;
}

#stats_article_count {
  display: none;
}

/* **********************
 * 侧边栏
 * **********************/
.catListLink,#sidebar_scorerank,#blog-news,#sidebar_recentposts,#sidebar_postarchive,
.mySearch,#blog-calendar,#topview_posts_wrap,#sidebar_topdiggedposts,
#sidebar_articlecategory,#sidebar_postcategory ,#sidebar_topviewedposts,
#sidebar_recentcomments{
    font-weight: normal;
    line-height: 1.2;
    font-size: 100%;
    margin-top: 0;
    margin-bottom: 5px;
    text-align: left;
    background-color: #fff;
    padding: 0 0 0 15px;
    border: 1px solid #eaeaea;
}

/*头像位置*/
#blog-news img {
    position: absolute;
    margin-top: 45px;
    margin-left: 120px;
    margin-bottom: 45px;
}

/*昵称和关注*/
div#profile_block{
    line-height: 2;
    padding: 10px 0 10px 0px;
    margin-left: 5px;
}

/*陌生人-加关注*/
div#p_b_follow {
    position: relative;
    margin-left: 20px;
    margin-bottom: 15px;
}

#blog-calendar{
    padding:0;
    width: 100%;
    padding-bottom: 5px;
    margin-bottom: 35px;
    border: 1px solid #EDEDED;
    box-shadow:none;
 
}

.CalTodayDay {
    background: #e5e5e5 !important;
    color: #FF5E52;
    font-weight: bold;
}

div#profile_block{
    padding: 10px 0 10px 0px;
}

#sideBar .catListTitle {
    background-color: #FF5E52;
    padding: 5px;
    color: #fff;
   font-weight: normal;
    line-height: 1.2;
   margin-top:0;
    margin-bottom: 10px;
    text-align: center;
    width: 80px;
}

#sideBar {
  width: 250px;
  margin-top: 0;
}

#sideBar a {
  color: inherit;
}

/*推荐评论的设计*/
.recent_comment_title {
    background-color: #ebe6e6;
    font-size: 12px;
    font-weight: bold;
    margin-right: 15px;
    border: solid 1px rgb(248, 236, 236);
}
.recent_comment_body{
  border: solid 1px rgb(248, 236, 236);
  color: #7c7373;
  margin-right: 15px;
  padding-left: 10px;
}
.recent_comment_author{
  margin-right: 8px;
}

/* 隐藏侧边公告标题 */
.newsItem .catListTitle {
  display: none;
}

/* 增加列表项间距 */
.sidebar-block li {
  margin-bottom: 5px;
}


/* **********************
 * 文章列表
 * **********************/

.entrylistTitle{
    font-weight: bold;
    font-size: 18px;
    /* font-size: 100%; */
    margin-top: 0;
    margin-bottom: 10px;
    text-align: left;
    background-color: #fff;
    padding: 0 0 0 15px;
    border: 1px solid #eaeaea;
    color: #FF5E52;
}
.entrylistPosttitle {
    padding-left: 15px;
    margin-bottom: 10px;
    border-left: 8px solid #009688;
    font-size: 20px;
    width: 100%;
}
.entrylistPosttitle a:link, .entrylistPosttitle a:visited, .entrylistPosttitle a:active {
    color: #393D49;
    transition: all 0.4s linear 0s;
    font-weight: bold;
}

/* 文章列表 */
#topics .postTitle {
  font-size: 28px;
  margin: 35px 0 30px;
  padding-left: 0;
}

#mainContent .day {
  padding: 15px 20px;
  background: #fff;
}

#mainContent .day .postTitle a {
  display: inline-block;
}

/* **********************
 * 文章详情
 * **********************/

pre {
  margin-bottom: 1.35em;
}

pre code {
  padding: 10px 16px !important;
}

.post {
    background: #fff;
    padding: 0 60px 60px;
    border-bottom: 1px solid #eee;
}

/* 文章标题 */
#topics .postTitle {
    font-size: 28px;
    margin: 35px 0 30px;
    padding-left: 0;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.postTitle {
  border-left: 8px solid #FF5E52;
  margin-bottom: 5px;
  font-weight: bold;
  line-height: 1;
  box-sizing: border-box;
}

.postTitle a:hover {
  margin-left: 0;
}

.postTitle a:link, .postTitle a:visited, .postTitle a:active {
    color: #393D49;
    transition: all 0.4s linear 0s;
}

/* 去除首行缩进 */
.postBody p,
.postCon p {
  text-indent: 0;
}

/* 重写引用块样式 */
.postBody blockquote {
  min-height: auto;
  border-top: none;
  border-bottom: none;
  border-right: none;
  padding: 0 0 0 1em;
  background:none;
}

/* 增加底部留白 */
#cnblogs_post_body {
  padding-bottom: 5px;
}

/* 防止图片溢出 */
#cnblogs_post_body img {
  max-width: 100%;
}

/* 文章底部信息 */
.postDesc {
  margin-top: 0;
}

/*回到顶部*/
#back-to-top {
    background-color:#eee;
    bottom: 50px;
    box-shadow: 0 0 6px;
    color: #444444;
    padding: 10px 10px;
    position: fixed;
    right: 50px;
    cursor: pointer;
    border-top-right-radius: 30px;
    border-top-left-radius: 30px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    height: 25px;
}

/*回到底部*/
#back-to-bottom {
    background-color:#eee;
    top: 0;
    box-shadow: 0 0 6px;
    color: #444444;
    padding: 10px 10px;
    position: fixed;
    right: 50px;
    cursor: pointer;
    border-bottom-right-radius: 15px;
    border-bottom-left-radius: 15px;
}


/* **********************
 * 文章评价
 * **********************/
/* 支持反对 */
#div_digg {
    position: fixed;
    right: 100px;
    bottom: 50px;
    background: #fff;
    padding: 20px 20px 15px;
    border-radius: 5px;
    border: 1px solid #eaeaea !important;
    box-shadow:none !important;

}

/* **********************
 * 隐藏广告&&去掉推送
 * **********************/

/*要挨打,跑路,嘻嘻*/

  #ad_t2{/*广告*/
    display: none;/*设置框架不显示*/
    overflow: hidden;/*框架超出部分隐藏*//*下同*/
  }
  .c_ad_block{
    display: none;
    overflow: hidden;
  }

  #opt_under_post {/*第三方推送*/
    display: none;
    overflow: hidden;
  }

  #cnblogs_c1{/*空白块1*/
    display: none;
    overflow: hidden;
  }
  #cnblogs_c2{/*空白块2*/
    display: none;
    overflow: hidden;
  }
  #under_post_news{/*相关博文*/
    display: none;
    overflow: hidden;
  }
  #under_post_kb{/*最新新闻*/
    display: none;
    overflow: hidden;
  }
  .under-post-card {
    display: none;
    overflow: hidden;
  }

/* **********************
 * 评论
 * **********************/

#comment_form_container .comment_textarea {
  width: 100%;
}

#commentform_title {
    font: normal normal 16px/35px "Microsoft YaHei";
    margin: 10px 0 30px;
    background-image: none;
    padding: 0;
    border-bottom: 1px solid #eaeaea;
    border-left: 8px solid #393D49;
    padding-left: 15px;
}
.comment_vote {
  padding-right: 2px;
  font-size: 14px;
  margin-top: 10px;
}

.comment_vote a.comment_digg {
  color: #f80;
}

.feedbackItem {
  margin: 20px 0 25px;
  background: #fff;
  padding: 10px 15px;
}

.feedbackCon {
  font-size: 13px;
  border-bottom: 0;
  padding: 10px 5px 0 5px;
  text-align: justify;
}


/* **********************
 * 适配手机
 * **********************/

@media only screen and (max-width: 767px) {
  #home {
    padding-left: 0;
    padding-right: 0;
  }

  #navList {
    margin-left: 15px;
  }

  #div_digg {
    width: 60px;
    padding: 0;
    left: 15px;
    bottom: 20px;
    box-shadow: none;
  }

  #div_digg .diggit {
    width: 60px;
    background-position: center;
  }

  #div_digg .buryit {
    display: none;
  }

  #mainContent .forFlow {
    padding-right: 0;
    margin: 0px;
  }

  #mainContent .post {
    padding: 0 20px;
  }

  #sideBar, #blog-comments-placeholder {
    padding: 0px 15px;
  }
  
  #sideBar #sideBarMain {
    padding: 0px;
  }

  /*去广告*/
  #ad_t2,
  #cnblogs_c1,
  #cnblogs_c2,
  #under_post_news,
  #under_post_kb,
  .under-post-card {
    display: none;
    overflow: hidden;
  }

}

2. “侧边栏公告”的html代码:

<img  style="width: 100px; height: 100px;"  src="头像路径或链接" alt="jianmuzi的头像" class="img_avatar">

3. 页脚 Html 代码:

<span id="back-to-top"><a href="#top">TOP</a></span>
<span id="back-to-bottom"><a href="#page_end_html">底部</a></span>
posted @   jianmuzi  阅读(94)  评论(3编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
TOP 底部
点击右上角即可分享
微信分享提示