mod from tramaulipas
This commit is contained in:
parent
7d96f55670
commit
3b9be320fc
@ -7,8 +7,8 @@ v = {
|
|||||||
'me': 'more_info/about_me.html',
|
'me': 'more_info/about_me.html',
|
||||||
'np': 'new_posts.html',
|
'np': 'new_posts.html',
|
||||||
'pjs': 'more_info/personal_projects.html',
|
'pjs': 'more_info/personal_projects.html',
|
||||||
'cv': 'more_info/cv.html'
|
'cv': 'more_info/cv.html',
|
||||||
|
'cv-file': 'static/source_imgs/cv/CV_David_Itehua_Xalamihua.pdf'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# 'cv': 'static/source_imgs/cv/CV_David_Itehua_Xalamihua.pdf'
|
|
28
main.py
28
main.py
@ -31,9 +31,9 @@ DB = DBSQLite(db_path)
|
|||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def home():
|
def home():
|
||||||
q_dataHome = "SELECT pk, label, svg_data FROM home;"
|
q_dataHome = 'SELECT pk, label, svg_data FROM home where pk <> "data analytics";'
|
||||||
|
# q_dataHome = "SELECT pk, label, svg_data FROM home;"
|
||||||
dataHome = DB.get_data(q_dataHome)
|
dataHome = DB.get_data(q_dataHome)
|
||||||
|
|
||||||
return render_template(v['home'], dataHome=dataHome, n_server=n_server)
|
return render_template(v['home'], dataHome=dataHome, n_server=n_server)
|
||||||
|
|
||||||
@app.route('/latest-posts')
|
@app.route('/latest-posts')
|
||||||
@ -118,8 +118,6 @@ def all_posts():
|
|||||||
'''
|
'''
|
||||||
db_newPosts = DB.get_data(q)
|
db_newPosts = DB.get_data(q)
|
||||||
return render_template(v['m.i.']['np'], db_newPosts=db_newPosts, db_mainSections=final)
|
return render_template(v['m.i.']['np'], db_newPosts=db_newPosts, db_mainSections=final)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/more-info/projects')
|
@app.route('/more-info/projects')
|
||||||
def projects():
|
def projects():
|
||||||
@ -129,10 +127,16 @@ def projects():
|
|||||||
def cv():
|
def cv():
|
||||||
return render_template(v['m.i.']['cv'])
|
return render_template(v['m.i.']['cv'])
|
||||||
|
|
||||||
# @app.route('/more-info/cv')
|
@app.route('/more-info/cv/download')
|
||||||
# def cv():
|
def download_cv():
|
||||||
# filePath=v['m.i.']['cv']
|
filePath = v['m.i.']['cv-file']
|
||||||
# return send_file(filePath, as_attachment=True)
|
return send_file(filePath, as_attachment=True)
|
||||||
|
|
||||||
|
@app.route('/more-info/cv/view')
|
||||||
|
def view_cv():
|
||||||
|
filePath = v['m.i.']['cv-file']
|
||||||
|
return send_file(filePath)
|
||||||
|
|
||||||
|
|
||||||
# solo ayuda dix template
|
# solo ayuda dix template
|
||||||
@app.route('/ayuda-template')
|
@app.route('/ayuda-template')
|
||||||
@ -141,10 +145,10 @@ def ayuda_template():
|
|||||||
return render_template(v['test'], data_links=data_links)
|
return render_template(v['test'], data_links=data_links)
|
||||||
|
|
||||||
|
|
||||||
# # Manejo del error 404
|
# Manejo del error 404
|
||||||
# @app.errorhandler(404)
|
@app.errorhandler(404)
|
||||||
# def page_not_found(error):
|
def page_not_found(error):
|
||||||
# return render_template('404.html'), 404
|
return render_template('404.html'), 404
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -1,20 +1,39 @@
|
|||||||
<!DOCTYPE html>
|
{% extends 'template.html' %}
|
||||||
<html lang="en">
|
|
||||||
<head>
|
{% block css %}
|
||||||
<meta charset="UTF-8">
|
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='c_more_info/about_me.css') }}"> -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
{% endblock %}
|
||||||
<title>Document</title>
|
|
||||||
</head>
|
{% block usr_path %}
|
||||||
<body>
|
<li class="breadcrumb-item active" aria-current="page">
|
||||||
|
<a href="">
|
||||||
<style>
|
<span>Sobre mí</span>
|
||||||
iframe {
|
</a>
|
||||||
width: 90%;
|
</li>
|
||||||
height: 90vh;
|
{% endblock %}
|
||||||
}
|
|
||||||
</style>
|
{% block body %}
|
||||||
<iframe src="https://1drv.ms/b/c/94fb71847d00f5d9/IQTZ9QB9hHH7IICUNaQJAAAAATl7DPlSGna-Ko1PodcD8Wc" frameborder="0" scrolling="no"></iframe>
|
<div class="container py-4">
|
||||||
|
|
||||||
|
<!-- Encabezado con botón -->
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
|
||||||
|
<a class="btn btn-primary" href="{{ url_for('download_cv') }}">
|
||||||
|
<i class="bi bi-download"></i> Descargar CV
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Contenedor del iframe -->
|
||||||
|
<div class="ratio ratio-1x1 border rounded shadow-sm">
|
||||||
|
<iframe
|
||||||
|
src="{{ url_for('view_cv') }}"
|
||||||
|
title="cv"
|
||||||
|
allowfullscreen>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
</div>
|
||||||
|
{% endblock body %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user