Skip to content

Commit

Permalink
test remove actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed Oct 19, 2024
1 parent 60beeb5 commit 28134d4
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,26 @@ def main():
# File Icon - Link - Size - Time
droot = (dirname == '.' and filename)
path = (dirname == '.' and filename or dirname + '/' + filename)
# Join Parent Directory and File Name with extension
fName = os.path.join(pDirname, filename)
f.write("<tr class=\"w-1/4 border-b dark:border-primary-darker hover:bg-primary-100 dark:hover:bg-primary-dark\">" +
"<th scope=\"row\" class=\"p-2 lg:px-6 font-medium whitespace-nowrap flex align-middle\">\n" +
"<a class=\"flex flex-nowrap items-center my-auto dark:text-light\" href=\"" + filename + "\" target=\"_blank\">" +
"<img style=\"max-width:23px; margin-right:5px\" src=\"" + get_icon_base64(filename) + "\"/>" + filename + "</a></th>" +
"<td class=\"size\">" + get_file_size(path) + "</td>" +
"<td class=\"time\">" + get_file_modified_time(path) + "</td>")

if droot:
f.write("<td></td></tr>\n")
else:
if not droot:
# File Preview - filename relative path
f.write("<td class=\"flex flex-nowrap items-center justify-center\">" +
"<a class=\"preview m-1 mb-1 py-1 bg-gray-100 rounded-md hover:text-light hover:bg-primary dark:bg-dark dark:hover:bg-dark dark:hover:text-light\" title=\"Preview File\" x-on:click=\"openWithSelfMain('" + filename + "','codemo','960','540')\">" +
"<span class=\"icon-view w-4 h-4 mx-2\"></span></a>")

# Join Parent Directory and File Name with extension
fName = os.path.join(pDirname, filename)
# GitHub Link to Edit
f.write("<a class=\"edit m-1 mb-1 py-1 bg-gray-100 rounded-md hover:text-light hover:bg-primary dark:bg-dark dark:hover:bg-dark dark:hover:text-light\" href=\"" + uEdit + fName + "\" target=\"_blank\" title=\"Edit File\">" +
"<span class=\"icon-view w-4 h-4 mx-2\"></span></a>" +
"<a class=\"edit m-1 mb-1 py-1 bg-gray-100 rounded-md hover:text-light hover:bg-primary dark:bg-dark dark:hover:bg-dark dark:hover:text-light\" href=\"" + uEdit + fName + "\" target=\"_blank\" title=\"Edit File\">" +
"<span class=\"icon-edit w-4 h-4 mx-2\"></span></a>" +
# GitHubBlob URL to Download
"<a class=\"download m-1 mb-1 py-1 bg-gray-100 rounded-md hover:text-light hover:bg-primary dark:bg-dark dark:hover:bg-dark dark:hover:text-light\" @click=\"GitZip.zipRepo('" + uBlob + fName + "'); await $nextTick(); $notify('Downloading file...')\" title=\"Download File\">" +
"<span class=\"icon-download w-4 h-4 mx-2\"></span></a></td></tr>\n")
"<span class=\"icon-download w-4 h-4 mx-2\"></span></a></td></tr>\n")
else:
f.write("<td></td></tr>\n")

f.write("\n".join([
get_template_foot(),
Expand Down

0 comments on commit 28134d4

Please sign in to comment.