Skip to content

Commit

Permalink
Merge pull request #48 from oAGoulart/updates
Browse files Browse the repository at this point in the history
Fix layouts and main bg-color
  • Loading branch information
oAGoulart authored May 27, 2020
2 parents 9024e20 + a17f4d5 commit b03aea6
Show file tree
Hide file tree
Showing 21 changed files with 135 additions and 71 deletions.
8 changes: 0 additions & 8 deletions 404.html

This file was deleted.

5 changes: 5 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: error
title: 404
message: This page could not be found!
---
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.2.4] - 2020-05-27

### Fixed

- Layouts not available when using as Jekyll theme
- Background color of `main`

## [0.2.2] - 2020-05-27

### Added
Expand Down Expand Up @@ -32,6 +39,7 @@ All notable changes to this project will be documented in this file.
- Unnecessary files from Jekyll build/serve


[unreleased]: https://github.com/oAGoulart/vitrina/compare/v0.2.2...HEAD
[unreleased]: https://github.com/oAGoulart/vitrina/compare/v0.2.4...HEAD
[0.2.4]: https://github.com/oAGoulart/vitrina/releases/tag/v0.2.4
[0.2.2]: https://github.com/oAGoulart/vitrina/releases/tag/v0.2.2
[0.2.0]: https://github.com/oAGoulart/vitrina/releases/tag/v0.2.0
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ This theme may be exactly what you need or exactly what you're trying to avoid.

## About the layout

There are some layouts at `_layouts` which can be used to create an entire page by just making a markdown page, those include:

+ blog (this one uses pagination, ext. must be `.html`)
+ contact
+ error
+ home
+ papers
+ post
+ projects
+ resume

```md
---
layout: contact
title: Contact
---
```

The layout is made by many elements, all elements have global attributes, while some have specific ones.

Any element **CAN** have the following global attributes:
Expand Down
53 changes: 53 additions & 0 deletions _layouts/blog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
layout: default
---

{{ content }}

<div class="page-head">
<h1 class="title is-size-1 has-text-centered has-text-info">{{ page.title }}</h1>
</div>

<div class="section blog">
<div class="container page">
{% if paginator.posts[0] %}
{% for post in paginator.posts %}
<h1>
<a class="title" href="{{ post.url | relative_url }}">{{ post.title }}</a>
</h1>

<p class="author">
{% if post.author %}
<span>by {{ post.author }}</span>
{% endif %}

{% if post.author and post.date %}
<span> - </span>
{% endif %}

{% if post.date %}
<span>{{ post.date | date: '%B %d, %Y' }}</span>
{% endif %}
</p>

<p class="categories">
{% for category in post.categories %}
<span>{{ category }}</span>
{% endfor %}
</p>

<div class="post-body">{{ post.excerpt }}</div><hr>

{% endfor %}

{% else %}
<div class="post-body">
<p class="has-text-centered">There's no content to be shown here!</p>
</div>

{% endif %}

{% include pagination.html %}

</div> {% comment %} container {% endcomment %}
</div> {% comment %} section {% endcomment %}
3 changes: 2 additions & 1 deletion contact.html → _layouts/contact.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: default
title: Contact
---

{{ content }}

<div class="contacts">
<h1 class="title is-size-1 has-text-centered has-text-primary">{{ page.title }}</h1>
<div class="section section-card">
Expand Down
10 changes: 10 additions & 0 deletions _layouts/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: default
---

{{ content }}

<div class="error">
<h1 class="title is-size-1 has-text-centered has-text-primary">{{ page.title }}</h1>
<h2 class="subtitle has-text-centered has-text-primary">{{ page.message }}</h2>
</div>
6 changes: 6 additions & 0 deletions _includes/home.html → _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
layout: default
---

{{ content }}

{% assign data = site.data.home %}

{% for part in data %}
Expand Down
3 changes: 2 additions & 1 deletion papers.html → _layouts/papers.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: default
title: Papers
---

{{ content }}

<div class="page-head">
<h1 class="title is-size-1 has-text-centered has-text-info">{{ page.title }}</h1>
</div>
Expand Down
3 changes: 2 additions & 1 deletion projects.html → _layouts/projects.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: default
title: Projects
---

{{ content }}

{% assign per_column = 3 %}

<div class="projects">
Expand Down
3 changes: 2 additions & 1 deletion resume.html → _layouts/resume.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: default
title: Resume
---

{{ content }}

<div class="resume">
<h1 class="title is-size-1 has-text-centered has-text-primary">{{ page.title }}</h1>
<div class="section section-card">
Expand Down
5 changes: 4 additions & 1 deletion _sass/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ hr {
}

main {
background-color: $grey-lighter;
min-height: 100vh;

.contacts,
Expand Down Expand Up @@ -103,6 +102,10 @@ main {
& > .section:nth-child(even) {
background-color: $white;
}

& > .section:nth-child(odd) {
background-color: $grey-lighter;
}
}

ul:not(.task-list) {
Expand Down
50 changes: 1 addition & 49 deletions blog/index.html
Original file line number Diff line number Diff line change
@@ -1,52 +1,4 @@
---
layout: default
layout: blog
title: Blog
---

<div class="page-head">
<h1 class="title is-size-1 has-text-centered has-text-info">{{ page.title }}</h1>
</div>

<div class="section blog">
<div class="container page">
{% if paginator.posts[0] %}
{% for post in paginator.posts %}
<h1>
<a class="title" href="{{ post.url | relative_url }}">{{ post.title }}</a>
</h1>

<p class="author">
{% if post.author %}
<span>by {{ post.author }}</span>
{% endif %}

{% if post.author and post.date %}
<span> - </span>
{% endif %}

{% if post.date %}
<span>{{ post.date | date: '%B %d, %Y' }}</span>
{% endif %}
</p>

<p class="categories">
{% for category in post.categories %}
<span>{{ category }}</span>
{% endfor %}
</p>

<div class="post-body">{{ post.excerpt }}</div><hr>

{% endfor %}

{% else %}
<div class="post-body">
<p class="has-text-centered">There's no content to be shown here!</p>
</div>

{% endif %}

{% include pagination.html %}

</div> {% comment %} container {% endcomment %}
</div> {% comment %} section {% endcomment %}
4 changes: 4 additions & 0 deletions contact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: contact
title: Contact
---
6 changes: 0 additions & 6 deletions index.html

This file was deleted.

3 changes: 3 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
layout: home
---
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vitrina",
"version": "0.2.2",
"version": "0.2.4",
"description": "A general purpose, configurable, Jekyll theme",
"main": "index.html",
"author": {
Expand Down
4 changes: 4 additions & 0 deletions papers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: papers
title: Papers
---
4 changes: 4 additions & 0 deletions projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: projects
title: Projects
---
4 changes: 4 additions & 0 deletions resume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: resume
title: Resume
---
2 changes: 1 addition & 1 deletion vitrina.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'vitrina'
s.version = '0.2.2'
s.version = '0.2.4'
s.authors = ['Augusto Goulart']
s.email = ['josegoulart.aluno@unipampa.edu.br']

Expand Down

0 comments on commit b03aea6

Please sign in to comment.