Bläddra i källkod

cms: cleaned up sidebar

version-14
Rushabh Mehta 11 år sedan
förälder
incheckning
c32d601c73
3 ändrade filer med 5 tillägg och 9 borttagningar
  1. +1
    -1
      frappe/templates/generators/blog_post.html
  2. +1
    -1
      frappe/templates/includes/sidebar.html
  3. +3
    -7
      frappe/website/sitemap.py

+ 1
- 1
frappe/templates/generators/blog_post.html Visa fil

@@ -8,7 +8,7 @@
<article class="blog-content" itemscope itemtype="http://schema.org/BlogPost">
<!-- begin blog content -->
<div class="help" style="color: #aaa">
<span itemprop="author">{{ blogger_info and blogger_info.full_name or full_name }}</span> /
<span itemprop="author">{{ blogger_info and blogger_info.full_name or full_name }}</span>,
<span itemprop="dateCreated">{{ updated }}</span></div>
<br>
<div itemprop="articleBody">


+ 1
- 1
frappe/templates/includes/sidebar.html Visa fil

@@ -2,7 +2,7 @@
{%- for child in children -%}
<div class="sidebar-item">
<i class="icon-fixed-width
{% if child.rgt - child.lft != 1 and not loop.first %}icon-chevron-right{% endif %}"
{% if (child.lft != None) and (child.rgt - child.lft != 1) and (not loop.first) %}icon-chevron-right{% endif %}"
style="margin-left: -17px; color: #ddd;"></i>
<a href="{{ child.name }}" class="no-decoration {% if child.name == pathname %}active{% endif %}">
{{ child.page_title }}


+ 3
- 7
frappe/website/sitemap.py Visa fil

@@ -44,13 +44,6 @@ def build_sitemap_options(path):
set_sidebar_items(sitemap_options, sitemap_options.pathname, home_page)
if not sitemap_options.children:
set_sidebar_items(sitemap_options, sitemap_options.parent_website_route, home_page)
if path != home_page:
sitemap_options.children = [frappe.doc("Website Route",
sitemap_options.parent_website_route).fields] + sitemap_options.children
else:
if path != home_page:
sitemap_options.children = [sitemap_options] + sitemap_options.children

# determine templates to be used
if not sitemap_options.base_template_path:
@@ -81,3 +74,6 @@ def set_sidebar_items(sitemap_options, pathname, home_page):
and t1.docname = t2.name
order by t2.{sort_by} {sort_order}""".format(**website_template.fields),
pathname, as_dict=True)
sitemap_options.children = [frappe.doc("Website Route", pathname).fields] + sitemap_options.children

Laddar…
Avbryt
Spara