From eeb7da7c05a93167c4d779972de8a8e8daba35d1 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Wed, 4 May 2016 23:13:22 +0530 Subject: [PATCH] Blog webpages cleanup --- frappe/public/css/website.css | 103 +++++----------- frappe/public/less/website.less | 115 ++++++------------ frappe/templates/generators/blog_post.html | 23 ++-- frappe/templates/includes/blog/blog_row.html | 21 ++-- frappe/templates/includes/blog/blogger.html | 4 +- .../templates/includes/comments/comments.html | 12 +- frappe/templates/includes/web_sidebar.html | 5 - frappe/templates/pages/me.html | 12 +- frappe/templates/web.html | 4 +- frappe/website/doctype/blog_post/blog_post.py | 1 - 10 files changed, 99 insertions(+), 201 deletions(-) diff --git a/frappe/public/css/website.css b/frappe/public/css/website.css index d5338b0376..45d8504fa5 100644 --- a/frappe/public/css/website.css +++ b/frappe/public/css/website.css @@ -380,7 +380,7 @@ h3, h4, h5, h6 { - font-weight: 300; + font-weight: 400 !important; } .navbar-brand { max-width: none; @@ -583,7 +583,7 @@ fieldset { } .web-list-item { padding: 15px 0px; - border-top: 1px solid #EBEFF2; + border-bottom: 1px solid #EBEFF2; } .web-list-item h1, .web-list-item h2, @@ -599,26 +599,16 @@ fieldset { color: inherit !important; text-decoration: none; } -.web-list-item:last-child { - border-bottom: 1px solid #EBEFF2; -} .blog-info { text-align: center; margin-top: 30px; } -.blog-text, .post-description { - padding-top: 40px; - padding-bottom: 40px; - font-size: 16px; - line-height: 28px; + padding-top: 8px; + padding-bottom: 8px; } -.blog-text p, .post-description p { - margin-bottom: 40px; -} -.blogger-name { - font-size: 24px; + margin-bottom: 8px; } .blog-footer { padding: 5px 15px; @@ -634,20 +624,18 @@ fieldset { .blog-category { text-transform: uppercase; letter-spacing: 0.5px; - font-size: 10px; text-align: center; margin-bottom: 30px; } .author { text-transform: uppercase; letter-spacing: 0.5px; - font-size: 10px; border-bottom: 1px solid #EBEFF2; - padding-bottom: 20px; + padding-bottom: 30px; } .blogger { - padding-top: 30px; - padding-bottom: 15px; + padding-top: 0px; + padding-bottom: 50px; } .blog-dot:before { padding-right: 8px; @@ -655,56 +643,15 @@ fieldset { content: "\2022"; } .blog-list-item { - margin-top: 25px; - margin-bottom: 25px; - border: none; -} -.post-by { - padding-bottom: 50px; - font-size: 10px; - letter-spacing: 0.5px; - border-bottom: 1px solid #EBEFF2; -} -.blog-list-item .blog-text, -.blog-list-item .read-more-btn, -.blog-list-item .recent-post { - display: none; -} -.blog-list-item .post-by { - padding-bottom: 25px; -} -.blog-list-item .post-description { - padding-top: 25px; -} -.blog-list-item:first-child .row .blog-header { - font-size: 34px; -} -.blog-list-item:first-child .row .post-by { - font-weight: 500; -} -.blog-list-item:first-child .row .post-description { - font-weight: 500; -} -.blog-list-item:first-child .row .blog-text { - display: block; - padding-top: 0px; - padding-bottom: 20px; + margin-top: 30px; + margin-bottom: 30px; } -.blog-list-item:first-child .row .read-more-btn { - display: inline; - padding-top: 0px; - border-bottom: 1px dotted #d1d8dd; - font-size: 12px; +.blog-list-item .blog-header { + font-size: 1.6em; } -.blog-list-item:first-child .row .post-description { - padding-bottom: 25px; -} -.blog-list-item:first-child .row .recent-post { - display: block; - padding-top: 50px; - padding-bottom: 20px; - margin-bottom: 20px; - border-bottom: 1px solid #EBEFF2; +.blog-header { + font-weight: 700; + font-size: 2em; } .blog-comments, .help-article-comments { @@ -963,11 +910,14 @@ body { font-size: 12px; } .sidebar-block, -.content-block { +.page-content { padding-top: 50px; padding-bottom: 50px; } -.content-block { +.your-account-info { + margin-top: 50px; +} +.page-content { padding-left: 50px; padding-right: 50px; } @@ -994,12 +944,14 @@ li .social-child-item { padding-top: 50px; padding-bottom: 50px; font-size: 18px; + line-height: 1.5; } .blog-text p { margin-bottom: 30px; } .blogger-name { - font-size: 24px; + margin-bottom: 0px; + margin-top: 0px; } .comment-header { font-size: 20px; @@ -1046,3 +998,12 @@ li .social-child-item { .dropdown .logged-in { border-left: 1px solid #d1d8dd; } +.cart-count-badge { + padding: 2px 4px; + margin-left: 10px; + background-color: #EBEFF2; + border-radius: 10px; + font-weight: 500; + margin-top: -10px; + margin-right: -8px; +} diff --git a/frappe/public/less/website.less b/frappe/public/less/website.less index dbebfea07e..cc539f803a 100644 --- a/frappe/public/less/website.less +++ b/frappe/public/less/website.less @@ -19,7 +19,7 @@ a& { } h1, h2, h3, h4, h5, h6 { - font-weight: 300; + font-weight: 400 !important; } @@ -201,7 +201,6 @@ fieldset { } .page-content { - hr { margin-left: -15px; margin-right: -15px; @@ -271,7 +270,7 @@ fieldset { .web-list-item { padding: 15px 0px; - border-top: 1px solid @light-border-color; + border-bottom: 1px solid @light-border-color; h1, h2, h3 { margin-top: 10px; @@ -289,28 +288,19 @@ fieldset { // background: @panel-bg; // } -.web-list-item:last-child { - border-bottom: 1px solid @light-border-color; -} - .blog-info { text-align:center; margin-top: 30px; } -.blog-text, .post-description { - padding-top: 40px; - padding-bottom: 40px; - font-size: 16px; - line-height: 28px; +.post-description { + padding-top: 8px; + padding-bottom: 8px; p { - margin-bottom: 40px; + margin-bottom: 8px; } } -.blogger-name { - font-size:24px; -} .blog-footer { padding: 5px 15px; @@ -329,7 +319,6 @@ fieldset { .blog-category { text-transform: uppercase; letter-spacing: 0.5px; - font-size: 10px; text-align: center; margin-bottom: 30px; } @@ -337,14 +326,13 @@ fieldset { .author { text-transform: uppercase; letter-spacing: 0.5px; - font-size: 10px; border-bottom: 1px solid @light-border-color; - padding-bottom:20px; + padding-bottom:30px; } .blogger { - padding-top: 30px; - padding-bottom: 15px; + padding-top: 0px; + padding-bottom: 50px; } .blog-dot:before{ @@ -354,61 +342,17 @@ fieldset { } .blog-list-item { - margin-top:25px; - margin-bottom:25px; - border:none; -} - -.post-by { - padding-bottom: 50px; - font-size: 10px; - letter-spacing: 0.5px; - border-bottom: 1px solid @light-border-color; -} - -.blog-list-item { - .blog-text,.read-more-btn,.recent-post { - display: none; + margin-top:30px; + margin-bottom:30px; + + .blog-header { + font-size: 1.6em; } - .post-by { - padding-bottom: 25px; - } - .post-description{ - padding-top: 25px; - } } -.blog-list-item:first-child .row { - .blog-header { - font-size: 34px; - } - .post-by { - font-weight: 500; - } - .post-description { - font-weight: 500; - } - .blog-text { - display: block; - padding-top: 0px; - padding-bottom: 20px; - } - .read-more-btn { - display: inline; - padding-top: 0px; - border-bottom: 1px dotted @border-color; - font-size: 12px; - } - .post-description { - padding-bottom: 25px; - } - .recent-post { - display: block; - padding-top: 50px; - padding-bottom: 20px; - margin-bottom: 20px; - border-bottom: 1px solid @light-border-color; - } +.blog-header { + font-weight: 700; + font-size: 2em; } .blog-comments, @@ -418,7 +362,6 @@ fieldset { .blog-comments { background-color: #fafbfc; position: relative; - } .blog-comments:before { @@ -567,12 +510,14 @@ a.active { font-size: 12px; } -.sidebar-block, .content-block { +.sidebar-block, .page-content { padding-top: 50px; padding-bottom: 50px; } - -.content-block { +.your-account-info { + margin-top: 50px; +} +.page-content { padding-left: 50px; padding-right: 50px; } @@ -603,13 +548,15 @@ li .social-child-item { padding-top: 50px; padding-bottom: 50px; font-size: 18px; + line-height: 1.5; p { margin-bottom: 30px; } } -.blogger-name{ - font-size:24px; +.blogger-name { + margin-bottom:0px; + margin-top:0px; } .comment-header{ @@ -656,3 +603,13 @@ li .social-child-item { .dropdown .logged-in { border-left: 1px solid @border-color; } + +.cart-count-badge { + padding: 2px 4px; + margin-left: 10px; + background-color: @light-border-color; + border-radius:10px; + font-weight: 500; + margin-top: -10px; + margin-right: -8px; +} \ No newline at end of file diff --git a/frappe/templates/generators/blog_post.html b/frappe/templates/generators/blog_post.html index 2e0f2b6a8a..e96605bd08 100644 --- a/frappe/templates/generators/blog_post.html +++ b/frappe/templates/generators/blog_post.html @@ -1,23 +1,18 @@ {% extends "templates/web.html" %} -{% block breadcrumbs %} - -{% endblock %} {% block page_content %}
+
-
{{blog_category}}
-
{{ title }}
-

- By {{ blogger_info and blogger_info.full_name or full_name }} {{ frappe.format_date(published_on) }} {{ comment_text }}

+

{{ title }}

+

+ By {{ blogger_info and blogger_info.full_name or full_name }} + {{ frappe.format_date(published_on) }} + {{ blog_category }} + {{ comment_text }} +

{{ content }} @@ -25,13 +20,11 @@
{% if blogger_info %} -
Author
{% include "templates/includes/blog/blogger.html" %} {% endif %}
{% include 'templates/includes/comments/comments.html' %}
- diff --git a/frappe/templates/includes/blog/blog_row.html b/frappe/templates/includes/blog/blog_row.html index 66e9cd72e0..bd5910e976 100644 --- a/frappe/templates/includes/blog/blog_row.html +++ b/frappe/templates/includes/blog/blog_row.html @@ -2,18 +2,15 @@
- -

- {{ post.blog_category }} By {{ post.full_name }} {{ frappe.format_date(post.published_on) }} {{ post.comment_text }}

+

{{ post.title }}

{{ post.intro }}

-
- {{ post.content }} -
- - Continue Reading - - {{_("Recent Posts")}} +

+ By {{ post.full_name }} + {{ frappe.format_date(post.published_on) }} + + {{ post.blog_category }} + {{ post.comment_text }} +

-
- + \ No newline at end of file diff --git a/frappe/templates/includes/blog/blogger.html b/frappe/templates/includes/blog/blogger.html index 812c584316..3f0d9b392b 100644 --- a/frappe/templates/includes/blog/blogger.html +++ b/frappe/templates/includes/blog/blogger.html @@ -5,9 +5,7 @@
-
{{ blogger_info.full_name }}
+

{{ blogger_info.full_name }}

{%if blogger_info.bio%}{{ blogger_info.bio }}{%endif%}

-

- All Posts By {{ blogger_info.full_name }}

diff --git a/frappe/templates/includes/comments/comments.html b/frappe/templates/includes/comments/comments.html index a00549a3d8..870bdbd40e 100644 --- a/frappe/templates/includes/comments/comments.html +++ b/frappe/templates/includes/comments/comments.html @@ -20,7 +20,8 @@
-
+ {{ _("Add Comment") }} +

-

+
@@ -61,7 +62,9 @@ $(".add-comment").toggle(false) .parent().append("
Comments are closed.
") } - + $(".add-comment").click(function() { + $(this).toggle(false); + $("#comment-form").toggle(); var full_name = "", user_id = ""; if(frappe.is_user_logged_in()) { full_name = getCookie("full_name"); @@ -72,6 +75,7 @@ } } $("#comment-form textarea").val(""); + }) $("#submit-comment").click(function() { var args = { diff --git a/frappe/templates/includes/web_sidebar.html b/frappe/templates/includes/web_sidebar.html index 42d5ba47cd..72ae277d9f 100644 --- a/frappe/templates/includes/web_sidebar.html +++ b/frappe/templates/includes/web_sidebar.html @@ -24,11 +24,6 @@ {{ _(item.title) }} - {% if item.reference_doctype %} - - {{ "20+" if item.count > 20 else item.count }} - - {% endif %} {% endif %} diff --git a/frappe/templates/pages/me.html b/frappe/templates/pages/me.html index 6ac9ca5c4e..39b7a523ed 100644 --- a/frappe/templates/pages/me.html +++ b/frappe/templates/pages/me.html @@ -10,12 +10,10 @@ {% block page_content %} -