From 06adec9a82b50da39b3268e19a1055058a3a82d4 Mon Sep 17 00:00:00 2001
From: Weilei Zeng <240155787@qq.com>
Date: Mon, 30 Mar 2020 14:37:51 -0700
Subject: [PATCH] optimize page performace
---
_data/stars/zhou-xiaojun-jd_mask.yml | 1 +
_includes/github_icon.md | 1 +
_includes/github_icon_with_name.md | 1 +
_includes/navigation.md | 2 +-
_includes/projects.md | 2 +-
_includes/tags_projects.md | 4 ++--
index.md | 8 --------
tags.md | 4 ++--
temp.md | 29 ++++++++++++++++++++++++++++
9 files changed, 38 insertions(+), 14 deletions(-)
create mode 100644 _data/stars/zhou-xiaojun-jd_mask.yml
create mode 100644 _includes/github_icon.md
create mode 100644 _includes/github_icon_with_name.md
create mode 100644 temp.md
diff --git a/_data/stars/zhou-xiaojun-jd_mask.yml b/_data/stars/zhou-xiaojun-jd_mask.yml
new file mode 100644
index 000000000..598ed30e8
--- /dev/null
+++ b/_data/stars/zhou-xiaojun-jd_mask.yml
@@ -0,0 +1 @@
+190
diff --git a/_includes/github_icon.md b/_includes/github_icon.md
new file mode 100644
index 000000000..86881bfe3
--- /dev/null
+++ b/_includes/github_icon.md
@@ -0,0 +1 @@
+
diff --git a/_includes/github_icon_with_name.md b/_includes/github_icon_with_name.md
new file mode 100644
index 000000000..ebe0359cb
--- /dev/null
+++ b/_includes/github_icon_with_name.md
@@ -0,0 +1 @@
+{{ repo_name }}
diff --git a/_includes/navigation.md b/_includes/navigation.md
index 00909da55..930420194 100644
--- a/_includes/navigation.md
+++ b/_includes/navigation.md
@@ -1 +1 @@
-| Global | [Countries](areas) | [China](china) | tags | [About](about) |
\ No newline at end of file
+| Global | [Countries](areas) | [China](china) | tags | [About](about) |
\ No newline at end of file
diff --git a/_includes/projects.md b/_includes/projects.md
index 078e98328..f56c185e6 100644
--- a/_includes/projects.md
+++ b/_includes/projects.md
@@ -2,7 +2,7 @@
{% for group in projects %}
## {{ group.group_name }}
{% for repo in group.repos %}
- {% if repo.repo_name %} {% endif %} {% if repo.repo2_name %} {% endif %} {% if repo.web_name %}{{ repo.web_name }}{% endif %} {% if repo.web2_name %}{{ repo.web2_name }}{% endif %} {{ repo.content }} {% for tag in repo.tags %} {{ tag }} {% 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 %}{{ repo.web_name }}{% endif %} {% if repo.web2_name %}{{ repo.web2_name }}{% endif %} {{ repo.content }} {% for tag in repo.tags %} {{ tag }} {% endfor %} {% endfor %}
{% endfor %}
diff --git a/_includes/tags_projects.md b/_includes/tags_projects.md
index e776fa347..da3e92c0a 100644
--- a/_includes/tags_projects.md
+++ b/_includes/tags_projects.md
@@ -3,8 +3,8 @@
{% for group in projects_sorted %}
## {{ group.group_name }}
{% for repo in group.repos %}
-* {% if repo.repo_name %} {{ repo.repo_name }} {% endif %} {% if repo.repo2_name %} {{ repo.repo2_name }} {% endif %} {% if repo.web_name %}{{ repo.web_name }}{% endif %} {% if repo.web2_name %}{{ repo.web2_name }}{% endif %} {{ repo.content }} {% for tag in repo.tags %} {{ tag }} {% endfor %} {% endfor %}
-
+* {% 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 %}{{ repo.web_name }}{% endif %} {% if repo.web2_name %}{{ repo.web2_name }}{% endif %} {{ repo.content }} {% for tag in repo.tags %} {{ tag }} {% endfor %} {% endfor %}
+
{% endfor %}
diff --git a/index.md b/index.md
index ff37e29fa..625741aec 100644
--- a/index.md
+++ b/index.md
@@ -11,14 +11,6 @@ comments: true
{% include projects.md %}
-
-
{% include site_recommendation.md %}
diff --git a/tags.md b/tags.md
index 9c7ed3697..b38f3a3b4 100644
--- a/tags.md
+++ b/tags.md
@@ -7,9 +7,9 @@ comments: true
{% include page_summary_total.md %}
-Here lists all projects classified by tags. 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 tags. 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 %}
- {% endfor %}
+ {% endfor %}
diff --git a/temp.md b/temp.md
new file mode 100644
index 000000000..ff37e29fa
--- /dev/null
+++ b/temp.md
@@ -0,0 +1,29 @@
+---
+comments: true
+---
+
+{% include navigation.md %}
+
+{% include page_summary_global.md %}
+
+
+{% assign projects = site.data.global %}
+
+{% include projects.md %}
+
+
+
+
+
+{% include site_recommendation.md %}
+
+
+
+
+{% include footer.md %}
\ No newline at end of file