refactor: content inner header as template to be reusable
This commit is contained in:
@@ -8,17 +8,3 @@
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.register__header-logo {
|
|
||||||
background-image: url('./../img/paw.png');
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.register__header-title {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
@media(min-width: 576px) {
|
|
||||||
margin-bottom: .5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,3 +12,17 @@ body {
|
|||||||
.content {
|
.content {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inner-header-logo {
|
||||||
|
background-image: url('./../img/paw.png');
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inner-header-title {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
@media(min-width: 576px) {
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
10
app/templates/layout/inner_header.html
Normal file
10
app/templates/layout/inner_header.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{% macro inner_header(title) %}
|
||||||
|
<div class="row">
|
||||||
|
{% include 'message.html' %}
|
||||||
|
<div class="col-2 inner-header-logo">
|
||||||
|
</div>
|
||||||
|
<div class="col-10 gx-md-4 gx-0">
|
||||||
|
<h1 class="inner-header-title">{{title}}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{% extends "layout/layout.html" %}
|
{% extends "layout/layout.html" %}
|
||||||
{% from "forms/validation-block.html" import form_field_validation %}
|
{% from "forms/validation-block.html" import form_field_validation %}
|
||||||
|
{% from "layout/inner_header.html" import inner_header%}
|
||||||
{% block title %} register {% endblock %}
|
{% block title %} register {% endblock %}
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
@@ -7,15 +8,9 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="register mx-auto">
|
<div class="register mx-auto">
|
||||||
<div class="row my-3 my-md-5">
|
<div class="my-3 my-md-5">
|
||||||
{% include 'message.html' %}
|
{{ inner_header("Register") }}
|
||||||
<div class="col-2 register__header-logo">
|
|
||||||
</div>
|
|
||||||
<div class="col-10 gx-md-4 gx-0">
|
|
||||||
<h1 class="register__header-title">Register</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<form class="row g-3 needs-validation" method="post" novalidate>
|
<form class="row g-3 needs-validation" method="post" novalidate>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|||||||
Reference in New Issue
Block a user