Skip to content

Commit 316ece4

Browse files
authored
Merge pull request #112 from rtfpessoa/fix-mobile-view
Fix mobile view
2 parents c2c253d + a6d119a commit 316ece4

File tree

10 files changed

+106
-93
lines changed

10 files changed

+106
-93
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</script>
4646
</head>
4747
<body class="swag-line template-index">
48-
<div class="container-overflow-wrap">
48+
<div>
4949

5050
<div class="container">
5151
<nav class="navbar navbar-default navbar-tall navbar-full" role="navigation">

docs/main.css

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@
136136
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2) 0, rgba(255, 255, 255, 0) 75%)
137137
}
138138

139-
.container-overflow-wrap {
140-
overflow: hidden
141-
}
142-
143139
.hero {
144140
position: relative;
145141
text-align: center;
@@ -538,6 +534,10 @@ a:hover, a:focus {
538534
user-select: none;
539535
}
540536

537+
.url-diff-container {
538+
width: 980px;
539+
}
540+
541541
.diff-url-wrapper {
542542
display: -webkit-box;
543543
display: -ms-flexbox;
@@ -564,19 +564,13 @@ a:hover, a:focus {
564564
font-weight: normal;
565565
}
566566

567-
.diff-url-options-container {
568-
display: -webkit-box;
569-
display: -ms-flexbox;
570-
display: flex;
571-
}
572-
573-
.diff-url-options-container label {
574-
-webkit-box-flex: 1;
575-
-ms-flex: 1;
576-
flex: 1;
577-
}
578-
579567
.diff-url-options-container label select,
580568
.diff-url-options-container label input {
581569
display: block;
582570
}
571+
572+
/* 15 columns */
573+
574+
.col-md- *.col-md-15 {
575+
width: 20%;
576+
}

docs/main.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/url.html

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</script>
5353
</head>
5454
<body class="swag-line template-index">
55-
<div class="container-overflow-wrap">
55+
<div>
5656

5757
<div class="container">
5858
<nav class="navbar navbar-default navbar-tall navbar-full" role="navigation">
@@ -107,33 +107,44 @@ <h1>Diff Prettifier <a href="#help">
107107
with code syntax highlight and line similarity matching for better code reviews.
108108
</p>
109109
<h2>Options:</h2>
110-
<div class="diff-url-options-container">
111-
<label title="Output format of the HTML, either line by line or side by side">Output Format
112-
<select class="options-label-value" id="diff-url-options-output-format" name="outputFormat">
113-
<option value="line-by-line" selected>Line by Line</option>
114-
<option value="side-by-side">Side by Side</option>
115-
</select>
116-
</label>
117-
<label title="Show the file list summary before the diff">File Summary
118-
<input class="options-label-value" id="diff-url-options-show-files" type="checkbox" name="showFiles" checked/>
119-
</label>
120-
<label title="Level of matching for the comparison algorithm">Matching Type
121-
<select class="options-label-value" id="diff-url-options-matching" name="matching">
122-
<option value="lines">Lines</option>
123-
<option value="words" selected>Words</option>
124-
<option value="none">None</option>
125-
</select>
126-
</label>
127-
<label title="Similarity threshold for the matching algorithm">Words Threshold
128-
<input class="options-label-value" id="diff-url-options-match-words-threshold" type="number"
129-
name="matchWordsThreshold" value="0.25" step="0.05"
130-
min="0" max="1"/>
131-
</label>
132-
<label title="Maximum number of comparison performed by the matching algorithm in a block of changes">Max Comparisons
133-
<input class="options-label-value" id="diff-url-options-matching-max-comparisons" type="number"
134-
name="matchingMaxComparisons" value="2500"
135-
step="100" min="0"/>
136-
</label>
110+
<div class="row">
111+
<div class="col-md-2 col-xs-12 col-15">
112+
<label title="Output format of the HTML, either line by line or side by side">Output Format
113+
<select class="options-label-value" id="diff-url-options-output-format" name="outputFormat">
114+
<option value="line-by-line" selected>Line by Line</option>
115+
<option value="side-by-side">Side by Side</option>
116+
</select>
117+
</label>
118+
</div>
119+
<div class=" col-md-2 col-xs-12 col-15">
120+
<label title="Show the file list summary before the diff">File Summary
121+
<input class="options-label-value" id="diff-url-options-show-files" type="checkbox" name="showFiles" checked/>
122+
</label>
123+
</div>
124+
<div class=" col-md-2 col-xs-12 col-15">
125+
<label title="Level of matching for the comparison algorithm">Matching Type
126+
<select class="options-label-value" id="diff-url-options-matching" name="matching">
127+
<option value="lines">Lines</option>
128+
<option value="words" selected>Words</option>
129+
<option value="none">None</option>
130+
</select>
131+
</label>
132+
</div>
133+
<div class=" col-md-2 col-xs-12 col-15">
134+
<label title="Similarity threshold for the matching algorithm">Words Threshold
135+
<input class="options-label-value" id="diff-url-options-match-words-threshold" type="number"
136+
name="matchWordsThreshold" value="0.25" step="0.05"
137+
min="0" max="1"/>
138+
</label>
139+
</div>
140+
<div class=" col-md-2 col-xs-12 col-15">
141+
<label title="Maximum number of comparison performed by the matching algorithm in a block of changes">Max
142+
Comparisons
143+
<input class="options-label-value" id="diff-url-options-matching-max-comparisons" type="number"
144+
name="matchingMaxComparisons" value="2500"
145+
step="100" min="0"/>
146+
</label>
147+
</div>
137148
</div>
138149
<br>
139150
<div class="diff-url-wrapper">

docs/url.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ $(document).ready(function() {
528528

529529
function draw(req) {
530530
if (!validateUrl(req.url)) {
531-
console.error("Invalid url provided!");
531+
console.error('Invalid url provided!');
532532
return;
533533
}
534534

@@ -554,9 +554,9 @@ $(document).ready(function() {
554554
var diff2htmlUi = new Diff2HtmlUI({diff: data});
555555

556556
if (outputFormat === 'side-by-side') {
557-
$container.css({'width': '1400px'});
557+
$container.css({'min-width': '1280px'});
558558
} else {
559-
$container.css({'width': ''});
559+
$container.css({'width': '980px'});
560560
}
561561

562562
diff2htmlUi.draw(container, {
@@ -584,7 +584,6 @@ $(document).ready(function() {
584584
window.location.search = '?diff=' + url;
585585
}
586586
}
587-
588587
});
589588

590589
},{"whatwg-fetch":1}]},{},[2]);

0 commit comments

Comments
 (0)