]> source.dussan.org Git - gitea.git/commitdiff
Add icon to vscode clone link (#17641)
authorsilverwind <me@silverwind.io>
Sun, 14 Nov 2021 21:48:26 +0000 (22:48 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Nov 2021 21:48:26 +0000 (16:48 -0500)
public/img/svg/gitea-vscode.svg [new file with mode: 0644]
templates/repo/home.tmpl
web_src/svg/gitea-vscode.svg [new file with mode: 0644]

diff --git a/public/img/svg/gitea-vscode.svg b/public/img/svg/gitea-vscode.svg
new file mode 100644 (file)
index 0000000..4ef94de
--- /dev/null
@@ -0,0 +1 @@
+<svg viewBox="-1 -1 34 34" class="svg gitea-vscode" width="16" height="16" aria-hidden="true"><path d="M30.9 3.4 24.3.3a2 2 0 0 0-2.3.4L9.4 12.2 3.9 8c-.5-.4-1.2-.4-1.7 0L.4 9.8c-.5.5-.5 1.4 0 2L5.2 16 .4 20.3c-.5.6-.5 1.5 0 2L2.2 24c.5.5 1.2.5 1.7 0l5.5-4L22 31.2a2 2 0 0 0 2.3.4l6.6-3.2a2 2 0 0 0 1.1-1.8V5.2a2 2 0 0 0-1.1-1.8zM24 23.3 14.4 16 24 8.7z"/></svg>
\ No newline at end of file
index 0c377251fa3f62c1e4f0b78b4b936be904c79a9b..eb6ee8c0a29b1016405e295655bb2e32828a6500 100644 (file)
                                                <button id="download-btn" class="ui basic jump dropdown icon button poping up" data-content="{{.i18n.Tr "repo.download_archive"}}" data-variation="tiny inverted" data-position="top right">
                                                        {{svg "octicon-download"}}
                                                        <div class="menu">
-                                                               <a class="item" href="vscode://vscode.git/clone?url={{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">
-                                                                       {{.i18n.Tr "repo.clone_in_vsc"}}
-                                                               </a>
-                                                               <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip"}}&nbsp;{{.i18n.Tr "repo.download_zip"}}</a>
-                                                               <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;{{.i18n.Tr "repo.download_tar"}}</a>
-                                                               <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.bundle">{{svg "octicon-package"}}&nbsp;{{.i18n.Tr "repo.download_bundle"}}</a>
+                                                               <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_zip"}}</a>
+                                                               <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_tar"}}</a>
+                                                               <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.bundle">{{svg "octicon-package" 16 "mr-3"}}{{.i18n.Tr "repo.download_bundle"}}</a>
+                                                               <a class="item" href="vscode://vscode.git/clone?url={{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">{{svg "gitea-vscode" 16 "mr-3"}}{{.i18n.Tr "repo.clone_in_vsc"}}</a>
                                                        </div>
                                                </button>
                                        </div>
diff --git a/web_src/svg/gitea-vscode.svg b/web_src/svg/gitea-vscode.svg
new file mode 100644 (file)
index 0000000..62cd1a3
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-1 -1 34 34"><path d="M30.9 3.4 24.3.3a2 2 0 0 0-2.3.4L9.4 12.2 3.9 8c-.5-.4-1.2-.4-1.7 0L.4 9.8c-.5.5-.5 1.4 0 2L5.2 16 .4 20.3c-.5.6-.5 1.5 0 2L2.2 24c.5.5 1.2.5 1.7 0l5.5-4L22 31.2a2 2 0 0 0 2.3.4l6.6-3.2a2 2 0 0 0 1.1-1.8V5.2a2 2 0 0 0-1.1-1.8zM24 23.3 14.4 16 24 8.7z"/></svg>
\ No newline at end of file