This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('hello from iodide-toolbox'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ellipsis_text(s, limit=90) | |
if s&.length>limit | |
(s.slice(0..limit) + | |
'... ' + | |
content_tag(:a, 'More', | |
class: 'more semibold small', | |
href: '#', | |
onClick: "$(this.nextElementSibling).removeClass('hide'); $(this).addClass('hide'); return false;") + | |
content_tag(:span, s.slice(90..-1), class: 'hide')).html_safe | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.scrollable-y-with-hide { | |
overflow-y: hidden; | |
&:hover { | |
overflow-y: auto; | |
// https://stackoverflow.com/a/54979559/375050 | |
// only for WebKit so that scrollbars do not take space and cause content to overflow | |
overflow-y: overlay; | |
} | |
&::-webkit-scrollbar-thumb { | |
background: hsla(0%, 0%, 0%, 0.4); |
OlderNewer