From bf2a62be41c9fb4216164a42de6d5cdc2cc0d226 Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Mon, 21 May 2018 21:59:38 +0530 Subject: [PATCH 1/4] Adding Tag Cloud Page. --- _assets/stylesheets/_base.scss | 8 ++++++ _assets/stylesheets/dark.scss | 1 + _assets/stylesheets/light.scss | 1 + _assets/stylesheets/modules/_tags.scss | 14 +++++++++ tags.html | 40 ++++++++++++++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 _assets/stylesheets/modules/_tags.scss create mode 100644 tags.html diff --git a/_assets/stylesheets/_base.scss b/_assets/stylesheets/_base.scss index f25e8aec3..ff5a174dd 100644 --- a/_assets/stylesheets/_base.scss +++ b/_assets/stylesheets/_base.scss @@ -153,3 +153,11 @@ img { color: $white; background-color: $gray-darkest; } + +.text-center { + text-align: center; +} + +.no-text-decoration { + text-decoration: none; +} \ No newline at end of file diff --git a/_assets/stylesheets/dark.scss b/_assets/stylesheets/dark.scss index 91cb799c5..8a5380003 100755 --- a/_assets/stylesheets/dark.scss +++ b/_assets/stylesheets/dark.scss @@ -67,3 +67,4 @@ $article-paginator-color-hover: $gray-lightest; @import "modules/header"; @import "modules/highlights-dark"; @import "modules/scrollappear"; +@import "modules/tags"; diff --git a/_assets/stylesheets/light.scss b/_assets/stylesheets/light.scss index 62fb78c30..2122cff15 100755 --- a/_assets/stylesheets/light.scss +++ b/_assets/stylesheets/light.scss @@ -67,3 +67,4 @@ $article-paginator-color-hover: $gray-darkest; @import "modules/header"; @import "modules/highlights-light"; @import "modules/scrollappear"; +@import "modules/tags"; diff --git a/_assets/stylesheets/modules/_tags.scss b/_assets/stylesheets/modules/_tags.scss new file mode 100644 index 000000000..343bee6d9 --- /dev/null +++ b/_assets/stylesheets/modules/_tags.scss @@ -0,0 +1,14 @@ +// ============================================================================= +// Tags +// ============================================================================= + +.tags-page-header { + margin-top: 0px; +} + +.tags-page { + padding: 50px 0; + h1 { + margin: 0 0 15px 0; + } +} \ No newline at end of file diff --git a/tags.html b/tags.html new file mode 100644 index 000000000..4c8970206 --- /dev/null +++ b/tags.html @@ -0,0 +1,40 @@ +--- +layout: default +title: "Tags" +description: "Tag cloud from all the posts" +permalink: /tags +sitemap: false +--- + +
+

+ Tags +

+ + {% assign my_tags = site.collections | where: "label", "my_tags" | first %} + + {% assign sorted_tags = site.tags | sort %} + + {% for tag in sorted_tags %} + + {% assign tag_slug = tag | first %} + {% assign upcase_tag_slug = tag_slug | upcase %} + {% assign no_of_posts = tag | last | size %} + + {% for my_tag in my_tags.docs %} + {% if tag_slug == my_tag.slug %} + {% assign tag_name = my_tag.name %} + {% endif %} + {% endfor %} + {% assign upcase_tag_name = tag_name | upcase %} + + {% if upcase_tag_slug != "PROJECT" %} +        + + {{ upcase_tag_name }}({{ no_of_posts }}) + + {% endif %} + + {% endfor %} +
From 1b754bac70274da0718fed4031d4e0ac9beddc4c Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Tue, 22 May 2018 23:21:26 +0530 Subject: [PATCH 2/4] fixed indentations --- tags.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tags.html b/tags.html index 4c8970206..4e42587d7 100644 --- a/tags.html +++ b/tags.html @@ -11,30 +11,30 @@

Tags

- {% assign my_tags = site.collections | where: "label", "my_tags" | first %} + {% assign my_tags = site.collections | where: "label", "my_tags" | first %} {% assign sorted_tags = site.tags | sort %} {% for tag in sorted_tags %} - {% assign tag_slug = tag | first %} - {% assign upcase_tag_slug = tag_slug | upcase %} - {% assign no_of_posts = tag | last | size %} + {% assign tag_slug = tag | first %} + {% assign upcase_tag_slug = tag_slug | upcase %} + {% assign no_of_posts = tag | last | size %} - {% for my_tag in my_tags.docs %} - {% if tag_slug == my_tag.slug %} - {% assign tag_name = my_tag.name %} - {% endif %} - {% endfor %} - {% assign upcase_tag_name = tag_name | upcase %} + {% for my_tag in my_tags.docs %} + {% if tag_slug == my_tag.slug %} + {% assign tag_name = my_tag.name %} + {% endif %} + {% endfor %} + {% assign upcase_tag_name = tag_name | upcase %} - {% if upcase_tag_slug != "PROJECT" %} + {% if upcase_tag_slug != "PROJECT" %}        - - {{ upcase_tag_name }}({{ no_of_posts }}) - - {% endif %} + {{ upcase_tag_name }}({{ no_of_posts }}) + + {% endif %} {% endfor %} From 127239804a00719445bb861abd93048af89b97f0 Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Thu, 24 May 2018 01:19:18 +0530 Subject: [PATCH 3/4] moved css for text to tag classes --- _assets/stylesheets/_base.scss | 8 -------- _assets/stylesheets/modules/_tags.scss | 5 +++++ tags.html | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/_assets/stylesheets/_base.scss b/_assets/stylesheets/_base.scss index ff5a174dd..81b517fe9 100644 --- a/_assets/stylesheets/_base.scss +++ b/_assets/stylesheets/_base.scss @@ -152,12 +152,4 @@ img { ::selection { color: $white; background-color: $gray-darkest; -} - -.text-center { - text-align: center; -} - -.no-text-decoration { - text-decoration: none; } \ No newline at end of file diff --git a/_assets/stylesheets/modules/_tags.scss b/_assets/stylesheets/modules/_tags.scss index 343bee6d9..0406c7264 100644 --- a/_assets/stylesheets/modules/_tags.scss +++ b/_assets/stylesheets/modules/_tags.scss @@ -7,8 +7,13 @@ } .tags-page { + text-align: center; padding: 50px 0; h1 { margin: 0 0 15px 0; } +} + +.tag-cloud { + text-decoration: none; } \ No newline at end of file diff --git a/tags.html b/tags.html index 4e42587d7..5a86b67ad 100644 --- a/tags.html +++ b/tags.html @@ -6,7 +6,7 @@ sitemap: false --- -
+

Tags

From 94af94e051535980c94706c0c494190e086fa115 Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Thu, 24 May 2018 01:20:55 +0530 Subject: [PATCH 4/4] removed extra class --- tags.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tags.html b/tags.html index 5a86b67ad..92efd15a6 100644 --- a/tags.html +++ b/tags.html @@ -30,7 +30,7 @@

{% if upcase_tag_slug != "PROJECT" %}        - {{ upcase_tag_name }}({{ no_of_posts }})