chore: added macro for page hero

This commit is contained in:
Shivam Mishra
2019-05-21 12:05:19 +05:30
parent c8c790a097
commit 87a7438d38
3 changed files with 38 additions and 19 deletions

View File

@@ -0,0 +1,20 @@
{% macro hero(title, description) %}
<div class='container pb-5'>
<h1>{{ title}}</h1>
<p class='lead' style="max-width: 100%;">{{ description }}</p>
<p class="mt-4">
<a id="signup" class="btn btn-primary btn-lg" style="width: 170px;" href="/login#signup" hidden=true>Sign Up</a>
</p>
</div>
{% block script %}
<script type="text/javascript">
frappe.ready(() => {
btn = document.getElementById('signup')
if(frappe.session.user == 'Guest') {
btn.hidden = false;
}
})
</script>
{% endblock %}
{% endmacro %}