Little fixes
This commit is contained in:
parent
5f815907e1
commit
2011e9f892
4 changed files with 56 additions and 17 deletions
3
app.py
3
app.py
|
|
@ -165,3 +165,6 @@ def cuchulublog_about():
|
||||||
|
|
||||||
return t.load_template('about.phtml', title=I18n.lang('cuchulublog', 'about', 'About'))
|
return t.load_template('about.phtml', title=I18n.lang('cuchulublog', 'about', 'About'))
|
||||||
|
|
||||||
|
if config.default_module=="cuchulublog":
|
||||||
|
|
||||||
|
home=cuchulublog_app.route("/")(cuchulublog_home)
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,12 @@ nav#nav_mobile li a i{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a#logo_url {
|
||||||
|
|
||||||
|
color: #fbfbfb;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.right_flex {
|
.right_flex {
|
||||||
|
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
|
@ -204,6 +210,14 @@ nav#nav_home a:hover {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav#nav_home a.title_menu {
|
||||||
|
|
||||||
|
background:#fbfbfb;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
|
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
<%
|
||||||
|
|
||||||
|
from settings import config
|
||||||
|
|
||||||
|
base_url=config.application_root
|
||||||
|
|
||||||
|
%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
@ -28,7 +35,7 @@
|
||||||
<div class="container" style="background: #fbfbfb;border: solid #cbcbcb;border-width: 0px 1px;">
|
<div class="container" style="background: #fbfbfb;border: solid #cbcbcb;border-width: 0px 1px;">
|
||||||
<div class="column_left logo">
|
<div class="column_left logo">
|
||||||
<div class="center_flex" style="height:50px;font-size:24px;font-family:Open Sans;background: #253062;color: #fff;">
|
<div class="center_flex" style="height:50px;font-size:24px;font-family:Open Sans;background: #253062;color: #fff;">
|
||||||
Cuchulu.com
|
<a href="/" id="logo_url">Cuchulu.com</a>
|
||||||
<div id="nav_home_mobile">
|
<div id="nav_home_mobile">
|
||||||
<a href="#" id="nav_button"><i class="fa fa-bars" aria-hidden="true"></i></a>
|
<a href="#" id="nav_button"><i class="fa fa-bars" aria-hidden="true"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -39,19 +46,15 @@
|
||||||
<nav id="nav_home">
|
<nav id="nav_home">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="${url_for('.cuchulublog_home')}"><i class="fa fa-home" aria-hidden="true"></i> ${lang('cuchulublog', 'home', 'Home')}</a>
|
<a href="${url_for('.cuchulublog_home')}" id="cuchulu_home"><i class="fa fa-home" aria-hidden="true"></i> ${lang('cuchulublog', 'home', 'Home')}</a>
|
||||||
</li>
|
</li><li>
|
||||||
<li>
|
<a href="${url_for('.cuchulublog_projects')}" id="cuchulu_projects"><i class="fa fa-globe" aria-hidden="true"></i> ${lang('cuchulublog', 'projects', 'Projects')}</a>
|
||||||
<a href="${url_for('.cuchulublog_projects')}"><i class="fa fa-globe" aria-hidden="true"></i> ${lang('cuchulublog', 'projects', 'Projects')}</a>
|
</li><li>
|
||||||
</li>
|
<a href="${url_for('.cuchulublog_all_posts')}" id="cuchulu_blog"><i class="fa fa-comments" aria-hidden="true"></i> ${lang('cuchulublog', 'blog', 'Blog')}</a>
|
||||||
<li>
|
</li><li>
|
||||||
<a href="${url_for('.cuchulublog_all_posts')}"><i class="fa fa-comments" aria-hidden="true"></i> ${lang('cuchulublog', 'blog', 'Blog')}</a>
|
<a href="${url_for('.cuchulublog_contact')}" id="cuchulu_contact"><i class="fa fa-envelope-o" aria-hidden="true"></i> ${lang('cuchulublog', 'contact', 'Contact')}</a>
|
||||||
</li>
|
</li><li>
|
||||||
<li>
|
<a href="${url_for('.cuchulublog_about')}" id="cuchulu_about"><i class="fa fa-info" aria-hidden="true"></i> ${lang('cuchulublog', 'about', 'About')}</a>
|
||||||
<a href="${url_for('.cuchulublog_contact')}"><i class="fa fa-envelope-o" aria-hidden="true"></i> ${lang('cuchulublog', 'contact', 'Contact')}</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="${url_for('.cuchulublog_about')}"><i class="fa fa-info" aria-hidden="true"></i> ${lang('cuchulublog', 'about', 'About')}</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -120,7 +123,7 @@
|
||||||
</%block>
|
</%block>
|
||||||
</div>
|
</div>
|
||||||
<footer id="footer_page">
|
<footer id="footer_page">
|
||||||
© Antonio de la Rosa - <a href="#">About</a>
|
© Antonio de la Rosa - <a href="${url_for('.cuchulublog_about')}">About</a>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -142,6 +145,15 @@
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
base_url="${base_url}";
|
||||||
|
|
||||||
|
menu={'': '#cuchulu_home','home': '#cuchulu_home', 'projects': '#cuchulu_projects', 'blog': '#cuchulu_blog', 'contact': '#cuchulu_contact', 'about': '#cuchulu_about'};
|
||||||
|
|
||||||
|
page=location.pathname.replace(base_url, '')
|
||||||
|
|
||||||
|
$(menu[page]).addClass('title_menu');
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<%block name="js_footer">
|
<%block name="js_footer">
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="content_post">
|
<div class="content_post">
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p><a href="#" class="url_post">${lang('cuchulublog', 'permanent_link', 'Permanent link')}</a></p>
|
<p><a href="#" class="url_post" id="url_post">${lang('cuchulublog', 'permanent_link', 'Permanent link')}</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
//http://localhost:5000/blog/2021/12/07/first-post/1#
|
||||||
|
|
||||||
var lang_default="${lang_default}";
|
var lang_default="${lang_default}";
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -33,7 +35,9 @@
|
||||||
data: {},
|
data: {},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
|
||||||
$('.blog_post_name').html(JSON.parse(data.title)[lang_default]);
|
post_name=JSON.parse(data.title)[lang_default];
|
||||||
|
|
||||||
|
$('.blog_post_name').html(post_name);
|
||||||
|
|
||||||
var date_post=data.date.replace(' 00:00:00', '').replace(/-/g, '/');
|
var date_post=data.date.replace(' 00:00:00', '').replace(/-/g, '/');
|
||||||
|
|
||||||
|
|
@ -41,6 +45,12 @@
|
||||||
|
|
||||||
$('.content_post').html(JSON.parse(data.text)[lang_default]);
|
$('.content_post').html(JSON.parse(data.text)[lang_default]);
|
||||||
|
|
||||||
|
var url_post='/blog/'+date_post+'/'+data.slugify+'/'+${post_id};
|
||||||
|
|
||||||
|
$('#url_post').attr('href', url_post);
|
||||||
|
|
||||||
|
$('title').html(post_name);
|
||||||
|
|
||||||
},
|
},
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue