Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 21, 2021

Conversation

Ray-Eldath
Copy link
Contributor

@Ray-Eldath Ray-Eldath commented Feb 16, 2021

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

src/view/widget/links.jsx Show resolved Hide resolved
src/view/misc/article_licensing.jsx Outdated Show resolved Hide resolved
src/view/misc/article_licensing.jsx Outdated Show resolved Hide resolved
@Ray-Eldath
Copy link
Contributor Author

Ray-Eldath commented Feb 20, 2021

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
Copy link
Owner

LGTM. Please go ahead and rebase.

feat(view): article_licensing supports multi-icons; feat(view): hostname now can be discarded if user specifies, fix ppoffice#17
@Ray-Eldath
Copy link
Contributor Author

Ray-Eldath commented Feb 21, 2021

rebase has been done, and related PR has submitted as ppoffice/hexo-theme-icarus#847.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

show hostname of links widget only there're enough space w/o wrap the line
2 participants