Skip to content

Commit

Permalink
I prefer this
Browse files Browse the repository at this point in the history
  • Loading branch information
leotrs committed Nov 30, 2024
1 parent 8d977fd commit b5957d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
15 changes: 8 additions & 7 deletions rsm/static/rsm.css
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@
.manuscriptwrapper .handrail__btn.handrail__btn--relative {
position: relative; }
.manuscriptwrapper .handrail__btn-container {
background: var(--gray-200);
display: none;
font-weight: var(--bold);
left: 0;
Expand All @@ -296,20 +295,20 @@
top: 0; }
.manuscriptwrapper .abstract div.handrail:first-of-type > .handrail__btn-container,
.manuscriptwrapper .toc div.handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h3-size)/2 + (var(--header-line-height)*var(--h3-size) - var(--body-line-height)*1rem)/2); }
top: calc(var(--h3-size)/2 + (var(--header-line-height)*var(--h3-size) - var(--body-line-height)*1rem)/3); }
.manuscriptwrapper div.theorem > .handrail:first-of-type > .handrail__btn-container,
.manuscriptwrapper div.proof > .handrail:first-of-type > .handrail__btn-container {
top: 1rem; }
.manuscriptwrapper section.level-1 > .handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h1-size)/2 + (var(--header-line-height)*var(--h1-size) - var(--body-line-height)*1rem)/2); }
top: calc(var(--h1-size)/2 + (var(--header-line-height)*var(--h1-size) - var(--body-line-height)*1rem)/3); }
.manuscriptwrapper section.level-2 > .handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h2-size)/2 + (var(--header-line-height)*var(--h2-size) - var(--body-line-height)*1rem)/2); }
top: calc(var(--h2-size)/2 + (var(--header-line-height)*var(--h2-size) - var(--body-line-height)*1rem)/3); }
.manuscriptwrapper section.level-3 > .handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h3-size)/2 + (var(--header-line-height)*var(--h3-size) - var(--body-line-height)*1rem)/2); }
top: calc(var(--h3-size)/2 + (var(--header-line-height)*var(--h3-size) - var(--body-line-height)*1rem)/3); }
.manuscriptwrapper section.level-4 > .handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h4-size)/2 + (var(--header-line-height)*var(--h4-size) - var(--body-line-height)*1rem)/2); }
top: calc(var(--h4-size)/2 + (var(--header-line-height)*var(--h4-size) - var(--body-line-height)*1rem)/3); }
.manuscriptwrapper section.level-5 > .handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h5-size)/2 + (var(--header-line-height)*var(--h5-size) - var(--body-line-height)*1rem)/2); }
top: calc(var(--h5-size)/2 + (var(--header-line-height)*var(--h5-size) - var(--body-line-height)*1rem)/3); }
.manuscriptwrapper .keyword {
color: var(--keyword-blue);
font-weight: var(--bold); }
Expand Down Expand Up @@ -554,6 +553,8 @@
--h6-size: 1.000rem;
--side-padding: 1.5em;
--font-size: 93.75%; }
.manuscriptwrapper {
padding-left: calc(var(--side-padding)*1.5); }
.manuscriptwrapper--narrow {
margin: 2.5em 15em 2.5em auto; }
.options {
Expand Down
10 changes: 7 additions & 3 deletions rsm/static/rsm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
}

&-container {
background: var(--gray-200);
// background: var(--gray-200);
display: none;
font-weight: var(--bold);
// left: calc(-1 * var(--border-thin));
Expand All @@ -405,7 +405,7 @@

.abstract div.handrail:first-of-type > .handrail__btn-container,
.toc div.handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h3-size)/2 + (var(--header-line-height)*var(--h3-size) - var(--body-line-height)*1rem)/2);
top: calc(var(--h3-size)/2 + (var(--header-line-height)*var(--h3-size) - var(--body-line-height)*1rem)/3);
}

div.theorem > .handrail:first-of-type > .handrail__btn-container,
Expand All @@ -415,7 +415,7 @@

@for $i from 1 through 5 {
section.level-#{$i} > .handrail:first-of-type > .handrail__btn-container {
top: calc(var(--h#{$i}-size)/2 + (var(--header-line-height)*var(--h#{$i}-size) - var(--body-line-height)*1rem)/2);
top: calc(var(--h#{$i}-size)/2 + (var(--header-line-height)*var(--h#{$i}-size) - var(--body-line-height)*1rem)/3);
}
}

Expand Down Expand Up @@ -874,6 +874,10 @@
--font-size: 93.75%;
}

.manuscriptwrapper {
padding-left: calc(var(--side-padding)*1.5);
}

.manuscriptwrapper--narrow {
margin: 2.5em 15em 2.5em auto;
}
Expand Down
16 changes: 8 additions & 8 deletions rsm/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,14 +1156,14 @@ def _replace_items_with_handrails(self, index, items, cls, include_content=False
newitems = [
handrail,
btn_cont,
btn_togg,
AppendOpenCloseTag(
"span",
self.svg["rarrow"],
newline_inner=False,
newline_outer=False,
),
btn_togg.close_command(),
# btn_togg,
# AppendOpenCloseTag(
# "span",
# # self.svg["rarrow"],
# newline_inner=False,
# newline_outer=False,
# ),
# btn_togg.close_command(),
btn_menu,
AppendOpenCloseTag(
"span",
Expand Down

0 comments on commit b5957d8

Please sign in to comment.