diff --git a/assets/stylesheets/global/table-of-contents.css b/assets/stylesheets/global/table-of-contents.css index 9857971..c0ec1df 100644 --- a/assets/stylesheets/global/table-of-contents.css +++ b/assets/stylesheets/global/table-of-contents.css @@ -20,10 +20,14 @@ display: block; color: var(--color-text-grey); + &:hover, &.active { - position: relative; font-family: var(--font-medium); color: var(--color-text-default); + } + + &.active { + position: relative; &:before, &:after { @@ -37,27 +41,27 @@ width: 3px; background: var(--color-course-active); } - &:after { - content: '👁'; - left: calc(var(--toc-gap-left) * 2 * -1); - } - } - - &:hover { - font-family: var(--font-medium); - color: var(--color-text-default); } &.visited { position:relative; + &:before, &:after { position: absolute; top: 0; } &:after { - content: '👁'; + content: ''; + display: block; + width: 16px; + height: 16px; + top: 50%; left: calc(var(--toc-gap-left) * 2 * -1); + transform: translateY(-50%); + + background: url('/images/icon-viewed.svg') no-repeat center center; + background-size: contain; } } } diff --git a/public/images/icon-viewed.svg b/public/images/icon-viewed.svg new file mode 100644 index 0000000..f698f88 --- /dev/null +++ b/public/images/icon-viewed.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index ae6adbd..4a5eeab 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1192,12 +1192,16 @@ display: flex; color: #8091a5; } -.table-of-contents__link.active { - position: relative; +.table-of-contents__link:hover, + .table-of-contents__link.active { font-family: 'robotomedium', Helvetica, sans-serif; color: #2a3039; } +.table-of-contents__link.active { + position: relative; +} + .table-of-contents__link.active:before, .table-of-contents__link.active:after { position: absolute; @@ -1212,16 +1216,6 @@ display: flex; background: #536171; } -.table-of-contents__link.active:after { - content: '👁'; - left: -22px; -} - -.table-of-contents__link:hover { - font-family: 'robotomedium', Helvetica, sans-serif; - color: #2a3039; -} - .table-of-contents__link.visited { position:relative; } @@ -1233,8 +1227,16 @@ display: flex; } .table-of-contents__link.visited:after { - content: '👁'; + content: ''; + display: block; + width: 16px; + height: 16px; + top: 50%; left: -22px; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + background: url('/images/icon-viewed.svg') no-repeat center center; + background-size: contain; } .sidebar-menu {}