From 96c9911a8c41870f8c773e4e86b82cd53ea5a2dd Mon Sep 17 00:00:00 2001 From: Felipe M Date: Sun, 14 Feb 2021 20:16:02 +0100 Subject: [PATCH] New (old) design --- .vscode/settings.json | 6 ++++ Felipe Martin.lektorproject | 1 - configs/sassify.ini | 3 -- configs/scss.ini | 3 ++ content/about/contents.lr | 41 ++++------------------- packages/sassify/lektor_sassify.py | 22 ------------- packages/sassify/setup.py | 14 -------- static/sass/_home.sass | 0 static/sass/_layout.sass | 52 +++++++++++++++-------------- static/sass/style.sass | 1 + templates/_base.html | 53 ++++++++---------------------- templates/blog-list.html | 2 +- templates/blog-post.html | 2 +- templates/home.html | 6 ++-- templates/macros/blog.html | 2 +- templates/page.html | 2 +- 16 files changed, 64 insertions(+), 146 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 configs/sassify.ini create mode 100644 configs/scss.ini delete mode 100644 packages/sassify/lektor_sassify.py delete mode 100644 packages/sassify/setup.py create mode 100644 static/sass/_home.sass diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c124094 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.formatting.provider": "black", + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": true, + "python.linting.enabled": true +} \ No newline at end of file diff --git a/Felipe Martin.lektorproject b/Felipe Martin.lektorproject index 860cade..f800a1a 100644 --- a/Felipe Martin.lektorproject +++ b/Felipe Martin.lektorproject @@ -8,4 +8,3 @@ lektor-markdown-header-anchors = 0.3.1 lektor-atom = 0.3 lektor-htmlmin = 1.0.2 lektor-markdown-highlighter = 0.3.1 -# lektor-thumbnail-generator = 0.4.0 diff --git a/configs/sassify.ini b/configs/sassify.ini deleted file mode 100644 index 1ef1f23..0000000 --- a/configs/sassify.ini +++ /dev/null @@ -1,3 +0,0 @@ -[sassify] -dest_path=assets/static/css -src_path=static/sass diff --git a/configs/scss.ini b/configs/scss.ini new file mode 100644 index 0000000..2f66bbb --- /dev/null +++ b/configs/scss.ini @@ -0,0 +1,3 @@ +source_dir=static/sass/ +output_dir=assets/static/css/ +output_style=compressed diff --git a/content/about/contents.lr b/content/about/contents.lr index c92f008..44dbd4f 100644 --- a/content/about/contents.lr +++ b/content/about/contents.lr @@ -13,37 +13,10 @@ I think that developers are like artists, writers and composers... we all make a If you want to get in touch feel free to drop me a line. -
-
-

E-Mail

- me@fmartingr.com -
-
-

LinkedIn

- linkedin.com/fmartingr -
-
-

Twitter

- @fmartingr -
-
-

Mastodon

- fmartingr@fosstodon.org -
-
-

Github

- fmartingr -
- -
-

Telegram

- @fmartingr -
-
-

Mastodon

- @fmartingr -
-
+- me@fmartingr.com +- linkedin.com/fmartingr +- twitter.com/fmartingr +- fmartingr@fosstodon.org +- telegram.me/fmartingr +- github.com/fmartingr +- code.fmartingr.dev/fmartingr, personal git server diff --git a/packages/sassify/lektor_sassify.py b/packages/sassify/lektor_sassify.py deleted file mode 100644 index f39b9e1..0000000 --- a/packages/sassify/lektor_sassify.py +++ /dev/null @@ -1,22 +0,0 @@ -import sass -from lektor.pluginsystem import Plugin -from werkzeug.utils import cached_property - - -class SassifyPlugin(Plugin): - name = "Sassify" - description = "Sassify" - - def on_before_build_all(self, builder, **extra): - sass.compile( - dirname=( - self.config["sassify"]["src_path"], - self.config["sassify"]["dest_path"], - ), - output_style="compressed", - ) - - @cached_property - def config(self): - conf = self.get_config() - return {section: conf.section_as_dict(section) for section in conf.sections()} diff --git a/packages/sassify/setup.py b/packages/sassify/setup.py deleted file mode 100644 index d6ec24c..0000000 --- a/packages/sassify/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -from setuptools import setup - - -setup( - name="lektor-sassify", - version="0.1", - py_modules=["lektor_sassify"], - entry_points={ - "lektor.plugins": [ - "sassify = lektor_sassify:SassifyPlugin", - ] - }, - install_requires=["libsass==0.20.1"], -) diff --git a/static/sass/_home.sass b/static/sass/_home.sass new file mode 100644 index 0000000..e69de29 diff --git a/static/sass/_layout.sass b/static/sass/_layout.sass index d90fef8..e461ad1 100644 --- a/static/sass/_layout.sass +++ b/static/sass/_layout.sass @@ -2,6 +2,7 @@ body font-family: $font-family font-size: $font-size-base line-height: 1.5em + padding: 24px .center margin: 0 auto @@ -61,7 +62,6 @@ p:first-child // New .page-content - display: flex margin: 0 auto flex-direction: row max-width: 980px @@ -70,37 +70,35 @@ p:first-child display: block width: 100% - header - width: 25% - text-align: center +header + text-align: right + + h1 + margin-top: 0 + font-size: 1.5em - @media ($tablet) - width: 100% - .avatar - max-width: 125px + .avatar + float: left + width: 70px + margin: 0 auto + margin-right: 12px - h1 - font-size: 1.3em - - .avatar - width: 70% - margin: 0 auto + img border-radius: 12% - nav - a - display: block + nav - .social - list-style: none - padding: 0 + a + display: inline-block + padding-left: 20px - .main-content - @media ($tablet) - width: 100% + .social + list-style: none + padding: 0 - width: 75% - padding-right: 16px +.main-content + @media ($tablet) + width: 100% *:target background-color: lighten($highlight-color, 40%) @@ -113,3 +111,7 @@ h2 h3 font-size: 1.3em + +footer + text-align: center + font-size: 0.8em diff --git a/static/sass/style.sass b/static/sass/style.sass index 0f3c073..c3b2139 100644 --- a/static/sass/style.sass +++ b/static/sass/style.sass @@ -5,6 +5,7 @@ @import ./grid @import ./layout @import ./blog +@import ./home @import ./portfolio @import ./table @import ./syntax diff --git a/templates/_base.html b/templates/_base.html index f0da775..0a410e2 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -15,54 +15,27 @@ {% block endhead %}{% endblock %} -
-
- {% block main_content %}asd{% endblock %} -
+
+
+ +

Felipe Martín

- -
-
- -
-
-
- {% block endbody %}{% endblock %} +
+
+ {% block main_content %}asd{% endblock %} +
+
+
+ Site created using Lektor. Source code available in Github +
+ {% block endbody %}{% endblock %} diff --git a/templates/blog-list.html b/templates/blog-list.html index 48404d5..e205eff 100644 --- a/templates/blog-list.html +++ b/templates/blog-list.html @@ -7,7 +7,7 @@ {{ render_blog_post(child, from_index=true) }} {% endfor %} -
{{ render_pagination(this.pagination) }}
+
{{ render_pagination(this.pagination) }}
{% endblock %} {% block endbody %} diff --git a/templates/blog-post.html b/templates/blog-post.html index 8a23acc..cb7afb5 100644 --- a/templates/blog-post.html +++ b/templates/blog-post.html @@ -7,7 +7,7 @@ {% block main_content %} {{ render_blog_post(this) }} -
+
If you want to approach me directly about this post use the most appropriate channel from the about page.
diff --git a/templates/home.html b/templates/home.html index 76c7487..e0a431e 100644 --- a/templates/home.html +++ b/templates/home.html @@ -6,11 +6,11 @@ {% block main_content %}

Latest blog posts

{% for post in site.get('/blog').pagination.for_page(1).pagination.items %} -
+

{{ post.title }}

-
{{ post.pub_date.strftime("%B %d, %Y") }}
+
{{ post.pub_date.strftime("%B %d, %Y") }}
-
+ {% if not loop.last %}
{% endif %} {% endfor %} {{ this.body }} {% endblock %} diff --git a/templates/macros/blog.html b/templates/macros/blog.html index 7ab5384..643f88a 100644 --- a/templates/macros/blog.html +++ b/templates/macros/blog.html @@ -1,6 +1,6 @@ {% macro render_blog_post(post, from_index=false, include_content=true) %} {% set summary = post.body.html.split('') %} -
+

{{ post.title }}

Published on {{ post.pub_date.strftime("%B %d, %Y") }} diff --git a/templates/page.html b/templates/page.html index 93d6405..eefcfec 100644 --- a/templates/page.html +++ b/templates/page.html @@ -6,7 +6,7 @@ {% block main_content %}

{{ this.title }}

-
+
{{ this.body }}
{% endblock %}