Compare commits
14 Commits
Author | SHA1 | Date |
---|---|---|
Felipe Martín | 26ec4814e4 | |
Felipe Martín | a83eb4a58e | |
Felipe Martín | d73e57bff6 | |
Felipe Martín | 4f5505ceba | |
Felipe Martín | 80634771ac | |
Felipe Martín | 4b685bb51c | |
Felipe Martín | 311f79a155 | |
Felipe Martín | e9f2304008 | |
Felipe Martín | 5ca6115ed5 | |
Felipe Martín | bba9109c82 | |
Felipe Martín | 1c3eebb5ca | |
Felipe Martín | 16c6cbceb6 | |
Felipe Martín | 79dd3339d1 | |
Felipe Martín | 97329994f6 |
4
.bowerrc
4
.bowerrc
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"directory": "fmartingrcom/themes/v1/static/bower"
|
||||
}
|
||||
"directory": "fmartingrcom/static/bower_components"
|
||||
}
|
|
@ -1,10 +1,22 @@
|
|||
# Python
|
||||
*.pyc
|
||||
__pycache__
|
||||
.virtualenv
|
||||
node_modules
|
||||
**/bower
|
||||
|
||||
# App
|
||||
local_settings.py
|
||||
|
||||
# Emacs
|
||||
*~
|
||||
|
||||
# OS X
|
||||
.DS_Store
|
||||
|
||||
# utilities
|
||||
bower_components
|
||||
**/CACHE/*
|
||||
*.sublime-workspace
|
||||
.sass-cache
|
||||
db.sqlite3
|
||||
/projects
|
||||
/fmartingrcom/themes/*/static/bower
|
||||
/fmartingrcom/themes/*/static/bower_components
|
||||
/node_modules
|
||||
|
||||
# css
|
||||
/fmartingrcom/themes/*/static/css
|
11
README.md
11
README.md
|
@ -1,6 +1,11 @@
|
|||
fmartingr.com
|
||||
===
|
||||
=============
|
||||
|
||||
My personal site codebase.
|
||||
## Setup
|
||||
|
||||
http://fmartingr.com
|
||||
```
|
||||
virtualenv -p python3.5 .virtualenv
|
||||
source .virtualenv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python main.py
|
||||
```
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
fmartingr.com
|
||||
===
|
||||
|
||||
My personal site codebase.
|
||||
|
||||
http://fmartingr.com
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "fmartingr.com",
|
||||
"version": "0.0.0",
|
||||
"homepage": "https://github.com/fmartingr/fmartingr.com",
|
||||
"authors": [
|
||||
"Felipe Martin <fmartingr@me.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"font-awesome": "~4.2.0",
|
||||
"google-code-prettify": "~1.0.3",
|
||||
"jquery": "~2.1.3",
|
||||
"lightbox2": "~2.7.1"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
|
||||
"fmartingrcom.settings.base")
|
||||
|
||||
from django.core.management import execute_from_command_line
|
||||
|
||||
execute_from_command_line(sys.argv)
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "fmartingr.com",
|
||||
"version": "0.1.0",
|
||||
"description": "fmartingr.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fmartingr/fmartingr.com.git"
|
||||
},
|
||||
"author": "Felipe Martin <fmartingr@me.com>",
|
||||
"license": "GPLv2",
|
||||
"bugs": {
|
||||
"url": "https://github.com/fmartingr/fmartingr.com/issues"
|
||||
},
|
||||
"homepage": "https://github.com/fmartingr/fmartingr.com",
|
||||
"devDependencies": {
|
||||
"grunt": ">=0.4.1",
|
||||
"grunt-contrib-watch": ">=0.4.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
Django==1.7.7
|
||||
|
||||
Jinja2==2.7.3
|
||||
django-jinja==1.3.1
|
||||
|
||||
dj-database-url==0.3.0
|
||||
|
||||
django-suit==0.2.12
|
||||
django-reversion==1.8.5
|
||||
django-solo==1.1.0
|
||||
django-ckeditor-updated==4.4.4
|
||||
|
||||
pytz==2014.10
|
||||
|
||||
django-compressor==1.4
|
||||
|
||||
easy-thumbnails==2.2
|
19
bower.json
19
bower.json
|
@ -1,22 +1,23 @@
|
|||
{
|
||||
"name": "fmartingr.com",
|
||||
"version": "0.0.0",
|
||||
"homepage": "https://github.com/fmartingr/fmartingr.com",
|
||||
"name": "fmartingrcom",
|
||||
"description": "fmartingr.com",
|
||||
"main": "gulpfile.js",
|
||||
"authors": [
|
||||
"Felipe Martin <fmartingr@me.com>"
|
||||
"Felipe Martin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"license": "GPLv2",
|
||||
"moduleType": [],
|
||||
"homepage": "",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"fmartingrcom/static/bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"font-awesome": "~4.2.0",
|
||||
"google-code-prettify": "~1.0.3",
|
||||
"jquery": "~2.1.3",
|
||||
"lightbox2": "~2.7.1"
|
||||
"google-code-prettify": "~1.0.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
import importlib
|
||||
|
||||
from flask import Flask, make_response, render_template, url_for
|
||||
from flask_admin import Admin
|
||||
from flask_admin.contrib.sqla import ModelView
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
|
||||
from . import conf
|
||||
|
||||
|
||||
def get_theme_folder(folder):
|
||||
return 'themes/{}/{}'.format(conf.THEME, folder)
|
||||
|
||||
app = Flask(__name__)
|
||||
app.debug = conf.DEBUG
|
||||
app.secret_key = conf.SECRET_KEY
|
||||
app.static_folder = get_theme_folder(conf.STATIC_FOLDER)
|
||||
app.template_folder = get_theme_folder(conf.TEMPLATE_FOLDER)
|
||||
app.config['cdn_domain'] = conf.CDN_DOMAIN
|
||||
|
||||
# Database
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = conf.DATABASE_PATH
|
||||
db = SQLAlchemy(app)
|
||||
|
||||
# Enable admin if set in the conf
|
||||
if conf.ENABLE_ADMIN:
|
||||
admin = Admin(app, name='fmartingrcom', template_mode='bootstrap3')
|
||||
|
||||
# Method to register admin models
|
||||
def register_admin_model(model):
|
||||
admin.add_view(ModelView(model, db.session))
|
||||
|
||||
# Autoload enabled blueprints
|
||||
for blueprint in conf.BLUEPRINTS:
|
||||
module = importlib.import_module(
|
||||
'.apps.{}'.format(blueprint),
|
||||
package=__name__)
|
||||
app.register_blueprint(getattr(module, blueprint))
|
||||
|
||||
@app.errorhandler(500)
|
||||
def internal_server_error(error):
|
||||
app.logger.error(error)
|
||||
return make_response(render_template('errors/500.html'), 500)
|
||||
|
||||
@app.context_processor
|
||||
def global_context():
|
||||
return {'current_year': datetime.now().strftime('%Y') }
|
||||
|
||||
# Patch url_for to use a CDN_DOMAIN if needed
|
||||
def patch_url_for(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
result = func(*args, **kwargs)
|
||||
cdn_domain = app.config.get('cdn_domain', None)
|
||||
|
||||
try:
|
||||
rewrite_path = result.split('/')[1] in conf.CDN_PATHS
|
||||
except IndexError:
|
||||
rewrite_path = False
|
||||
|
||||
if cdn_domain and rewrite_path:
|
||||
return '{}{}'.format(cdn_domain, result)
|
||||
return result
|
||||
return wrapper
|
||||
app.jinja_env.globals['url_for'] = patch_url_for(url_for)
|
|
@ -0,0 +1 @@
|
|||
from . import home, blog, portfolio
|
|
@ -0,0 +1,55 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from flask import Blueprint, render_template, request, abort, url_for
|
||||
from sqlalchemy import Column, String, Text, Integer, Boolean, DateTime
|
||||
from fmartingrcom import db, register_admin_model, conf
|
||||
|
||||
|
||||
blog = Blueprint('blog', __name__)
|
||||
|
||||
|
||||
# Models
|
||||
class Post(db.Model):
|
||||
__tablename__ = 'blog_post'
|
||||
id = Column(Integer, primary_key=True)
|
||||
title = Column(String(250))
|
||||
slug = Column(String(250), index=True)
|
||||
date = Column(DateTime(True), index=True)
|
||||
content = Column(Text)
|
||||
html = Column(Text)
|
||||
draft = Column(Boolean, default=True)
|
||||
|
||||
@property
|
||||
def absolute_url(self):
|
||||
return url_for('blog.blog_post',
|
||||
year=self.date.year,
|
||||
month=str(self.date.month).zfill(2),
|
||||
day=str(self.date.day).zfill(2),
|
||||
slug=self.slug)
|
||||
|
||||
if conf.ENABLE_ADMIN:
|
||||
register_admin_model(Post)
|
||||
|
||||
|
||||
# Views
|
||||
@blog.route('/blog/<int:year>/<string:month>/<string:day>/<slug>/')
|
||||
def blog_post(year, month, day, slug):
|
||||
item = Post.query.filter_by(slug=slug).first_or_404()
|
||||
context = {
|
||||
'item': item,
|
||||
}
|
||||
return render_template('blog/post.html', **context)
|
||||
|
||||
@blog.route('/blog/')
|
||||
def blog_list():
|
||||
try:
|
||||
page_num = int(request.args.get('page', 1))
|
||||
except ValueError:
|
||||
page_num = 1
|
||||
|
||||
query = Post.query.order_by(Post.date)
|
||||
paginator = query.paginate(page_num, 1)
|
||||
context = {
|
||||
'items': paginator.items,
|
||||
'paginator': paginator
|
||||
}
|
||||
return render_template('blog/list.html', **context)
|
|
@ -0,0 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from flask import Blueprint, render_template
|
||||
|
||||
|
||||
home = Blueprint('home', __name__)
|
||||
|
||||
|
||||
@home.route('/')
|
||||
def homepage():
|
||||
return render_template('home.html')
|
|
@ -0,0 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from flask import Blueprint, render_template
|
||||
|
||||
|
||||
portfolio = Blueprint('portfolio', __name__)
|
||||
|
||||
@portfolio.route('/projects/')
|
||||
def portfolio_list():
|
||||
context = {}
|
||||
return render_template('portfolio.html', **context)
|
|
@ -0,0 +1,37 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
PROJECT_PATH = os.getcwd()
|
||||
|
||||
# Enables or disables debug mode
|
||||
DEBUG = False
|
||||
|
||||
# Secret key for some stuff
|
||||
SECRET_KEY = '0123456789'
|
||||
|
||||
# Database URI
|
||||
DATABASE_PATH = '/tmp/fmartingr.db'
|
||||
|
||||
# Admin
|
||||
ENABLE_ADMIN = False
|
||||
|
||||
# Static and media files
|
||||
THEME = 'v2'
|
||||
CDN_DOMAIN = None
|
||||
STATIC_FOLDER = 'static'
|
||||
TEMPLATE_FOLDER = 'templates'
|
||||
CDN_PATHS = (STATIC_FOLDER, )
|
||||
|
||||
# Enabled blueprints
|
||||
BLUEPRINTS = (
|
||||
'home',
|
||||
'blog',
|
||||
'portfolio',
|
||||
)
|
||||
|
||||
# Try to import local_settings module for this enviroment
|
||||
try:
|
||||
from local_settings import *
|
||||
except ImportError:
|
||||
pass
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
Model = declarative_base()
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"directory": "./static/bower"
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "fmartingr.com",
|
||||
"version": "0.0.0",
|
||||
"homepage": "https://gitlab.com/fmartingr/fmartingr.com",
|
||||
"authors": [
|
||||
"Felipe Martin <fmartingr@me.com>"
|
||||
],
|
||||
"license": "GPLv2",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"font-awesome": "~4.5.0",
|
||||
"google-code-prettify": "~1.0.3",
|
||||
"jquery": "~2.1.3",
|
||||
"lightbox2": "~2.7.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"css": [
|
||||
""
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
|
@ -0,0 +1,26 @@
|
|||
(function() {
|
||||
var toggleMenu,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
toggleMenu = function() {
|
||||
var button, sidebar;
|
||||
|
||||
sidebar = document.querySelector('.sidebar');
|
||||
button = document.querySelector('button.menu');
|
||||
if (__indexOf.call(button.classList, 'menu-shown') >= 0) {
|
||||
sidebar.classList.remove('shown');
|
||||
return button.classList.remove('menu-shown');
|
||||
} else {
|
||||
sidebar.classList.add('shown');
|
||||
return button.classList.add('menu-shown');
|
||||
}
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
var button;
|
||||
|
||||
button = document.querySelector('button.menu');
|
||||
return button.onclick = toggleMenu;
|
||||
};
|
||||
|
||||
}).call(this);
|
|
@ -0,0 +1,128 @@
|
|||
body
|
||||
&.blog
|
||||
background-color: #fff
|
||||
padding-bottom: 20px
|
||||
|
||||
section.content
|
||||
hr:last-child
|
||||
display: none
|
||||
|
||||
article.blog-entry
|
||||
text-align: left
|
||||
|
||||
&:after
|
||||
clear: both
|
||||
|
||||
h2
|
||||
margin: 16px 0 10px 0
|
||||
|
||||
a:hover
|
||||
border: 0
|
||||
|
||||
h1
|
||||
border-right: #555 6px solid
|
||||
margin-bottom: 0.5em
|
||||
font-size: 2.2em
|
||||
|
||||
&.draft
|
||||
border: $warning-color 3px dashed
|
||||
padding: 0 20px
|
||||
|
||||
.info
|
||||
|
||||
.content
|
||||
line-height: 140%
|
||||
padding-top: 15px
|
||||
|
||||
img
|
||||
box-shadow: $sidebar-bg 0 0 4px
|
||||
max-width: 100%
|
||||
|
||||
&.noshadow
|
||||
box-shadow: none
|
||||
|
||||
&.float-left
|
||||
float: left
|
||||
margin-right: 3%
|
||||
|
||||
blockquote
|
||||
border-left: 4px solid #dddddd
|
||||
padding: 0 15px
|
||||
color: #777777
|
||||
> :first-child
|
||||
margin-top: 0
|
||||
> :last-child
|
||||
margin-bottom: 0
|
||||
|
||||
code
|
||||
display: inline-block
|
||||
white-space: no-wrap
|
||||
background: #fff
|
||||
font-size: .8em
|
||||
line-height: 1.5em
|
||||
color: #555
|
||||
border: 1px solid #ddd
|
||||
-webkit-border-radius: 0.4em
|
||||
-moz-border-radius: 0.4em
|
||||
-ms-border-radius: 0.4em
|
||||
-o-border-radius: 0.4em
|
||||
border-radius: 0.4em
|
||||
padding: 0 .3em
|
||||
margin: -1px 0
|
||||
|
||||
hr
|
||||
width: 50%
|
||||
|
||||
table
|
||||
padding: 0
|
||||
margin: 0 auto
|
||||
|
||||
tr
|
||||
border-top: 1px solid #cccccc
|
||||
background-color: white
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
&:nth-child(2n)
|
||||
background-color: #f8f8f8
|
||||
|
||||
th
|
||||
font-weight: bold
|
||||
border: 1px solid #cccccc
|
||||
text-align: left
|
||||
margin: 0
|
||||
padding: 6px 13px
|
||||
td
|
||||
border: 1px solid #cccccc
|
||||
text-align: left
|
||||
margin: 0
|
||||
padding: 6px 13px
|
||||
|
||||
th :first-child, td :first-child
|
||||
margin-top: 0
|
||||
|
||||
th :last-child, td :last-child
|
||||
margin-bottom: 0
|
||||
|
||||
a.readmore
|
||||
background: $warning-color
|
||||
border: none
|
||||
color: white
|
||||
font-family: helvetica, sans-serif
|
||||
font-weight: bold
|
||||
padding: 10px
|
||||
font-size: 90%
|
||||
|
||||
.draft-warning
|
||||
background-color: $warning-color
|
||||
color: $warning-text-color
|
||||
margin: 5px 0 5px 0
|
||||
padding: 8px 0 8px 0
|
||||
|
||||
.search-field
|
||||
border: none
|
||||
font-size: 0.8em
|
||||
font-weight: bold
|
||||
height: 1.2em
|
||||
padding: 2%
|
||||
width: 86%
|
|
@ -0,0 +1,110 @@
|
|||
body
|
||||
&.homepage
|
||||
background-color: #fff
|
||||
background-image: url('../images/homepage/bg.png')
|
||||
background-attachment: fixed
|
||||
|
||||
section.content
|
||||
// http://www.sitepoint.com/css3-shuffled-paper/
|
||||
.papers
|
||||
background: #fff
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.3)
|
||||
margin: 30px 0
|
||||
//max-width: 700px
|
||||
max-width: 600px
|
||||
padding: 24px
|
||||
position: relative
|
||||
font-size: 110%
|
||||
width: 80%
|
||||
|
||||
.papers:before, .papers:after
|
||||
content: ""
|
||||
height: 98%
|
||||
position: absolute
|
||||
width: 100%
|
||||
z-index: -1
|
||||
|
||||
.papers:before
|
||||
background: #fafafa
|
||||
box-shadow: 0 0 8px rgba(0,0,0,0.2)
|
||||
left: -5px
|
||||
top: 4px
|
||||
@include rotate(-2.5)
|
||||
|
||||
.papers:after
|
||||
background: #f6f6f6
|
||||
box-shadow: 0 0 3px rgba(0,0,0,0.2)
|
||||
right: -3px
|
||||
top: 1px
|
||||
@include rotate(1.4)
|
||||
|
||||
.picture
|
||||
background-color: white
|
||||
padding: 8px
|
||||
padding-bottom: 30px
|
||||
margin-left: 40px
|
||||
margin-bottom: 12px
|
||||
box-shadow: 0 0 3px rgba(0,0,0,0.2)
|
||||
@include rotate(10)
|
||||
margin-top: -10px
|
||||
margin-right: -50px
|
||||
|
||||
.img-circle
|
||||
border-radius: 50%
|
||||
|
||||
.social
|
||||
$button-size: 50px
|
||||
height: $button-size + 4px
|
||||
|
||||
.button
|
||||
border-radius: 50%
|
||||
display: inline-block
|
||||
font-size: 120%
|
||||
height: $button-size
|
||||
line-height: $button-size
|
||||
margin-right: 5px
|
||||
text-align: center
|
||||
width: $button-size
|
||||
|
||||
&:hover
|
||||
border-bottom: 0
|
||||
|
||||
&.email
|
||||
background-color: $email-color
|
||||
color: $email-text-color
|
||||
box-shadow: 0 0 1px $email-color
|
||||
|
||||
&:hover
|
||||
background-color: darken($email-color, 12%)
|
||||
|
||||
&.twitter
|
||||
background-color: $twitter-color
|
||||
color: $twitter-text-color
|
||||
box-shadow: 0 0 1px $twitter-color
|
||||
|
||||
&:hover
|
||||
background-color: darken($twitter-color, 12%)
|
||||
|
||||
&.github
|
||||
background-color: $github-color
|
||||
color: $github-text-color
|
||||
box-shadow: 0 0 1px $github-color
|
||||
|
||||
&:hover
|
||||
background-color: darken($github-color, 12%)
|
||||
|
||||
&.linkedin
|
||||
background-color: $linkedin-color
|
||||
color: $linkedin-text-color
|
||||
box-shadow: 0 0 1px $linkedin-color
|
||||
|
||||
&:hover
|
||||
background-color: darken($linkedin-color, 12%)
|
||||
|
||||
&.telegram
|
||||
background-color: $telegram-color
|
||||
color: $telegram-text-color
|
||||
box-shadow: 0 0 1px $telegram-color
|
||||
|
||||
&:hover
|
||||
background-color: darken($telegram-color, 12%)
|
|
@ -0,0 +1,178 @@
|
|||
html, body
|
||||
color: $text-color
|
||||
font-family: $font-family
|
||||
font-size: $font-size
|
||||
//font-weight: 400
|
||||
margin: 0
|
||||
min-height: 100%
|
||||
text-align: justify
|
||||
|
||||
body
|
||||
padding-bottom: 40px
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
font-family: $headers-font-family
|
||||
font-weight: normal
|
||||
text-shadow: 1px 1px 3px rgb(221, 221, 221)
|
||||
|
||||
h1
|
||||
font-size: 200%
|
||||
|
||||
h2
|
||||
font-size: 175%
|
||||
|
||||
h3
|
||||
font-size: 150%
|
||||
|
||||
h4
|
||||
font-size: 125%
|
||||
|
||||
strong
|
||||
color: $strong-text-color
|
||||
|
||||
a
|
||||
color: $anchor-text-color
|
||||
text-decoration: none
|
||||
|
||||
&.dark
|
||||
color: $text-color
|
||||
//text-shadow: $text-color $text-shadow-properties
|
||||
|
||||
&.bright
|
||||
color: $text-shadow-color
|
||||
|
||||
&:hover
|
||||
border-bottom: 1px dotted
|
||||
|
||||
figure
|
||||
margin: 0
|
||||
text-align: center
|
||||
|
||||
img
|
||||
margin: 14px
|
||||
|
||||
&.pull-left
|
||||
margin-left: 0
|
||||
|
||||
&.pull-right
|
||||
margin-right: 0
|
||||
|
||||
&.padding
|
||||
padding: 6px
|
||||
|
||||
&.shadow
|
||||
box-shadow: $text-color $box-shadow-properties
|
||||
|
||||
hr
|
||||
background: none
|
||||
border: 0
|
||||
border-bottom: #aaa 1px dotted
|
||||
width: 90%
|
||||
|
||||
&.big
|
||||
border-bottom-width: 3px
|
||||
margin: 30px auto
|
||||
|
||||
|
||||
.sidebar
|
||||
background-color: $sidebar-bg
|
||||
color: $sidebar-text-color
|
||||
min-height: 100%
|
||||
position: fixed
|
||||
top: 0
|
||||
width: $sidebar-width
|
||||
|
||||
&> button.menu
|
||||
display: none
|
||||
|
||||
&> header
|
||||
height: 220px
|
||||
|
||||
.logo
|
||||
color: #fff
|
||||
font-family: Verdana
|
||||
font-size: 200%
|
||||
font-weight: 800
|
||||
padding: 20px
|
||||
|
||||
footer
|
||||
bottom: 0
|
||||
position: absolute
|
||||
left: 0
|
||||
padding: $footer-padding
|
||||
width: $sidebar-width - ($footer-padding*2)
|
||||
|
||||
.zombiepress
|
||||
font-family: $headers-font-family
|
||||
font-size: 80%
|
||||
text-shadow: #333 1px 1px 3px
|
||||
a
|
||||
color: #fff
|
||||
|
||||
.zone-menu
|
||||
|
||||
.buttons
|
||||
@extend .text-center
|
||||
|
||||
header
|
||||
font-size: 170%
|
||||
margin-bottom: 10px
|
||||
|
||||
&.social
|
||||
margin-bottom: 20px
|
||||
button
|
||||
width: 31%
|
||||
font-size: 75%
|
||||
font-family: helvetica, sans-serif
|
||||
|
||||
a.button
|
||||
@include button(inherit, rgb(192, 192, 192))
|
||||
border: none
|
||||
cursor: pointer
|
||||
display: inline-block
|
||||
font-family: helvetica, sans-serif
|
||||
font-size: 90%
|
||||
margin-top: 5px
|
||||
padding: 8px 0 8px 0
|
||||
font-weight: bold
|
||||
text-shadow: 0 0 1px #000
|
||||
width: 90%
|
||||
text-align: left
|
||||
|
||||
transition: 0.3s all
|
||||
|
||||
i.fa
|
||||
margin: 0 8px 0 10px
|
||||
width: 20px
|
||||
|
||||
&.half
|
||||
width: 38%
|
||||
|
||||
&.gap
|
||||
&.pull-right
|
||||
margin-right: 5%
|
||||
|
||||
&.pull-left
|
||||
margin-left: 5%
|
||||
|
||||
&:hover
|
||||
//margin-left: 10px
|
||||
|
||||
&.rss
|
||||
@include button($rss-text-color, $rss-color)
|
||||
|
||||
&.blog
|
||||
@include button($blog-text-color, $blog-color)
|
||||
|
||||
&.homepage
|
||||
@include button($homepage-text-color, $homepage-color)
|
||||
|
||||
&.projects
|
||||
@include button($projects-text-color, $projects-color)
|
||||
|
||||
section.content
|
||||
margin-left: $sidebar-width + $content-sidebar-gap
|
||||
width: 60%
|
||||
|
||||
.pagination
|
||||
padding-bottom: 30px
|
|
@ -0,0 +1,103 @@
|
|||
.pull-left
|
||||
float: left
|
||||
|
||||
.pull-right
|
||||
float: right
|
||||
|
||||
.text-center
|
||||
text-align: center
|
||||
|
||||
.text-right
|
||||
text-align: right
|
||||
|
||||
.text-left
|
||||
text-align: left
|
||||
|
||||
.clearfix
|
||||
*zoom: 1
|
||||
|
||||
&:before, &:after
|
||||
content: " "
|
||||
display: table
|
||||
|
||||
&:after
|
||||
clear: both
|
||||
|
||||
.small
|
||||
font-size: 50%
|
||||
line-height: 50%
|
||||
|
||||
.alt-font
|
||||
font-family: $headers-font-family
|
||||
|
||||
.hacker-icon
|
||||
$size: 22px
|
||||
display: inline-block
|
||||
position: relative
|
||||
height: $size
|
||||
width: $size
|
||||
|
||||
-moz-transition: all 0.5s
|
||||
-webkit-transition: all 0.5s
|
||||
transition: all 0.5s
|
||||
|
||||
&:hover
|
||||
vertical-align: top
|
||||
width: 22px
|
||||
&:before
|
||||
content: "a"
|
||||
div
|
||||
display: none
|
||||
|
||||
div:nth-child(1)
|
||||
position: absolute
|
||||
left: $size/3
|
||||
top: 0
|
||||
|
||||
div:nth-child(2)
|
||||
position: absolute
|
||||
left: ($size/3)*2
|
||||
top: $size/3
|
||||
|
||||
div:nth-child(3)
|
||||
position: absolute
|
||||
left: ($size/3)*2
|
||||
top: ($size/3)*2
|
||||
|
||||
div:nth-child(4)
|
||||
position: absolute
|
||||
left: $size/3
|
||||
top: ($size/3)*2
|
||||
|
||||
div:nth-child(5)
|
||||
position: absolute
|
||||
left: 0
|
||||
top: ($size/3)*2
|
||||
|
||||
div
|
||||
background-color: #fff
|
||||
width: $size/3
|
||||
height: $size/3
|
||||
|
||||
.hidden
|
||||
display: none
|
||||
|
||||
/* Mix-ins */
|
||||
@mixin rotate($degrees)
|
||||
-webkit-transform: rotate(#{$degrees}deg)
|
||||
-moz-transform: rotate(#{$degrees}deg)
|
||||
-ms-transform: rotate(#{$degrees}deg)
|
||||
-o-transform: rotate(#{$degrees}deg)
|
||||
transform: rotate(#{$degrees}deg)
|
||||
|
||||
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=#{cos($degrees)}, M12=-#{sin($degrees)}, M21=#{sin($degrees)}, M22=#{cos($degrees)})
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=#{cos($degrees)}, M12=-#{sin($degrees)}, M21=#{sin($degrees)}, M22=#{cos($degrees)})"
|
||||
zoom: 1
|
||||
|
||||
@mixin button($color, $bg-color)
|
||||
background-color: $bg-color
|
||||
color: $color
|
||||
box-shadow: 0 0 1px $bg-color
|
||||
|
||||
&:hover
|
||||
background-color: darken($bg-color, 12%)
|
|
@ -0,0 +1,54 @@
|
|||
body
|
||||
&.projects
|
||||
background-color: #fff
|
||||
background-image: url('/static/images/homepage/bg.png')
|
||||
background-attachment: fixed
|
||||
|
||||
|
||||
.project-papers
|
||||
background: #fff
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.3)
|
||||
margin: 30px 0
|
||||
max-width: 600px
|
||||
min-width: 200px
|
||||
padding: 24px
|
||||
position: relative
|
||||
font-size: 110%
|
||||
width: 80%
|
||||
|
||||
.project-papers:before, .project-papers:after
|
||||
content: ""
|
||||
height: 98%
|
||||
position: absolute
|
||||
width: 100%
|
||||
z-index: -1
|
||||
|
||||
.project-papers:before
|
||||
background: #fafafa
|
||||
box-shadow: 0 0 8px rgba(0,0,0,0.2)
|
||||
left: -5px
|
||||
top: 4px
|
||||
@include rotate(-2.5)
|
||||
|
||||
.project-papers:after
|
||||
background: #f6f6f6
|
||||
box-shadow: 0 0 3px rgba(0,0,0,0.2)
|
||||
right: -3px
|
||||
top: 1px
|
||||
@include rotate(1.4)
|
||||
|
||||
|
||||
.project-papers
|
||||
&:hover
|
||||
cursor: pointer
|
||||
.title
|
||||
float: left
|
||||
margin: 0
|
||||
.role, .stack, .company, .title, .date, .url
|
||||
margin: 12px 0 12px 0
|
||||
.date
|
||||
float: right
|
||||
.computer
|
||||
max-width: inherit
|
||||
.images a:hover
|
||||
text-decoration: none !important
|
|
@ -0,0 +1,4 @@
|
|||
button
|
||||
margin: 0
|
||||
padding: 0
|
||||
outline: 0
|
|
@ -0,0 +1,96 @@
|
|||
/* Landspace tablet and Large desktop */
|
||||
@media (min-width: 980px)
|
||||
.dummy
|
||||
display: none
|
||||
|
||||
/* From portrait tablet and down */
|
||||
@media (max-width: 979px)
|
||||
.hacker-icon
|
||||
$size: 12px
|
||||
|
||||
body
|
||||
font-size: 85%
|
||||
|
||||
button.menu
|
||||
background-color: $sidebar-bg
|
||||
border: lighten($sidebar-bg, 20%) 1px solid
|
||||
color: white
|
||||
display: block
|
||||
font-size: 16px
|
||||
height: 32px
|
||||
left: 8px
|
||||
padding: 0 5px 0 5px
|
||||
position: fixed
|
||||
text-align: center
|
||||
top: 8px
|
||||
z-index: 900
|
||||
|
||||
-moz-border-radius: 4px
|
||||
-webkit-border-radius: 4px
|
||||
border-radius: 4px
|
||||
|
||||
-moz-transition: left 0.3s
|
||||
-webkit-transition: left 0.3s
|
||||
transition: left 0.3s
|
||||
|
||||
span
|
||||
display: block
|
||||
|
||||
-moz-transition: all 0.3s
|
||||
-webkit-transition: all 0.3s
|
||||
transition: all 0.3s
|
||||
|
||||
&.menu-shown
|
||||
left: $sidebar-width + 8px
|
||||
|
||||
span
|
||||
-moz-transform: rotate(180deg)
|
||||
-webkit-transform: rotate(180deg)
|
||||
transform: rotate(180deg)
|
||||
|
||||
.sidebar
|
||||
margin-left: -1*$sidebar-width
|
||||
z-index: 999
|
||||
|
||||
-moz-transition: margin-left 0.3s
|
||||
-webkit-transition: margin-left 0.3s
|
||||
transition: margin-left 0.3s
|
||||
|
||||
&.shown
|
||||
margin-left: 0
|
||||
|
||||
&> header
|
||||
height: auto
|
||||
|
||||
table
|
||||
font-size: 60%
|
||||
|
||||
th
|
||||
padding: 1px 2px
|
||||
|
||||
td
|
||||
padding: 1px 2px
|
||||
|
||||
|
||||
section.content
|
||||
margin-left: 0
|
||||
padding: 4%
|
||||
width: auto
|
||||
|
||||
.papers
|
||||
width: auto
|
||||
|
||||
/* Portrait tablet to desktop*/
|
||||
@media (min-width: 767px) and (max-width: 979px)
|
||||
.dummy
|
||||
display: none
|
||||
|
||||
/* Landscape phone to portrait tablet */
|
||||
@media (max-width: 767px)
|
||||
.hide-mobile
|
||||
display: none
|
||||
|
||||
/* Landscape phones and down */
|
||||
@media (max-width: 480px)
|
||||
.dummy
|
||||
display: none
|
|
@ -0,0 +1,84 @@
|
|||
pre .str, code .str
|
||||
color: #65b042
|
||||
|
||||
pre .kwd, code .kwd
|
||||
color: #e28964
|
||||
|
||||
pre .com, code .com
|
||||
color: #aeaeae
|
||||
font-style: italic
|
||||
|
||||
pre .typ, code .typ
|
||||
color: #89bdff
|
||||
|
||||
pre .lit, code .lit
|
||||
color: #3387cc
|
||||
|
||||
pre .pun, code .pun, pre .pln, code .pln
|
||||
color: #fff
|
||||
|
||||
pre .tag, code .tag
|
||||
color: #89bdff
|
||||
|
||||
pre .atn, code .atn
|
||||
color: #bdb76b
|
||||
|
||||
pre .atv, code .atv
|
||||
color: #65b042
|
||||
|
||||
pre .dec, code .dec
|
||||
color: #3387cc
|
||||
|
||||
pre.prettyprint, code.prettyprint
|
||||
background-color: #242424
|
||||
border: 0 !important
|
||||
-moz-border-radius: 0
|
||||
-webkit-border-radius: 0
|
||||
-o-border-radius: 0
|
||||
-ms-border-radius: 0
|
||||
-khtml-border-radius: 0
|
||||
border-radius: 0
|
||||
|
||||
pre.prettyprint
|
||||
font-size: 84%
|
||||
line-height: 120%
|
||||
width: auto
|
||||
margin: 1em auto
|
||||
padding: 12px !important
|
||||
white-space: pre-wrap
|
||||
font-size: 86%
|
||||
|
||||
ol.linenums
|
||||
margin-top: 0
|
||||
margin-bottom: 0
|
||||
color: #aeaeae
|
||||
|
||||
li
|
||||
&.L0, &.L1, &.L2, &.L3, &.L5, &.L6, &.L7, &.L8
|
||||
list-style-type: none
|
||||
|
||||
@media print
|
||||
pre .str, code .str
|
||||
color: #060
|
||||
pre .kwd, code .kwd
|
||||
color: #006
|
||||
font-weight: bold
|
||||
pre .com, code .com
|
||||
color: #600
|
||||
font-style: italic
|
||||
pre .typ, code .typ
|
||||
color: #404
|
||||
font-weight: bold
|
||||
pre .lit, code .lit
|
||||
color: #044
|
||||
pre .pun, code .pun
|
||||
color: #440
|
||||
pre .pln, code .pln
|
||||
color: #000
|
||||
pre .tag, code .tag
|
||||
color: #006
|
||||
font-weight: bold
|
||||
pre .atn, code .atn
|
||||
color: #404
|
||||
pre .atv, code .atv
|
||||
color: #060
|
|
@ -0,0 +1,63 @@
|
|||
// General
|
||||
$text-color: #242424
|
||||
$font-family: "Georgia", "Open Sans", OpenSansRegular, sans-serif
|
||||
$font-size: 18px
|
||||
|
||||
$anchor-text-color: #2277bb
|
||||
$anchor-text-shadow-color: #004b6b
|
||||
|
||||
$headers-font-family: 'Antic Slab', serif
|
||||
|
||||
$text-shadow-color: #fff
|
||||
$text-shadow-properties: 1px 1px 1px
|
||||
|
||||
$strong-text-color: #3e4349
|
||||
|
||||
$box-shadow-properties: 0px 0px 5px
|
||||
|
||||
// Sidebar
|
||||
$sidebar-bg: #242424
|
||||
$sidebar-text-color: #fff
|
||||
$sidebar-width: 260px
|
||||
|
||||
$footer-padding: 10px
|
||||
|
||||
// Content
|
||||
$content-sidebar-gap: 40px
|
||||
|
||||
// Buttons
|
||||
$twitter-color: #55acee
|
||||
$twitter-text-color: #fff
|
||||
|
||||
$email-color: #db4437
|
||||
$email-text-color: #e7e6dd
|
||||
|
||||
$github-color: #999
|
||||
$github-text-color: #000
|
||||
|
||||
$linkedin-color: #0976b4
|
||||
$linkedin-text-color: #fff
|
||||
|
||||
$telegram-color: #0088cc
|
||||
$telegram-text-color: #fff
|
||||
|
||||
$rss-color: #ff9557
|
||||
$rss-text-color: #eee
|
||||
|
||||
$blog-color: desaturate(#fe160e, 50)
|
||||
$blog-text-color: #fff
|
||||
|
||||
$homepage-color: desaturate(#00cbf4, 50)
|
||||
$homepage-text-color: #efefef
|
||||
|
||||
$projects-color: desaturate(#491b93, 50)
|
||||
$projects-text-color: #efefef
|
||||
|
||||
// Colors
|
||||
$warning-color: #f39c12
|
||||
$warning-text-color: #fff
|
||||
|
||||
// font
|
||||
@font-face
|
||||
font-family: fmartingr
|
||||
src: url('/static/fmartingr.ttf')
|
|
@ -0,0 +1,10 @@
|
|||
@import "reset"
|
||||
@import "variables"
|
||||
@import "oocss"
|
||||
@import "layout"
|
||||
@import "homepage"
|
||||
@import "blog"
|
||||
@import "projects"
|
||||
@import "syntax"
|
||||
|
||||
@import "responsive"
|
|
@ -0,0 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="//fonts.googleapis.com/css?family=Open+Sans:400|Antic+Slab" rel="stylesheet" type="text/css">
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='bower/font-awesome/css/font-awesome.css') }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/x-sass" />
|
||||
{% endblock %}
|
||||
{% block head %}{% endblock %}
|
||||
<!-- Mobile -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
<title>Felipe Martin | {% block page_title %} Homepage{% endblock %}</title>
|
||||
</head>
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
<button class="menu"><span class="fa fa-arrow-right"></span></button>
|
||||
<section class="sidebar">
|
||||
<header class="text-center">
|
||||
<a href="/">
|
||||
<div class="logo">
|
||||
Felipe<br />
|
||||
M<div class="hacker-icon">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>rtín
|
||||
</div>
|
||||
</a>
|
||||
<div class="slogan alt-font hide-mobile">
|
||||
Be incomprehensible.<br />
|
||||
If they can't understand, <br />
|
||||
they can't disagree.
|
||||
</div>
|
||||
</header>
|
||||
<div class="menu buttons">
|
||||
{% block sections %}
|
||||
<a href="/" class="button homepage">
|
||||
<i class="fa fa-user"></i> About me
|
||||
</a>
|
||||
<a href="{{ url_for('blog.blog_list') }}" class="button blog">
|
||||
<i class="fa fa-comment"></i> Blog
|
||||
</a>
|
||||
<a href="{{ url_for('portfolio.portfolio_list') }}" class="button projects">
|
||||
<i class="fa fa-folder-open"></i> Portfolio
|
||||
</a>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<nav class="zone-menu buttons">
|
||||
{% block menu %}
|
||||
<hr />
|
||||
<header>{{ section|capitalize }}</header>
|
||||
{% endblock %}
|
||||
</nav>
|
||||
</section>
|
||||
<section class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/mobile.js') }}"></script>
|
||||
{% block javascript %}{% endblock %}
|
||||
{% if config.google_analytics %}
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', '{{ config.google_analytics }}', '{{ config.google_analytics_domain }}');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% block endbody %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue