mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
Update navbar & blog list
* Add sitename in the navbar conditionally * Add subtitle block * Add blog list layout
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
<div class="left flex align-item-center">
|
||||
<a class="logo flex align-item-center pr1" href="{{ url_prefix }}{{ home_page or "/"}}">
|
||||
<img class="logo-img" src="/assets/foundation/img/erpnext-logo.svg" alt="Open Source ERP Software">
|
||||
<!-- <span>ERPNext.org</span> -->
|
||||
{% if not parents %}
|
||||
<span class="pl2">ERPNext.org</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
<!-- breadcrumbs -->
|
||||
{% if parents and parents|length > 0 %}
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
{% include "foundation/templates/includes/sidebar/sidebar.html" %}
|
||||
</div>
|
||||
<div class="page-main flex-4 p6">
|
||||
{% include "foundation/templates/includes/page-head.html" %}
|
||||
<div class="mb4">
|
||||
{% include "foundation/templates/includes/page-head.html" %}
|
||||
{% block page_subtitle %}{% endblock %}
|
||||
</div>
|
||||
<div class="page-body">
|
||||
{%- block page_content -%}{%- endblock -%}
|
||||
</div>
|
||||
|
||||
@@ -2,14 +2,20 @@
|
||||
{% block meta_block %}
|
||||
{% include "templates/includes/meta_block.html" %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block page_subtitle %}
|
||||
<div class="blog-info">
|
||||
<p class="post-by">
|
||||
<a href="/blog?blogger={{ blogger }}" class="no-decoration">{{ _("By") }} {{ blogger_info and blogger_info.full_name or full_name }}</a>
|
||||
Posted on {{ frappe.format_date(published_on) }} in <a href="/blog?blog_category={{ blog_category }}" class="no-decoration">{{ category.title }}</a> .{{ comment_text }}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block page_content %}
|
||||
<article class="blog-content" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<div class="blog-info">
|
||||
<p class="post-by">
|
||||
<a href="/blog?blogger={{ blogger }}" class="no-decoration">{{ _("By") }} {{ blogger_info and blogger_info.full_name or full_name }}</a>
|
||||
Posted on {{ frappe.format_date(published_on) }} in <a href="/blog?blog_category={{ blog_category }}" class="no-decoration">{{ category.title }}</a> .{{ comment_text }}
|
||||
</p>
|
||||
</div>
|
||||
<div itemprop="articleBody" class="longform blog-text">
|
||||
{{ content }}
|
||||
</div>
|
||||
@@ -32,6 +38,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
frappe.ready(function() { frappe.set_search_path("/blog"); })
|
||||
frappe.ready(function() { frappe.set_search_path("/blog"); })
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,35 +1,19 @@
|
||||
{%- set post = doc -%}
|
||||
<div class="web-list-item blog-list-item">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h1><a href="/{{ post.route }}">{{ post.title }}</a></h1>
|
||||
{% if post.cover_image %}
|
||||
<p>
|
||||
<img class="blogpost-cover-img" src="{{ post.cover_image }}" alt="{{post.title}} - Cover Image">
|
||||
<div class="list-item">
|
||||
<div class="flex">
|
||||
<div class="flex-1 mr2">
|
||||
<img class="thumb-medium" alt="{{ post.full_name }}'s profile picture" itemprop="thumbnailUrl" src='{{ post.avatar or "/assets/frappe/images/default-avatar.png" }}' />
|
||||
</div>
|
||||
<div class="flex-2 text-dark-grey">
|
||||
<h2 class="h2 text-black"><a href="/{{ post.route }}">{{ post.title }}</a></h1>
|
||||
<p>By <a href="/blog?blogger={{ post.blogger }}">{{ post.full_name }}</a>. Posted on
|
||||
{{ frappe.format_date(post.published_on) }}
|
||||
{% if post.comments %}
|
||||
<span style='display: inline-block; margin-left: 10px;'>
|
||||
<i class='octicon octicon-comment-discussion'></i> {{ post.comments }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="post-description">{{ post.intro }}</p>
|
||||
|
||||
<div>
|
||||
<div class="inline-block" style="vertical-align: top">
|
||||
<div class="avatar">
|
||||
<img itemprop="thumbnailUrl" src="{{ post.avatar or "/assets/frappe/images/default-avatar.png" }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline-block" style="width: calc(100% - 100px)">
|
||||
<div class='text-muted'>
|
||||
<a href="/blog?blogger={{ post.blogger }}">{{ post.full_name }}</a>
|
||||
</div>
|
||||
<div class="text-muted small">
|
||||
{{ frappe.format_date(post.published_on) }}
|
||||
{% if post.comments %}
|
||||
<span style='display: inline-block; margin-left: 10px;'>
|
||||
<i class='octicon octicon-comment-discussion'></i> {{ post.comments }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user