Skip to content

Commit f296de8

Browse files
Feat/evaluate website improvements (#286)
* Adjust layout order and show teasers * Hide post excerpt on detail pages * style: lighten breadcrumb colors * Display title in hero when overlay enabled * style: define custom color palette * docs: rewrite README --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b518605 commit f296de8

File tree

12 files changed

+93
-88
lines changed

12 files changed

+93
-88
lines changed

README.md

Lines changed: 31 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,62 @@
1-
# [Minimal Mistakes Jekyll theme](https://mmistakes.github.io/minimal-mistakes/)
1+
# Personal Blog on Minimal Mistakes
22

3-
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/DiogoRibeiro7/DiogoRibeiro7.github.io/master/LICENSE)
3+
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
44
[![Hosted with GH Pages](https://img.shields.io/badge/Hosted_with-GitHub_Pages-blue?logo=github&logoColor=white)](https://pages.github.com/)
55
[![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions)
66

7-
[![Jekyll](https://img.shields.io/badge/jekyll-%3E%3D%204.3-blue.svg)](https://jekyllrb.com/)
7+
This repository contains the source code for my website built with the
8+
[Minimal Mistakes](https://mmistakes.github.io/minimal-mistakes/) Jekyll theme.
9+
It also includes a few helper scripts to clean up Markdown front matter and
10+
run tests.
811

9-
[![Ruby Version](https://img.shields.io/badge/ruby-3.1-blue)](https://www.ruby-lang.org)
10-
[![Ruby gem](https://img.shields.io/gem/v/minimal-mistakes-jekyll.svg)](https://rubygems.org/gems/minimal-mistakes-jekyll)
12+
## Requirements
1113

12-
13-
Minimal Mistakes is a flexible two-column Jekyll theme, perfect for building personal sites, blogs, and portfolios. As the name implies, styling is purposely minimalistic to be enhanced and customized by you :smile:.
14-
15-
## Setup
16-
17-
This repository contains a few helper scripts for processing Markdown posts.
18-
Install the Python dependencies listed in `requirements.txt` with:
14+
The site relies on Ruby, Node and Python tooling. Install dependencies with:
1915

2016
```bash
17+
# Python packages for helper scripts and tests
2118
pip install -r requirements.txt
22-
```
2319

24-
To work with the JavaScript that powers the theme you'll also need Node
25-
dependencies. Install them with:
26-
27-
```bash
20+
# JavaScript dependencies
2821
npm install
29-
```
30-
31-
This project uses **npm** for managing JavaScript dependencies and tracks
32-
exact versions in `package-lock.json`.
33-
34-
Bundled JavaScript is compiled from the source files in `assets/js/`. Run the
35-
following to create `main.min.js` (minified with a banner) or watch for changes:
36-
37-
```bash
38-
npm run build:js # minify and add banner
39-
npm run watch:js # optional: automatically rebuild on changes
40-
```
41-
42-
## CSS linting
43-
44-
Lint all SCSS files with [Stylelint](https://stylelint.io/):
4522

46-
```bash
47-
npm run lint:css
23+
# Ruby gems for Jekyll
24+
bundle install
4825
```
4926

50-
## Local development
27+
## Development
5128

52-
Install Ruby gems specified in the `Gemfile` with:
29+
Use the following commands while working on the site:
5330

5431
```bash
55-
bundle install
56-
```
32+
# start a local server at http://localhost:4000/
33+
bundle exec jekyll serve
5734

58-
Serve the site locally with:
35+
# rebuild JavaScript when files change
36+
npm run watch:js
5937

60-
```bash
61-
bundle exec jekyll serve
38+
# lint stylesheets
39+
npm run lint:css
6240
```
6341

42+
## Tests
6443

65-
## Running tests
66-
67-
Install the Python dependencies and execute:
44+
Front matter utilities are covered by a small `pytest` suite. Run the tests with:
6845

6946
```bash
7047
pytest
7148
```
72-
GitHub Actions already runs these commands automatically during deployments.
73-
74-
# ToDo
75-
76-
~~Have a consistency in the font and font sizes (ideally you want to use 2 fonts. One for the header/subtitle and one for the text. You can use this kind of website https://fontjoy.com/ which allow you to pair fonts).~~
77-
78-
Choose a few main colours for your site (I would suggest black/white/grey but not in solid. You can also use this kind of site: https://coolors.co/palettes/popular/2a4849).
7949

80-
~~Reduce then size of the homepage top image (ideally you want your first articles to be visible on load and not hidden below the fold).~~
50+
GitHub Actions executes the same tests on every push.
8151

82-
~~Restyle your links (ideally the link should be back with no underline and you add a css style on hover)~~
52+
## Roadmap
8353

84-
~~Center pagination~~
54+
Planned improvements are organised as sprints in [ROADMAP.md](ROADMAP.md).
55+
Highlights include:
8556

86-
~~Restyle your article detail page breadcrumbs. You want them to be less visible (I would suggest a light grey colour here)~~
57+
- refining typography and the colour palette
58+
- restructuring the homepage with card‑style articles
59+
- adding search and dark mode
60+
- optimising performance and accessibility
8761

88-
Right now at the top of the detail page, you have your site breadcrumbs, a title then another title and the font sizes are a bit off and it is hard to understand the role of the second title. I would reorganise this to provide a better understanding to the reader
89-
On the detail page, I would suggest you put the `You may also enjoy` straight at the end of the article. Right now it is after comments and you can lose engagement on your site.
90-
I would suggest you remove your description from the detail page. I think having it on the home page is enough. You can have a smaller introduction if needed with a read more button or link that will take the reader to a full page description of yourself and your skillset. That will allow you to tell more about yourself and why you do what you do
91-
I will create card article with a hover animation (add some shape and background colour and ideally a header image for the card. The graphs you show me last week for example.)
62+
Contributions are welcome!

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ facebook:
8686
username :
8787
app_id :
8888
publisher :
89-
og_image : # Open Graph/Twitter default site image
89+
og_image : /assets/images/data-science.png
9090
# For specifying social profiles
9191
# - https://developers.google.com/structured-data/customize/social-profiles
9292
social:

_includes/archive-single.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
{% endif %}
1212

1313
<div class="{{ include.type | default: 'list' }}__item">
14-
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
15-
{% if include.type == "grid" and teaser %}
16-
<div class="archive__item-teaser">
17-
<a href="{{ post.url | relative_url }}"><img src="{{ teaser | relative_url }}" alt="{{ post.title }}"></a>
18-
</div>
19-
{% endif %}
14+
<article class="archive__item card" itemscope itemtype="https://schema.org/CreativeWork">
15+
{% if teaser %}
16+
<div class="archive__item-teaser">
17+
<a href="{{ post.url | relative_url }}"><img src="{{ teaser | relative_url }}" alt="{{ post.title }}"></a>
18+
</div>
19+
{% endif %}
2020
<h2 class="archive__item-title no_toc" itemprop="headline">
2121
{% if post.link %}
2222
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- Google Fonts -->
2121
<link rel="preconnect" href="https://fonts.googleapis.com">
2222
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
23-
<link href="https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
23+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Nunito+Sans:wght@400;700&display=swap" rel="stylesheet">
2424

2525
{% if site.head_scripts %}
2626
{% for script in site.head_scripts %}

_includes/page__hero.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
>
2424
{% if page.header.overlay_color or page.header.overlay_image %}
2525
<div class="wrapper">
26-
<!-- <h1 id="page-title" class="page__title" itemprop="headline">
26+
<h1 id="page-title" class="page__title" itemprop="headline">
2727
{% if paginator and site.paginate_show_page_num %}
2828
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
2929
{% else %}
3030
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
3131
{% endif %}
32-
</h1> -->
32+
</h1>
3333
{% if page.tagline %}
3434
<p class="page__lead">{{ page.tagline | markdownify | remove: "<p>" | remove: "</p>" }}</p>
35-
{% elsif page.header.show_overlay_excerpt != false and page.excerpt %}
35+
{% elsif page.header.show_overlay_excerpt != false and page.excerpt and page.collection != 'posts' %}
3636
<p class="page__lead">{{ page.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p>
3737
{% endif %}
3838
{% include page__meta.html %}

_layouts/single.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
{% include sidebar.html %}
2323

2424
<article class="page h-entry" itemscope itemtype="https://schema.org/CreativeWork">
25+
{% unless page.header.overlay_color or page.header.overlay_image %}
2526
{% if page.title %}<h1 id="page-title" class="page__title p-name" itemprop="headline">
2627
<a href="{{ page.url | absolute_url }}" class="u-url" itemprop="url">{{ page.title | markdownify | remove: "
2728
<p>" | remove: "</p>" }}</a>
2829
</h1>{% endif %}
30+
{% endunless %}
2931
{% if page.subtitle %}<h2 class="page__subtitle">{{ page.subtitle }}</h2>{% endif %}
3032

3133
{% if page.excerpt %}
@@ -108,4 +110,4 @@ <h2 class="page__related-title">{{ site.data.ui-text[site.locale].related_label
108110
{% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
109111
{% include comments.html %}
110112
{% endif %}
111-
</div>
113+
</div>

_sass/minimal-mistakes/_navigation.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
animation: $intro-transition;
1818
-webkit-animation-delay: 0.3s;
1919
animation-delay: 0.3s;
20+
color: $muted-text-color;
21+
22+
a {
23+
color: inherit;
24+
text-decoration: none;
25+
26+
&:hover {
27+
color: $text-color;
28+
}
29+
}
2030

2131
@include breakpoint($x-large) {
2232
max-width: $x-large;
@@ -43,6 +53,7 @@
4353

4454
.current {
4555
font-weight: bold;
56+
color: $text-color;
4657
}
4758
}
4859

_sass/minimal-mistakes/_variables.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ $calisto: "Calisto MT", serif !default;
3232
$garamond: Garamond, serif !default;
3333

3434
// Setting the fonts
35-
$global-font-family: "Roboto", Helvetica, Arial, sans-serif;
36-
$header-font-family: "Lora", "Times New Roman", serif;
35+
$global-font-family: 'Inter', system-ui, sans-serif;
36+
$header-font-family: 'Nunito Sans', system-ui, sans-serif;
3737
$caption-font-family: "Cardo, serif";
3838

3939
/* type scale */
@@ -73,7 +73,13 @@ $border-color: $lighter-gray !default;
7373
$form-background-color: $lighter-gray !default;
7474
$footer-background-color: $lighter-gray !default;
7575

76-
$primary-color: #6f777d !default;
76+
$color-primary: #2a4849 !default;
77+
$color-secondary: #6c757d !default;
78+
$color-background: #f7f9fa !default;
79+
$color-surface: #ffffff !default;
80+
$color-accent: #ffca00 !default;
81+
82+
$primary-color: $color-primary !default;
7783
$success-color: #3fa63f !default;
7884
$warning-color: #d67f05 !default;
7985
$danger-color: #ee5f5b !default;

_sass/minimal-mistakes/skins/_air.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
========================================================================== */
44

55
/* Colors */
6-
$background-color: #eeeeee !default;
7-
$text-color: #222831 !default;
8-
$muted-text-color: #393e46 !default;
9-
$primary-color: #0092ca !default;
10-
$border-color: mix(#fff, #393e46, 75%) !default;
6+
$background-color: $color-background !default;
7+
$text-color: #2a2a2a !default;
8+
$muted-text-color: $color-secondary !default;
9+
$primary-color: $color-primary !default;
10+
$accent-color: $color-accent !default;
11+
$border-color: mix(#fff, $text-color, 85%) !default;
1112
$footer-background-color: $primary-color !default;
12-
$link-color: #393e46 !default;
13+
$link-color: $primary-color !default;
1314
$masthead-link-color: $text-color !default;
1415
$masthead-link-color-hover: $text-color !default;
1516
$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default;

assets/css/main.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,16 @@ a:hover {
134134
max-height: 40vh;
135135
object-fit: cover;
136136
}
137+
138+
/* Card styles for archive items */
139+
.archive__item.card {
140+
background: $background-color;
141+
border-radius: $border-radius;
142+
padding: 1em;
143+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
144+
transition: transform 0.2s, box-shadow 0.2s;
145+
}
146+
.archive__item.card:hover {
147+
transform: translateY(-4px);
148+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
149+
}

0 commit comments

Comments
 (0)