Skip to content

Commit

Permalink
💄 Style: update footnote and footnote-ref style
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Oct 9, 2023
1 parent 7fa16bb commit 8611f00
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- :sparkles: Feat: add code block attributes support ([#330](https://github.com/hugo-fixit/FixIt/issues/330))
- :bug: Fix: use dateFormat function to render localized dates (@stefanoginobili [#355](https://github.com/hugo-fixit/FixIt/pull/355))
- :lipstick: Style: update define list style
- :lipstick: Style: update footnote and footnote-ref style

## v0.2.18 [2023.3.31]

Expand Down
10 changes: 8 additions & 2 deletions assets/css/_mixin/_link.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
@mixin link($light, $dark) {
/**
* Link mixin
* @param {Boolean} $light use global link color
* @param {Boolean} $dark use global link color dark
* @param {String} $decoration text-decoration, default none
*/
@mixin link($light, $dark, $decoration: none) {
a,
a::before,
a::after {
text-decoration: none;
text-decoration: $decoration;

@if $light {
color: $global-link-color;
Expand Down
41 changes: 34 additions & 7 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,40 @@
@include link(false, true);
}

sup[id^='fnref:']:has(.footnote-ref) {
padding: 2px 4px;
background-color: rgba(238, 238, 238, 0.7);
color: #555555;
border-radius: 4px;
cursor: pointer;

[data-theme='dark'] & {
background-color: rgba(56, 139, 253, 0.1);
color: #58a6ff;
}

@include link(true, false);
}

.footnotes {
color: $global-font-secondary-color;
font-size: 0.75rem;
white-space: normal;
color: darken($global-font-secondary-color, 5%);

ol {
margin-block: 1em;
padding-left: 1rem;
}

a:not(.footnote-backref) {
color: inherit;
text-decoration: underline;
}

@include link(false, true);

[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
color: lighten($global-font-secondary-color-dark, 5%);
}

p {
Expand All @@ -364,13 +393,13 @@
@import '../_shortcodes';

hr {
margin: 1rem 0;
margin-block: 1em;
position: relative;
border-top: 1px dashed $global-border-color;
border-top: 1px dashed darken($global-border-color, 5%);
border-bottom: none;

[data-theme='dark'] & {
border-top: 1px dashed $global-border-color-dark;
border-top: 1px dashed lighten($global-border-color-dark, 5%);
}
}

Expand All @@ -379,7 +408,6 @@
padding: 0 0.25rem;
background-color: $global-background-color;
border: 1px solid $global-border-color;
border-bottom-color: $global-border-color;
font-size: 0.8rem;
font-family: $code-font-family;
color: $code-color;
Expand All @@ -389,7 +417,6 @@
[data-theme='dark'] & {
background-color: $global-background-color-dark;
border: 1px solid $global-border-color-dark;
border-bottom-color: $global-border-color-dark;
color: $code-color-dark;
@include box-shadow(inset 0 -1px 0 $global-border-color-dark);
}
Expand Down

1 comment on commit 8611f00

@vercel
Copy link

@vercel vercel bot commented on 8611f00 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

fixit – ./

hugofixit.vercel.app
fixit-cell-x.vercel.app
fixit.lruihao.cn
fixit-git-master-cell-x.vercel.app

Please sign in to comment.