New layout & home

This commit is contained in:
Felipe Martín 2015-12-06 21:12:54 +01:00
parent 5ca6115ed5
commit e9f2304008
7 changed files with 154 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from datetime import datetime
import importlib
from flask import Flask
@ -15,3 +16,7 @@ for blueprint in conf.BLUEPRINTS:
'.apps.{}'.format(blueprint),
package=__name__)
app.register_blueprint(getattr(module, blueprint))
@app.context_processor
def global_context():
return {'current_year': datetime.now().strftime('%Y') }

View File

@ -0,0 +1,48 @@
* {
@include box-sizing(border-box);
}
$pad: 20px;
.grid {
background: white;
margin: 0 0 $pad 0;
&:after {
/* Or @extend clearfix */
content: "";
display: table;
clear: both;
}
}
[class*='col-'] {
float: left;
padding-right: $pad;
.grid &:last-of-type {
padding-right: 0;
}
}
.col-2-3 {
width: 66.66%;
}
.col-1-3 {
width: 33.33%;
}
.col-1-2 {
width: 50%;
}
.col-1-4 {
width: 25%;
}
.col-1-8 {
width: 12.5%;
}
/* Opt-in outside padding */
.grid-pad {
padding: $pad 0 $pad $pad;
[class*='col-']:last-of-type {
padding-right: $pad;
}
}

View File

@ -0,0 +1,53 @@
body {
font-family: 'Antic Slab';
font-size: 20px;
}
.center {
margin: 0 auto;
max-width: 1000px;
}
a {
text-decoration: underilne;
//color: inherit !important;
color: #c24e4a;
//color: #3da3b7;
}
img { max-width: 100%; }
header {
h1 { margin-bottom: 0; }
h2 {
font-size: 0.8em;
font-weight: normal;
margin-top: 0;
}
& + hr, hr {
margin: 1em 0 1em 0;
border-style: dashed;
border-top: 0px;
}
}
nav.main-menu {
text-align: center;
}
footer {
font-size: 0.7em;
padding-top: 1em;
}
p:first-child {
margin-top: 0;
}
.text-center {
text-align: center;
}
.float-right {
float: right;
}

View File

@ -0,0 +1,5 @@
@mixin box-sizing($type) {
-webkit-box-sizing: $type;
-moz-box-sizing: $type;
box-sizing: $type;
}

View File

@ -0,0 +1,3 @@
@import "./mixins";
@import "./grid";
@import "./layout";

View File

@ -1,8 +1,30 @@
<html>
<head>
<title>{{ page_title }}</title>
<title>{% block page_title %}{% endblock %}</title>
<link href='https://fonts.googleapis.com/css?family=Antic+Slab' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<body class="{% block body_class %}{% endblock %}">
<header class="center">
<h1>Felipe Martín</h1>
<h2>Be incomprehensible. If they can't understand, they can't disagree.</h2>
<nav class="main-menu">
<a href="{{ url_for('home.homepage') }}">About me</a> //
<a href="{{ url_for('blog.blog_list') }}">Blog</a> //
<a href="{{ url_for('portfolio.portfolio_list') }}">Portfolio</a>
</nav>
</header>
<hr>
{% block main_content %}{% endblock %}
<footer class="center text-center">
<div class="center text-center">
<a href="mailto:me@fmartingr.com" target="_blank">E-mail</a> //
<a href="https://telegram.me/fmartingr" target="_blank">Telegram</a> //
<a href="http://es.linkedin.com/in/felipemartingarcia" target="_blank">LinkedIn</a> //
<a href="https://github.com/fmartingr" target="_blank">Github</a> //
<a href="https://twitter.com/fmartingr" target="_blank">Twitter</a>
</div>
<a href="https://gitlab.com/fmartingr/fmartingr.com" target="_blank">This site is open source</a>. 2012-{{ current_year }}
</footer>
</body>
</html>

View File

@ -1,5 +1,20 @@
{% extends "_base.html" %}
{% block page_title %}About me // Felipe Martín{% endblock %}
{% block main_content %}
Home
<div class="grid center">
<div class="col-1-3">
<img src="http://cdn.fmartingr.com/avatar.png">
</div>
<div class="col-2-3">
<p>Hi! I'm Felipe, and I am a developer. Whatever that is.</p>
<p>I have been playing with code for a while now, but I also enjoy geeking around with computers, algorithms and other stuff; the less I know about it, the better! Learning new things every day is my way of life.</p>
<p>I think that developers are like artists, writers and composers... we all make art. But we don't use strokes and colors, words or notes, we make it through code. And I really love it.</p>
<p>If you want to get in touch, feel free to drop me a line.</p>
</div>
</div>
<br />
{% endblock %}
{% block body_class %}home{% endblock %}