Skip to content

Commit

Permalink
Widget: moving settings bar to the top
Browse files Browse the repository at this point in the history
Also, moving tabs to the bottom.
  • Loading branch information
gusthoff committed Sep 8, 2024
1 parent cd77a0c commit b113cb3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions frontend/sphinx/widget/templates/widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@
{% for f in w.files %}
<div class="file" data-basename="{{ f.basename }}">{{ f.content }}</div>
{% endfor %}
<div id="{{ w.id }}.tab" class="tab">
{% for t in w.files %}
<button id="{{ w.id }}.tab.{{ t.basename }}" class="tab-links">{{ t.basename }}</button>
{% endfor %}
</div>
<div id="{{ w.id }}.editors">
<div id="{{ w.id }}.editors.editor" class="editor-container"></div>
<div id="{{ w.id }}.editors.non-tabbed-editor" class="non-tabbed-editor-container" hidden>
{% for t in w.files %}
<div id="{{ w.id }}.editors.non-tabbed-editor.{{ t.basename }}" class="non-tabbed-links"></div>
{% endfor %}
</div>
</div>
<div id="{{ w.id }}.settings-bar" class="settings-bar">
<div class="dropdown-container settingsbar-item">
<button class="dropdown-btn">
Expand Down Expand Up @@ -78,6 +65,19 @@
Download
</button>
</div>
<div id="{{ w.id }}.editors">
<div id="{{ w.id }}.editors.editor" class="editor-container"></div>
<div id="{{ w.id }}.editors.non-tabbed-editor" class="non-tabbed-editor-container" hidden>
{% for t in w.files %}
<div id="{{ w.id }}.editors.non-tabbed-editor.{{ t.basename }}" class="non-tabbed-links"></div>
{% endfor %}
</div>
</div>
<div id="{{ w.id }}.tab" class="tab">
{% for t in w.files %}
<button id="{{ w.id }}.tab.{{ t.basename }}" class="tab-links">{{ t.basename }}</button>
{% endfor %}
</div>
<div class="row output-row">
<div id="{{ w.id }}.button-group" class="col-md-3 button-group">
{% for b in w.button_group %}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/styles/learn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ pre.widget {
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-bottom: 10px;

button {
background-color: inherit;
float: left;
Expand Down Expand Up @@ -196,7 +198,6 @@ pre.widget {
padding-left: 13px;
display: block;
margin-top: 0px;
margin-bottom: 10px;

button {
background-color: transparent;
Expand Down

0 comments on commit b113cb3

Please sign in to comment.