Update inner pages

- Fellow page if now cards based
- update blog detail page
- over ride chapters list page
- add avatar css
- update breadcrumb
- remove unecessary paddings from pages
- fix type in bootstrap js include
- over ride list template
- update about page and service providers page
- update jobs page
- add spacing to footer copyright section
- temporarily remove webform templates (TODO - needs fix)
This commit is contained in:
Raghavendra Kamath
2018-04-23 17:53:35 +05:30
parent 68c9801d73
commit eed2444093
21 changed files with 374 additions and 111 deletions

View File

@@ -27,4 +27,3 @@ def get_list_context(context):
context.no_cache = True context.no_cache = True
context.no_breadcrumbs = True context.no_breadcrumbs = True
context.order_by = 'creation desc' context.order_by = 'creation desc'
context.introduction = '<p>Following are the Foundation Fellows</p>'

View File

@@ -1,14 +1,15 @@
<div class="media my-3 bg-light p-4 clickable" style="cursor: pointer;" onclick="location.href='{{ doc.route }}'"> <div class="col-xs-6 col-sm-3 p-4" style="cursor: pointer;" onclick="location.href='{{ doc.route }}'">
<div class="card">
<a href="{{ link or "#" }}"> <a href="{{ link or "#" }}">
<img class="mr-3 media-img" <img class="card-img-top" src="{% if image %}{% if not '/' in image %}/assets/foundation/img/{% endif %}{{ image }}{% else %}/assets/foundation/img/frappe-bird-grey.svg{% endif %}"
src="{% if image %}{% if not '/' in image %}/assets/foundation/img/{% endif %}{{ image }}{% else %}/assets/foundation/img/frappe-bird-grey.svg{% endif %}"
style="{% if image and not '/' in image %}opacity: 0.4{% endif %}"> style="{% if image and not '/' in image %}opacity: 0.4{% endif %}">
</a> </a>
<div class="media-body mt-0"> <div class="card-body mt-0">
{% if title %}<h4 class="media-heading">{{ doc.title }}</h4>{% endif %} {% if title %}<h5>{{ doc.title }}</h5>{% endif %}
<p> <p>
<span class='label'>{{ frappe.format_date(doc.creation) }}</span> <span class='label'>{{ frappe.format_date(doc.creation) }}</span><br>
<span class='label'>{{ doc.country }}</span> <span class='label'>{{ doc.country }}</span>
</p> </p>
</div> </div>
</div>
</div> </div>

View File

@@ -1,7 +1,5 @@
<div style='margin-bottom: 30px; max-width: 600px;' <div class='mb-4 col-xs-12 col-sm-12'>
class='with-border clickable'> <h3>{{ doc.title }}</h3>
<a href="/{{ doc.route }}">
<h3 style='margin-top: 0px;'>{{ doc.title }}</h3>
<p> <p>
<span class='label'>{{ frappe.format_date(doc.creation) }}</span> <span class='label'>{{ frappe.format_date(doc.creation) }}</span>
<span class='label'>{{ doc.country }}</span> <span class='label'>{{ doc.country }}</span>
@@ -9,5 +7,5 @@
<span class='label'>{{ doc.status }}</span> <span class='label'>{{ doc.status }}</span>
</p> </p>
<p>{{ html2text(doc.description)[:200] }}{% if doc.description|len > 200 %}...{% endif %}</p> <p>{{ html2text(doc.description)[:200] }}{% if doc.description|len > 200 %}...{% endif %}</p>
</a> <a href="/{{ doc.route }}">Read More Details</a>
</div> </div>

View File

@@ -0,0 +1,69 @@
{% extends "templates/web.html" %}
{% block page_content %}
<h1>{{ title }}</h1>
<h3>Details</h3>
<p>{{ introduction }}</p>
{% if meetup_embed_html %}
{{ meetup_embed_html }}
{% endif %}
<h3>List of Members</h3>
{% if members %}
<table class="table table-bordered small" style="max-width: 500px;">
<tr>
<th width="15%" ></th>
<th>Member Details</th>
</tr>
{% set index = [1] %}
{% for user in members %}
{% if user.enabled == 1 %}
<tr>
<td>{{ index|length }}</td>
<td>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">{{ frappe.db.get_value('User', user.user, 'full_name') }}</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
{% if user.website_url %}
<a href="{{ user.website_url }}">{{ user.website_url or '' }}</a>
{% endif %}
</div>
<div class="col-lg-12">
{% if user.introduction %}
{{ user.introduction }}
{% endif %}
</div>
</div>
</td>
</tr>
{% set __ = index.append(1) %}
{% endif %}
{% endfor %}
</table>
{% else %}
<p>No member yet.</p>
{% endif %}
<h3>Chapter Head</h3>
<table class="table table-bordered small" style="max-width: 500px;">
{% set doc = frappe.get_doc('Member',chapter_head) %}
<tr>
<td style='width: 15%'>Name</td>
<td>{{ doc.member_name }}</td>
</tr>
<tr>
<td>Email</td>
<td>{{ frappe.db.get_value('User', doc.email, 'email') or '' }}</td>
</tr>
<tr>
<td>Phone</td>
<td>{{ frappe.db.get_value('User', doc.email, 'phone') or '' }}</td>
</tr>
</table>
<h3>Address</h3>
<p>{{ address }}</p>
<p style="margin: 20px 0 30px;"><a href="/non_profit/join-chapter?name={{ name }}" class='btn btn-primary'>Join this Chapter</a></p>
<p style="margin: 20px 0 30px;"><a href="/non_profit/leave-chapter?name={{ name }}" class=''>Leave this Chapter</a></p>
{% endblock %}

View File

@@ -0,0 +1,23 @@
{% if doc.published %}
<div class="mb-4 col-xs-12 col-sm-12">
<h3>{{ doc.name | capitalize }}</h3>
<p> <span class="label"> Chapter Head : {{ frappe.db.get_value('User', chapter_head, 'full_name') }} </span>
<span class="label">
{% if members %}
{% set index = [] %}
{% for user in members %}
{% if user.enabled == 1 %}
{% set __ = index.append(1) %}
{% endif %}
{% endfor %}
Members: {{ index|length }}
{% else %}
Members: 0
{% endif %}
</span>
<!-- Assignment of value to global variable not working in jinja -->
</p>
<p>{{ html2text(doc.introduction) | truncate (200) }}</p>
<a href={{ route }}>Read More Details </a>
</div>
{% endif %}

View File

@@ -1,3 +1,7 @@
.navbar {
padding: 0.5rem 0;
}
.media-img { .media-img {
max-width: 150px; max-width: 150px;
} }
@@ -7,6 +11,121 @@
} }
.breadcrumb { .breadcrumb {
background-color: #ffffff; background-color: #fff;
margin: 0 -2rem; margin: 0 -1rem;
}
img,
.img {
max-width: 100%;
}
/* avatar */
.avatar {
display: inline-block;
vertical-align: middle;
width: 50px;
height: 50px;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.avatar img {
max-width: 100%;
max-height: 100%;
border-radius: 4px;
}
.avatar-empty {
border: 1px dashed #d1d8dd;
border-radius: 4px;
}
.avatar-small {
margin-right: 5px;
width: 24px;
height: 24px;
}
.avatar-small .standard-image {
font-size: 14px;
}
.avatar-small .avatar-frame {
border-radius: 3px;
}
.avatar-medium {
margin-right: 5px;
width: 36px;
height: 36px;
}
.avatar-medium .standard-image {
font-size: 18px;
}
.avatar-large {
margin-right: 10px;
width: 72px;
height: 72px;
}
.avatar-large .standard-image {
font-size: 36px;
}
.avatar-xl {
margin-right: 10px;
width: 108px;
height: 108px;
}
.avatar-xl .standard-image {
font-size: 72px;
}
.avatar-xs {
margin-right: 3px;
margin-top: -2px;
width: 17px;
height: 17px;
border: none;
border-radius: 3px;
}
.avatar-xs .standard-image {
font-size: 9px;
}
.avatar-text {
display: inline;
width: 100%;
height: 0;
padding-bottom: 100%;
}
.standard-image {
width: 100%;
height: 0;
padding: 50% 0;
display: inline-block;
text-align: center;
border-radius: 4px;
font-size: 14px;
line-height: 0;
color: #d1d8dd;
border: 1px solid #d1d8dd;
font-weight: normal;
margin-top: -1px;
} }

View File

@@ -45,7 +45,7 @@
<script type="text/javascript" <script type="text/javascript"
src="/assets/js/frappe-web.min.js"></script> src="/assets/js/frappe-web.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="assets/bootstrap-4/js/bootstrap.min.js"></script> <script src="/assets/bootstrap-4/js/bootstrap.min.js"></script>
{% endblock %} {% endblock %}
{%- if js_globals is defined %} {%- if js_globals is defined %}
<script> <script>

View File

@@ -0,0 +1,19 @@
{% extends "templates/web.html" %}
{% block title %}{{ blog_title or _("Blog") }}{% endblock %}
{% block header %}<h1>{{ blog_title or _("Blog") }}</h1>{% endblock %}
{% block hero %}{% endblock %}
{% block page_content %}
<!-- no-header -->
<!-- no-breadcrumbs -->
<div class="blog-list-content">
<div id="blog-list">
{% include "templates/includes/list/list.html" %}
</div>
</div>
{% endblock %}
{% block script %}
<script>{% include "templates/includes/list/list.js" %}</script>
{% endblock %}

View File

@@ -0,0 +1,13 @@
<div class="row mt-4">
<div class="col-xs-12 col-sm-1">
<div class="avatar avatar-large">
<img itemprop="thumbnailUrl" src="{{ blogger_info.avatar or "/assets/frappe/images/default-avatar.png" }}" />
</div>
</div>
<div class="col-xs-12 col-sm-8">
<h4 class="text-muted">
<a href="/blog?blogger={{ blogger_info.name }}">{{ blogger_info.full_name }}</a>
</h4>
<p class="text-muted">{%if blogger_info.bio %}{{ blogger_info.bio }}{% endif %}</p>
</div>
</div>

View File

@@ -0,0 +1,12 @@
{% if blog_title and not (frappe.local.form_dict.txt or frappe.local.form_dict.by) %}
<div class="page-hero border-bottom">
<div class="container">
<h1 class="page-title">
{{ blog_title }}
</h1>
{% if blog_introduction -%}
<p class="blog-introduction">{{ blog_introduction }}</p>
{%- endif %}
</div>
</div>
{% endif %}

View File

@@ -3,7 +3,7 @@
{% for parent in parents %} {% for parent in parents %}
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url"> <a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url">
<span itemprop="title">{{ parent.title or parent.label or parent.name or "" }}</span> <span itemprop="title">{{ parent.title or parent.label or parent.name or "" }} </span>
</a> </a>
</li> </li>
{% endfor %} {% endfor %}

View File

@@ -114,7 +114,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="pt-3 mt-3 border-top"> <div class="py-3 mt-3 border-top">
<span>&copy; <span id="year"></span> ERPNext Open Source Software Foundation. Content licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank"> CC-BY-SA 3.0</a> Read the <a href="/terms" >Terms of use</a>.</span> <span>&copy; <span id="year"></span> ERPNext Open Source Software Foundation. Content licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank"> CC-BY-SA 3.0</a> Read the <a href="/terms" >Terms of use</a>.</span>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -0,0 +1,26 @@
{% if sub_title %}
<h4 class="text-muted">{{ sub_title }}</h4>
{% endif %}
{% if not result -%}
<div class="text-muted no-results" style="min-height: 300px;">
<i class="mega-octicon octicon-telescope"></i>
{{ no_result_message or _("Nothing to show") }}
</div>
{% else %}
<div class="website-list" data-doctype="{{ doctype }}"
data-txt="{{ txt or '[notxt]' }}">
<!-- {% if not hide_filters -%}
{% include "templates/includes/list/filters.html" %}
{%- endif %} -->
{% if result_heading_template %}{% include result_heading_template %}{% endif %}
<div class="row result">
{% for item in result %}
{{ item }}
{% endfor %}
</div>
<div class="more-block mb-4 {% if not show_more -%} hide {%- endif %}">
<button class="btn btn-more btn-secondary">{{ _("More") }}</button>
</div>
</div>
{%- endif %}

View File

@@ -1,4 +1,4 @@
<nav class="navbar navbar-expand-lg" role="navigation"> <nav class="navbar navbar-expand-lg border-bottom" role="navigation">
<a class="navbar-brand ellipsis" <a class="navbar-brand ellipsis"
href="{{ url_prefix }}{{ home_page or "/"}}"> href="{{ url_prefix }}{{ home_page or "/"}}">
<span>{{ brand_html or (frappe.get_hooks("brand_html") or ["Home"])[0] }}</span> <span>{{ brand_html or (frappe.get_hooks("brand_html") or ["Home"])[0] }}</span>

View File

@@ -1,16 +1,15 @@
{% extends base_template_path %} {% extends base_template_path %}
{% block hero %}{% endblock %} {% block hero %}{% endblock %}
{% block content %} {% block content %}
<div class="page px-3 pt-3"> <div class="page">
<div class="row" id="page-{{ name or route }}" <div class="row" id="page-{{ name or route }}" data-path="{{ pathname }}" {%- if page_or_generator=="Generator" %} data-doctype="{{ doctype }}"{% endif %}>
data-path="{{ pathname }}" {%- if page_or_generator=="Generator" %} data-doctype="{{ doctype }}"{% endif %}>
{% if show_sidebar %} {% if show_sidebar %}
<div class="pt-3 col-sm-2 border-right"> <div class="pt-4 col-sm-2 border-right">
{% include "templates/includes/web_sidebar.html" %} {% include "templates/includes/web_sidebar.html" %}
</div> </div>
{% endif %} {% endif %}
<div class="{% if show_sidebar %}pt-3 col-sm-10{% else %} col-sm-12 {% endif %}"> <div class="pt-3 {% if show_sidebar %}px-3 col-sm-10{% else %} col-sm-12 {% endif %}">
<div class="page-content-wrapper px-3"> <div class="page-content-wrapper">
<div class="row page-head"> <div class="row page-head">
<div class='col-sm-12'> <div class='col-sm-12'>
{% if not no_breadcrumbs and parents %} {% if not no_breadcrumbs and parents %}
@@ -52,4 +51,3 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -3,7 +3,6 @@
{% include "templates/includes/meta_block.html" %} {% include "templates/includes/meta_block.html" %}
{% endblock %} {% endblock %}
{% block page_content %} {% block page_content %}
<div class="blog-container">
<article class="blog-content" itemscope itemtype="http://schema.org/BlogPosting"> <article class="blog-content" itemscope itemtype="http://schema.org/BlogPosting">
<!-- begin blog content --> <!-- begin blog content -->
<div class="blog-info"> <div class="blog-info">
@@ -23,22 +22,13 @@
{% if blogger_info %} {% if blogger_info %}
{% include "templates/includes/blog/blogger.html" %} {% include "templates/includes/blog/blogger.html" %}
{% endif %} {% endif %}
<div class="blog-comments"> <div class="border-top mt-4 pt-4 blog-comments">
{% include 'templates/includes/comments/comments.html' %} {% include 'templates/includes/comments/comments.html' %}
</div> </div>
</div>
<script> <script>
frappe.ready(function() { frappe.set_search_path("/blog"); }) frappe.ready(function() { frappe.set_search_path("/blog"); })
</script> </script>
{% endblock %} {% endblock %}
{% block style %} {% block style %}
<style>
.blog-container {
max-width: 720px;
margin: auto;
}
.page-content {
padding-bottom: 0px;
}
</style>
{% endblock %} {% endblock %}

View File

@@ -1,7 +1,5 @@
{%- set post = doc -%} {%- set post = doc -%}
<div class="web-list-item blog-list-item mb-4"> <div class="blog-list-item mb-4 col-sm-12">
<div class="row">
<div class="col-xs-12">
<h3 class="font-weight-normal"><a href="/{{ post.route }}">{{ post.title }}</a></h3> <h3 class="font-weight-normal"><a href="/{{ post.route }}">{{ post.title }}</a></h3>
<p class="post-description">{{ post.intro }}</p> <p class="post-description">{{ post.intro }}</p>
@@ -13,6 +11,6 @@
</p> </p>
</div> </div>
</div>
</div>
</div> </div>

View File

@@ -375,8 +375,6 @@ window.web_form_settings = {
{% endblock %} {% endblock %}
{% block style %} {% block style %}
<link type="text/css" rel="stylesheet" href="/assets/css/web_form.css">
<link href="/assets/foundation/css/bootstrap-for-webform.css" rel="stylesheet">
<style> <style>
{% if style is defined %}{{ style }}{% endif %} {% if style is defined %}{{ style }}{% endif %}
</style> </style>

View File

@@ -6,7 +6,7 @@
{% block content%} {% block content%}
<div class="page"> <div class="page">
<section class='my-3'> <section>
<img class="rounded mw-100 my-5" src="/assets/foundation/img/community-colored.jpg"> <img class="rounded mw-100 my-5" src="/assets/foundation/img/community-colored.jpg">
<h1 class="font-weight-normal">ERPNext Foundation</h1> <h1 class="font-weight-normal">ERPNext Foundation</h1>
<p class="lead w-75">We are a Non Profit <p class="lead w-75">We are a Non Profit

View File

@@ -34,7 +34,7 @@
{% endmacro %} {% endmacro %}
{% block page_content %} {% block page_content %}
<section class="my-5 px-3"> <section class="px-3">
<h3 class="mb-5">Gold Members</h3> <h3 class="mb-5">Gold Members</h3>
{% for m in gold_members %} {% for m in gold_members %}
{{ gold_member(m) }} {{ gold_member(m) }}