Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
Add support for jdenticon, refactor js library dependency structure
Browse files Browse the repository at this point in the history
  • Loading branch information
qutang committed Jul 7, 2018
1 parent 82ffe88 commit 7fe0275
Show file tree
Hide file tree
Showing 143 changed files with 17,809 additions and 103 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.DS_Store
node_modules
tmp
.vscode/
vim*
6 changes: 6 additions & 0 deletions .grenrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
dataSource: "issues"
prefix: ""
onlyMilestones: false
groupBy: false
changelogFilename: "CHANGELOG.md"
9 changes: 8 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.0.15
version: 2.0.16
url: https://qutang.github.io/cutie/
logo: /images/theme-icon.svg
slogan: Bazinga, theme cutie!
Expand Down Expand Up @@ -28,6 +28,8 @@ post:
enable_unread_badge: false

changelog:
v2.0.16:
- Use jdenticon when post icon is unavailable.
v2.0.15:
- Bug fix of searching result links. Refer to <a href='https://github.com/qutang/hexo-theme-cutie/issues/85' target='_blank'>#85</a>.
v2.0.14:
Expand Down Expand Up @@ -157,6 +159,11 @@ libs:
name: striptags
url: https://www.npmjs.com/package/striptags
js: /libs/striptags/src/striptags.js
jdenticon:
name: "Jdenticon: Open source library for generating identicons"
url: https://jdenticon.com
js_min: /libs/jdenticon/dist/jdenticon.min.js
js: /libs/jdenticon/dist/jdenicon.js



9 changes: 5 additions & 4 deletions layout/_partial/card.swig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{% endfor %}
{% else %}
{% set category_link = url_for(item.path) %}
{% set category_name = "uncategorized" %}
{% set category_name = "{{ url_for(generate_post_icon(item.title)) }}" %}
{% endif %}
<mark class='Card-badge' style='{visibility: "hidden"}'></mark>
<div class='Card-figure'>
Expand All @@ -37,10 +37,11 @@
{% else %}
<a href="{{ url_for(item.path) }}">
{% endif %}

{% if item.icon %}
<img class='grow' src="{{ item.icon }}" alt="" onerror='if(this.src != "/images/uncategorized.svg") this.src = "/images/uncategorized.svg"'>
{% else %}
<img class='grow' src="{{ '/images/' + category_name + '.svg' }}" alt="" onerror='if (this.src != "/images/uncategorized.svg") this.src = "/images/uncategorized.svg"'>
<img class='grow' src="{{ item.icon }}" alt="" onerror='this.src = "{{ generate_post_icon(item.title) }}"'>
{% else %}
<img class='grow' src="{{ category_name }}" alt="" onerror='this.src = "{{ generate_post_icon(item.title) }}"'>
{% endif %}
</a>
</div>
Expand Down
15 changes: 15 additions & 0 deletions node_modules/.bin/hashes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions node_modules/.bin/hashes.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/canvas-renderer/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

173 changes: 173 additions & 0 deletions node_modules/canvas-renderer/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions node_modules/canvas-renderer/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7fe0275

Please sign in to comment.