Skip to content

Commit

Permalink
fixes and refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
leoadec committed Nov 25, 2023
1 parent 2eddbb3 commit 55d3538
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 23 deletions.
6 changes: 5 additions & 1 deletion _config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
collections:
pages:
output: true
exclude:
- CNAME
- Gemfile
- Gemfile.lock
- Rakefile
- README.md
title: Leonardo Andreta de Castro
theme: minimal-mistakes-jekyll
3 changes: 2 additions & 1 deletion _data/about.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
full_name: Leonardo Andreta de Castro
name: Leonardo Andreta de Castro
tagline: Quantum physicist and software developer
19 changes: 19 additions & 0 deletions _layouts/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: single
---
<address>
{% for data in site.data.contact %}
{{ data.type }}: <a href="{{data.external_url}}" target="_blank">{{data.title}}</a>
{% endfor %}
</address>

<address class="links">
{% for data in site.data.links %}
<a href="{{data.external_url}}" target="_blank">{{data.title}}</a>
{%- unless forloop.last %} | {% endunless -%}
{% endfor %}
</address>

<p id="summary">
{%- include summary.html -%}
</p>
48 changes: 46 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,47 @@
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"></noscript>

<title>{{ site.title }}{% if page.title %} - {{ page.title }}{% endif %}</title>
<title>{{ site.data.about.name }}{% if page.title %} - {{ page.title }}{% endif %}</title>

{% include head/custom.html %}
</head>

<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
{% include_cached masthead.html %}

{% capture logo_path %}{{ site.data.about.logo }}{% endcapture %}

<div class="masthead">
<div class="masthead__inner-wrap">
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
{% unless logo_path == empty %}
<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt="{{ site.data.about.name }}"></a>
{% endunless %}
<a class="site-title" href="{{ '/' | relative_url }}">
{{ site.data.about.name }}
{% if site.data.about.tagline %}<span class="site-subtitle">{{ site.data.about.tagline }}</span>{% endif %}
</a>
<ul class="visible-links">
{%- for page in site.pages -%}
<li class="masthead__menu-item">
<a href="{{ page.permalink | relative_url }}"{% if page.description %} title="{{ page.description }}"{% endif %}>{{ page.title }}</a>
</li>
{%- endfor -%}
</ul>
{% if site.search == true %}
<button class="search__toggle" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].search_label | default: "Toggle search" }}</span>
<i class="fas fa-search"></i>
</button>
{% endif %}
<button class="greedy-nav__toggle hidden" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle menu" }}</span>
</button>
<ul class="hidden-links hidden"></ul>
</nav>
</div>
</div>
</div>

<div class="initial-content">
{{ content }}
Expand All @@ -38,6 +72,16 @@

<script src="{{ 'assets/js/resize.js' | relative_url }}"></script>

<script>
const authors = document.getElementsByClassName("authors");
const name = "{{ site.data.about.name }}"

for (var i = 0; i < authors.length; i++) {
var originalText = authors[i].innerHTML;
authors[i].innerHTML = originalText.replace(name, name.bold());
}
</script>

</body>
</html>

3 changes: 2 additions & 1 deletion cv.md → _pages/cv.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
layout: cv
title: CV
lang: en
locale: en
permalink: cv
jobs:
- start: 2023
title: Staff Software Engineer, Quantum Product
Expand Down
19 changes: 1 addition & 18 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
---
layout: single
layout: about
---
<address>
{% for data in site.data.contact %}
{{ data.type }}: <a href="{{data.external_url}}" target="_blank">{{data.title}}</a>
{% endfor %}
</address>

<address class="links">
{% for data in site.data.links %}
<a href="{{data.external_url}}" target="_blank">{{data.title}}</a>
{%- unless forloop.last %} | {% endunless -%}
{% endfor %}
</address>

<p id="summary">
{%- include summary.html -%}
</p>

0 comments on commit 55d3538

Please sign in to comment.