Hexo主題實現多級分類顯示,hexo主題

來源:互聯網
上載者:User

Hexo主題實現多級分類顯示,hexo主題
前言

最近在搞一個部落格,是託管在github和gitcafe上的,利用Hexo產生的。
之後,發現一個問題,顯示的分類都是一級的。而我想要的是:能顯示多級分類,層次分明`的那樣。

問題

基本主題內建的分類顯示都是一級的,如何顯示多級?

解決方案

所以,研究了一下,找到了理想的方法,方法如下:

樣本

說明:我使用的是jacman主題,以這個主題為例說明。

  • 在主題檔案夾下找到source/css/_partial/aside.styl檔案,其他的也可能是source/css/_partial/sidebar.styl。反正,能在頁面顯示即可。

  • 添加新的樣式,我的如下:

    //categories.category-block>ul>li  border-bottom 1px solid #ccc.category-block li  margin-bottom 8px.category-list  @media mini    width 45%    float left    margin 0 5% 0 0  @media tablet    width 100%    float none    margin .5em 0 0  .categoriy-list-item    padding .5em 5%  .category-list-count    top -.5em    padding-left .3em    font-size 75%    line-height 0    position relative    vertical-align baseline  ul, ol, dl    list-style none  ul, ol, dl    background-color #f9f9fa    margin-left 20px    li      border-bottom 1px dashed #ccc  .category-list-child    border-top 1px dashed #ccc    margin-bottom 8px

想實現不同的樣式,自己可以修改。

原文來自:http://git.seay.me

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.