Skip to content

Commit 7e2581e

Browse files
authored
Merge pull request #17 from Iximiel/workaroundForLongLines
Adding an extra container to localize the horizontal scroll to the input file
2 parents 78c35ce + d4691ce commit 7e2581e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/PlumedToHTML/PlumedToHTML.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ def get_html( inpt, name, outloc, tested, broken, plumedexe, usejson=None, maxch
358358
plumed_formatter = load_formatter_from_file(formatfile, "PlumedFormatter", keyword_dict=keyword_dict, input_name=name, hasload=found_load, broken=any(broken), auxinputs=inputfiles, auxinputlines=inputfilelines, valuedict=valuedict, actions=actions, checkaction=checkaction )
359359

360360
# Now generate html of input
361-
html = '<div class="plumedpreheader">\n'
361+
html = '<div class="plumedInputContainer">\n'
362+
html += '<div class="plumedpreheader">\n'
362363
html += f'<div class="headerInfo" id="value_details_{name}"> Click on the labels of the actions for more information on what each action computes </div>\n'
363364
html += '<div class="containerBadge">\n'
364365
for i in range(len(tested)) :
@@ -404,7 +405,8 @@ def get_html( inpt, name, outloc, tested, broken, plumedexe, usejson=None, maxch
404405
else :
405406
# html += highlight( final_inpt, plumed_lexer, HtmlFormatter() )
406407
html += highlight( final_inpt, plumed_lexer, plumed_formatter )
407-
408+
#close the html = '<div class="plumedInputContainer">\n'
409+
html += '</div>\n'
408410
# Now remove keywords that appear in examples
409411
mykeywords = plumed_formatter.getCheckActionKeywords()
410412
for key in mykeywords :

src/PlumedToHTML/assets/header.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<style>
2+
.plumedInputContainer{
3+
width: 100%;
4+
overflow: auto;
5+
}
26
.plumedpreheader{
37
width: 100%;
48
display: grid;

0 commit comments

Comments
 (0)