migrated the templates to frappe_theme

- now org requires frappe_theme (see hooks.py)
- footer is kept in templates since io and org have different footer
This commit is contained in:
Raghavendra Kamath
2018-04-27 12:01:08 +05:30
parent 46032b2d75
commit a933345755
32 changed files with 6 additions and 4123 deletions

View File

@@ -1,67 +0,0 @@
<!DOCTYPE html>
<!-- Built on Frappe. https://frappe.io/ -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %} {{ title | striptags }} {% endblock %}</title>
<meta name="generator" content="frappe">
{% block favicon %}
<link rel="shortcut icon"
href="{{ (favicon or "/assets/frappe/images/favicon.png") | abs_url }}"
type="image/x-icon">
<link rel="icon"
href="{{ (favicon or "/assets/frappe/images/favicon.png") | abs_url }}"
type="image/x-icon">
{% endblock %}
{%- block head -%}
{% block meta_block %}{% endblock %}
<link href="/assets/bootstrap-4/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/foundation/css/style.css" rel="stylesheet">
{% if path == 'login' or template == 'website/doctype/web_form/templates/web_form.html' %}
<link type="text/css" rel="stylesheet" href="/assets/css/frappe-web.css">
{% endif %}
{%- endblock -%}
{%- block head_include %}{{ head_include or "" }}{% endblock -%}
{%- block style %}{%- endblock -%}
<script>
window.frappe = {};
frappe.ready_events = [];
frappe.ready = function(fn) {
frappe.ready_events.push(fn);
}
window.dev_server = {{ dev_server }};
</script>
</head>
<body data-path="{{ path }}">
<div class="container">
{%- block navbar -%}{% include "templates/includes/navbar/navbar.html" %}{%- endblock -%}
{% block content %}
{{ content }}
{% endblock %}
{%- block footer -%}{% include "templates/includes/footer/footer.html" %}{%- endblock -%}
</div>
{% block base_scripts %}
<!-- js should be loaded in body! -->
<script type="text/javascript"
src="/assets/frappe/js/lib/jquery/jquery.min.js"></script>
<script type="text/javascript"
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="/assets/bootstrap-4/js/bootstrap.min.js"></script>
{% endblock %}
{%- if js_globals is defined %}
<script>
{%- for key, value in js_globals.iteritems() %}
window.{{ key }} = "{{ value[0] }}";
{%- endfor -%}
</script>
{% endif -%}
{%- for link in web_include_js %}
<script type="text/javascript" src="{{ link|abs_url }}"></script>
{%- endfor -%}
{%- block script %}{%- endblock %}
<!-- csrf_token -->
{%- block body_include %}{{ body_include or "" }}{% endblock -%}
</body>
</html>

View File

@@ -1,19 +0,0 @@
{% 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

@@ -1,13 +0,0 @@
<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

@@ -1,12 +0,0 @@
{% 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

@@ -1,12 +0,0 @@
{% if parents and parents|length > 0 %}
<ul class="breadcrumb mb-4" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
{% for parent in parents %}
<li class="breadcrumb-item">
<a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url">
<span itemprop="title">{{ parent.title or parent.label or parent.name or "" }} </span>
</a>
</li>
{% endfor %}
<li class="breadcrumb-item active"><span itemprop="title">{{ title or "" }}</span></li>
</ul>
{% endif %}

View File

@@ -1,5 +0,0 @@
<div class="feature text-center">
<form class="email-subcription">
<label class="email">Stay Updated<input class="email-input" type="email" placeholder="Email"></label>
</form>
</div>

View File

@@ -1,26 +0,0 @@
{% if sub_title %}
<h4 class="text-muted">{{ sub_title }}</h4>
{% endif %}
{% if not result -%}
<div class="text-muted no-results">
<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="result row">
{% 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,15 +0,0 @@
{% macro media(title, content, image, link) %}
<div class="media my-3 bg-light p-4 {% if link %}clickable{% endif %}"
{% if link %}style="cursor: pointer;"{% endif %}
{% if link %}onclick="location.href='{{ link }}'"{% endif %}>
<a href="{{ link or "#" }}">
<img class="mr-3 media-img"
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 %}">
</a>
<div class="media-body mt-0">
{% if title %}<h4 class="media-heading">{{ title }}</h4>{% endif %}
{{ content }}
</div>
</div>
{% endmacro %}

View File

@@ -1,17 +0,0 @@
<ul class="nav-bar nav ml-auto mt-2 mt-lg-0">
{% if top_bar_items -%}
{%- for page in top_bar_items -%}
{% if not page.parent_label and not page.right -%}
{% include "templates/includes/navbar/navbar_link.html" %}
{%- endif -%}
{%- endfor %}
{%- endif %}
{%- for page in top_bar_items -%}
{% if not page.parent_label and page.right -%}
{% include "templates/includes/navbar/navbar_link.html" %}
{%- endif -%}
{%- endfor %}
{% block navbar_right_extension %}{% endblock %}
{% include "templates/includes/navbar/navbar_search.html" %}
{% include "templates/includes/navbar/dropdown_login.html" %}
</ul>

View File

@@ -1,17 +0,0 @@
<!-- post login tools -->
{% if not only_static %}
{%- for child in post_login -%}
<li {% if child.label %}data-label="{{ child.label }}" {% endif %}
class="{% if child.class %} {{ child.class }} {% endif %} logged-in" >
{%- if child.url -%}
<a href="{{ child.url | abs_url }}" {{ child.target or '' }}
rel="nofollow">
{{ child.label }}
</a>
{%- endif -%}
</li>
{%- endfor -%}
{% if not hide_login %}
<li class="btn-login-area"><a href="/login">{{ _("Login") }}</a></li>
{% endif %}
{% endif %}

View File

@@ -1,11 +0,0 @@
<nav class="navbar navbar-expand-lg border-bottom navbar-light" role="navigation">
<a class="navbar-brand" href="{{ url_prefix }}{{ home_page or "/"}}">
<span>{{ brand_html or (frappe.get_hooks("brand_html") or ["Home"])[0] }}</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
{% include "templates/includes/navbar/navbar_items.html" %}
</div>
</nav>

View File

@@ -1,21 +0,0 @@
{% if top_bar_items -%}
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
{%- for page in top_bar_items -%}
{% if not page.parent_label and not page.right -%}
{% include "templates/includes/navbar/navbar_link.html" %}
{%- endif -%}
{%- endfor %}
</ul>
{%- endif %}
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
{%- for page in top_bar_items -%}
{% if not page.parent_label and page.right -%}
{% include "templates/includes/navbar/navbar_link.html" %}
{%- endif -%}
{%- endfor %}
{% if not only_static %}
{% block navbar_right_extension %}{% endblock %}
{% endif %}
{% include "templates/includes/navbar/navbar_search.html" %}
{% include "templates/includes/navbar/navbar_login.html" %}
</ul>

View File

@@ -1,13 +0,0 @@
<li class="nav-item {% if page.child_items %} dropdown {% endif %}" data-label='{{ page.label }}'>
<a {% if not page.child_items -%} class="nav-link" href="{{ (page.url or '')|abs_url }}" {%- endif %}
{% if page.child_items %} class="nav-link dropdown-toggle" data-toggle="dropdown" id="navbarDropdownMenuLink" role="button" aria-haspopup="true" aria-expanded="false" {% endif %}
{{ page.target or ''}}>
{{ page.label }}
</a>
<div class="dropdown-menu" role="menu">
{%- for child in page.child_items -%}
<a class="dropdown-item" data-label='{{ child.label }}' href="{{ child.url | abs_url }}" {{ child.target or '' }}>{{ child.label }}</a>
{%- endfor -%}
</div>
</a>
</li>

View File

@@ -1,25 +0,0 @@
<!-- post login tools -->
{% if not only_static %}
<li class="nav-item dropdown logged-in" id="website-post-login"
data-label="website-post-login" style="display: none">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
<span class="user-image-wrapper"></span>
<span class="full-name"></span>
<b class="caret"></b>
</a>
<div class="dropdown-menu" role="menu">
{%- for child in post_login -%}
{%- if child.url -%}
<a class="dropdown-item" href="{{ child.url | abs_url }}" {{ child.target or '' }}
rel="nofollow">
{{ child.label }}
</a>
{%- endif -%}
{%- endfor -%}
<a class="dropdown-item" href="/desk">{{ _('Switch To Desk') }}</a>
</div>
</li>
{% if not hide_login %}
<li class="nav-item btn-login-area"><a class="nav-link" href="/login">{{ _("Login") }}</a></li>
{% endif %}
{% endif %}

View File

@@ -1,9 +0,0 @@
{% if navbar_search %}
<li>
<form action='/search'>
<input name='q' class='form-control navbar-search' type='text'
value='{{ frappe.form_dict.q or ''}}'
{% if not frappe.form_dict.q%}placeholder="{{ _("Search...") }}"{% endif %}>
</form>
</li>
{% endif %}

View File

@@ -1,42 +0,0 @@
<section class="sponsor">
<div class="grid-of-three">
<div class="box text-center top-spacer" >
<a href="https://frappe.io/" class="no-decoration" target="_blank">
<img src="/assets/foundation/img/frappe-bird-black.svg" alt="Frappe"/>
</a>
</div>
<div class="box text-center top-spacer" >
<a href="https://mntechnique.com/" class="no-decoration" target="_blank">
<img src="/assets/foundation/img/conf/sponsors/mnt-logo.png" alt="MNT"/>
</a>
</div>
<div class="box text-center top-spacer" >
<a href="http://fogliasana.com/" class="no-decoration" target="_blank">
<img src="/assets/foundation/img/conf/sponsors/shs-logo.png" alt="SHS"/>
</a>
</div>
<div class="box text-center top-spacer" >
<a href="https://www.cloude8.com/" class="no-decoration" target="_blank">
<img src="/assets/foundation/img/conf/sponsors/cloude8.png" alt="Cloude8"/>
</a>
</div>
<div class="box text-center top-spacer" >
<a href="https://digithinkit.com/" class="no-decoration" target="_blank">
<img src="/assets/foundation/img/conf/sponsors/digithinkit.png" alt="DigiThinkIT"/>
</a>
</div>
<div class="box text-center top-spacer" >
<a href="http://www.indictranstech.com/" class="no-decoration" target="_blank">
<img src="/assets/foundation/img/conf/sponsors/indictrans.png">
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div style="margin-top: 40px;">
<p>Become a patron for the conference and get associated with a global community<br>
of tens of thousands of users and developers. Sponsors also get 5 complimentary passes for the full conference!</p>
<a href="mailto:foundation@erpnext.org" style="color:white" class="btn btn-primary disabled">Become A Sponsor</a>
</div>
</div>
</div>
</section>

View File

@@ -1,53 +0,0 @@
{% extends base_template_path %}
{% block hero %}{% endblock %}
{% block content %}
<div class="page">
<div class="row" id="page-{{ name or route }}" data-path="{{ pathname }}" {%- if page_or_generator=="Generator" %} data-doctype="{{ doctype }}"{% endif %}>
{% if show_sidebar %}
<div class="pt-4 col-sm-2 border-right">
{% include "templates/includes/web_sidebar.html" %}
</div>
{% endif %}
<div class="pt-3 {% if show_sidebar %}px-3 col-sm-10{% else %} col-sm-12 {% endif %}">
<div class="page-content-wrapper">
<div class="row page-head">
<div class='col-sm-12'>
{% if not no_breadcrumbs and parents %}
<div class="page-breadcrumbs">
{% block breadcrumbs %}
{% include 'templates/includes/breadcrumbs.html' %}
{% endblock %}
</div>
{% endif %}
</div>
{% if doctype != 'Blog Post' %}
<div class="col-sm-8 col-xs-6">
{% block header %}{% endblock %}
</div>
{% endif %}
<div class="col-sm-4 col-xs-6">
{% if show_search %}
<div class="page-search-block">
{% block search %}
{% include
'templates/includes/search_box.html' %}
{% endblock %}
</div>
{% endif %}
{% if self.header_actions() %}
<div class="page-header-actions-block">
{% block header_actions %}{% endblock %}
</div>
{% endif %}
</div>
</div>
<div class="page_content">
{%- block page_content -%}{%- endblock -%}
</div>
</div>
<!-- sidebar ends -->
</div>
</div>
</div>
{% endblock %}