Skip to content

Instantly share code, notes, and snippets.

@rodrigobertin
Last active July 31, 2019 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrigobertin/0f46aaa756c3128c245963f0273b3850 to your computer and use it in GitHub Desktop.
Save rodrigobertin/0f46aaa756c3128c245963f0273b3850 to your computer and use it in GitHub Desktop.
Base flask bootstrap
{% extends "bootstrap/base.html" %}
{% block html_attribs %} lang="es"{% endblock %}
{% block title %}Title page{% endblock %}
{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for('static',filename='img/icons/favicon.ico') }}" type="image/x-icon"/>
<link rel="apple-touch-icon" sizes="57x57" href="{{ url_for('static',filename='img/icons/apple-touch-icon-57x57.png') }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ url_for('static',filename='img/icons/apple-touch-icon-60x60.png') }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ url_for('static',filename='img/icons/apple-touch-icon-72x72.png') }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static',filename='img/icons/apple-touch-icon-76x76.png') }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static',filename='img/icons/apple-touch-icon-114x114.png') }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static',filename='img/icons/apple-touch-icon-120x120.png') }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static',filename='img/icons/apple-touch-icon-144x144.png') }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ url_for('static',filename='img/icons/apple-touch-icon-152x152.png') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static',filename='img/icons/apple-touch-icon-180x180.png') }}">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/icons/favicon-16x16.png') }}" sizes="16x16">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/icons/favicon-32x32.png') }}" sizes="32x32">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/icons/favicon-96x96.png') }}" sizes="96x96">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/icons/android-chrome-192x192.png') }}" sizes="192x192">
<meta name="msapplication-square70x70logo" content="{{ url_for('static', filename='img/icons/smalltile.png') }}"/>
<meta name="msapplication-square150x150logo" content="{{ url_for('static', filename='img/icons/mediumtile.png') }}"/>
<meta name="msapplication-wide310x150logo" content="{{ url_for('static', filename='img/icons/widetile.png') }}"/>
<meta name="msapplication-square310x310logo" content="{{ url_for('static', filename='img/icons/largetile.png') }}"/>
{% endblock %}
{# CSS #}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
{#<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.min.css') }}">#}
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
{% endblock %}
{% block body %}
{% block header %}
{% include 'front/nav.html' %}
{% endblock %}
{# Flash messages #}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="animated bounceOutDown delay-2s alert alert-block alert-{{ category }}">{{ message | safe }}</div>
{% endfor %}
{% endif %}
{% endwith %}
{# Contenido de la seccion #}
{% block content %}
<h1>Hello, Bootstrap</h1>
{% endblock %}
{# Footer #}
{% block footer %}
{% include 'front/footer.html' %}
{% endblock %}
{# Scripts #}
{% block scripts %}
{{ super() }}
<script src="{{ url_for('static',filename='js/scripts.min.js') }}"></script>
<script src="{{ url_for('static',filename='js/main.js') }}"></script>
{% endblock %}
{#
{% assets "js_all" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
<script type="text/javascript" src="{{ url_for('static',filename='js/main.min.js') }}"></script>
{% endassets %}
#}
{# Scripts de la seccion #}
{% block main_scripts %}{% endblock %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment