Skip to content

Commit

Permalink
optimize page performace
Browse files Browse the repository at this point in the history
  • Loading branch information
WeileiZeng committed Mar 30, 2020
1 parent 326c2c5 commit 06adec9
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 14 deletions.
1 change: 1 addition & 0 deletions _data/stars/zhou-xiaojun-jd_mask.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
190
1 change: 1 addition & 0 deletions _includes/github_icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://github.com/{{repo_name}}" target="_blank"><img alt="github" src="assets/shields/{{ repo_name | split: '/' | join: '-' }}.svg" align="top"></a>
1 change: 1 addition & 0 deletions _includes/github_icon_with_name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ repo_name }} <a href="https://github.com/{{repo_name}}" target="_blank"><img alt="github" src="assets/shields/{{ repo_name | split: '/' | join: '-' }}.svg" align="top"></a>
2 changes: 1 addition & 1 deletion _includes/navigation.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| <a href="index" name="top">Global</a> | [Countries](areas) | [China](china) | <a href="tags"> <em style="color:#D0CE3B">tags</em> </a> | [About](about) |
| <a href="index" name="top">Global</a> | [Countries](areas) | [China](china) | <a href="tags"> <em style="color:#C68C10">tags</em> </a> | [About](about) |
2 changes: 1 addition & 1 deletion _includes/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% for group in projects %}
## {{ group.group_name }}
{% for repo in group.repos %}
&nbsp;{% if repo.repo_name %} <object alt="github" data="assets/shields/{{ repo.repo_name | split: '/' | join: '-' }}.svg" type="image/svg+xml" align="top"></object>{% endif %} {% if repo.repo2_name %} <object alt="github" data="assets/shields/{{ repo.repo2_name | split: '/' | join: '-' }}.svg" type="image/svg+xml" align="top"></object> {% endif %} {% if repo.web_name %}<a href="{{ repo.web_url }}" target="blank">{{ repo.web_name }}</a>{% endif %} {% if repo.web2_name %}<a href="{{ repo.web2_url }}" target="blank">{{ repo.web2_name }}</a>{% endif %} {{ repo.content }} {% for tag in repo.tags %} <em style="color:#D0CE3B"> {{ tag }}</em> {% endfor %} {% endfor %}
* {% if repo.repo_name %} {% assign repo_name = repo.repo_name %} {% include github_icon.md %}{% endif %} {% if repo.repo2_name %} {% assign repo_name = repo.repo2_name %} {% include github_icon.md %}{% endif %} {% if repo.web_name %}<a href="{{ repo.web_url }}" target="blank">{{ repo.web_name }}</a>{% endif %} {% if repo.web2_name %}<a href="{{ repo.web2_url }}" target="blank">{{ repo.web2_name }}</a>{% endif %} {{ repo.content }} {% for tag in repo.tags %} <em style="color:#C68C10"> {{ tag }}</em> {% endfor %} {% endfor %}
{% endfor %}


4 changes: 2 additions & 2 deletions _includes/tags_projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{% for group in projects_sorted %}
## {{ group.group_name }}
{% for repo in group.repos %}
* {% if repo.repo_name %} {{ repo.repo_name }} <object alt="github" data="assets/shields/{{ repo.repo_name | split: '/' | join: '-' }}.svg" type="image/svg+xml" align="top"></object> {% endif %} {% if repo.repo2_name %} {{ repo.repo2_name }} <object alt="github" data="assets/shields/{{ repo.repo2_name | split: '/' | join: '-' }}.svg" type="image/svg+xml" align="top"></object> {% endif %} {% if repo.web_name %}<a href="{{ repo.web_url }}" target="blank">{{ repo.web_name }}</a>{% endif %} {% if repo.web2_name %}<a href="{{ repo.web2_url }}" target="blank">{{ repo.web2_name }}</a>{% endif %} {{ repo.content }} {% for tag in repo.tags %} <em style="color:#D0CE3B"> {{ tag }}</em> {% endfor %} {% endfor %}
<button type="button" class="hvr-radial-out" style="background-color:#83E583;color=#F392F3" onclick='myFunction("top")'>back to top</button>
* {% if repo.repo_name %}{% assign repo_name = repo.repo_name %} {% include github_icon_with_name.md %}{% endif %} {% if repo.repo2_name %}{% assign repo_name = repo.repo2_name %} {% include github_icon_with_name.md %}{% endif %} {% if repo.web_name %}<a href="{{ repo.web_url }}" target="blank">{{ repo.web_name }}</a>{% endif %} {% if repo.web2_name %}<a href="{{ repo.web2_url }}" target="blank">{{ repo.web2_name }}</a>{% endif %} {{ repo.content }} {% for tag in repo.tags %} <em style="color:#C68C10"> {{ tag }}</em> {% endfor %} {% endfor %}
<button type="button" onclick='myFunction("top")'>back to top</button>
{% endfor %}


8 changes: 0 additions & 8 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ comments: true

{% include projects.md %}

<!--
{% for country in projects %}
## {{ country.country }}
{% for repo in country.repos %}
* {% if repo.repo_name %} ![](https://img.shields.io/github/stars/{{ repo.repo_name }}?color=yellow&label=%E2%AD%90%EF%B8%8F&logoColor=blue&style=plastic) [{{ repo.repo_name }}](https://github.com/{{ repo.repo_name }}) {% endif %} {% if repo.repo2_name %} ![](https://img.shields.io/github/stars/{{ repo.repo2_name }}?color=yellow&label=%E2%AD%90%EF%B8%8F&logoColor=blue&style=plastic) [{{ repo.repo2_name }}](https://github.com/{{ repo.repo2_name }}) {% endif %} {% if repo.web_name %}[{{ repo.web_name }}]({{ repo.web_url }}){% endif %} {% if repo.web2_name %}[{{ repo.web2_name }}]({{ repo.web2_url }}){% endif %} {{ repo.content }} {% endfor %}
{% endfor %}
-->



{% include site_recommendation.md %}
Expand Down
4 changes: 2 additions & 2 deletions tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ comments: true
<a name="top" id="top"></a>
{% include page_summary_total.md %}

Here lists all projects classified by <em style="color:#D0CE3B">tags</em>. A project may appear under multiple tags. Help me to add [more.](https://github.com/WeileiZeng/Open-Source-COVID-19/issues/68)
Here lists all projects classified by <em style="color:#C68C10">tags</em>. A project may appear under multiple tags. Help me to add [more.](https://github.com/WeileiZeng/Open-Source-COVID-19/issues/68)
{% assign tags_sorted = site.data.tags | sort %}{% for tag in tags_sorted %}
<button type="button" class="hvr-radial-out" style="background-color:#83E583;color=#F392F3" onclick='myFunction("{{ tag | downcase }}")'>{{tag}}</button> {% endfor %}
<button type="button" onclick='myFunction("{{ tag | downcase }}")'>{{tag}}</button> {% endfor %}



Expand Down
29 changes: 29 additions & 0 deletions temp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
comments: true
---

{% include navigation.md %}

{% include page_summary_global.md %}


{% assign projects = site.data.global %}

{% include projects.md %}

<!--
{% for country in projects %}
## {{ country.country }}
{% for repo in country.repos %}
* {% if repo.repo_name %} ![](https://img.shields.io/github/stars/{{ repo.repo_name }}?color=yellow&label=%E2%AD%90%EF%B8%8F&logoColor=blue&style=plastic) [{{ repo.repo_name }}](https://github.com/{{ repo.repo_name }}) {% endif %} {% if repo.repo2_name %} ![](https://img.shields.io/github/stars/{{ repo.repo2_name }}?color=yellow&label=%E2%AD%90%EF%B8%8F&logoColor=blue&style=plastic) [{{ repo.repo2_name }}](https://github.com/{{ repo.repo2_name }}) {% endif %} {% if repo.web_name %}[{{ repo.web_name }}]({{ repo.web_url }}){% endif %} {% if repo.web2_name %}[{{ repo.web2_name }}]({{ repo.web2_url }}){% endif %} {{ repo.content }} {% endfor %}
{% endfor %}
-->



{% include site_recommendation.md %}




{% include footer.md %}

0 comments on commit 06adec9

Please sign in to comment.