First commit
This commit is contained in:
commit
664842d309
57 changed files with 49647 additions and 0 deletions
49
templates/post.phtml
Normal file
49
templates/post.phtml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<%inherit file="home.phtml"/>
|
||||
<%block name="content">
|
||||
<div align="center" style="padding-top:40px;min-height:90vh;">
|
||||
<h2 class="title_post"></h2>
|
||||
<article class="tpl_post">
|
||||
<header>
|
||||
<h1 class="blog_post_name"></h1>
|
||||
<p>${lang('cuchulublog', 'published', 'Published')}: <time pubdate="pubdate" class="date_post"></time></p>
|
||||
</header>
|
||||
<div class="content_post">
|
||||
</div>
|
||||
<footer>
|
||||
<p><a href="#" class="url_post">${lang('cuchulublog', 'permanent_link', 'Permanent link')}</a></p>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
</%block>
|
||||
<%block name="js_footer">
|
||||
<script>
|
||||
|
||||
<%
|
||||
|
||||
from paramecio2.libraries.i18n import I18n
|
||||
|
||||
lang_default=I18n.default_lang
|
||||
|
||||
%>
|
||||
|
||||
var lang_default="${lang_default}";
|
||||
|
||||
$.ajax({
|
||||
url: "${url_for('blog_app.get_post', post_id=post_id)}",
|
||||
data: {},
|
||||
success: function (data) {
|
||||
|
||||
$('.blog_post_name').html(JSON.parse(data.title)[lang_default]);
|
||||
|
||||
var date_post=data.date.replace(' 00:00:00', '').replace(/-/g, '/');
|
||||
|
||||
$('.date_post').html(date_post);
|
||||
|
||||
$('.content_post').html(JSON.parse(data.text)[lang_default]);
|
||||
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
</script>
|
||||
</%block>
|
||||
Loading…
Add table
Add a link
Reference in a new issue