1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-04 13:05:22 +02:00

update view

This commit is contained in:
Taly 2022-06-09 14:12:20 +03:00
parent 20747407f7
commit 443edb4c98
3 changed files with 16 additions and 10 deletions

View file

@ -3,7 +3,7 @@
{% block body %}
{# Remove after testing #}
<div class="page-intersection-field"></div>
{# <div class="page-intersection-field"></div>#}
<article class="page" data-module="page">
<header class="page__header">

View file

@ -107,8 +107,12 @@ export default class TableOfContent {
const targetLink = target.querySelector('a').getAttribute('href');
// @todo remove after testing
document.querySelector('.page-intersection-field').style.top = `${entry.rootBounds.top}px`;
document.querySelector('.page-intersection-field').style.height = `${entry.rootBounds.height}px`;
try {
const pageIntersectionField = document.querySelector('.page-intersection-field');
pageIntersectionField.style.top = `${entry.rootBounds.top}px`;
pageIntersectionField.style.height = `${entry.rootBounds.height}px`;
} catch (e) {}
/**
* Intersection state of block

View file

@ -32,14 +32,8 @@
gap: 6px;
&-item {
padding: 4px 8px;
font-size: 14px;
border-radius: 8px;
letter-spacing: -0.01em;
font-size: 14px;
line-height: 150%;
&:hover {
background-color: #F3F6F8;
cursor: pointer;
@ -53,6 +47,14 @@
&--h4 { margin-left: 12px; }
&--h5 { margin-left: 18px; }
&--h6 { margin-left: 24px; }
& > a {
margin: 4px 8px;
display: block;
font-size: 14px;
letter-spacing: -0.01em;
line-height: 150%;
}
}
}
}
@ -64,7 +66,7 @@
.page-intersection-field {
//background-color: rgba(255,0,0,.1);
background-color: rgba(255,0,0,.1);
position: fixed;
left: 0;
width: 100%;