Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented axe accessibility changes for about + blog #2169

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 56 additions & 56 deletions _layouts/about.liquid
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: default
---
<div class="post">
<header class="post-header">
<body>
<div class="post">
<h1 class="post-title">
{% if site.title == 'blank' %}
<span class="font-weight-bold">{{ site.first_name }}</span> {{ site.middle_name }}
Expand All @@ -12,65 +12,65 @@ layout: default
{% endif %}
</h1>
<p class="desc">{{ page.subtitle }}</p>
</header>

<article>
{% if page.profile %}
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
{% if page.profile.image %}
{% assign profile_image_path = page.profile.image | prepend: 'assets/img/' %}
{% if page.profile.image_circular %}
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
{% else %}
{% assign profile_image_class = 'img-fluid z-depth-1
rounded' %}
<article>
{% if page.profile %}
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
{% if page.profile.image %}
{% assign profile_image_path = page.profile.image | prepend: 'assets/img/' %}
{% if page.profile.image_circular %}
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
{% else %}
{% assign profile_image_class = 'img-fluid z-depth-1
rounded' %}
{% endif %}
{% capture sizes %}(min-width: {{site.max_width}}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px)
30vw, 95vw"{% endcapture %}
{%
include figure.liquid path = profile_image_path class = profile_image_class sizes = sizes alt = page.profile.image
cache_bust = true
%}
{% endif %}
{% capture sizes %}(min-width: {{site.max_width}}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px)
30vw, 95vw"{% endcapture %}
{%
include figure.liquid path = profile_image_path class = profile_image_class sizes = sizes alt = page.profile.image
cache_bust = true
%}
{% endif %}
{% if page.profile.more_info %}
<div class="more-info">{{ page.profile.more_info }}</div>
{% endif %}
</div>
{% endif %}
{% if page.profile.more_info %}
<div class="more-info">{{ page.profile.more_info }}</div>
{% endif %}
</div>
{% endif %}

<div class="clearfix">{{ content }}</div>
<div class="clearfix">{{ content }}</div>

<!-- News -->
{% if page.news and site.announcements.enabled %}
<h2>
<a href="{{ '/news/' | relative_url }}" style="color: inherit">news</a>
</h2>
{% include news.liquid limit=true %}
{% endif %}
<!-- News -->
{% if page.news and site.announcements.enabled %}
<h2>
<a href="{{ '/news/' | relative_url }}" style="color: inherit">news</a>
</h2>
{% include news.liquid limit=true %}
{% endif %}

<!-- Latest posts -->
{% if page.latest_posts %}
<h2>
<a href="{{ '/blog/' | relative_url }}" style="color: inherit">latest posts</a>
</h2>
{% include latest_posts.liquid %}
{% endif %}
<!-- Latest posts -->
{% if page.latest_posts %}
<h2>
<a href="{{ '/blog/' | relative_url }}" style="color: inherit">latest posts</a>
</h2>
{% include latest_posts.liquid %}
{% endif %}

<!-- Selected papers -->
{% if page.selected_papers %}
<h2>
<a href="{{ '/publications/' | relative_url }}" style="color: inherit">selected publications</a>
</h2>
{% include selected_papers.liquid %}
{% endif %}
<!-- Selected papers -->
{% if page.selected_papers %}
<h2>
<a href="{{ '/publications/' | relative_url }}" style="color: inherit">selected publications</a>
</h2>
{% include selected_papers.liquid %}
{% endif %}

<!-- Social -->
{% if page.social %}
<div class="social">
<div class="contact-icons">{% include social.liquid %}</div>
<!-- Social -->
{% if page.social %}
<div class="social">
<div class="contact-icons">{% include social.liquid %}</div>

<div class="contact-note">{{ site.contact_note }}</div>
</div>
{% endif %}
</article>
</div>
<div class="contact-note">{{ site.contact_note }}</div>
</div>
{% endif %}
</article>
</div>
</body>
44 changes: 22 additions & 22 deletions _pages/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ pagination:
{% if site.display_tags or site.display_categories %}

<div class="tag-category-list">
<ul class="p-0 m-0">
<ul class="list-unstyled">
{% for tag in site.display_tags %}
<li>
<i class="fa-solid fa-hashtag fa-sm"></i> <a href="{{ tag | slugify | prepend: '/blog/tag/' | relative_url }}">{{ tag }}</a>
</li>
{% unless forloop.last %}
<p>&bull;</p>
<li>&bull;</li>
{% endunless %}
{% endfor %}
{% if site.display_categories.size > 0 and site.display_tags.size > 0 %}
<p>&bull;</p>
<li>&bull;</li>
{% endif %}
{% for category in site.display_categories %}
<li>
<i class="fa-solid fa-tag fa-sm"></i> <a href="{{ category | slugify | prepend: '/blog/category/' | relative_url }}">{{ category }}</a>
</li>
{% unless forloop.last %}
<p>&bull;</p>
<li>&bull;</li>
{% endunless %}
{% endfor %}
</ul>
Expand All @@ -60,21 +60,21 @@ pagination:
{% if featured_posts.size > 0 %}
<br>

<div class="container featured-posts">
{% assign is_even = featured_posts.size | modulo: 2 %}
<div class="row row-cols-{% if featured_posts.size <= 2 or is_even == 0 %}2{% else %}3{% endif %}">
{% for post in featured_posts %}
<div class="card-item col">
<a href="{{ post.url | relative_url }}">
<div class="card hoverable">
<div class="row g-0">
<div class="col-md-12">
<div class="card-body">
<div class="float-right">
<i class="fa-solid fa-thumbtack fa-xs"></i>
</div>
<h3 class="card-title text-lowercase">{{ post.title }}</h3>
<p class="card-text">{{ post.description }}</p>
<div class="container featured-posts">
{% assign is_even = featured_posts.size | modulo: 2 %}
<div class="row row-cols-{% if featured_posts.size <= 2 or is_even == 0 %}2{% else %}3{% endif %}">
{% for post in featured_posts %}
<div class="card-item col">
<a href="{{ post.url | relative_url }}" aria-label="Read more about {{ post.title }}">
<div class="card hoverable">
<div class="row g-0">
<div class="col-md-12">
<div class="card-body">
<div class="float-right">
<i class="fa-solid fa-thumbtack fa-xs"></i>
</div>
<h3 class="card-title text-lowercase">{{ post.title }}</h3>
<p class="card-text">{{ post.description }}</p>

{% if post.external_source == blank %}
{% assign read_time = post.content | number_of_words | divided_by: 180 | plus: 1 %}
Expand Down Expand Up @@ -129,14 +129,14 @@ pagination:
{% endif %}
<h3>
{% if post.redirect == blank %}
<a class="post-title" href="{{ post.url | relative_url }}">{{ post.title }}</a>
<a class="post-title" href="{{ post.url | relative_url }}" aria-label="Read more about {{ post.title }}">{{ post.title }}</a>
{% elsif post.redirect contains '://' %}
<a class="post-title" href="{{ post.redirect }}" target="_blank">{{ post.title }}</a>
<a class="post-title" href="{{ post.redirect }}" target="_blank" aria-label="Read more about {{ post.title }}">{{ post.title }} </a>
<svg width="2rem" height="2rem" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
<path d="M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9" class="icon_svg-stroke" stroke="#999" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
{% else %}
<a class="post-title" href="{{ post.redirect | relative_url }}">{{ post.title }}</a>
<a class="post-title" href="{{ post.redirect | relative_url }}" aria-label="Read more about {{ post.title }}">{{ post.title }} </a>
{% endif %}
</h3>
<p>{{ post.description }}</p>
Expand Down
10 changes: 5 additions & 5 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ footer.fixed-bottom {
color: var(--global-footer-text-color);
padding-top: 9px;
padding-bottom: 8px;
text-align: center;
}

a {
Expand All @@ -444,10 +443,6 @@ footer.sticky-bottom {
padding-top: 40px;
padding-bottom: 40px;
font-size: 0.9rem;

.container {
text-align: center;
}
}

// CV
Expand Down Expand Up @@ -584,6 +579,11 @@ footer.sticky-bottom {
}
}

.page-item.disabled .page-link {
color: black !important;
/* other styles... */
}

// Distill

.distill {
Expand Down
2 changes: 1 addition & 1 deletion _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $pink-color: #f92080 !default;
$pink-color-light: #ffdddd !default;
$yellow-color: #efcc00 !default;

$grey-color: #828282 !default;
$grey-color: #595959 !default;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: #1c1c1d;
$grey-900: #212529;
Expand Down