-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from libsgh/dev
v2.0.5
- Loading branch information
Showing
7 changed files
with
66 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,11 +53,11 @@ | |
} | ||
</style> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/jquery.cookie.min.js"></script> | ||
</head> | ||
<body> | ||
{{ $SurportFolderDown := .SurportFolderDown }} | ||
{{if .HasPwd}} | ||
<script src="https://cdn.bootcdn.net/ajax/libs/jquery-cookie/1.0/jquery.cookie.min.js"></script> | ||
<script> | ||
promptPwd("{{ .FileId}}"); | ||
function promptPwd(fileId){ | ||
|
@@ -150,13 +150,13 @@ | |
<tr> | ||
{{if .IsFolder}} | ||
<td class="file-name"> | ||
<a class="icon icon-dir" href="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}"><i class="fa fa-folder" aria-hidden="true"></i> {{.FileName}}</a> | ||
<a class="icon icon-dir" href="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}"><i class="fa fa-folder" aria-hidden="true"></i> {{.FileName}}</a> | ||
{{if $.SearchKey}} | ||
<br><p style="margin-left: 30px">{{.Dx}}{{.Path}}</p> | ||
<br><p style="margin-left: 30px">{{index $.AcountIndex .AccountId }}{{.Path}}</p> | ||
{{end}} | ||
</td> | ||
{{else}} | ||
<td class="file-name"><a class="icon icon-file" data-file-type="{{.FileType}}" data-media-type="{{.MediaType}}" data-title="{{.FileName}}" data-url="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}" href="javascript:void(0);"> | ||
<td class="file-name"><a class="icon icon-file" data-file-type="{{.FileType}}" data-media-type="{{.MediaType}}" data-title="{{.FileName}}" data-url="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}" href="javascript:void(0);"> | ||
{{if eq .MediaType 1}} | ||
<i class="fa fa-file-image-o" aria-hidden="true"></i> | ||
{{else if eq .MediaType 2}} | ||
|
@@ -180,10 +180,10 @@ | |
<i class="fa fa-file" aria-hidden="true"></i> | ||
{{end}} | ||
{{end}} | ||
{{.FileName}} <i class="fa fa-copy copyBtn" data-path="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}" data-clipboard-action="copy" data-toggle="tooltip" data-placement="bottom" title="复制链接" style="font-size: x-small" aria-hidden="true"></i> | ||
{{.FileName}} <i class="fa fa-copy copyBtn" data-path="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}" data-clipboard-action="copy" data-toggle="tooltip" data-placement="bottom" title="复制链接" style="font-size: x-small" aria-hidden="true"></i> | ||
</a> | ||
{{if $.SearchKey}} | ||
<br><p style="margin-left: 30px">{{.Dx}}{{.Path}}</p> | ||
<br><p style="margin-left: 30px">{{index $.AcountIndex .AccountId }}{{.Path}}</p> | ||
{{end}} | ||
</td> | ||
{{end}} | ||
|
@@ -196,7 +196,7 @@ | |
<td class="file-size">-</td> | ||
{{end}} | ||
{{else}} | ||
<td class="text-center"><a href="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}}{{.Path}}" target="_blank"><i class="fa fa-download" aria-hidden="true"></i></a></td> | ||
<td class="text-center"><a href="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}}{{.Path}}" target="_blank"><i class="fa fa-download" aria-hidden="true"></i></a></td> | ||
{{end}} | ||
</tr> | ||
{{end}} | ||
|
@@ -215,13 +215,30 @@ | |
<p id="content" class="card-text"> | ||
</p> | ||
<script> | ||
$("#content").html(marked($("#readme").val())); | ||
var c = $("#readme").val(); | ||
if(c != ""){ | ||
$("#content").append(marked(c)); | ||
$("#content").show(); | ||
}else{ | ||
var fullUrl = encodeURI(window.location.protocol + "//"+window.location.host + "/api/public/raw/README.md"); | ||
$.ajax({ | ||
method: 'GET', | ||
url: fullUrl, | ||
success: function (data) { | ||
if(data != ""){ | ||
$("#content").append(marked(data)); | ||
$("#content").show(); | ||
} | ||
} | ||
}); | ||
} | ||
</script> | ||
</div> | ||
</div> | ||
</div> | ||
{{else}} | ||
{{end}} | ||
<div id="previewImages"></div> | ||
<div class="col-sm-12"> | ||
<div class="text-center"> | ||
{{if eq $.Footer ""}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,11 +66,11 @@ | |
} | ||
</style> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/jquery.cookie.min.js"></script> | ||
</head> | ||
<body> | ||
{{ $SurportFolderDown := .SurportFolderDown }} | ||
{{if .HasPwd}} | ||
<script src="https://cdn.bootcdn.net/ajax/libs/jquery-cookie/1.0/jquery.cookie.min.js"></script> | ||
<script> | ||
promptPwd("{{ .FileId}}"); | ||
function promptPwd(fileId){ | ||
|
@@ -151,13 +151,13 @@ <h2 id="heading">{{.Title}} {{ .Path }}</h2> | |
<tr> | ||
{{if .IsFolder}} | ||
<td class="file-name"> | ||
<a class="icon icon-dir" href="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}"><i class="fa fa-folder" aria-hidden="true"></i> {{.FileName}}</a> | ||
<a class="icon icon-dir" href="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}"><i class="fa fa-folder" aria-hidden="true"></i> {{.FileName}}</a> | ||
{{if $.SearchKey}} | ||
<br><p style="margin-left: 45px">{{.Dx}}{{.Path}}</p> | ||
<br><p style="margin-left: 45px">{{index $.AcountIndex .AccountId }}{{.Path}}</p> | ||
{{end}} | ||
</td> | ||
{{else}} | ||
<td class="file-name"><a class="icon icon-file" data-file-type="{{.FileType}}" data-media-type="{{.MediaType}}" data-title="{{.FileName}}" data-url="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}" href="javascript:void(0);"> | ||
<td class="file-name"><a class="icon icon-file" data-file-type="{{.FileType}}" data-media-type="{{.MediaType}}" data-title="{{.FileName}}" data-url="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}" href="javascript:void(0);"> | ||
{{if eq .MediaType 1}} | ||
<i class="fa fa-file-image-o" aria-hidden="true"></i> | ||
{{else if eq .MediaType 2}} | ||
|
@@ -181,9 +181,9 @@ <h2 id="heading">{{.Title}} {{ .Path }}</h2> | |
<i class="fa fa-file" aria-hidden="true"></i> | ||
{{end}} | ||
{{end}} | ||
{{.FileName}} <i class="fa fa-copy copyBtn" data-path="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}" data-clipboard-action="copy" data-toggle="tooltip" data-placement="bottom" title="复制链接" style="font-size: x-small" aria-hidden="true"></i></a> | ||
{{.FileName}} <i class="fa fa-copy copyBtn" data-path="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}" data-clipboard-action="copy" data-toggle="tooltip" data-placement="bottom" title="复制链接" style="font-size: x-small" aria-hidden="true"></i></a> | ||
{{if $.SearchKey}} | ||
<br><p style="margin-left: 45px">{{.Dx}}{{.Path}}</p> | ||
<br><p style="margin-left: 45px">{{index $.AcountIndex .AccountId }}{{.Path}}</p> | ||
{{end}} | ||
</td> | ||
{{end}} | ||
|
@@ -196,7 +196,7 @@ <h2 id="heading">{{.Title}} {{ .Path }}</h2> | |
<td class="file-size">-</td> | ||
{{end}} | ||
{{else}} | ||
<td class="center-align"><a href="{{if $.SearchKey}}{{.Dx}}{{else}}{{$.DIndex}}{{end}}{{.Path}}" target="_blank"><i class="fa fa-download" aria-hidden="true"></i></a></td> | ||
<td class="center-align"><a href="{{if $.SearchKey}}{{index $.AcountIndex .AccountId }}{{else}}{{$.DIndex}}{{end}}{{.Path}}" target="_blank"><i class="fa fa-download" aria-hidden="true"></i></a></td> | ||
{{end}} | ||
</tr> | ||
{{end}} | ||
|
@@ -211,12 +211,29 @@ <h2 id="heading">{{.Title}} {{ .Path }}</h2> | |
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> | ||
<div id="content"></div> | ||
<script> | ||
$("#content").html(marked($("#readme").val())); | ||
var c = $("#readme").val(); | ||
if(c != ""){ | ||
$("#content").append(marked(c)); | ||
$("#content").show(); | ||
}else{ | ||
var fullUrl = encodeURI(window.location.protocol + "//"+window.location.host + "/api/public/raw/README.md"); | ||
$.ajax({ | ||
method: 'GET', | ||
url: fullUrl, | ||
success: function (data) { | ||
if(data != ""){ | ||
$("#content").append(marked(data)); | ||
$("#content").show(); | ||
} | ||
} | ||
}); | ||
} | ||
</script> | ||
</div> | ||
</div> | ||
</div> | ||
{{end}} | ||
<div id="previewImages"></div> | ||
<div class="col s12 footer"> | ||
<div class="center-align"> | ||
{{if eq $.Footer ""}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,10 @@ | |
<script | ||
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/mdui.min.js" | ||
integrity="sha384-gCMZcshYKOGRX9r6wbDrvF+TcCCswSHFucUzUPwka+Gr+uHgjlYvkABr95TCOz3A" | ||
crossorigin="anonymous" | ||
crossorigin="anonymous" ------------------------------------------------------- | ||
></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script> | ||
<script src="https://cdn.bootcdn.net/ajax/libs/jquery-cookie/1.0/jquery.cookie.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/jquery.cookie@1.4.1/jquery.cookie.min.js"></script> | ||
<style> | ||
.mdui-list-item, | ||
.mdui-list-item:hover { | ||
|