Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix preview width if stack rows are too wide #54

Merged
merged 3 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions src/error.compiled.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -488,23 +488,25 @@ body {

.error-frames {
display: flex;
flex-direction: row-reverse;
flex-wrap: wrap;
gap: 40px;
}

.frame-preview {
background: #fff;
width: 50%;
flex: 1 1 400px;
box-shadow: 0px 0px 9px #d3d3d3;
height: 100%;
box-sizing: border-box;
overflow: auto;
width: 100%;
}

.frame-stack {
margin-right: 40px;
flex: 1;
flex: 1 1 300px;
padding: 10px 0;
box-sizing: border-box;
width: 100%;
}

.frames-list {
Expand Down Expand Up @@ -632,19 +634,7 @@ code[class*="language-"], pre[class*="language-"] {
display: none;
}

@media only screen and (max-width: 970px) {
.error-frames {
flex-direction: column-reverse;
}

.frame-preview {
width: 100%;
}

.frame-stack {
width: 100%;
}
}

</style>

Expand All @@ -665,12 +655,6 @@ code[class*="language-"], pre[class*="language-"] {
</div>

<div class="error-frames">
{{!-- Filled using frontend code, based upon the active frame --}}
<div class="frame-preview is-hidden">
<div id="frame-file"></div>
<div id="frame-code"><pre class="line-numbers"><code class="language-js" id="code-drop"></code></pre></div>
<div id="frame-method"></div>
</div>

<div class="frame-stack">
<div class="frames-filter-selector">
Expand Down Expand Up @@ -702,6 +686,13 @@ code[class*="language-"], pre[class*="language-"] {
{{/frames}}
</div>
</div>

{{!-- Filled using frontend code, based upon the active frame --}}
<div class="frame-preview is-hidden">
<div id="frame-file"></div>
<div id="frame-code"><pre class="line-numbers"><code class="language-js" id="code-drop"></code></pre></div>
<div id="frame-method"></div>
</div>
</div>
</section>

Expand Down
22 changes: 6 additions & 16 deletions static/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,25 @@ body {

.error-frames {
display: flex;
flex-direction: row-reverse;
flex-wrap: wrap;
gap: 40px;
}

.frame-preview {
background: #fff;
width: 50%;
flex: 1 1 400px;
box-shadow: 0px 0px 9px #d3d3d3;
height: 100%;
box-sizing: border-box;
overflow: auto;
width: 100%;
}

.frame-stack {
margin-right: 40px;
flex: 1;
flex: 1 1 300px;
padding: 10px 0;
box-sizing: border-box;
width: 100%;
}

.frames-list {
Expand Down Expand Up @@ -220,16 +222,4 @@ code[class*="language-"], pre[class*="language-"] {
display: none;
}

@media only screen and (max-width: 970px) {
.error-frames {
flex-direction: column-reverse;
}

.frame-preview {
width: 100%;
}

.frame-stack {
width: 100%;
}
}
13 changes: 7 additions & 6 deletions static/error.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
</div>

<div class="error-frames">
{{!-- Filled using frontend code, based upon the active frame --}}
<div class="frame-preview is-hidden">
<div id="frame-file"></div>
<div id="frame-code"><pre class="line-numbers"><code class="language-js" id="code-drop"></code></pre></div>
<div id="frame-method"></div>
</div>

<div class="frame-stack">
<div class="frames-filter-selector">
Expand Down Expand Up @@ -72,6 +66,13 @@
{{/frames}}
</div>
</div>

{{!-- Filled using frontend code, based upon the active frame --}}
<div class="frame-preview is-hidden">
<div id="frame-file"></div>
<div id="frame-code"><pre class="line-numbers"><code class="language-js" id="code-drop"></code></pre></div>
<div id="frame-method"></div>
</div>
</div>
</section>

Expand Down
Loading