Skip to content

Commit

Permalink
Merge pull request #4 from OlenaYefymenko/1-about-me
Browse files Browse the repository at this point in the history
Change default blog's structure and design, add first post
  • Loading branch information
OlenaYefymenko committed Sep 9, 2023
2 parents 07d218a + d9f4778 commit 958e985
Show file tree
Hide file tree
Showing 17 changed files with 171 additions and 66 deletions.
48 changes: 35 additions & 13 deletions assets/static/style.css
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
:root {
--custom-white: #fcfcfc;
--custom-black: #010101;
--custom-shadow-overlay: 0 1px 8px 1px rgba(0, 0, 0, 0.25);
}

body {
font-family: 'Verdana', sans-serif;
margin: 50px 25px;
font-family: 'Nunito Sans', sans-serif;
color: white;
background-color: #3183A3;
margin: 0;
font-weight: 300;
font-size: 1.5rem;
transition: all .4s ease-in-out;
overflow-x: hidden;
}

a {
color: #2a99b6;
color: white;
}

a:hover {
color: #33bbdf;
color: #e2edf1;
}

header, footer, div.page {
width: 760px;
header,
footer,
div.page {
width: 800px;
margin: 0 auto;
background: #daeef3;
padding: 20px 30px;
background: #2a6f8d;
padding: 20px 40px;
}

header h1 {
color: #169bbd;
margin: 0;
font-weight: normal;
font-size: 42px;
font-weight: 400;
font-size: 44px;
}

header nav ul {
Expand All @@ -33,10 +46,19 @@ header nav ul {

header nav ul li {
display: inline;
margin: 0 8px 0 0;
margin: 0 10px 0 0;
padding: 0;
}

div.page {
background: #f1fbfe;
background: #2a6f8d;
}

html {
font-size: 63%;
}

::selection {
background-color: #2a6f8d;
color: white;
}
12 changes: 11 additions & 1 deletion blog.lektorproject
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
[project]
name = OlenaYefymenko/blog
name = OLENA YEFYMENKO
locale = en_US

url = https://blog.yefymenko.pp.ua/

[packages]
lektor-markdown-highlighter = 0.3.2
lektor-atom = 0.4.0
lektor-read-full-post = 0.3
Lektor-Open-Graph = 1b4
lektor-markdown-admonition = 0.3.1
4 changes: 4 additions & 0 deletions configs/atom.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[feed]
name = OLENA YEFYMENKO
source_path = /blog
url_path = /feed.xml
Empty file.
Empty file added configs/read-full-post.ini
Empty file.
23 changes: 20 additions & 3 deletions content/about/contents.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
title: About this Website
_model: page
---
body:

This is a website that was made with the Lektor quickstart.
### Hi there 👋

And it does not contain a lot of information.
My name is Olena Yefymenko. I’m an aspiring Python developer. My first IT experience was obtained in the cloud area during my internship. I learned and implemented many new technologies and tools, including serverless AWS services and IoT core devices. It was not easy, but interesting.

However, learning was always an integral part of my life. I've spent a significant part of my career in data analysis and research. Also, I had familiarity with scientific activity during my studding at university. So, my job expertise contributed the habit to study constantly and search insights.

Like most of us, I store notes in my computer or in the Cloud. However, considering that *learning to public* provides a deeper understanding of the issues we study, I have come up with the idea that sharing my learning process is a good approach to improving knowledge. It's also important that I have a chance to help someone.

Reflecting on various learning areas, I've outlined some objectives for my blog:

- 👁️ Analyze basic software design patterns.
- 🐍 Share insights and best practices in Python development.
- 🌐 Dive deep into Django framework, publish some step of my own project.
- 🛠 Highlight related tools, libraries, and frameworks that supercharge Python and Django development.
- 🌥️ Consider topics of cloud technologies (perhaps, I will prepare for the next AWS certification exam).


*To find out what I'm currently working on, you can take a look at [my GitHub profile](https://github.com/OlenaYefymenko).*

Obviously, I am not expert in these fields, but I strive to self-improvement and have motivation to work a lot. We'll see what happens😉.
4 changes: 3 additions & 1 deletion content/blog/contents.lr
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_model: blog
---
title: Blog
title: TIL
---
_slug: prose
9 changes: 0 additions & 9 deletions content/blog/first-post/contents.lr

This file was deleted.

7 changes: 2 additions & 5 deletions content/contents.lr
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
title: Welcome to OlenaYefymenko/blog!
_model: blog
---
body:

This is a basic demo website that shows how to use Lektor for a basic
website with some pages and a blog.
title: TIL
8 changes: 3 additions & 5 deletions content/projects/contents.lr
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
_model: page
---
title: Projects
---
body:

This is a list of the projects:

* Project 1
* Project 2
* Project 3
[Django Girls Blog](https://github.com/kpi-web-guild/django-girls-blog-OlenaEfymenko)
5 changes: 4 additions & 1 deletion models/blog-post.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[model]
name = Blog Post
label = {{ this.title }}
hidden = yes

[fields.title]
label = Title
Expand All @@ -24,6 +23,10 @@ label = Publication date
type = date
width = 1/4

[fields.excerpt]
label = Excerpt (overrides lektor-read-full-post, if set)
type = markdown

[fields.body]
label = Body
type = markdown
1 change: 1 addition & 0 deletions models/blog.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ order_by = -pub_date, title
[pagination]
enabled = yes
per_page = 10
items = site.query('/blog').filter(F._model == 'blog-post')
13 changes: 8 additions & 5 deletions templates/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
{% from "macros/pagination.html" import render_pagination %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
{% for child in this.pagination.items %}
{{ render_blog_post(child, from_index=true) }}
{% endfor %}
{% for child in this.pagination.items %}
{% set child = plugin_read_full_post(child) %}
{{ render_blog_post(child, from_index=true) }}
{% endfor %}

{{ render_pagination(this.pagination) }}
{% endblock %}
{% if this.pagination.has_prev or this.pagination.has_next %}
{{ render_pagination(this.pagination) }}
{% endif %}
{% endblock %}
60 changes: 44 additions & 16 deletions templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,57 @@
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="{{ '/static/style.css'|url }}">
<title>{% block title %}Welcome{% endblock %} — OlenaYefymenko/blog</title>
<!DOCTYPE html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="supported-color-schemes" content="light dark">

<meta name="author" content="Olena Yefymenko">
<meta name="description" content="{{ config.PROJECT.name }} — personal blog of Olena Yefymenko">
<meta name="robots" content="all">

<meta name="p:domain_verify" content="8ac6cdaefda8d0a20ed08fb5c9fd3352">

<link rel="profile" href="http://gmpg.org/xfn/11">

<link rel="prefetch">
<link rel="dns-prefetch" href="//fonts.googleapis.com">

<link rel="alternate" type="application/rss+xml" title="RSS Feed for {{ config.PROJECT.name }}" href="/feed.xml">
<link rel="stylesheet" href="{{ get_pygments_stylesheet() | url }}">
<link rel="stylesheet" href="{{ '/static/style.css' | url }}">

<!-- Adding Nunito Sans font -->
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap"
rel="stylesheet">

<title>{% block title %}Welcome{% endblock %} — {{ config.PROJECT.name }}</title>

{% if this.datamodel.filename is not none -%}
{# NOTE: Lektor-Open-Graph tracebacks if filename is None #}
{{- open_graph.render_tags(this) | indent(width=2) }}
{% endif -%}
</head>

<body>
<header>
<h1>OlenaYefymenko/blog</h1>
<h1><a href="{{ '/' | url }}">{{ config.PROJECT.name }}</a></h1>
<nav>
<ul class="nav navbar-nav">
<li{% if this._path == '/' %} class="active"{% endif
%}><a href="{{ '/'|url }}">Welcome</a></li>
{% for href, title in [
['/blog', 'Blog'],
<li{% if this._path[:5] in ('/', '/blog' ) %} class="active" {% endif %}><a href="{{ '/' | url }}">TIL</a></li>
{% for href, title in [
['/projects', 'Projects'],
['/about', 'About']
] %}
<li{% if this.is_child_of(href) %} class="active"{% endif
%}><a href="{{ href|url }}">{{ title }}</a></li>
{% endfor %}
['/about', "About Me"]
] %}
<li{% if this.is_child_of(href) %} class="active" {% endif %}><a href="{{ href | url }}">{{ title }}</a></li>
{% endfor %}
</ul>
</nav>
</header>
<div class="page">
{% block body %}{% endblock %}
</div>
<footer>
&copy; Copyright 2023 by Olena.
© 2023 by Olena Yefymenko
</footer>
</body>
</body>
23 changes: 16 additions & 7 deletions templates/macros/blog.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
{% macro render_blog_post(post, from_index=false) %}
<div class="blog-post">
<div class="blog-post">
{% if from_index %}
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
{% else %}
<h2>{{ post.title }}</h2>
<h2>{{ post.title }}</h2>
{% endif %}
<p class="meta">
written by
{% if post.twitter_handle %}
<a href="https://twitter.com/{{ post.twitter_handle
<a href="https://twitter.com/{{ post.twitter_handle
}}">{{ post.author or post.twitter_handle }}</a>
{% else %}
{{ post.author }}
{{ post.author }}
{% endif %}
on {{ post.pub_date }}
</p>
{% if from_index and post.excerpt %}
{# handcrafted excerpt #}
{{ post.excerpt }}
<br><a href="{{ post | url }}">Read Full Post</a>
{% elif from_index and post.body_short %}
{# lektor-read-full-post plugin #}
{{ post.body_short }}
{% else %}
{{ post.body }}
</div>
{% endmacro %}
{% endif %}
</div>
{% endmacro %}
13 changes: 13 additions & 0 deletions templates/sitemap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "layout.html" %}
{% block title %}Sitemap{% endblock %}
{% block body %}
<ul class="sitemap">
{% for page in [site.root] if page.record_label recursive %}
<li><a href="{{ page|url }}">{{ page.record_label }}</a>
{% if page.children %}
<ul>{{ loop(page.children|sort(attribute='path')) }}</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}
7 changes: 7 additions & 0 deletions templates/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in [site.root] if page != this recursive %}
<url><loc>{{ page|url(external=true) }}</loc></url>
{{- loop(page.children|sort(attribute='path')) }}
{%- endfor %}
</urlset>

0 comments on commit 958e985

Please sign in to comment.