主頁 > 軟體設計 > 博客園next主題皮膚(cnblogs-theme-next-pro)

博客園next主題皮膚(cnblogs-theme-next-pro)

2021-10-21 08:20:01 軟體設計

文章目錄

  • cnblogs-theme-next-pro
    • 案例
    • 優化
    • 原始碼
      • custom.css
      • footer.html
      • head.html

cnblogs-theme-next-pro

博客園next主題皮膚

原始碼地址: https://github.com/hiszm/cnblogs-theme-next-pro

主題在 cnblogs-theme-next 的基礎上進行了修改

案例

https://hiszm.cnblogs.com/

優化

  • 增加后臺 管理


  • 首頁歸檔 布局

  • 分類布局

  • 博客著作權簽名

<table style="background:white; padding: 10px 10px 10px 10px; border: 1px dashed #1b95e0; font-family: 微軟雅黑; font-size: 13px;"
    onm ousemove="Show(this.offsetLeft,this.offsetTop);" >
    <td >
        🐳  作者:<a href="http://hiszm.cnblogs.com/" target="_blank">hiszm</a> <br />
      
        📢  著作權:本文著作權歸作者和博客園共有,歡迎轉載,但未經作者同意必須保留此段宣告,且在文章頁面明顯位置給出原文連接,萬分感謝, <br>
       💬  留言:同時 , 如果文中有什么錯誤,歡迎指出,以免更多的人被誤導, <br>
    </td>
    <td align="right">
        <div id="qr_bg"><img src="https://gitee.com/hiszm/img2021/raw/master//April/wx.png" width="146" ></div>
    </td>
</table>

  • 注意后臺設定,開多了會擾亂布局

原始碼

custom.css

/**
   * @author:me@makergyt.com
   * @version:2020-07-01
   * @------------------------------------------------------------------
   * @update 2021-5-6 https://github.com/hiszm/cnblogs-theme-next-pro
   */
:root {
  --primary-color:#0566d1;/* 全域主色*/
  --body-bg-color: #f5f7f9; /*頁面背景色*/
	--content-bg-color: #fff; /*頁面內容背景色*/
	--heading-color: rgba(0, 0, 0, 0.85); /* 標題色 */
	--text-color: #353535; /*主文本色*/
	--text-color-secondary:rgba(0, 0, 0, 0.45);/*次文本色*/
	--text-color-grey:rgba(0, 0, 0, 0.25); /*失效色,無需關注色*/
  --link-color: #555; /*鏈接色*/
  --code-bg-color:#f0f0f0; /*代碼塊背景色*/
}
.header { margin:0 auto; position:relative; width:calc(100% - 20px); } body { margin:0; background:var(--body-bg-color); color:var(--text-color); line-height:2; } a { color:var(--link-color); text-decoration:none; } #main { align-items:flex-start; display:flex; justify-content:space-between; flex-direction:row-reverse; margin:0 auto; width:calc(100% - 20px); } #page_begin_html { margin:0 auto; position:relative; } .header-inner { background:#fff; border-radius:initial; box-shadow:initial; overflow:hidden; padding:0; position:absolute; top:0; width:240px; margin:0 auto; } .site-brand-container { background:var(--primary-color); display:flex; flex-shrink:0; padding:0 10px; } .site-meta { padding:20px 0; flex-grow:1; text-align:center; } .brand { color:#fff; display:inline-block; padding:0 40px; position:relative; } .site-title { font-family:'Times New Roman',sans-serif; font-size:1.375em; font-weight:400; margin:0; line-height:1.5; } .menu { margin-top:20px; padding-left:0; } .menu .menu-item { display:block; margin:0; list-style:none; } .search-wrap { display:inline-block; background-color:var(--code-bg-color); border-radius:20px; padding:0 10px; } .input_my_zzk { width:140px; vertical-align:middle; background-color:var(--code-bg-color); height:30px; border:none; outline:none } .site-nav-right,.site-nav-toggle { display:none; } .site-nav-right .toggle,.site-nav-toggle .toggle { padding:10px; width:22px; color:#fff; } .site-nav-right .toggle a .fa { color:#fff; } .toggle { line-height:0; } .site-nav-right .toggle .toggle-line,.site-nav-toggle .toggle .toggle-line { background:#fff; border-radius:1px; } .toggle.toggle-close .toggle-line-first { transform:rotate(-45deg); top:5px; } .toggle.toggle-close .toggle-line-middle { opacity:0; } .toggle.toggle-close .toggle-line-last { transform:rotate(45deg); top:-5px; } .toggle .toggle-line { display:inline-block; height:2px; left:0; position:relative; top:0; transition:all .4s; vertical-align:top; width:100%; } .toggle .toggle-line:not(:first-child) { margin-top:3px; } .site-nav.site-nav-on { display:block; } .site-nav .menu-item-active { border-right:3px solid var(--primary-color); background:var(--body-bg-color); } .site-nav .menu-item .menu-item-inner { color:#555; font-size:16px; padding:5px 20px; position:relative; text-align:left; display:block; line-height:2; } .site-nav .menu-item .menu-item-inner .fa { color:#69c0ff; margin-right:8px; } #sideBar { margin-top:300px; position:static; width:240px; background:#fff; margin-right:12px; /*?*/ } .affix { position:fixed; top:0; } #post-toc-wrap { background:var(--content-bg-color); width:240px; } #post-toc-wrap ol { font-size:14px; line-height:1.8; list-style:none; padding:0 2px 5px 10px; } .back-to-top { background: var(--body-bg-color); margin: 0 auto; cursor: pointer; text-align: center; font-size: 12px; color: var(--text-color); } #author_profile_detail { margin-left:10px; font-size:14px; } #author_profile_detail a { color:var(--text-color-secondary); } .author_avatar,.site-author-image { border-radius:50%; } .site-author-image { border:1px solid #eee; display:block; margin:20px auto 0; max-width:80px; padding:2px; } .site-author-name { color:var(--text-color); font-weight:600; margin:10px 0 0; text-align:center; } .site-state { margin:10px auto; text-align:center; color:var(--text-color); } .links-of-author { display: flex; flex-wrap: wrap; margin-top: 10px; justify-content: center; } .links-of-author-item { margin: 5px 0 0; } .links-of-author a{ font-size: 16px; padding: 0 5px; } .links-of-author a .fa-envelope { color: #e4b56b; } .links-of-author a .fa-rss { color: #fa541c; } #mainContent { background:var(--content-bg-color); box-sizing:border-box; padding:40px; width:calc(100% - 252px); } .forFlow { padding-top:20px; } .day { margin-bottom:60px; } .dayTitle { display:none; } .postTitle { font-size:27px; font-weight:400; line-height:1.5; text-align:center; word-wrap:break-word; color:var(--link-color); } .postCon { font-family:'Noto Serif SC','Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; word-wrap:break-word; margin:.5em 0; } .c_b_p_desc_readmore { color:var(--primary-color); } .c_b_p_desc { line-height:2; } .postDesc { text-align:right; font-style:italic; font-size:14px; color:var(--text-color-grey); } .postDesc a { color:var(--text-color-grey); } #cnblogs_post_description { font-family:'Noto Serif SC','Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; color:var(--text-color); } #post-description-meta { line-height:4; text-align:center; font-size:18.667px; font-weight:500; color:var(--heading-color); font-family:SimHei,'Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; } #post-keyword { color:var(--text-color); font-family:'Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; } #post-keyword a { font-family:'Noto Serif SC','Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; } #cnblogs_post_body p { font-family:'Noto Serif SC','Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; } #cnblogs_post_body h3 { padding-top:10px; font-size:18.667px; font-weight:500; color:var(--heading-color); font-family:SimHei,'Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; } #cnblogs_post_body h4,#cnblogs_post_body h5,#cnblogs_post_body h6 { padding-top:10px; font-size:16px; font-weight:500; color:var(--heading-color); font-family:SimHei,'Times New Roman',"PingFang SC","Microsoft YaHei",sans-serif; } #cnblogs_post_body h2 { padding-top:10px; text-align:center; font-size:21.333px; margin:1em auto; font-weight:500; line-height:2em; color:var(--heading-color); } .postBody blockquote { border:none; border-left:4px solid #ddd; color:var(--text-color-secondary); margin:0; padding:0 15px; } .postBody p > a { text-decoration:underline; } #cnblogs_post_body table { border-collapse:collapse; border-spacing:0; font-size:.875em; margin:0 auto; max-width:100%; width:auto; border:none; border-top:2px solid #222; border-bottom:2px solid #222; } #cnblogs_post_body table thead { border-bottom:1px solid #999; } #cnblogs_post_body table tr { overflow-x: scroll; overflow-y:hidden; text-align:justify; word-break:keep-all; } #cnblogs_post_body table td,#cnblogs_post_body table th { padding:4px 8px; width:150px; border:none; } .cnblogs-markdown code { background-color:var(--code-bg-color) !important; border:none !important; font-weight: 300; } .cnblogs-markdown .hljs { font-size:14px !important; padding:10px !important; } #cnblogs_post_body img { display:block; margin:0 auto; } .footnotes-meta { margin:2em 0 0 0; } .github-corner svg { border:0; color:#fff; fill:var(--primary-color); position:absolute; right:0; top:0; z-index:1000; } .github-corner:hover .octo-arm { animation:octocat-wave 560ms ease-in-out; } @keyframes octocat-wave { 0%,100% { transform:rotate(0); } 20%,60% { transform:rotate(-25deg); } 40%,80% { transform:rotate(10deg); } } /*share*/ #div_digg{ filter: grayscale(); margin-right: 0; margin-top: 0; } #blog_post_info { display: flex; justify-content: space-between; } #author_profile { width:auto; } #green_channel { display: none; } /*pre-next*/ .post_next_prev { line-height: 1.5; display: flex; justify-content: space-between; border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; } .post_next_prev >div { width: 50%; padding: 0 12px; } .next-block,.next a { text-align: right; } .pre-block a,.next-block a { display: inline-block; padding: 32px 0; } .post_next_prev_label { margin-bottom: 8px; font-size: 14px; color: var(--text-color-grey); } /*comment*/ .comment_textarea { padding:15px; border-radius:10px; outline:0; resize:none; overflow:hidden; width:100%; } .feedback_area_title, #commentform_title { font-size: 14px; line-height: 32px; color: var(--text-color-secondary); padding: 10px 0; background: none; } .feedbackItem { position: relative; padding: 16px 0 16px 60px; font-size:14px; } .feedbackAvatar { position: absolute; left: 1px; } .feedbackAvatar img { border-radius: 50%; width:40px; height: 40px; } .feedbackManage { text-align: right; float: right; } .feedbackManage a, .comment_vote a { color: var(--text-color-secondary); } .layer { display: none; } [id^=a_comment_author_] { float: left; } .louzhu { background-color: var(--primary-color); color: #fff; line-height: 28px; padding: 3px; border-radius: 3px; } .comment_date { color: var(--text-color-grey); font-size: 12px; padding-left: 16px; } .commentbox_tab { margin-right: 0; padding: 8px 16px; font-size: 14px; line-height: 23px; color: var(--text-color-secondary); border: 1px solid var(); border-bottom: 0; } .commentbox_tab:hover, .commentbox_tab.active { color: var(--text-color); border-bottom: none; } .commentbox_tab.active { border-radius: 6px 6px 0 0; border: 1px solid #e1e4e8; border-bottom: none; } div.commentform textarea, #tbCommentBodyPreview  { min-height: 250px; padding: 8px 0; } #commentbox_opt { text-align: right; } #commentbox_opt>a,#btn_comment_submit, #span_comment_canceledit{ width:auto; height: 34px; color: var(--text-color-secondary); padding: 5px 16px; font-size: 14px; line-height: 20px; } #btn_comment_submit { background-color: var(--primary-color); color: #fff; border-radius: 6px; border:1px solid rgba(27,31,35,.15); } #comment_form_container p { color: var(--text-color-secondary); } #footer { color:var(--text-color-grey); font-size:.875em; line-height:28px; padding-left:260px; box-sizing:border-box; margin:0 auto; text-align:center; width:calc(100% - 20px); } #header,.catListTitle,#profile_block,#under_post_news,#ad_t2,.c_ad_block,#under_post_kb,#comment_nav { display:none; } /*mypost*/ #myposts .PostList { font-size: 18.667px; color: var(--heading-color); line-height: 2; } #myposts .postDesc2 { font-size: 14px; color: var(--text-color-secondary); text-align: right; } /* Responsive design*/ @media (min-width:1600px) { #main,.header { width:73%; } } @media (min-width:1200px) { #main,.header { width:1160px; } .header-inner { width:240px; } } @media (max-width:991px) { .header,.header-inner,.main-inner,#footer { width:auto; } .header-inner { border-radius:initial; position:relative; } #sideBar,#post-toc-wrap,.github-corner { display:none; } #mainContent { border-radius:initial; padding:16px; width:100%; } .site-brand-container { box-shadow:0 0 16px rgba(50,132,191,.9); } #footer { padding-left:0; padding-right:0; } } @media (max-width:991px) and (min-width:768px) { .site-nav-right,.site-nav-toggle { display:flex; flex-direction:column; justify-content:center; } .site-nav { display:none; } } @media (max-width:767px) { .site-nav { clear:both; display:none; } .site-nav-right,.site-nav-toggle { display:flex; flex-direction:column; justify-content:center } .feedbackAvatar img { width:32px; height: 32px; } .feedbackItem { padding-left: 40px; } .commentform { margin-left: 0; } }


#bannerbar{
display:none;
}

.entrylistPosttitle{
display: block;
text-align: left;
border-bottom: 3px solid var(--primary-color);
}

.entrylistItem{
margin-top:20px;
}

.entrylistPostSummary{
margin:10px 0 10px 0;
}




#sidebar_categories{
border-top: 1px solid var(--primary-color);
border-bottom: 3px solid var(--primary-color);
background: #ffffff;
}

PostsList1_rpPosts_TitleUrl_2

#sidebar_toptags{
border-right: 3px solid var(--primary-color);
background: var(--body-bg-color);
}


.postTitle2{


display: block;
text-align: left;
border-bottom: 3px solid var(--primary-color);

}
.vertical-middle{
display: block;
text-align: left;
border-bottom: 3px solid var(--primary-color);
}


.catListTag ul li{
list-style:none;
}



footer.html


<script>
  /**
   * @author:me@makergyt.com
   * @version:2020-07-01
   * @------------------------------------------------------------------
   * @update 2021-5-6 https://github.com/hiszm/cnblogs-theme-next-pro
   */
  window.config = {
    avatar: 'https://pic.cnblogs.com/avatar/1170988/20210329201859.png',
    github: 'hiszm',
    gallery: '1833698'
  }
</script>
<!-- 下方內容請勿擅自修改,除非知道明確含義,如進行完善和擴展,請fork原始碼(https://github.com/MakerGYT/cnblogs-theme-next)后提交pull request;-->
<!-- 引入在線字體-->
<link rel="stylesheet"
  href="https://fonts.googleapis.com/css2?family=Noto Serif SC:wght@400;500;700&display=swap&subset=latin,latin-ext">
<!-- 引入圖示庫-->
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<!-- 更改高亮樣式-->
<link href="https://cdn.jsdelivr.net/npm/highlight.js@10.1.1/styles/github.min.css" rel="stylesheet">
<!-- 頂部滾動條-->
<script src="https://cdn.jsdelivr.net/gh/djyde/ToProgress/ToProgress.min.js"></script>
<script type="text/javascript">
  let progressBar = new ToProgress({
    color: getComputedStyle(document.documentElement).getPropertyValue('--primary-color')
  })
  progressBar.reset()
  // 如未做大幅修改,請保留下方內容
  $('#poweredby').append('&nbsp;&&nbsp;<a href="https://github.com/hiszm/cnblogs-theme-next-pro">cnblogs-theme-next-pro</a>')
  // 獲取默認基礎資訊
  window.isPost = $('.forFlow').find('#post_detail').length ? true : false;
  window.blogSlug = currentBlogApp;
  var footerOverTestArray = $($("#footer")[0].childNodes[2]).text().trim().split(" ");

  config = Object.assign({
    siteTitle: $('#Header1_HeaderTitle').text(),
    author: footerOverTestArray[footerOverTestArray.length - 1],
    avatar: $('.author_avatar').attr('src'),
    github: blogSlug,
    gallery: null
  }, config);

  var linkObject = document.createElement("link");
  linkObject.rel = "shortcut icon";
  linkObject.href = config.avatar;

  // 設定摘要
  function setDesc() {
    $('#cnblogs_post_description').css('display', 'block')
    $('#cnblogs_post_description').prepend('<h3 id="post-description-meta">摘 要</h3>')
    // 由于標簽是網路請求,可能在修改dom后回傳,故重新請求后再修改
    $.ajax({
      url: getAjaxBaseUrl() + "CategoriesTags.aspx",
      type: "get",
      contentType: "application/json; charset=utf-8",
      data: {
        blogId: cb_blogId,
        postId: cb_entryId,
      },
      cache: !1,
      dataType: "text",
      timeout: 1e4,
      success: function (n) {
        n && $("#cnblogs_post_description").append(n.replace('EntryTag', 'post-keyword').replace('標簽', '關鍵詞'))
        $('#EntryTag').remove()
      }
    })
  }
  // 設定參考文獻標題
  function setFoot() {
    $('.footnotes').prepend('<h2 id="-參考文獻" class="footnotes-meta">參 考 文 獻</h2>')
  }
  // 設定左側目錄
  function setContent() {
    if ($('#post-toc-wrap').length) return;
    var toc = $('<div id="post-toc-wrap"><h3 style="text-align:center">目錄</h3></div>')
    $('#blog-news').prepend(toc)
    var captions_ori = $("#cnblogs_post_body h2"),
      captions_ori2 = $("#cnblogs_post_body h3"),
      captions = $("#cnblogs_post_body h2,#cnblogs_post_body h3").clone(),
      content = $("<ol id='post-toc'></ol>");

    toc.append(content.append(captions));
    toc.append('<div class="back-to-top" οnclick="toScroll(0,500)"><i class="fa fa-arrow-up"></i>&nbsp;<span id="btc-persent">0%</span></div>')

    var index = -1, index2 = -1;
    captions.replaceWith(function () {
      var self = this;
      if (self.tagName == "H2" || self.tagName == "h2") {
        // 設定點擊目錄跳轉
        index += 1;
        $('<a name="' + '_caption_' + index + '"></a>').insertBefore(captions_ori[index]);
        return '<li id="' + index + 'li"><a href="#_caption_' + index + '">' + self.innerHTML + '</a><ol></ol></li>';
      } else {
        index2 += 1;
        $('<a name="' + '_caption' + index2 + '"></a>').insertBefore(captions_ori2[index2]);
        $("#" + index + "li ol").append("<li><a href='#_caption" + index2 + "' style='color:#5f5f5f;'>" + self.innerHTML + "</a></li>");
        return;
      }
    });
  }
  // 滾動至頂部
  function toScroll(endScroll, time) {
    $('html,body').stop().animate({ scrollTop: endScroll }, time);
  }
  function onScroll() {
    // 上拉至指定位置貼頂
    var oldScrollNum = 0;

    window.onscroll = function () {
      var t = document.documentElement.scrollTop || document.body.scrollTop;
      if (t > oldScrollNum) {
        if (t > 135) {
          $('.site-author').remove()
          $('#sidebar_categories').hide()
          setContent()
        }
        if (t > 270) {
          $("#post-toc-wrap").addClass("affix");
        }
      } else {
        if (t <= 135) {
          $('#post-toc-wrap').remove()
          $('#sidebar_categories').show()
          setAuthor()
        }
        if (t <= 270) {
          $("#post-toc-wrap").removeClass("affix");
        }
      }
      oldScrollNum = t;
      // 滾動條
      var docHeight = $(document).height(),
        windowHeight = $(window).height(),
        scrollPercent = (t / (docHeight - windowHeight)) * 100;
      progressBar.setProgress(scrollPercent);
      $('#btc-persent').replaceWith('<span id="btc-persent">' + scrollPercent.toFixed() + '%</span>')
    }
  }
  function setAuthor() {
    if ($('.site-author').length) return;
    var siteAuthor = $('<div class="site-author motion-element"><img class="site-author-image" src="' + config.avatar + '"><p class="site-author-name">' + config.author + '</p></div>');
    siteAuthor.append('<div class="site-state">' + $('.blogStats').html() + '</div>')
    var links = $('<div class="links-of-author"></div>')
    links.append('<div class="links-of-author-item"><a href="https://msg.cnblogs.com/send/'+ config.author+'"><i class="fa fa-fw fa-envelope"></i></a></div>'
      +'<div class="links-of-author-item"><a id="blog_nav_rss" href="https://www.cnblogs.com/'+blogSlug+'/rss/" data-rss="https://www.cnblogs.com/'+blogSlug+'/rss/" style="display: inline !important;"><i class="fa fa-fw fa-rss"></i></a></div>')
    $('#blog-news').prepend(siteAuthor.append(links))
  }
  // 設定導航區
  function setNav() {
    var url = window.location.href;
    $('.brand').attr('href', '/' + blogSlug)
    $('.site-title').text(config.siteTitle)
    $('.menu-item-home a:first').attr('href', '/' + blogSlug)
    $('.menu-item-archives a:first').attr('href', '/' + blogSlug+'/p')
    if(config.gallery) {
      $('.menu-item-gallery a:first').attr('href', '/' + blogSlug+'/gallery/'+config.gallery+'.html')
      $('.menu-item-gallery').css('display','block')

      if(/gallery/.test(url)){
        $('.menu-item-home').removeClass('menu-item-active')
        $('.menu-item-gallery').addClass('menu-item-active')
      }
    }
    
    if(/(\/p)$/.test(url)) {
      $('.menu-item-home').removeClass('menu-item-active')
      $('.menu-item-archives').addClass('menu-item-active')
    } 
  }

  // 設定右上角github跳轉鏈接
  function setGithub() {
    $('.github-corner').attr('href', 'https://github.com/' + config.github)
  }
  // 在回應式設計中,選單折疊打開事件
  function setToggle() {
    document.querySelector('.site-nav-toggle .toggle').addEventListener('click', () => {
      event.currentTarget.classList.toggle('toggle-close');
      var e = document.querySelector('.site-nav'),
        t = e.classList.contains('site-nav-on') ? 'slideUp' : 'slideDown';
      'function' == typeof Velocity ? Velocity(e, t, {
        duration: 200,
        complete: function () {
          e.classList.toggle('site-nav-on')
        }
      }) : e.classList.toggle('site-nav-on')
    });
  }
  function setCommentStyle() {
    let t = $(".feedbackItem");
    if (t.length > 0) {
      $.each(t, function (t) {
        let e = $(this)
          , n = e.find(".feedbackCon")
          , o = e.find(".feedbackListSubtitle")
          , i = n.length ? n.find(".blog_comment_body") : []
          , s = ""
          , a = i.length ? i.attr("id").split("_") : void 0;
        if (a && a.length > 0) {
          let t = a[a.length - 1]
            , n = t.toString().match(/[0-9]/g);
          $.isArray(n) && (t = n.join(""));
          let o = $("#comment_" + t + "_avatar")
            , i = o.length > 0 ? $.trim(o.text()) : "https://cdn.jsdelivr.net/gh/BNDong/Cnblogs-Theme-SimpleMemory@master/img/webp/default_avatar.webp"
            , l = $("#a_comment_author_" + t)
            , c = l.length ? l.attr("href") : "javascropt:void(0);";
          s = '<div class="feedbackAvatar"><a href="' + c + '" target="_blank"><img src="' + i + '"/></a></div>',
            e.prepend(s)
        }
        o.length && o.find(".louzhu").length && o.addClass("feedbackListSubtitle-louzhu")
      })
    }
  }
  function setPreNext() {
    var pnp = $("#post_next_prev a");
    if(!pnp.length) return;
    var cont = $('#post_next_prev').text();
    var wrapper = $('<div class="post_next_prev"><div class="pre-block"></div><div class="next-block"></div></div>')
    $("#post_next_prev").replaceWith(wrapper)
    var pre = $('<a href="'+pnp[1].href+'"><div class="post_next_prev_label">&#9668上一篇</div><div>'+pnp[1].innerText+'</div></a>')
    
    if(pnp.length>2){
      $('.pre-block').append(pre)
      var next = $('<a href="'+pnp[3].href+'"><div class="post_next_prev_label">下一篇&#9658</div><div>'+pnp[3].innerText+'</div></a>')
      $('.next-block').append(next)
    } else {
      if(/上一篇/.test(cont)) {
        $('.pre-block').append(pre)
      } else if(/下一篇/.test(cont)) {
        var next = $('<a href="'+pnp[1].href+'"><div class="post_next_prev_label">下一篇&#9658</div><div>'+pnp[1].innerText+'</div></a>')
        $('.next-block').append(next)
      }
    }
  }
  setGithub();
  setToggle();
  setNav();
  setTimeout(() => {
    setAuthor();
  }, 500);
  // 只對文章頁
  if (isPost) {
    setFoot();
    // 由于加載需要時間故增加延時后操作
    setTimeout(() => {
      setDesc();
      setPreNext();
      onScroll();
    }, 500);
    setTimeout( () => {
      setCommentStyle()
    }, 1000)
  }
</script>


head.html

<!-- 進度條 -->
<div id="top-progress-bar" style="position: fixed; top: 0px; left: 0px; right: 0px; background-color: rgb(244, 67, 54); height: 2px; width: 0%; transition: width 0.2s ease 0s, opacity 0.6s ease 0s;"></div>
<!-- 右上角github-->
<a href=" " rel="noopener external nofollow noreferrer" target="_blank"
  class="exturl github-corner"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
    <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
    <path
      d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
      fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"></path>
    <path
      d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
      fill="currentColor" class="octo-body"></path>
  </svg></a>
<header class="header">
  <div class="header-inner">
    <!-- 頭部banner-->
    <div class="site-brand-container">
      <div class="site-nav-toggle">
        <div class="toggle" aria-label="切換導航欄"><span class="toggle-line toggle-line-first"></span> <span
            class="toggle-line toggle-line-middle"></span> <span class="toggle-line toggle-line-last"></span></div>
      </div>
      <div class="site-meta"><a href="" class="brand" rel="start"><span class="logo-line-before"><i></i></span>
          <h1 class="site-title">博客園</h1><span class="logo-line-after"><i></i></span>
        </a></div>
      <div class="site-nav-right">
        <div class="toggle popup-trigger"><i class="fa fa-search fa-fw fa-lg"></i></div>
      </div>
    </div>
    <!-- 導航-->
    <nav class="site-nav">
      <ul id="menu" class="menu">
        <li class="menu-item menu-item-home menu-item-active"><a class="menu-item-inner" href=""
            rel="section"><i class="fa fa-fw fa-home"></i>首頁</a></li>
        <li class="menu-item menu-item-archives"><a class="menu-item-inner" href=""
        rel="section"><i class="fa fa-fw fa-archive"></i>歸檔</a></li>  
        <li class="menu-item "><a class="menu-item-inner" href="https://i.cnblogs.com/"
        rel="section"><i class="fa fa-fw fa-cog"></i>管理</a></li>  
        <li class="menu-item menu-item-gallery" style="display: none;"><a class="menu-item-inner" href=""
            rel="section"><i class="fa fa-fw fa-camera"></i>相冊</a>
</li>



        <li class="menu-item menu-item-search"><a class="menu-item-inner search-wrap"><i
              class="fa fa-search fa-fw"></i><input type="text" id="q" onkeydown="return zzk_go_enter(event);"
              class="input_my_zzk" placeholder="按下Enter搜索"></a></li>
      </ul>
    </nav>
  </div>
</header>




轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/328072.html

標籤:其他

上一篇:怎么修改樹形控制元件中的圖示

下一篇:C++多型

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 面試突擊第一季,第二季,第三季

    第一季必考 https://www.bilibili.com/video/BV1FE411y79Y?from=search&seid=15921726601957489746 第二季分布式 https://www.bilibili.com/video/BV13f4y127ee/?spm_id_fro ......

    uj5u.com 2020-09-10 05:35:24 more
  • 第三單元作業總結

    1.前言 這應該是本學期最后一次寫作業總結了吧。總體來說,對作業的節奏也差不多掌握了,作業做起來的效率也更高了。雖然和之前的作業一樣,作業中都要用到新的知識,但是相比之前,更加懂得了如何利用工具以及資料。雖然之間卡過殼,但總體而言,這幾次作業還算完成的比較好。 2.作業程序總結 相比前兩個單元,此單 ......

    uj5u.com 2020-09-10 05:35:41 more
  • 北航OO(2020)第四單元博客作業暨課程總結博客

    北航OO(2020)第四單元博客作業暨課程總結博客 本單元作業的架構設計 在本單元中,由于UML圖具有比較清晰的樹形結構,因此我對其中需要進行查詢操作的元素進行了包裝,在樹的父節點中存盤所有孩子的參考。考慮到性能問題,我采用了快取機制,一次查詢后盡可能快取已經遍歷過的資訊,以減少遍歷次數。 本單元我 ......

    uj5u.com 2020-09-10 05:35:48 more
  • BUAA_OO_第四單元

    一、UML決議器設計 ? 先看下題目:第四單元實作一個基于JDK 8帶有效性檢查的UML(Unified Modeling Language)類圖,順序圖,狀態圖分析器 MyUmlInteraction,實際上我們要建立一個有向圖模型,UML中的物件(元素)可能與同級元素連接,也可與低級元素相連形成 ......

    uj5u.com 2020-09-10 05:35:54 more
  • 6.1邏輯運算子

    邏輯運算子 1. && 短路與 運算式1 && 運算式2 01.運算式1為true并且運算式2也為true 整體回傳為true 02.運算式1為false,將不會執行運算式2 整體回傳為false 03.只要有一個運算式為false 整體回傳為false 2. || 短路或 運算式1 || 運算式2 ......

    uj5u.com 2020-09-10 05:35:56 more
  • BUAAOO 第四單元 & 課程總結

    1. 第四單元:StarUml檔案決議 本單元采用了圖模型決議UML。 UML檔案可以抽象為圖、子圖、邊的邏輯結構。 在實作中,圖的節點包括類、介面、屬性,子圖包括狀態圖、順序圖等。 采用了三次遍歷UML元素的方法建圖,第一遍遍歷建點,第二、三次遍歷設定屬性、連邊,實作圖物件的初始化。這里借鑒了一些 ......

    uj5u.com 2020-09-10 05:36:06 more
  • 談談我對C# 多型的理解

    面向物件三要素:封裝、繼承、多型。 封裝和繼承,這兩個比較好理解,但要理解多型的話,可就稍微有點難度了。今天,我們就來講講多型的理解。 我們應該經常會看到面試題目:請談談對多型的理解。 其實呢,多型非常簡單,就一句話:呼叫同一種方法產生了不同的結果。 具體實作方式有三種。 一、多載 多載很簡單。 p ......

    uj5u.com 2020-09-10 05:36:09 more
  • Python 資料驅動工具:DDT

    背景 python 的unittest 沒有自帶資料驅動功能。 所以如果使用unittest,同時又想使用資料驅動,那么就可以使用DDT來完成。 DDT是 “Data-Driven Tests”的縮寫。 資料:http://ddt.readthedocs.io/en/latest/ 使用方法 dd. ......

    uj5u.com 2020-09-10 05:36:13 more
  • Python里面的xlrd模塊詳解

    那我就一下面積個問題對xlrd模塊進行學習一下: 1.什么是xlrd模塊? 2.為什么使用xlrd模塊? 3.怎樣使用xlrd模塊? 1.什么是xlrd模塊? ?python操作excel主要用到xlrd和xlwt這兩個庫,即xlrd是讀excel,xlwt是寫excel的庫。 今天就先來說一下xl ......

    uj5u.com 2020-09-10 05:36:28 more
  • 當我們創建HashMap時,底層到底做了什么?

    jdk1.7中的底層實作程序(底層基于陣列+鏈表) 在我們new HashMap()時,底層創建了默認長度為16的一維陣列Entry[ ] table。當我們呼叫map.put(key1,value1)方法向HashMap里添加資料的時候: 首先,呼叫key1所在類的hashCode()計算key1 ......

    uj5u.com 2020-09-10 05:36:38 more
最新发布
  • 【中介者設計模式詳解】C/Java/JS/Go/Python/TS不同語言實作

    * 中介者模式是一種行為型設計模式,它可以用來減少類之間的直接依賴關系,
    * 將物件之間的通信封裝到一個中介者物件中,從而使得各個物件之間的關系更加松散。
    * 在中介者模式中,物件之間不再直接相互互動,而是通過中介者來中轉訊息。 ......

    uj5u.com 2023-04-20 08:20:47 more
  • 露天煤礦現場調研和交流案例分享

    他們集團的資訊化公司及研究院在一個礦區正在做智能礦山的統一平臺的 試點,專案投資大概1億,包括了礦山的各方面的內容,顯示得我們這次交流有點多余。他們2年前開始做智能礦山的規劃,有很多煤礦行業專家的加持,他們的描述是非常完美,但是去年底應該上線的平臺,現在還沒有看到影子。他們確實有很多場景需求,但是被... ......

    uj5u.com 2023-04-20 08:20:25 more
  • 《社區人員管理》實戰案例設計&個人案例分享

    設計是一個讓人夢想成真程序,開始編碼、測驗、除錯之前進行需求分析和架構設計,才能保證關鍵方面都做正確 ......

    uj5u.com 2023-04-20 08:20:17 more
  • 軟體架構生態化-多角色交付的探索實踐

    作為一個技術架構師,不僅僅要緊跟行業技術趨勢,還要結合研發團隊現狀及痛點,探索新的交付方案。在日常中,你是否遇到如下問題 “ 業務需求排期長研發是瓶頸;非研發角色感受不到研發技改提效的變化;引入ISV 團隊又擔心質量和安全,培訓周期長“等等,基于此我們探索了一種新的技術體系及交付方案來解決如上問題。 ......

    uj5u.com 2023-04-20 08:20:10 more
  • 【中介者設計模式詳解】C/Java/JS/Go/Python/TS不同語言實作

    * 中介者模式是一種行為型設計模式,它可以用來減少類之間的直接依賴關系,
    * 將物件之間的通信封裝到一個中介者物件中,從而使得各個物件之間的關系更加松散。
    * 在中介者模式中,物件之間不再直接相互互動,而是通過中介者來中轉訊息。 ......

    uj5u.com 2023-04-20 08:19:44 more
  • 露天煤礦現場調研和交流案例分享

    他們集團的資訊化公司及研究院在一個礦區正在做智能礦山的統一平臺的 試點,專案投資大概1億,包括了礦山的各方面的內容,顯示得我們這次交流有點多余。他們2年前開始做智能礦山的規劃,有很多煤礦行業專家的加持,他們的描述是非常完美,但是去年底應該上線的平臺,現在還沒有看到影子。他們確實有很多場景需求,但是被... ......

    uj5u.com 2023-04-20 08:19:07 more
  • 《社區人員管理》實戰案例設計&個人案例分享

    設計是一個讓人夢想成真程序,開始編碼、測驗、除錯之前進行需求分析和架構設計,才能保證關鍵方面都做正確 ......

    uj5u.com 2023-04-20 08:18:57 more
  • 軟體架構生態化-多角色交付的探索實踐

    作為一個技術架構師,不僅僅要緊跟行業技術趨勢,還要結合研發團隊現狀及痛點,探索新的交付方案。在日常中,你是否遇到如下問題 “ 業務需求排期長研發是瓶頸;非研發角色感受不到研發技改提效的變化;引入ISV 團隊又擔心質量和安全,培訓周期長“等等,基于此我們探索了一種新的技術體系及交付方案來解決如上問題。 ......

    uj5u.com 2023-04-20 08:18:49 more
  • 05單件模式

    #經典的單件模式 public class Singleton { private static Singleton uniqueInstance; //一個靜態變數持有Singleton類的唯一實體。 // 其他有用的實體變數寫在這里 //構造器宣告為私有,只有Singleton可以實體化這個類! ......

    uj5u.com 2023-04-19 08:42:51 more
  • 【架構與設計】常見微服務分層架構的區別和落地實踐

    軟體工程的方方面面都遵循一個最基本的道理:沒有銀彈,架構分層模型更是如此,每一種都有各自優缺點,所以請根據不同的業務場景,并遵循簡單、可演進這兩個重要的架構原則選擇合適的架構分層模型即可。 ......

    uj5u.com 2023-04-19 08:42:41 more