Initial commit
This commit is contained in:
commit
edb5816892
30 changed files with 534 additions and 0 deletions
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
# node/bower
|
||||
node_modules
|
||||
bower_components
|
||||
|
||||
# emacs
|
||||
*~
|
||||
|
||||
# static js
|
||||
assets/static/js
|
||||
assets/static/css
|
2
Felipe Martin.lektorproject
Normal file
2
Felipe Martin.lektorproject
Normal file
|
@ -0,0 +1,2 @@
|
|||
[project]
|
||||
name = Felipe Martin
|
10
Makefile
Normal file
10
Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
setup:
|
||||
npm install
|
||||
node_modules/bower/bin/bower install
|
||||
|
||||
dev:
|
||||
node_modules/gulp/bin/gulp.js sass
|
||||
node_modules/gulp/bin/gulp.js js
|
||||
|
||||
watch:
|
||||
node_modules/gulp/bin/gulp.js sass:watch
|
BIN
assets/static/images/avatar.png
Normal file
BIN
assets/static/images/avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
20
assets/static/sass/_blog.scss
Normal file
20
assets/static/sass/_blog.scss
Normal file
|
@ -0,0 +1,20 @@
|
|||
body.blog {
|
||||
&.post {
|
||||
article {
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
.info {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.content {
|
||||
margin-top: 1em;
|
||||
|
||||
&.md {
|
||||
img { margin: 0 auto; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
48
assets/static/sass/_grid.scss
Normal file
48
assets/static/sass/_grid.scss
Normal 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;
|
||||
}
|
||||
}
|
57
assets/static/sass/_layout.scss
Normal file
57
assets/static/sass/_layout.scss
Normal file
|
@ -0,0 +1,57 @@
|
|||
body {
|
||||
font-family: 'Antic Slab';
|
||||
font-size: 20px;
|
||||
line-height: 1.5em
|
||||
}
|
||||
|
||||
.center {
|
||||
margin: 0 auto;
|
||||
max-width: 920px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: underilne;
|
||||
//color: inherit !important;
|
||||
color: #c24e4a;
|
||||
//color: #3da3b7;
|
||||
}
|
||||
|
||||
img { max-width: 100%; }
|
||||
|
||||
header {
|
||||
h1 { margin-bottom: 0; font-size: 1.5em; text-align: right; }
|
||||
|
||||
h2 {
|
||||
font-size: 0.8em;
|
||||
font-weight: normal;
|
||||
margin-top: 0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
nav.main-menu {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
footer {
|
||||
font-size: 0.7em;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
hr.light {
|
||||
border: 0px;
|
||||
margin: 1em 0 1em 0;
|
||||
border-top: #CCC 1px solid;
|
||||
}
|
||||
|
||||
p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
6
assets/static/sass/_mediaqueries.scss
Normal file
6
assets/static/sass/_mediaqueries.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
$desktop: "(max-width: 992px)";
|
||||
$until-desktop: "(min-width: 768px)";
|
||||
$tablet: "(max-width: 768px)";
|
||||
$until-tablet: "(min-width: 768px)";
|
||||
$mobile: "(max-width: 480px)";
|
||||
$until-mobile: "(min-width: 480px)";
|
5
assets/static/sass/_mixins.scss
Normal file
5
assets/static/sass/_mixins.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
@mixin box-sizing($type) {
|
||||
-webkit-box-sizing: $type;
|
||||
-moz-box-sizing: $type;
|
||||
box-sizing: $type;
|
||||
}
|
84
assets/static/sass/_syntax.sass
Normal file
84
assets/static/sass/_syntax.sass
Normal file
|
@ -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
|
6
assets/static/sass/style.scss
Normal file
6
assets/static/sass/style.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
@import "./mediaqueries";
|
||||
@import "./mixins";
|
||||
@import "./grid";
|
||||
@import "./layout";
|
||||
@import "./blog";
|
||||
@import "./syntax";
|
23
bower.json
Normal file
23
bower.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "fmartingrcom",
|
||||
"description": "fmartingr.com",
|
||||
"main": "gulpfile.js",
|
||||
"authors": [
|
||||
"Felipe Martin"
|
||||
],
|
||||
"license": "GPLv2",
|
||||
"moduleType": [],
|
||||
"homepage": "",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"fmartingrcom/static/bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"google-code-prettify": "~1.0.4"
|
||||
}
|
||||
}
|
3
content/blog/contents.lr
Normal file
3
content/blog/contents.lr
Normal file
|
@ -0,0 +1,3 @@
|
|||
_model: blog
|
||||
---
|
||||
_template: blog/list.html
|
9
content/blog/first-post/contents.lr
Normal file
9
content/blog/first-post/contents.lr
Normal file
|
@ -0,0 +1,9 @@
|
|||
title: Hello Website
|
||||
---
|
||||
pub_date: 2016-11-27
|
||||
---
|
||||
author: Felipe Martin
|
||||
---
|
||||
body: This is an example blog post. Not much here but that's not the point :)
|
||||
---
|
||||
_template: blog/post.html
|
8
content/contents.lr
Normal file
8
content/contents.lr
Normal file
|
@ -0,0 +1,8 @@
|
|||
title: Welcome to Felipe Martin!
|
||||
---
|
||||
body:
|
||||
|
||||
This is a basic demo website that shows how to use Lektor for a basic
|
||||
website with some pages and a blog.
|
||||
---
|
||||
_template: home.html
|
13
content/projects/contents.lr
Normal file
13
content/projects/contents.lr
Normal file
|
@ -0,0 +1,13 @@
|
|||
title: Portfolio
|
||||
---
|
||||
body:
|
||||
|
||||
This is a list of the projects:
|
||||
|
||||
* Project 1
|
||||
* Project 2
|
||||
* Project 3
|
||||
---
|
||||
_slug:
|
||||
---
|
||||
_template: portfolio.html
|
50
gulpfile.js
Normal file
50
gulpfile.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
'use strict';
|
||||
|
||||
var gulp = require('gulp');
|
||||
|
||||
// Styles
|
||||
var sass = require('gulp-sass');
|
||||
var concatCss = require('gulp-concat-css');
|
||||
var concatJs = require('gulp-concat');
|
||||
var merge = require('merge-stream');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var livereload = require('gulp-livereload');
|
||||
var yargs = require('yargs').argv;
|
||||
var minify = require('gulp-minify');
|
||||
|
||||
|
||||
gulp.task('sass', function () {
|
||||
var sassStream = gulp.src('./assets/static/sass/style.scss')
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
var bowerStream = gulp.src([
|
||||
])
|
||||
|
||||
return merge(bowerStream, sassStream)
|
||||
.pipe(concatCss("style.css"))
|
||||
.pipe(minifyCss())
|
||||
.pipe(gulp.dest('./assets/static/css'))
|
||||
.pipe(livereload());
|
||||
});
|
||||
|
||||
gulp.task('js', function () {
|
||||
var bowerStream = gulp.src([
|
||||
'./bower_components/google-code-prettify/bin/run_prettify.min.js'
|
||||
])
|
||||
return bowerStream
|
||||
.pipe(concatJs('app.js'))
|
||||
.pipe(minify({
|
||||
exclude: [],
|
||||
ignoreFiles: []
|
||||
}))
|
||||
.pipe(gulp.dest('./assets/static/js'))
|
||||
})
|
||||
|
||||
gulp.task('livereload', function () {
|
||||
return gulp.src('./templates/**/*.html').pipe(livereload());
|
||||
});
|
||||
|
||||
gulp.task('sass:watch', function () {
|
||||
livereload.listen();
|
||||
gulp.watch('./templates/static/sass/**/*.scss', ['sass']);
|
||||
gulp.watch('./templates/static/templates/**/*.html', ['livereload']);
|
||||
});
|
29
models/blog-post.ini
Normal file
29
models/blog-post.ini
Normal file
|
@ -0,0 +1,29 @@
|
|||
[model]
|
||||
name = Blog Post
|
||||
label = {{ this.title }}
|
||||
hidden = yes
|
||||
|
||||
[fields.title]
|
||||
label = Title
|
||||
type = string
|
||||
size = large
|
||||
|
||||
[fields.author]
|
||||
label = Author
|
||||
type = string
|
||||
width = 1/2
|
||||
|
||||
[fields.twitter_handle]
|
||||
label = Twitter Handle
|
||||
type = string
|
||||
width = 1/4
|
||||
addon_label = @
|
||||
|
||||
[fields.pub_date]
|
||||
label = Publication date
|
||||
type = date
|
||||
width = 1/4
|
||||
|
||||
[fields.body]
|
||||
label = Body
|
||||
type = markdown
|
12
models/blog.ini
Normal file
12
models/blog.ini
Normal file
|
@ -0,0 +1,12 @@
|
|||
[model]
|
||||
name = Blog
|
||||
label = Blog
|
||||
hidden = yes
|
||||
|
||||
[children]
|
||||
model = blog-post
|
||||
order_by = -pub_date, title
|
||||
|
||||
[pagination]
|
||||
enabled = yes
|
||||
per_page = 10
|
11
models/page.ini
Normal file
11
models/page.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[model]
|
||||
name = Page
|
||||
label = {{ this.title }}
|
||||
|
||||
[fields.title]
|
||||
label = Title
|
||||
type = string
|
||||
|
||||
[fields.body]
|
||||
label = Body
|
||||
type = markdown
|
26
package.json
Normal file
26
package.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "fmartingrcom",
|
||||
"version": "3.0.0",
|
||||
"description": "fmartingr.com",
|
||||
"main": "gulpfile.js",
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-concat-css": "^2.2.0",
|
||||
"gulp-livereload": "^3.8.1",
|
||||
"gulp-minify": "0.0.5",
|
||||
"gulp-minify-css": "^1.2.2",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"merge-stream": "^1.0.0",
|
||||
"yargs": "^3.31.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/fmartingr/fmartingr.com.git"
|
||||
},
|
||||
"author": "Felipe Martin",
|
||||
"license": "GPLv2"
|
||||
}
|
31
templates/_base.html
Normal file
31
templates/_base.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<html>
|
||||
<head>
|
||||
<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="{{ '/static/css/style.css'|asseturl }}">
|
||||
</head>
|
||||
<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 }}">About me</a> //
|
||||
<a href="{{ '/blog'|url }}">Blog</a> //
|
||||
<a href="{{ '/portfolio'|url }}">Portfolio</a>
|
||||
</nav>
|
||||
<hr class="light">
|
||||
</header>
|
||||
{% block main_content %}{% endblock %}
|
||||
<footer class="center text-center">
|
||||
<hr class="light">
|
||||
<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>
|
||||
</footer>
|
||||
<script type="text/javascript" src="{{ 'static/js/app-min.js'|url }}"></script>
|
||||
</body>
|
||||
</html>
|
1
templates/blog/_base.html
Normal file
1
templates/blog/_base.html
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends "_base.html" %}
|
11
templates/blog/list.html
Normal file
11
templates/blog/list.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends "blog/_base.html" %}
|
||||
{% from "macros/blog.html" import render_blog_post %}
|
||||
{% from "macros/pagination.html" import render_pagination %}
|
||||
|
||||
{% block main_content %}
|
||||
{% for child in this.pagination.items %}
|
||||
{{ render_blog_post(child, from_index=true) }}
|
||||
{% endfor %}
|
||||
|
||||
<div class="center">{{ render_pagination(this.pagination) }}</div>
|
||||
{% endblock %}
|
8
templates/blog/post.html
Normal file
8
templates/blog/post.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% extends "blog/_base.html" %}
|
||||
{% from "macros/blog.html" import render_blog_post %}
|
||||
|
||||
{% block main_content %}
|
||||
{{ render_blog_post(this) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}blog post{% endblock %}
|
1
templates/error/500.html
Normal file
1
templates/error/500.html
Normal file
|
@ -0,0 +1 @@
|
|||
500
|
19
templates/home.html
Normal file
19
templates/home.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends "_base.html" %}
|
||||
|
||||
{% block page_title %}About me // Felipe Martín{% endblock %}
|
||||
|
||||
{% block main_content %}
|
||||
<div class="grid center">
|
||||
<div class="col-1-3">
|
||||
<img src="{{ 'static/images/avatar.png'|url }}">
|
||||
</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>
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}home{% endblock %}
|
11
templates/macros/blog.html
Normal file
11
templates/macros/blog.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% macro render_blog_post(post, from_index=false) %}
|
||||
<article class="center">
|
||||
<h1><a href="{{ post|url }}">{{ post.title }}</a></h1>
|
||||
<div class="info">
|
||||
Published on {{ post.pub_date }}. // <a href="#">No comments.</a>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ post.body }}
|
||||
</div>
|
||||
</article>
|
||||
{% endmacro %}
|
15
templates/macros/pagination.html
Normal file
15
templates/macros/pagination.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% macro render_pagination(pagination) %}
|
||||
<div class="pagination">
|
||||
{% if pagination.has_prev %}
|
||||
<a href="{{ pagination.prev|url }}">« Previous</a>
|
||||
{% else %}
|
||||
<span class="disabled">« Previous</span>
|
||||
{% endif %}
|
||||
| {{ pagination.page }} |
|
||||
{% if pagination.has_next %}
|
||||
<a href="{{ pagination.next|url }}">Next »</a>
|
||||
{% else %}
|
||||
<span class="disabled">Next »</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
5
templates/portfolio.html
Normal file
5
templates/portfolio.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "_base.html" %}
|
||||
|
||||
{% block main_content %}
|
||||
portfolio
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue