|
26 | 26 | </div>
|
27 | 27 | </div>
|
28 | 28 | <div class="field">
|
29 |
| - <div class="ui compact small menu small-menu-items repo-editor-menu"> |
30 |
| - <a class="active item" data-tab="write">{{svg "octicon-code"}} {{if .IsNewFile}}{{ctx.Locale.Tr "repo.editor.new_file"}}{{else}}{{ctx.Locale.Tr "repo.editor.edit_file"}}{{end}}</a> |
31 |
| - <a class="item" data-tab="preview" data-url="{{.Repository.Link}}/markup" data-context="{{.RepoLink}}/src/{{.BranchNameSubURL}}" data-markup-mode="file">{{svg "octicon-eye"}} {{ctx.Locale.Tr "preview"}}</a> |
32 |
| - {{if not .IsNewFile}} |
33 |
| - <a class="item" data-tab="diff" hx-params="context,content" hx-vals='{"context":"{{.BranchLink}}"}' hx-include="#edit_area" hx-swap="innerHTML" hx-target=".tab[data-tab='diff']" hx-indicator=".tab[data-tab='diff']" hx-post="{{.RepoLink}}/_preview/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">{{svg "octicon-diff"}} {{ctx.Locale.Tr "repo.editor.preview_changes"}}</a> |
34 |
| - {{end}} |
35 |
| - </div> |
36 |
| - <div class="ui active tab segment tw-rounded" data-tab="write"> |
37 |
| - <textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}" |
38 |
| - data-url="{{.Repository.Link}}/markup" |
39 |
| - data-context="{{.RepoLink}}" |
40 |
| - data-previewable-extensions="{{.PreviewableExtensions}}" |
41 |
| - data-line-wrap-extensions="{{.LineWrapExtensions}}">{{.FileContent}}</textarea> |
42 |
| - <div class="editor-loading is-loading"></div> |
43 |
| - </div> |
44 |
| - <div class="ui tab segment markup tw-rounded" data-tab="preview"> |
45 |
| - {{ctx.Locale.Tr "loading"}} |
| 29 | + <div class="ui top attached header"> |
| 30 | + <div class="ui compact small menu small-menu-items repo-editor-menu"> |
| 31 | + <a class="active item" data-tab="write">{{svg "octicon-code"}} {{if .IsNewFile}}{{ctx.Locale.Tr "repo.editor.new_file"}}{{else}}{{ctx.Locale.Tr "repo.editor.edit_file"}}{{end}}</a> |
| 32 | + <a class="item" data-tab="preview" data-url="{{.Repository.Link}}/markup" data-context="{{.RepoLink}}/src/{{.BranchNameSubURL}}" data-markup-mode="file">{{svg "octicon-eye"}} {{ctx.Locale.Tr "preview"}}</a> |
| 33 | + {{if not .IsNewFile}} |
| 34 | + <a class="item" data-tab="diff" hx-params="context,content" hx-vals='{"context":"{{.BranchLink}}"}' hx-include="#edit_area" hx-swap="innerHTML" hx-target=".tab[data-tab='diff']" hx-indicator=".tab[data-tab='diff']" hx-post="{{.RepoLink}}/_preview/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">{{svg "octicon-diff"}} {{ctx.Locale.Tr "repo.editor.preview_changes"}}</a> |
| 35 | + {{end}} |
| 36 | + </div> |
46 | 37 | </div>
|
47 |
| - <div class="ui tab segment diff edit-diff" data-tab="diff"> |
48 |
| - <div class="tw-p-16"></div> |
| 38 | + <div class="ui bottom attached segment tw-p-0"> |
| 39 | + <div class="ui active tab tw-rounded" data-tab="write"> |
| 40 | + <textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}" |
| 41 | + data-url="{{.Repository.Link}}/markup" |
| 42 | + data-context="{{.RepoLink}}" |
| 43 | + data-previewable-extensions="{{.PreviewableExtensions}}" |
| 44 | + data-line-wrap-extensions="{{.LineWrapExtensions}}">{{.FileContent}}</textarea> |
| 45 | + <div class="editor-loading is-loading"></div> |
| 46 | + </div> |
| 47 | + <div class="ui tab markup tw-px-4 tw-py-3" data-tab="preview"> |
| 48 | + {{ctx.Locale.Tr "loading"}} |
| 49 | + </div> |
| 50 | + <div class="ui tab diff edit-diff" data-tab="diff"> |
| 51 | + <div class="tw-p-16"></div> |
| 52 | + </div> |
49 | 53 | </div>
|
50 | 54 | </div>
|
51 | 55 | {{template "repo/editor/commit_form" .}}
|
|
0 commit comments