diff --git a/frappe/docs/current/api/website/frappe.website.render.html b/frappe/docs/current/api/website/frappe.website.render.html
index 0b45cee97b..acb3b6e9e3 100644
--- a/frappe/docs/current/api/website/frappe.website.render.html
+++ b/frappe/docs/current/api/website/frappe.website.render.html
@@ -64,22 +64,6 @@
-
-
-
- frappe.website.render.build_json
- (path)
-
-
-
-
-
-
-
-
-
-
@@ -144,22 +128,6 @@
-
-
-
- frappe.website.render.is_ajax
- ()
-
-
-
-
-
-
-
-
-
-
diff --git a/frappe/docs/current/api/website/frappe.website.template.html b/frappe/docs/current/api/website/frappe.website.template.html
index 6c55adf387..b154b8fc03 100644
--- a/frappe/docs/current/api/website/frappe.website.template.html
+++ b/frappe/docs/current/api/website/frappe.website.template.html
@@ -114,22 +114,6 @@ Hero elements get full page width.
-
-
-
- frappe.website.template.set_sidebar
- (out, context)
-
- Include sidebar (deprecated)
-
-
-
-
-
-
-
-
-
diff --git a/frappe/docs/current/models/core/user.html b/frappe/docs/current/models/core/user.html
index f51f81074d..52f57c0ca4 100644
--- a/frappe/docs/current/models/core/user.html
+++ b/frappe/docs/current/models/core/user.html
@@ -1595,6 +1595,8 @@ The mentions will be separated by non-word characters or may appear at the start
+
+
diff --git a/frappe/docs/current/models/website/web_page.html b/frappe/docs/current/models/website/web_page.html
index d7acc0e721..215b7e2a14 100644
--- a/frappe/docs/current/models/website/web_page.html
+++ b/frappe/docs/current/models/website/web_page.html
@@ -423,6 +423,35 @@ Right
+
+
+
+ add_hero
+ (self, context)
+
+ Add a hero element if specified in content or hooks.
+Hero elements get full page width.
+
+
+
+
+
+
+
+
+
+
+ add_index
+ (self, context)
+
+ Add index, next button if {index}, {next} is present.
+
+
+
+
+
+
+
@@ -507,6 +536,20 @@ Right
+
+
+
+ set_breadcrumbs
+ (self, context)
+
+ Build breadcrumbs template (deprecated)
+
+
+
+
+
+
+
@@ -521,6 +564,20 @@ Right
+
+
+
+ set_title_and_header
+ (self, context)
+
+ Extract and set title and header from content or context.
+
+
+
+
+
+
+
diff --git a/frappe/hooks.py b/frappe/hooks.py
index 76d975d919..84000d96e6 100644
--- a/frappe/hooks.py
+++ b/frappe/hooks.py
@@ -45,12 +45,6 @@ website_route_rules = [
{"from_route": "/blog/", "to_route": "Blog Post"}
]
-website_context = {
- "hero": {
- "blog": "templates/includes/blog/hero.html"
- }
-}
-
write_file_keys = ["file_url", "file_name"]
notification_config = "frappe.core.notifications.get_notification_config"
diff --git a/frappe/public/build.json b/frappe/public/build.json
index 17cc177f51..3668c69365 100644
--- a/frappe/public/build.json
+++ b/frappe/public/build.json
@@ -2,14 +2,12 @@
"css/frappe-web.css": [
"public/css/font-awesome.css",
"public/css/octicons/octicons.css",
- "public/css/nprogress.css",
"public/css/website.css"
],
"js/frappe-web.min.js": [
"public/js/lib/bootstrap.min.js",
"public/js/frappe/provide.js",
"public/js/frappe/misc/number_format.js",
- "public/js/lib/nprogress.js",
"public/js/frappe/translate.js",
"public/js/frappe/misc/pretty_date.js",
"public/js/lib/moment/moment.min.js",
@@ -39,7 +37,6 @@
"public/css/sidebar.css",
"public/css/page.css",
"public/css/tree.css",
- "public/css/nprogress.css",
"public/css/desktop.css",
"public/css/form.css",
"public/css/mobile.css"
@@ -50,7 +47,6 @@
"public/js/lib/tag-it.min.js",
"public/js/lib/notify.js",
"public/js/lib/bootstrap.min.js",
- "public/js/lib/nprogress.js",
"public/js/lib/moment/moment-with-locales.min.js",
"public/js/lib/moment/moment-timezone-with-data.min.js",
"public/js/lib/socket.io.min.js",
diff --git a/frappe/public/css/nprogress.css b/frappe/public/css/nprogress.css
deleted file mode 100644
index 1eaeae9210..0000000000
--- a/frappe/public/css/nprogress.css
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Make clicks pass-through */
-#nprogress {
- pointer-events: none;
- -webkit-pointer-events: none;
-}
-
-/* Make the entire page show a busy cursor */
-.nprogress-busy body {
- cursor: wait;
-}
-
-#nprogress .bar {
- background: #36414C;
-
- position: fixed;
- z-index: 1050;
- top: 0;
- left: 0;
-
- width: 100%;
- height: 2px;
-}
-
-/* Fancy blur effect */
-#nprogress .peg {
- display: block;
- position: absolute;
- right: 0px;
- width: 100px;
- height: 100%;
- /*box-shadow: 0 0 10px #2ecc71, 0 0 5px #2ecc71;*/
- opacity: 1.0;
-
- -webkit-transform: rotate(3deg) translate(0px, -4px);
- -moz-transform: rotate(3deg) translate(0px, -4px);
- -ms-transform: rotate(3deg) translate(0px, -4px);
- -o-transform: rotate(3deg) translate(0px, -4px);
- transform: rotate(3deg) translate(0px, -4px);
-}
-
-/* Remove these to get rid of the spinner
-#nprogress .spinner {
- display: block;
- position: fixed;
- z-index: 1050;
- top: 7px;
- right: 15px;
-}
-
-#nprogress .spinner-icon {
- width: 14px;
- height: 14px;
-
- border: solid 2px transparent;
- border-top-color: #fff;
- border-left-color: #fff;
- border-radius: 10px;
-
- -webkit-animation: nprogress-spinner 400ms linear infinite;
- -moz-animation: nprogress-spinner 400ms linear infinite;
- -ms-animation: nprogress-spinner 400ms linear infinite;
- -o-animation: nprogress-spinner 400ms linear infinite;
- animation: nprogress-spinner 400ms linear infinite;
-}
-
-@-webkit-keyframes nprogress-spinner {
- 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
-}
-@-moz-keyframes nprogress-spinner {
- 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
- 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); }
-}
-@-o-keyframes nprogress-spinner {
- 0% { -o-transform: rotate(0deg); transform: rotate(0deg); }
- 100% { -o-transform: rotate(360deg); transform: rotate(360deg); }
-}
-@-ms-keyframes nprogress-spinner {
- 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); }
- 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); }
-}
-@keyframes nprogress-spinner {
- 0% { transform: rotate(0deg); transform: rotate(0deg); }
- 100% { transform: rotate(360deg); transform: rotate(360deg); }
-}*/
diff --git a/frappe/public/js/lib/nprogress.js b/frappe/public/js/lib/nprogress.js
deleted file mode 100644
index 1a05eaf57b..0000000000
--- a/frappe/public/js/lib/nprogress.js
+++ /dev/null
@@ -1,220 +0,0 @@
-/*! NProgress (c) 2013, Rico Sta. Cruz
- * http://ricostacruz.com/nprogress */
-
-;(function(factory) {
-
- if (typeof module === 'object') {
- module.exports = factory(this.jQuery || require('dom'));
- } else {
- this.NProgress = factory(this.jQuery);
- }
-
-})(function($) {
- var NProgress = {};
-
- NProgress.version = '0.1.0';
-
- var Settings = NProgress.settings = {
- minimum: 0.08,
- easing: 'ease',
- speed: 200,
- trickle: true,
- trickleRate: 0.02,
- trickleSpeed: 800,
- template: ''
- };
-
- /**
- * Updates configuration.
- *
- * NProgress.configure({
- * minimum: 0.1
- * });
- */
- NProgress.configure = function(options) {
- $.extend(Settings, options);
- return this;
- };
-
- /**
- * Last number.
- */
-
- NProgress.status = null;
-
- /**
- * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
- *
- * NProgress.set(0.4);
- * NProgress.set(1.0);
- */
-
- NProgress.set = function(n) {
- var started = NProgress.isStarted();
-
- n = clamp(n, Settings.minimum, 1);
- NProgress.status = (n === 1 ? null : n);
-
- var $progress = NProgress.render(!started),
- $bar = $progress.find('[role="bar"]'),
- speed = Settings.speed,
- ease = Settings.easing;
-
- $progress[0].offsetWidth; /* Repaint */
-
- $progress.queue(function(next) {
- $bar.css({
- transition: 'all '+speed+'ms '+ease,
- transform: 'translate3d('+toBarPerc(n)+'%,0,0)'
- });
-
- if (n === 1) {
- // Fade out
- $progress.css({ transition: 'none', opacity: 1 });
- $progress[0].offsetWidth; /* Repaint */
-
- setTimeout(function() {
- $progress.css({ transition: 'all '+speed+'ms linear', opacity: 0 });
- setTimeout(function() {
- NProgress.remove();
- next();
- }, speed);
- }, speed);
- } else {
- setTimeout(next, speed);
- }
- });
-
- return this;
- };
-
- NProgress.isStarted = function() {
- return typeof NProgress.status === 'number';
- };
-
- /**
- * Shows the progress bar.
- * This is the same as setting the status to 0%, except that it doesn't go backwards.
- *
- * NProgress.start();
- *
- */
- NProgress.start = function() {
- if (!NProgress.status) NProgress.set(0);
-
- var work = function() {
- setTimeout(function() {
- if (!NProgress.status) return;
- NProgress.trickle();
- work();
- }, Settings.trickleSpeed);
- };
-
- if (Settings.trickle) work();
-
- return this;
- };
-
- /**
- * Hides the progress bar.
- * This is the *sort of* the same as setting the status to 100%, with the
- * difference being `done()` makes some placebo effect of some realistic motion.
- *
- * NProgress.done();
- *
- * If `true` is passed, it will show the progress bar even if its hidden.
- *
- * NProgress.done(true);
- */
-
- NProgress.done = function(force) {
- if (!force && !NProgress.status) return this;
-
- return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
- };
-
- /**
- * Increments by a random amount.
- */
-
- NProgress.inc = function(amount) {
- var n = NProgress.status;
-
- if (!n) {
- return NProgress.start();
- } else {
- if (typeof amount !== 'number') {
- amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);
- }
-
- n = clamp(n + amount, 0, 0.994);
- return NProgress.set(n);
- }
- };
-
- NProgress.trickle = function() {
- return NProgress.inc(Math.random() * Settings.trickleRate);
- };
-
- /**
- * (Internal) renders the progress bar markup based on the `template`
- * setting.
- */
-
- NProgress.render = function(fromStart) {
- if (NProgress.isRendered()) return $("#nprogress");
- $('html').addClass('nprogress-busy');
-
- var $el = $("")
- .html(Settings.template);
-
- var perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0);
-
- $el.find('[role="bar"]').css({
- transition: 'all 0 linear',
- transform: 'translate3d('+perc+'%,0,0)'
- });
-
- $el.appendTo(document.body);
-
- return $el;
- };
-
- /**
- * (Internal) Removes the element. Opposite of render().
- */
-
- NProgress.remove = function() {
- $('html').removeClass('nprogress-busy');
- $('#nprogress').remove();
- };
-
- /**
- * Checks if the progress bar is rendered.
- */
-
- NProgress.isRendered = function() {
- return ($("#nprogress").length > 0);
- };
-
- /**
- * Helpers
- */
-
- function clamp(n, min, max) {
- if (n < min) return min;
- if (n > max) return max;
- return n;
- }
-
- /**
- * (Internal) converts a percentage (`0..1`) to a bar translateX
- * percentage (`-100%..0%`).
- */
-
- function toBarPerc(n) {
- return (-1 + n) * 100;
- }
-
- return NProgress;
-});
diff --git a/frappe/templates/autodoc/base_template.html b/frappe/templates/autodoc/base_template.html
index 362e4fe460..0c38dae4ee 100644
--- a/frappe/templates/autodoc/base_template.html
+++ b/frappe/templates/autodoc/base_template.html
@@ -4,7 +4,7 @@
-
{{ title }}
+
{% block title %} {{ title }} {% endblock %}
@@ -12,11 +12,6 @@
-
-
-
-
-
{% block favicon %}
- {%- if style is defined -%}{{ style }}{%- endif -%}
-
- {%- endblock -%}
+ {%- block style %}{%- endblock -%}
{%- endblock -%}
@@ -60,17 +51,12 @@
{% include "templates/includes/navbar/navbar.html" %}
{%- endblock -%}
- {%- block hero -%}
-
- {{ hero or "" }}
-
- {%- endblock -%}
- {% block content %}
-
- {{ content }}
-
-
- {% endblock %}
+
+ {%- block hero -%}{%- endblock -%}
+
+
+ {% block content %}{% endblock %}
+
+
+
+
+
+
- {%- block script %}
-
- {%- endblock %}
+
+ {%- block script %}{%- endblock %}
{%- block body_include %}{{ body_include or "" }}{% endblock -%}
diff --git a/frappe/templates/base.html b/frappe/templates/base.html
index 3b282bc136..41e4bd1722 100644
--- a/frappe/templates/base.html
+++ b/frappe/templates/base.html
@@ -4,12 +4,8 @@
- {{ title }}
+ {% block title %} {{ title }} {% endblock %}
-
-
{% block favicon %}
- {%- if style is defined -%}{{ style }}{%- endif -%}
-
- {%- endblock -%}
+ {%- block style %}{%- endblock -%}
{%- endblock -%}
- {%- if js_globals is defined %}
- {% endif -%}
@@ -64,16 +60,12 @@
{% include "templates/includes/navbar/navbar.html" %}
{%- endblock -%}
- {%- block hero -%}
-
- {{ hero or "" }}
-
- {%- endblock -%}
- {% block content %}
-
- {{ content }}
-
- {% endblock %}
+
+ {%- block hero -%}{%- endblock -%}
+
+
+ {% block content %}{% endblock %}
+