First commit

This commit is contained in:
Antonio de la Rosa 2021-12-14 23:27:04 +01:00
commit 664842d309
57 changed files with 49647 additions and 0 deletions

109
.gitignore vendored Normal file
View file

@ -0,0 +1,109 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
.static_storage/
.media/
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
/ssh
/backups
/settings/config.py

6
__init__.py Normal file
View file

@ -0,0 +1,6 @@
from flask import Blueprint, g, request, session, redirect, url_for, current_app
from paramecio2.libraries.db.webmodel import WebModel
from settings import config
cuchulublog_app=Blueprint('cuchulublog_app', __name__)

167
app.py Normal file
View file

@ -0,0 +1,167 @@
from modules.cuchulublog import cuchulublog_app
from flask import request, g, url_for
from settings import config
from paramecio2.libraries.mtemplates import PTemplate, env_theme
from paramecio2.libraries.i18n import I18n
from modules.blog.models.blog import Post
from paramecio2.libraries.plugins import db
from paramecio2.libraries.pages import Pages
from paramecio2.libraries.db.extrafields.emailfield import EmailField
import requests
from paramecio2.libraries.sendmail import SendMail
from paramecio2.libraries.urls import make_media_url
try:
import ujson as json
except:
import json
secret_captcha='6LcFDSgUAAAAANAF2t513zIhpAZYpEbHCpmIkIV9'
if hasattr(config, 'secret_captcha'):
secret_captcha=config.secret_captcha
email_used='antonio.delarosa@coesinfo.com'
email_send='antonio.delarosa@coesinfo.com'
if hasattr(config, 'email_used'):
email_used=config.email_used
if hasattr(config, 'email_send'):
email_send=config.email_send
env=env_theme(__file__)
t=PTemplate(env)
#t.env.directories=admin_t.env.directories
#t.env.directories.insert(1, os.path.dirname(__file__).replace('/admin', '')+'/templates/admin')
@cuchulublog_app.route('/home')
def cuchulublog_home():
return t.load_template('home.phtml', title=I18n.lang('cuchulublog', 'home', 'Home'))
@cuchulublog_app.route('/blog/<path:date>/<slugify>/<int:post_id>')
def cuchulublog_blog(date, slugify, post_id):
return t.load_template('post.phtml', title=I18n.lang('cuchulublog', 'post', 'Post'), post_id=post_id)
@cuchulublog_app.route('/projects')
def cuchulublog_projects():
return t.load_template('projects.phtml', title=I18n.lang('cuchulublog', 'projects', 'Projects'))
@cuchulublog_app.route('/blog')
@db
def cuchulublog_all_posts():
post=Post(g.connection)
try:
begin_post=request.args.get('begin_post', 0)
except:
begin_post=0
total_elements=post.select_count()
num_elements=10
q=post.query('select * from post order by date DESC limit %s, 10', [begin_post])
arr_post=[]
lang_default=I18n.default_lang
for row in q:
row['date']=str(row['date']).replace(' 00:00:00', '').replace('-', '/')
row['title']=json.loads(row['title'])[lang_default]
row['text']=json.loads(row['text'])[lang_default]
arr_post.append(row)
html_pages=Pages.show(begin_post, total_elements, num_elements, url_for('.cuchulublog_all_posts'), initial_num_pages=20, variable='begin_page', label='', func_jscript='')
return t.load_template('blog.phtml', title=I18n.lang('cuchulublog', 'blog_last_post', 'Blog - lasts posts'), posts=arr_post)
@cuchulublog_app.route('/contact')
def cuchulublog_contact():
return t.load_template('contact.phtml', title=I18n.lang('cuchulublog', 'contact', 'Contact'))
@cuchulublog_app.route('/send_contact', methods=['POST'])
def send_contact():
#p=GetPostFiles()
#p.obtain_post()
email_check=EmailField('email')
nombre=request.form.get('nombre', '').strip()
email=request.form.get('email', '').strip()
email=email_check.check(email)
#telefono=request.form.get('telefono', '').strip()
asunto=request.form.get('asunto', '').strip()
texto=request.form.get('texto', '').strip()
ip = request.headers.get('HTTP_X_FORWARDED_FOR') or request.remote_addr
r=requests.post('https://www.google.com/recaptcha/api/siteverify', data = {'secret': secret_captcha, 'response': request.form['g-recaptcha-response'], 'remoteip': ip})
response_json=r.json()
arr_return={'error': 1, 'txt_error': 'Error: no se pudo enviar el email, vuelva a intentarlo', 'form': {}}
text=t.load_template('email/content_contact.phtml', nombre=nombre, email=email, asunto=asunto, texto=texto)
"""
text.="<h1>FORMULARIO DE CONTACTO</h1>\n";
$text.="<p>Nombre: %s</p>\n\n" % nombre
$text.="<p>E-mail: %s</p>\n\n" % email
$text.="<p>Asunto: %s</p>\n\n" % asunto
$text.="<p>Texto: \n\n%s</p>\n" % texto
"""
if nombre!='' and asunto!='' and texto!='' and email!='' and response_json['success']:
sendmail=SendMail()
image_url=make_media_url('images/logo.png', 'cuchulublog')
email_text=t.load_template('email/email.phtml', text=text, logo_url=image_url)
if sendmail.send(email_used, [email_send], 'Cuchulu.com - %s' % asunto, email_text, content_type='html', attachments=[]):
return {'error': 0, 'txt_error': ''}
if asunto=='':
arr_return['form']['asunto']='Error: se necesita un asunto'
if texto=='':
arr_return['form']['texto']='Error: se necesita un texto'
if email=='':
arr_return['form']['email']='Error: se necesita un email correcto'
if nombre=='':
arr_return['form']['nombre']='Error: se necesita un nombre'
if not response_json['success']:
arr_return['form']['captcha']='Error: captcha vacio'
return arr_return
@cuchulublog_app.route('/about')
def cuchulublog_about():
return t.load_template('about.phtml', title=I18n.lang('cuchulublog', 'about', 'About'))

5051
media/css/bootstrap/bootstrap-grid.css vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5050
media/css/bootstrap/bootstrap-grid.rtl.css vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

485
media/css/bootstrap/bootstrap-reboot.css vendored Normal file
View file

@ -0,0 +1,485 @@
/*!
* Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #0a58ca;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
direction: ltr /* rtl:ignore */;
unicode-bidi: bidi-override;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
}
::file-selector-button {
font: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,482 @@
/*!
* Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-right: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-right: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #0a58ca;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
direction: ltr ;
unicode-bidi: bidi-override;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: right;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: right;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: right;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
}
::file-selector-button {
font: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11266
media/css/bootstrap/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

7
media/css/bootstrap/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11242
media/css/bootstrap/bootstrap.rtl.css vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
media/css/font-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

317
media/css/layout.css Normal file
View file

@ -0,0 +1,317 @@
body {
margin: 0px;
background: #fbfbfb;
background-image:url('../images/background.png');
font-family: "Roboto Slab";
}
.container-top {
width:100%;
}
.container {
max-width:1240px;
min-width:1024px;
margin-left:auto;
margin-right:auto;
/*border: solid #ff0 1px;*/
box-sizing: border-box;
min-height:100vh;
/*height:100%;*/
}
.column_left {
width:25%;
/*border: solid #f00 1px;*/
box-sizing: border-box;
float:left;
display:block;
}
.column_content {
box-sizing: border-box;
float:right;
width:75%;
/*border: solid #00f 1px;*/
display:block;
}
nav#nav_home {
float:right;
/*border: solid #f00 4px;*/
display: inline-block;
position:relative;
font-size:20px;
}
nav#nav_home ul {
list-style-type: none;
padding:0px;
margin:0px;
width:100%;
}
nav#nav_home li {
/*border: solid #ff0 1px;*/
display: inline-flex;
padding: 0px;
/*vertical-align: middle !important;*/
align-items: center;
justify-content: center;
height:50px;
margin: 0px;
}
.header_nav {
background: #253062;
color: #fff;
height:50px;
/**/
}
.header_pc {
background-image: url('../images/background_home.jpg');
}
#pc_logo {
width:600px;
position:relative;
top:15px;
border: solid #f00 1px;
}
.right_flex {
display: inline-flex;
align-items: center;
justify-content:right;
position:relative;
/*border: solid #f11 4px;*/
width:100%;
/*height:50px;*/
}
.center_flex {
display: inline-flex;
align-items: center;
justify-content:center;
position:relative;
/*border: solid #f11 4px;*/
width:100%;
/*height:50px;*/
}
.left_flex {
display: inline-flex;
align-items: center;
justify-content:left;
position:relative;
/*border: solid #f11 4px;*/
width:100%;
/*height:50px;*/
}
nav#nav_home a {
color: #fff;
display: inline-flex;
align-items: center;
justify-content:right;
height:100%;
width:100%;
padding:0px 20px;
text-decoration: none;
}
nav#nav_home a:hover {
background: #fff;
color: #000;
}
#logo img {
width:250px;
}
.home_line_separator {
width:100%;
height:25px;
background: #000000;
/*border: solid #cbcbcb;
border-width: 1px 0px;*/
}
#content_home {
width:90%;
margin-left:auto;
margin-right: auto;
clear:both;
}
a {
text-decoration:none;
}
.blog_post_name {
font-size:26px;
}
article {
margin-bottom:15px;
border: solid #cbcbcb;
border-width: 0px 0px 1px 0px;
}
.column_50 {
width:50%;
box-sizing: border-box;
float:left;
}
#footer_page {
padding: 10px 15px;
background: #000628;
color: #fff;
text-align:center;
}
.content_section {
background: #fff;
padding:10px 15px;
box-sizing: border-box;
border: solid #cbcbcb 1px;
border-radius: 5px;
}
.content_section_left {
margin-right:5px;
}
.content_section_right {
margin-left:5px;
}
/* Forms */
input[type=text], input[type=password]{
width:100%;
font-size:24px;
border-radius:5px;
border: solid #cbcbcb 1px;
}
input[type=checkbox], input[type=radio] {
vertical-align: middle;
position: relative;
bottom: 0px;
}
input[type=radio] {
bottom: 2px;
}
button, a.button {
color: #fff;
background: #000;
border-width:0px;
padding:10px;
font-size:20px;
display: inline-block;
cursor: pointer;
}
a.button {
text-decoration: none;
padding:10px !important;
margin: 21px 0px !important;
}
.form label {
display: block;
width: 150px;
float: left;
margin-bottom: 10px;
text-align: left;
width: 300px;
padding-right: 20px;
}
.form textarea {
width:100%;
height:150px;
clear:both;
}
.form p {
clear: left;
}
.error {
font-weight:bold;
color: #f00;
}

BIN
media/fonts/FontAwesome.otf Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
media/images/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

BIN
media/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

2583
media/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load diff

12
media/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
media/js/jsutils Symbolic link
View file

@ -0,0 +1 @@
/home/absurdo/apache/htdocs/cuchuludev/modules/cuchulu/media/js/jsutils/

52
templates/about.phtml Normal file
View file

@ -0,0 +1,52 @@
<%inherit file="home.phtml"/>
<%block name="content">
<div align="center" style="padding-top:40px;min-height:90vh;">
<img src="${make_media_url('images/logo.png', 'cuchulublog')}" />
<h1>About</h1>
<section>
<p><strong>Antonio de la Rosa Caballero</strong></p>
<p style="max-width:500px;">${lang('cuchulublog', 'geek_enthusiast_linux_user', 'Geek enthusiast. Linux user, <strong>Debian user, Archlinux user, Gentoo user, Fedora user</strong>. <strong>Free software supporter</strong>. Specialized in <strong>Linux</strong> sysadmin, backend, and frontend')}.</p>
<h2>${lang('cuchulublog', 'projects', 'Projects')}</h2>
<div class="yui-u">
<h2>${lang('cuchulublog', 'all_repositories', 'All repositories')}</h2>
<p>${lang('cuchulublog', 'new_and_old_repositories', 'New and old repositories with my software')}</p>
<p><a href="https://bitbucket.org/paramecio/">Paramecio project</a></p>
<p><a href="https://bitbucket.org/phangoapp/">Phango project</a></p>
</div>
<div class="yui-u">
<h2>Paramecio</h2>
<p style="max-width:500px;">${lang('cuchulublog', 'a_series_of_shortcuts', 'A series of shortcuts and libraries for Flask and Bottle, with ORM, Datetime shortcuts for Arrow library, templates shortcuts for Mako templates and more')}</p>
<p><a href="https://bitbucket.org/paramecio/paramecio2fm/src/master/">Bitbucket GIT repository</a></p>
</div>
<div class="yui-u">
<h2>Pastarafi</h2>
<p>${lang('cuchulublog', 'a_simple_tool_for_make', 'A simple tool for make tasks in remote linux servers. Similar to ansible')}.</p>
<p><a href="https://bitbucket.org/paramecio/pastafari/src/master/">Bitbucket GIT repository</a></p>
</div>
<div class="yui-u">
<h2>Pastarafistats</h2>
<p style="max-width:500px;">${lang('cuchulublog', 'a_simple_monit_tool_based_in_psutil', 'A simple monitoritation tool based in psutil and flask for monitoring servers. You can define webhooks for process events with tools how node-red')}</p>
<p><a href="https://bitbucket.org/paramecio/pastafaristats/src/master/">Bitbucket GIT repository for daemon collector</a></p>
<p><a href="https://bitbucket.org/paramecio/monit/src/master/">Bitbucket GIT repository for simple show of data</a></p>
</div>
<div class="yui-u">
<h2>PhaRouter2</h2>
<p style="max-width:500px;">${lang('cuchulublog', 'simple_and_fast_framework', 'Simple and fast framework router based in php with modern technics how Composer, PSR-4 and more')}.</p>
<p><a href="https://bitbucket.org/phangoapp/pharouter2/src/master/">Bitbucket GIT repository</a></p>
</div>
<div class="yui-u">
<h2>Phango Framework</h2>
<p style="max-width:500px;">${lang('cuchulublog', 'a_mvc_framework_based_in_php', 'A MVC framework based in php modern technics how Composer, PSR-4 and more. Deprecated')}.</p>
<p><a href="https://bitbucket.org/phangoapp/phango">Bitbucket GIT repository</a></p>
</div>
</section>
</div>
</%block>
<%block name="js_footer">
</%block>

26
templates/blog.phtml Normal file
View file

@ -0,0 +1,26 @@
<%inherit file="home.phtml"/>
<%block name="content">
<div align="center" style="padding-top:40px;min-height:90vh;">
<img src="${make_media_url('images/logo.png', 'cuchulublog')}" />
<h1>${lang('cuchulublog', 'posts', 'Posts')}</h1>
<section>
% for post in posts:
<h2 class="title_post">${post['title']}</h2>
<article class="tpl_post">
<header>
<h1 class="blog_post_name"></h1>
<p>${lang('cuchulublog', 'published', 'Published')}: <time pubdate="pubdate" class="date_post">${post['date']}</time></p>
</header>
<div class="content_post">
${post['text']|n}
</div>
<footer>
<p><a href="${url_for('.cuchulublog_blog', date=post['date'], slugify=post['slugify'], post_id=post['id'])}" class="url_post">${lang('cuchulublog', 'read_more', 'Read more')}</a></p>
</footer>
</article>
% endfor
</section>
</div>
</%block>
<%block name="js_footer">
</%block>

41
templates/contact.phtml Normal file
View file

@ -0,0 +1,41 @@
<%inherit file="home.phtml"/>
<%block name="content">
<div align="center" style="padding-top:40px;min-height:90vh;">
<h1>${lang('cuchulublog', 'contact', 'Contact')}</h1>
<div id="error_id" class="error" style="display:none;">${lang('cuchulublog', 'error_cannot_send_email', 'Error: no puedo enviar el email')}</div>
<div class="cont">
<form method="post" id="sendmail_form">
<p>${lang('cuchulublog', 'fill_this_form_for_contact', 'Rellene este formulario para contactar')}.</p>
<div class="form">
<p><label>${lang('cuchulublog', 'name', 'Nombre')}*: </label><input type="text" id="nombre_field_form" class="" name="nombre" value=""> <span class="error" id="nombre_error"></span></p>
<p><label>${lang('cuchulublog', 'email', 'Email')}*: </label><input type="text" id="email_field_form" class="" name="email" value=""> <span class="error" id="email_error"></span></p>
<p><label>${lang('cuchulublog', 'subject', 'Subject')}*: </label><input type="text" id="asunto_field_form" class="" name="asunto" value=""> <span class="error" id="asunto_error"></span></p>
<p><label>${lang('cuchulublog', 'text', 'Text')}*: </label> <p><textarea class="tinymce_editor" name="texto"></textarea></p>
<span class="error" id="text_error"></span></p>
</div>
<p><div class="g-recaptcha" data-sitekey="6LcFDSgUAAAAANfNjQE_gRbra1F0TPeRRRAS4xNs" id="captcha_field_form"></div>
<span class="error" id="captcha_error"></span></p>
${csrf_token()|n}
<p><button type="submit">${lang('cuchulublog', 'send_form', 'Send form')}</button></p>
</form>
<script src="https://www.google.com/recaptcha/api.js"></script>
</div>
<div id="success_sendmail" style="display:none;"><p>${lang('cuchulublog', 'email_sended_successfully', 'Se envió el email correctamente. Pronto nos pondremos en contacto')}.</p></div>
</div>
</%block>
<%block name="js_footer">
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'cuchulublog')}"></script>
<script language="javascript">
//var options={'url': "${url_for('.send_contact')}",
var options={url: "${url_for('.send_contact')}", success: function(data) {
$('#sendmail_form').hide();
$('#success_sendmail').show();
}, pre_callback: function () {}, loading: '#loading', upload: {}};
$('#sendmail_form').sendPost(options);
</script>
</%block>

View file

@ -0,0 +1,7 @@
<h1>FORMULARIO DE CONTACTO</h1>
<p>Nombre: ${nombre}</p>
<p>E-mail: ${email}</p>
<p>Asunto: ${asunto}</p>
<p>Texto:
<br /><br />
${texto}</p>

View file

@ -0,0 +1,18 @@
<html>
<body>
<table style="border:solid #cdcdcd;border-width:1px" align="center" width="90%">
<tbody>
<tr>
<td style="background-color:#008ce5;padding:15px" width="500px">
<img src="${logo_url}" style="border: solid #000 1px;" />
</td>
</tr>
<tr>
<td style="background-color:#fbfbfb;padding:15px">
${text|n}
</td>
</tr>
</tbody>
</table>
</body>
</html>

154
templates/home.phtml Normal file
View file

@ -0,0 +1,154 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${title}</title>
<!-- Google Font: Source Sans Pro -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,500,500italic&display=fallback">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Slab:300,400,400i,700&display=fallback">
<!-- styles -->
<!--<link href="${make_media_url('css/font-awesome.min.css', 'admin')}" rel="stylesheet" />-->
<link href="${make_media_url('css/bootstrap/bootstrap-reboot.min.css', 'cuchulublog')}" rel="stylesheet" type="text/css"/>
<!--<link href="${make_media_url('css/bootstrap/bootstrap-grid.min.css', 'cuchulublog')}" rel="stylesheet" type="text/css"/>-->
<link href="${make_media_url('css/font-awesome.min.css', 'cuchulublog')}" rel="stylesheet" type="text/css"/>
<link href="${make_media_url('css/layout.css', 'cuchulublog')}" rel="stylesheet" type="text/css"/>
<link rel="icon" type="image/png" href="${make_media_url('images/logo.png', 'cuchulublog')}">
<%block name="header_css">
</%block>
</head>
<body>
<div id="loading" style="position:fixed;top:0px;height:100vh;width:100%;border: solid #f00 0px;display:none;">
<div style="display: flex;padding: 0px;align-items: center;justify-content: center;height:100vh;width:100%;">
<i class="fa fa-refresh fa-spin fa-3x fa-fw" style="position:absolute;top:50%;"></i>
</div>
</div>
<div class="container-top">
<div class="container" style="background: #fbfbfb;border: solid #cbcbcb;border-width: 0px 1px;">
<div class="column_left logo">
<div class="center_flex" style="height:50px;font-size:24px;font-family:Open Sans;background: #253062;color: #fff;">
Cuchulu.com
</div>
</div>
<div class="column_content">
<div class="right_flex header_nav">
<nav id="nav_home">
<ul>
<li>
<a href="${url_for('.cuchulublog_home')}"><i class="fa fa-home" aria-hidden="true"></i>&nbsp;&nbsp; ${lang('cuchulublog', 'home', 'Home')}</a>
</li>
<li>
<a href="${url_for('.cuchulublog_projects')}"><i class="fa fa-globe" aria-hidden="true"></i>&nbsp;&nbsp; ${lang('cuchulublog', 'projects', 'Projects')}</a>
</li>
<li>
<a href="${url_for('.cuchulublog_all_posts')}"><i class="fa fa-comments" aria-hidden="true"></i>&nbsp;&nbsp; ${lang('cuchulublog', 'blog', 'Blog')}</a>
</li>
<li>
<a href="${url_for('.cuchulublog_contact')}"><i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp;&nbsp; ${lang('cuchulublog', 'contact', 'Contact')}</a>
</li>
<li>
<a href="${url_for('.cuchulublog_about')}"><i class="fa fa-info" aria-hidden="true"></i>&nbsp;&nbsp; ${lang('cuchulublog', 'about', 'About')}</a>
</li>
</ul>
</nav>
</div>
</div>
<div id="content_home">
<%block name="content">
<div align="center" style="padding-top:40px;">
<img src="${make_media_url('images/logo.png', 'cuchulublog')}" />
<h1>${lang('cuchulublog', 'welcome_to_cuchulu', 'Welcome to cuchulu.com!!!')}</h1>
<p>
${lang('cuchulublog', 'cuchulu_is_set_projects', 'Cuchulu.com is a set of projects of Antonio de la Rosa, a coder and Linux sysadmin from Spain.')}
</p>
<p>
${lang('cuchulublog', 'you_can_find_multiple', 'You can find multiple utilities for Linux administration, cloud systems, monitoritation tools and more.')}
</p>
<p>
${lang('cuchulublog', 'of_course_if_you_need', 'Of course, if you need Linux admin services, create an App or other computer enginering services, you can <a href="">contact me</a>.')|n}
</p>
<%include file="mantained_projects.phtml" />
<section id="blog_section">
<h2>${lang('cuchulublog', 'blog_last_posts', 'Blog - Last posts')}</h2>
<article style="display:none;" class="tpl_post">
<header>
<h1 class="blog_post_name">Apple</h1>
<p>${lang('cuchulublog', 'published', 'Published')}: <time pubdate="pubdate" class="date_post">09/10/2009</time></p>
</header>
<div class="content_post">
</div>
<footer>
<!--<p><small>Licencia Creative Commons Reconocimiento-Compartir bajo la misma</small></p>-->
<p><a href="#" class="url_post">${lang('cuchulublog', 'read_more', 'Read more')}</a></p>
</footer>
</article>
<br clear="all" />
</section>
</div>
<!--<div class="column_left" id="nav_column_left">
<nav id="nav_column">
<ul>
<li>Home</li>
</ul>
</nav>
</div>-->
</%block>
</div>
<footer id="footer_page">
&copy; Antonio de la Rosa - <a href="#">About</a>
</footer>
</div>
</div>
<script language="Javascript" src="${make_media_url('js/jquery.min.js', 'admin')}"></script>
<%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_last_posts')}",
data: {},
success: function (data) {
for(i in data) {
var tpl=$('.tpl_post').clone().appendTo('#blog_section');
tpl.removeClass('tpl_post');
tpl.attr('id', 'tpl_post_'+data[i].id);
tpl.find('.blog_post_name').html(JSON.parse(data[i].title)[lang_default]);
tpl.find('.content_post').html(JSON.parse(data[i].lead)[lang_default]);
//console.log(data[i].date.replace(' 00:00:00', '').replace(/-/g, '/'));
var date_post=data[i].date.replace(' 00:00:00', '').replace(/-/g, '/');
tpl.find('.date_post').html(date_post);
tpl.find('.url_post').attr('href', '/blog/'+date_post+'/'+data[i].slugify+'/'+data[i].id);
tpl.show();
}
},
dataType: 'json'
});
</script>
</%block>
</body>
</html>

View file

@ -0,0 +1,36 @@
<section>
<h2>Mantained Projects</h2>
<div class="column_50">
<h3>Paramecio</h3>
<div class="content_section content_section_left">
<p>${lang('cuchulublog', 'a_simple_web_framework', 'A simple web framework with shorcuts and hooks for Flask, Mako templates, etc...')}</p>
<p><a href="https://bitbucket.org/paramecio/paramecio2fm/">${lang('cuchulublog', 'git_repo', 'Git repository')}</a></p>
<p><a href="https://bitbucket.org/paramecio/paramecio2fm/">${lang('cuchulublog', 'documentation', 'Documentation')}</a></p>
</div>
</div>
<div class="column_50">
<h3>PastafariStats Agent</h3>
<div class="content_section content_section_right"">
<p>${lang('cuchulublog', 'a_simple_monit_script_writed', 'A simple monitoritation script writed in Python for save systemd data from a server (Linux or Windows) in a MySQL database')}</p>
<p><a href="https://bitbucket.org/paramecio/pastafaristats/">${lang('cuchulublog', 'git_repo', 'Git repository')}</a></p>
<p><a href="https://bitbucket.org/paramecio/pastafaristats/">${lang('cuchulublog', 'documentation', 'Documentation')}</a></p>
</div>
</div>
<div class="column_50">
<h3>Pastafari Monit Viewer</h3>
<div class="content_section content_section_left"">
<p>${lang('cuchulublog', 'a_simple_representation_of_data', 'A simple representation of data from PastafariStats Agent data')}</p>
<p><a href="https://bitbucket.org/paramecio/monit/">${lang('cuchulublog', 'git_repo', 'Git repository')}</a></p>
<p><a href="https://bitbucket.org/paramecio/monit/">${lang('cuchulublog', 'documentation', 'Documentation')}</a></p>
</div>
</div>
<div class="column_50">
<h3>Leviathan control panel</h3>
<div class="content_section content_section_right"">
<p>${lang('cuchulublog', 'a_set_of_tools_for', 'A set of tools for control Linux servers')}</p>
<p><a href="https://bitbucket.org/paramecio/leviathanapi/">${lang('cuchulublog', 'git_repo', 'Git repository')}</a></p>
<p><a href="https://bitbucket.org/paramecio/leviathanapi/">${lang('cuchulublog', 'documentation', 'Documentation')}</a></p>
</div>
</div>
</section>
<br clear="all" />

49
templates/post.phtml Normal file
View 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>

21
templates/projects.phtml Normal file
View file

@ -0,0 +1,21 @@
<%inherit file="home.phtml"/>
<%block name="content">
<div align="center" style="padding-top:40px;min-height:90vh;">
<img src="${make_media_url('images/logo.png', 'cuchulublog')}" />
<%include file="mantained_projects.phtml" />
<section>
<br />
<h2>${lang('cuchulublog', 'legacy_projects', 'Legacy Projects')}</h2>
<br />
<div class="">
<h3>${lang('cuchulublog', 'phangoapp_php_tools', 'PhangoApp php tools')}</h3>
<div class="content_section content_section_right"">
<p>${lang('cuchulublog', 'tools_for_php_devel', 'Tools for php development using modern techniques how Composer, PSR-4 for packaging and more...')}</p>
<p><a href="https://bitbucket.org/phangoapp/">Git repository</a></p>
</div>
</div>
</section>
</div>
</%block>
<%block name="js_footer">
</%block>