[fix] blog, comments css
This commit is contained in:
commit
aa9e1ae0a9
8 changed files with 60 additions and 56 deletions
|
|
@ -382,6 +382,15 @@ h5,
|
|||
h6 {
|
||||
font-weight: 400;
|
||||
}
|
||||
h1 a,
|
||||
h2 a,
|
||||
h3 a,
|
||||
h4 a,
|
||||
h5 a,
|
||||
h6 a {
|
||||
color: inherit !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-brand {
|
||||
max-width: none;
|
||||
}
|
||||
|
|
@ -590,15 +599,6 @@ fieldset {
|
|||
.web-list-item h3 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.web-list-item h1 a,
|
||||
.web-list-item h2 a,
|
||||
.web-list-item h3 a,
|
||||
.web-list-item h4 a,
|
||||
.web-list-item h5 a,
|
||||
.web-list-item h6 a {
|
||||
color: inherit !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
.web-list-item:last-child {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
|
@ -607,7 +607,6 @@ fieldset {
|
|||
margin-top: 30px;
|
||||
}
|
||||
.post-description {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.post-description p {
|
||||
|
|
@ -654,9 +653,8 @@ fieldset {
|
|||
font-weight: 700;
|
||||
font-size: 2em;
|
||||
}
|
||||
.blog-comments,
|
||||
.help-article-comments {
|
||||
padding: 0px 15px 15px 0px;
|
||||
.add-comment-section {
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
.blog-comments {
|
||||
background-color: #fafbfc;
|
||||
|
|
@ -916,7 +914,7 @@ body {
|
|||
.your-account-info {
|
||||
margin-top: 50px;
|
||||
}
|
||||
.page-content {
|
||||
.page-content.with-sidebar {
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
|
@ -952,11 +950,12 @@ li .social-child-item {
|
|||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.comment-view {
|
||||
padding: 30px 0px;
|
||||
}
|
||||
.comment-header {
|
||||
font-size: 20px;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #d1d8dd;
|
||||
border-bottom: 1px solid #EBEFF2;
|
||||
}
|
||||
.item-search {
|
||||
border-bottom: 1px solid #d1d8dd;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ frappe.ui.form.quick_entry = function(doctype, success) {
|
|||
return;
|
||||
}
|
||||
|
||||
if(meta.autoname.toLowerCase()==='prompt') {
|
||||
if(meta.autoname && meta.autoname.toLowerCase()==='prompt') {
|
||||
mandatory = [{fieldname:'__name', label:__('{0} Name', [meta.name]),
|
||||
reqd: 1, fieldtype:'Data'}].concat(mandatory);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,13 @@ a& {
|
|||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 400;
|
||||
|
||||
// anchor inside header should not be styled
|
||||
a {
|
||||
color: inherit !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -275,13 +282,6 @@ fieldset {
|
|||
h1, h2, h3 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
a {
|
||||
color: inherit !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.web-list-item:last-child {
|
||||
|
|
@ -298,7 +298,6 @@ fieldset {
|
|||
}
|
||||
|
||||
.post-description {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
p {
|
||||
margin-bottom: 8px;
|
||||
|
|
@ -344,8 +343,8 @@ fieldset {
|
|||
}
|
||||
|
||||
.blog-list-item {
|
||||
margin-top:30px;
|
||||
margin-bottom:30px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
|
||||
.blog-header {
|
||||
font-size: 1.6em;
|
||||
|
|
@ -357,18 +356,21 @@ fieldset {
|
|||
font-size: 2em;
|
||||
}
|
||||
|
||||
.add-comment-section {
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.blog-comments,
|
||||
.help-article-comments {
|
||||
padding: 0px 15px 15px 0px;
|
||||
}
|
||||
.blog-comments {
|
||||
background-color: #fafbfc;
|
||||
background-color: @light-bg;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blog-comments:before {
|
||||
content:"";
|
||||
background-color:#fafbfc;
|
||||
background-color: @light-bg;
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 4000px;
|
||||
|
|
@ -517,7 +519,8 @@ a.active {
|
|||
.your-account-info {
|
||||
margin-top: 50px;
|
||||
}
|
||||
.page-content {
|
||||
|
||||
.page-content.with-sidebar {
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
|
@ -559,11 +562,13 @@ li .social-child-item {
|
|||
margin-top:0px;
|
||||
}
|
||||
|
||||
.comment-view {
|
||||
padding: 30px 0px;
|
||||
}
|
||||
|
||||
.comment-header{
|
||||
font-size:20px;
|
||||
padding-top:30px;
|
||||
padding-bottom:20px;
|
||||
border-bottom: 1px solid @border-color;
|
||||
border-bottom: 1px solid @light-border-color;
|
||||
}
|
||||
|
||||
.item-search {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="blog-container">
|
||||
<article class="blog-content" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<meta itemprop="datePublished" content="{{ frappe.format_date(published_on) }}"></meta>
|
||||
<meta itemprop="publisher" content="{{brand_html}}"></meta>
|
||||
<!-- begin blog content -->
|
||||
<div class="blog-info">
|
||||
<h1 itemprop="headline" class="blog-header">{{ title }}</h1>
|
||||
<p class="post-by text-muted small">
|
||||
<p class="post-by text-muted">
|
||||
<a href="/blog?by={{ blogger }}&by_name={{ full_name }}" class="no-decoration">By {{ blogger_info and blogger_info.full_name or full_name }}</a>
|
||||
<i class="blog-dot"></i> {{ frappe.format_date(published_on) }}
|
||||
<i class="blog-dot"></i> <a href="/{{ parent_website_route }}" class="no-decoration">{{ blog_category }}</a>
|
||||
<i class="blog-dot"></i> {{ frappe.format_date(published_on) }}
|
||||
<i class="blog-dot"></i> <a href="/{{ parent_website_route }}" class="no-decoration">{{ blog_category }}</a>
|
||||
<i class="blog-dot"></i> {{ comment_text }}
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -25,12 +26,17 @@
|
|||
<div class="blog-comments">
|
||||
{% include 'templates/includes/comments/comments.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
frappe.ready(function() { frappe.set_search_path("/blog"); })
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block style %}
|
||||
<style>
|
||||
.blog-container {
|
||||
width: 720px;
|
||||
margin: auto;
|
||||
}
|
||||
.page-content {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,12 +16,4 @@
|
|||
|
||||
{% block script %}
|
||||
<script>{% include "templates/includes/list/list.js" %}</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
<style>
|
||||
.page-content {
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
@ -4,13 +4,12 @@
|
|||
<img itemprop="thumbnailUrl" src="{{ frappe.get_gravatar(comment.sender) }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline-block" style="width: calc(100% - 100px)">
|
||||
<h4 itemprop="name">{{ comment.sender_full_name }}
|
||||
|
||||
<small class="text-muted pull-right">
|
||||
<span itemprop="commentTime">{{ comment.creation|global_date_format }}</span>
|
||||
</small>
|
||||
</h4>
|
||||
<div class="inline-block" style="width: calc(100% - 50px)">
|
||||
<h6 itemprop="name">{{ comment.sender_full_name }}
|
||||
<span class="text-muted pull-right" itemprop="commentTime">
|
||||
{{ comment.creation|global_date_format }}
|
||||
</span>
|
||||
</h6>
|
||||
<div itemprop="commentText">{{ comment.content|markdown }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
{% include "templates/includes/web_sidebar.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="{% if show_sidebar %}page-content col-sm-9{% else %} page-content col-sm-12 {% endif %}">
|
||||
<div class="{% if show_sidebar %}page-content with-sidebar col-sm-9{% else %} page-content col-sm-12 {% endif %}">
|
||||
<div class="page-content-wrapper">
|
||||
<div class="row page-head">
|
||||
<div class="col-sm-8">
|
||||
|
|
|
|||
|
|
@ -75,7 +75,10 @@ class BlogPost(WebsiteGenerator):
|
|||
if not context.comment_list:
|
||||
context.comment_text = _('No comments yet')
|
||||
else:
|
||||
context.comment_text = _('{0} comments').format(len(context.comment_list))
|
||||
if(len(context.comment_list)) == 1:
|
||||
context.comment_text = _('1 comment')
|
||||
else:
|
||||
context.comment_text = _('{0} comments').format(len(context.comment_list))
|
||||
|
||||
context.children = get_children()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue