Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitst05 committed May 2, 2024
1 parent 4f3aa0e commit 5ae207d
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 31 deletions.
4 changes: 2 additions & 2 deletions web/templates/components/audio_svg_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/templates/components/audio_svg_templ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\" viewBox=\"0 0 24 24\"><path d=\"M1 10v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-2 0zM6 6v12a1 1 0 0 0 2 0V6a1 1 0 0 0-2 0zM21 10v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-2 0zM16 6v12a1 1 0 0 0 2 0V6a1 1 0 0 0-2 0zM11 2v20a1 1 0 0 0 2 0V2a1 1 0 0 0-2 0z\" fill=\"#F8F6E3\"></path></svg>
28 changes: 14 additions & 14 deletions web/templates/components/cards_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions web/templates/components/cards_templ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;pngFile&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">PNG</p><input type=\"file\" accept=\"image/png\" id=\"pngFile\" name=\"file\" onchange=\"submitForm(&#39;pngFile&#39;)\" hidden></li><li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;jpgFile&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">JPG</p><input type=\"file\" accept=\"image/jpeg\" id=\"jpgFile\" name=\"file\" onchange=\"submitForm(&#39;jpgFile&#39;)\" hidden></li>
<li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;pdfFile&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">PDF</p><input type=\"file\" accept=\"application/pdf\" id=\"pdfFile\" name=\"file\" onchange=\"submitForm(&#39;pdfFile&#39;)\" hidden></li><li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;docxFile&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">DOCX</p><input type=\"file\" accept=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" id=\"docxFile\" name=\"file\" onchange=\"submitForm(&#39;docxFile&#39;)\" hidden></li>
<li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;mp3File&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">MP3</p><input type=\"file\" accept=\"audio/mpeg\" id=\"mp3File\" name=\"file\" onchange=\"submitForm(&#39;mp3File&#39;)\" hidden></li><li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;wavFile&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">WAV</p><input type=\"file\" accept=\"audio/wav\" id=\"wavFile\" name=\"file\" onchange=\"submitForm(&#39;wavFile&#39;)\" hidden></li>
<li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;mp4File&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">MP4</p><input type=\"file\" accept=\"video/mp4\" id=\"mp4File\" name=\"file\" onchange=\"submitForm(&#39;mp4File&#39;)\" hidden></li><li class=\"flex flex-col items-center p-8 rounded-lg hover:scale-110 bg-[#7AA2E3] cursor-pointer\" onclick=\"document.getElementById(&#39;mkvFile&#39;).click();\">
<p class=\"text-[#f8f6e3] font-bold text-4xl\">MKV</p><input type=\"file\" accept=\"video/x-matroska\" id=\"mkvFile\" name=\"file\" onchange=\"submitForm(&#39;mkvFile&#39;)\" hidden></li>
<script>\n\tfunction submitForm(fileInputId) {\n\t\tvar form = document.createElement('form');\n\t\tform.method = 'POST';\n\t\tform.enctype = 'multipart/form-data';\n\t\tform.style.display = 'none';\n\n\t\tif (fileInputId === 'pngFile') {\n\t\t\tform.action = '/shrink/png';\n\t\t} else if (fileInputId === 'jpgFile') {\n\t\t\tform.action = '/shrink/jpg';\n\t\t} else if (fileInputId === 'pdfFile') {\n\t\t\tform.action = '/shrink/pdf'\n\t\t} else if (fileInputId === 'docxFile') {\n\t\t\tform.action = '/shrink/docx';\n\t\t} else if (fileInputId === 'mp3File') {\n\t\t\tform.action = '/shrink/mp3'\n\t\t} else if (fileInputId === 'wavFile') {\n\t\t\tform.action = '/shrink/wav'\n\t\t} else if (fileInputId === 'mp4File') {\n\t\t\tform.action = '/shrink/mp4'\n\t\t} else if (fileInputId === 'mkvFile') {\n\t\t\tform.action = '/shrink/mkv'\n\t\t}\n\n\t\tvar fileInput = document.getElementById(fileInputId);\n\t\tform.appendChild(fileInput.cloneNode(true));\n\n\t\tdocument.body.appendChild(form);\n\t\tform.submit();\n\t\tdocument.body.removeChild(form);\n\t}\n</script>
4 changes: 2 additions & 2 deletions web/templates/components/document_svg_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/templates/components/document_svg_templ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F8F6E3\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z\"></path> <path d=\"M14 3v5h5\"></path></svg>
12 changes: 6 additions & 6 deletions web/templates/components/header_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5ae207d

Please sign in to comment.