ppoffice / hexo-component-inferno

A collection of Inferno.js layout components and utility scripts for Hexo
https://ppoffice.github.io/hexo-component-inferno/
24 stars 30 forks source link

feat(view): fix #17, and make article_licensing supports more than one icons #18

Closed Ray-Eldath closed 3 years ago

Ray-Eldath commented 3 years ago

this PR is backward-compatible.

it makes changes to article_licensing.jsx, links.jsx and related schemas.

the former makes the article.licenses.icon supports many icons, as it's common for CC lincense to show all icons, e.g.

article:
  licenses:
     'CC BY-NC-ND 4.0':
       icon: 
         - fab fa-creative-commons-by
         - fab fa-creative-commons-nc
         - fab fa-creative-commons-nd
       url: https://creativecommons.org/licenses/by-nc-nd/4.0/

and the latter fix #17 by adding a new property hide_hostname which is a boolean. this PR is tested on my hexo-theme-icarus deployments (ray-eldath.me) and works really great. it may need slight CSS-ing of hexo-theme-icarus regarding icons of license.


BTW here's another great small improvement, appending following lines to icarus/include/style/widget.styl creates a very sommth experience IMHO when the toc is too long to be filled in a single page even some items are stacked:

image

    &#toc
        .card-content
            max-height: 94vh
            overflow-y: auto
Ray-Eldath commented 3 years ago

sorry for the late reply, just came back from a trip. problems addressed, now it rendered like this with some extra CSS-tunning in the main theme repo:

image

if it's ok, i'll rebase this PR to simplify commit log and propose a new PR in hexo-theme-icarus for all accompanying CSS-stuff and some small improvements which is useful IMHO.

ppoffice commented 3 years ago

LGTM. Please go ahead and rebase.

Ray-Eldath commented 3 years ago

rebase has been done, and related PR has submitted as https://github.com/ppoffice/hexo-theme-icarus/pull/847.