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

Link hover style #152

Merged
merged 11 commits into from
Apr 7, 2022
2 changes: 1 addition & 1 deletion sass/_component_footer.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
footer {
a {
border: none;
text-decoration: none;
}
}
2 changes: 1 addition & 1 deletion sass/_component_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ header {
.navbar-brand {
display: flex;
padding: 0;
border: none;
text-decoration: none;
margin-right: 0;
font-size: $h3-font-size;
line-height: 1.2;
Expand Down
25 changes: 14 additions & 11 deletions sass/_component_link.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
a {
border-bottom: 2px solid;
color: $link-color;
border-color: $link-border-color;
color: $link-color;
text-decoration: 2px solid underline;
text-decoration-color: $link-border-color;
text-underline-offset: 3px;

&:hover {
color: $link-hover-color;
border-color: $link-border-hover-color;
text-decoration: none;
}
&:focus,
&:hover {
color: $link-hover-color;
// This is necessary because of some weird `hover` mixin in bootstrap.
text-decoration: 2px solid underline;
}

&:visited {
color: $link-hover-color;
}
&:active {
color: $link-active-color;
text-decoration: 2px solid underline;
}
}
3 changes: 1 addition & 2 deletions sass/_component_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
display: inline-block;
line-height: 1.25;
padding: ($spacer / 4) 0;
text-decoration: none;
}

li {
margin: $size-1 0;
}

li:not(.toctree-l1) a {
border: none;
text-decoration: none;
}

ul {
Expand Down
10 changes: 8 additions & 2 deletions sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ $gray-800: #313131;
$gray-900: #212121;
$black: #000000;

$teal: #007d7e;
$indigo: #251657;
$bright-green: #3beccd;
$bright-green-700: darken($bright-green, 15%);
$bright-green-900: darken($bright-green, 30%);

$primary: $indigo;
$success: #a456c9;
Expand All @@ -25,11 +28,14 @@ $search: #ffe69c;


$link-color: $primary;
$link-hover-color: darken($link-color, 15%);
$link-border-color: $bright-green;
$link-border-hover-color: darken($bright-green, 15%);
$link-hover-color: $bright-green-700;
$link-active-color: $bright-green-900;
$link-border-active-color: $bright-green-900;

$link-alternate-color: #ffffff;
$link-alternate-hover-color: darken($link-alternate-color, 15%);

$table-bg: $white;

$yiq-contrasted-threshold: 160;
Expand Down
4 changes: 2 additions & 2 deletions sphinx_wagtail_theme/pager.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<nav aria-label="Page navigation" class="py-4 my-5 clearfix font-weight-bold border-top">
{%- if prev %}
<a class="float-left" href="{{ prev.link|e }}" title="{{ _('Previous') }}">
<span aria-hidden="true" class="mr-1">←</span> {{ prev.title }}
<span aria-hidden="true">←&nbsp;</span>{{ prev.title }}
</a>
{%- endif %}
{%- if next %}
<a class="float-right" href="{{ next.link|e }}" title="{{ _('Next') }}">
{{ next.title }} <span aria-hidden="true" class="ml-1">→</span>
{{ next.title }} <span aria-hidden="true">&nbsp;→</span>
</a>
{%- endif %}
</nav>
Expand Down
4 changes: 2 additions & 2 deletions sphinx_wagtail_theme/source-buttons.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div>
{%- if theme_github_url %}
<a class="btn btn-sm btn-light" href="{{ theme_github_url }}{{ pagename }}{{ page_source_suffix }}" rel="nofollow">
<a class="btn btn-sm btn-light text-decoration-none" href="{{ theme_github_url }}{{ pagename }}{{ page_source_suffix }}" rel="nofollow">
<span class="btn-icon"><span class="fab fa-github"></span></span>
<span class="btn-text">{{ _('Edit on GitHub') }}</span>
</a>
{%- endif %}
{%- if show_source and has_source and sourcename %}
<a class="btn btn-sm btn-light" href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">
<a class="btn btn-sm btn-light text-decoration-none" href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">
<span class="btn-icon"><span class="fas fa-code"></span></span>
<span class="btn-text">View source</span>
</a>
Expand Down