diff --git a/go.mod b/go.mod index 9c8234c..5192dc8 100644 --- a/go.mod +++ b/go.mod @@ -1,27 +1,27 @@ module fornaxian.tech/pixeldrain_web -go 1.17 +go 1.18 replace fornaxian.tech/pixeldrain_api_client => ../pixeldrain_api_client require ( fornaxian.tech/config v0.0.0-20211108212237-6133aed90586 fornaxian.tech/log v0.0.0-20211102185326-552e9b1f8640 - fornaxian.tech/pixeldrain_api_client v0.0.0-20220305171318-e1197ab3d4c0 - fornaxian.tech/util v0.0.0-20211102152345-9a486dee9787 + fornaxian.tech/pixeldrain_api_client v0.0.0-20220503161309-06b62641c05d + fornaxian.tech/util v0.0.0-20220603201140-7b74b1181b98 github.com/julienschmidt/httprouter v1.3.0 github.com/microcosm-cc/bluemonday v1.0.18 github.com/russross/blackfriday/v2 v2.1.0 ) require ( - github.com/BurntSushi/toml v1.0.0 // indirect + github.com/BurntSushi/toml v1.1.0 // indirect github.com/aymerick/douceur v0.2.0 // indirect - github.com/gocql/gocql v0.0.0-20220224095938-0eacd3183625 // indirect + github.com/gocql/gocql v1.1.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect - golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect gopkg.in/inf.v0 v0.9.1 // indirect ) diff --git a/go.sum b/go.sum index 4433c11..4eefc95 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,11 @@ fornaxian.tech/config v0.0.0-20211108212237-6133aed90586 h1:/4a0Iq3cYeyTWcPHsN9pVAGJH3UTq1GapK253lHfXnE= fornaxian.tech/config v0.0.0-20211108212237-6133aed90586/go.mod h1:ULIXF4J1DbBw4EsIPRNQDf6J3hl4P/jlihjy6UCm9FM= -fornaxian.tech/log v0.0.0-20190617093801-1c7ce9a7c9b3/go.mod h1:OyWUNsNPlo5AmlOHvJ4s6WcStQw+9rQyBMwmTz0buEM= fornaxian.tech/log v0.0.0-20211102185326-552e9b1f8640 h1:UPDxJwLRCfh/cv80UMSanzmZ0jIcfS1mcd0Y06HYuLw= fornaxian.tech/log v0.0.0-20211102185326-552e9b1f8640/go.mod h1:sN82qMToeHhP2u3ehvrcE8y1IudRZJAZO9yG5OBYblo= -fornaxian.tech/util v0.0.0-20211102152345-9a486dee9787 h1:9ujI8Qi6+FTL/YW6xQAS9DmWDMerHBe8foQvVD/G/i0= -fornaxian.tech/util v0.0.0-20211102152345-9a486dee9787/go.mod h1:FqVgfghmxTGR3l9Zx4MOMeZ9KHjiEFl3s3C0BSTvBwk= -github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= -github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +fornaxian.tech/util v0.0.0-20220603201140-7b74b1181b98 h1:d0FsJgwiHunT4X6Hyz7FRBQF+ix/RDagKj2/2VnlY14= +fornaxian.tech/util v0.0.0-20220603201140-7b74b1181b98/go.mod h1:lCmtcb4/SVt2ol55/EHDWGySY7o0ONbj97RR9CdsN4M= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= @@ -15,9 +13,8 @@ github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCS github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gocql/gocql v0.0.0-20211015133455-b225f9b53fa1/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= -github.com/gocql/gocql v0.0.0-20220224095938-0eacd3183625 h1:6ImvI6U901e1ezn/8u2z3bh1DZIvMOia0yTSBxhy4Ao= -github.com/gocql/gocql v0.0.0-20220224095938-0eacd3183625/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/gocql/gocql v1.1.0 h1:ow36yzymDGsuKqnkecq2zR3prFkkbdzC/af5zTyPXNc= +github.com/gocql/gocql v1.1.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -39,27 +36,15 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= +golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= diff --git a/res/include/img/icons/bat_logo_color.png b/res/include/img/icons/bat_logo_color.png deleted file mode 100644 index 70bfc3e..0000000 Binary files a/res/include/img/icons/bat_logo_color.png and /dev/null differ diff --git a/res/include/img/icons/brave_lion.png b/res/include/img/icons/brave_lion.png deleted file mode 100644 index 0cff5eb..0000000 Binary files a/res/include/img/icons/brave_lion.png and /dev/null differ diff --git a/res/include/img/icons/pixeldrain_icon.png b/res/include/img/icons/pixeldrain_icon.png deleted file mode 100644 index 99eaee0..0000000 Binary files a/res/include/img/icons/pixeldrain_icon.png and /dev/null differ diff --git a/res/include/img/loadthink.gif b/res/include/img/loadthink.gif deleted file mode 100644 index 89e158e..0000000 Binary files a/res/include/img/loadthink.gif and /dev/null differ diff --git a/res/include/md/hosting.md b/res/include/md/hosting.md index 567ff60..e6fe132 100644 --- a/res/include/md/hosting.md +++ b/res/include/md/hosting.md @@ -122,5 +122,7 @@ this. So enable IPv6. If you don't have IPv6, call your ISP and ask them why not.
-{{ template "built-with-Sia-mono.svg" . }} + + Built with Sia +
diff --git a/res/include/script/history.js b/res/include/script/history.js deleted file mode 100644 index 4a7eec2..0000000 --- a/res/include/script/history.js +++ /dev/null @@ -1,87 +0,0 @@ -function renderFileButton(apiURL, id, title, subtitle) { - let btn = document.createElement("a") - btn.classList = "file_button" - btn.href = "/u/" + id - btn.target = "_blank" - let thumbnail = document.createElement("img") - thumbnail.src = apiURL + "/file/" + id + "/thumbnail?width=80&height=80" - thumbnail.alt = title - let titleSpan = document.createElement("span") - titleSpan.classList = "file_button_title" - titleSpan.innerText = title - let br = document.createElement("br") - let subtitleSpan = document.createElement("span") - subtitleSpan.classList = "file_button_subtitle" - subtitleSpan.innerText = subtitle - - btn.appendChild(thumbnail) - btn.appendChild(titleSpan) - btn.appendChild(br) - btn.appendChild(subtitleSpan) - return btn -} - -function getCookie(name) { - var result = new RegExp('(?:^|; )' + encodeURIComponent(name) + '=([^;]*)').exec(document.cookie) - return result ? result[1] : null -} - -function printDate(date, hours, minutes, seconds) { - let dateStr = date.getFullYear() - + "-" + ("00" + (date.getMonth() + 1)).slice(-2) - + "-" + ("00" + date.getDate()).slice(-2) - - if (hours) { dateStr += " " + ("00" + date.getHours()).slice(-2) } - if (minutes) { dateStr += ":" + ("00" + date.getMinutes()).slice(-2) } - if (seconds) { dateStr += ":" + ("00" + date.getMinutes()).slice(-2) } - return dateStr -} - -// Get the uploads from localstorage -let uploadsStr = localStorage.getItem("uploaded_files") -if (uploadsStr === null) { uploadsStr = "" } - -let uploads = Array() -if (uploadsStr != "") { - // Strip the trailing comma - uploads = uploadsStr.slice(0, -1).split(",") -} - -// Get the uploads from a cookie -uploadsStr = getCookie("pduploads") -if (uploadsStr === null) { uploadsStr = "" } - -if (uploadsStr != "") { - uploadsStr = uploadsStr.slice(0, -1) // Strip the trailing dot - uploads.push(uploadsStr.split(".").reverse()) -} - -// Render all the items -function getHistoryItem() { - let item = uploads.shift() - if (item === undefined || item === "") { return } - - fetch( - apiEndpoint + "/file/" + item + "/info" - ).then(resp => { - if (!resp.ok) { - return Promise.reject() - } - return resp.json() - }).then(resp => { - document.getElementById("uploaded_files").appendChild( - renderFileButton( - apiEndpoint, - resp.id, - resp.name, - printDate(new Date(resp.date_upload), true, true, true), - ) - ) - getHistoryItem() - }).catch(err => { - console.log("Fetch failed: " + err) - getHistoryItem() - }) -} - -getHistoryItem() diff --git a/res/include/img/background_patterns/checker0.png b/res/static/img/background_patterns/checker0.png similarity index 100% rename from res/include/img/background_patterns/checker0.png rename to res/static/img/background_patterns/checker0.png diff --git a/res/include/img/background_patterns/checker0_transparent.png b/res/static/img/background_patterns/checker0_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker0_transparent.png rename to res/static/img/background_patterns/checker0_transparent.png diff --git a/res/include/img/background_patterns/checker1.png b/res/static/img/background_patterns/checker1.png similarity index 100% rename from res/include/img/background_patterns/checker1.png rename to res/static/img/background_patterns/checker1.png diff --git a/res/include/img/background_patterns/checker10.png b/res/static/img/background_patterns/checker10.png similarity index 100% rename from res/include/img/background_patterns/checker10.png rename to res/static/img/background_patterns/checker10.png diff --git a/res/include/img/background_patterns/checker10_transparent.png b/res/static/img/background_patterns/checker10_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker10_transparent.png rename to res/static/img/background_patterns/checker10_transparent.png diff --git a/res/include/img/background_patterns/checker11.png b/res/static/img/background_patterns/checker11.png similarity index 100% rename from res/include/img/background_patterns/checker11.png rename to res/static/img/background_patterns/checker11.png diff --git a/res/include/img/background_patterns/checker11_transparent.png b/res/static/img/background_patterns/checker11_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker11_transparent.png rename to res/static/img/background_patterns/checker11_transparent.png diff --git a/res/include/img/background_patterns/checker12.png b/res/static/img/background_patterns/checker12.png similarity index 100% rename from res/include/img/background_patterns/checker12.png rename to res/static/img/background_patterns/checker12.png diff --git a/res/include/img/background_patterns/checker12_transparent.png b/res/static/img/background_patterns/checker12_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker12_transparent.png rename to res/static/img/background_patterns/checker12_transparent.png diff --git a/res/include/img/background_patterns/checker13.png b/res/static/img/background_patterns/checker13.png similarity index 100% rename from res/include/img/background_patterns/checker13.png rename to res/static/img/background_patterns/checker13.png diff --git a/res/include/img/background_patterns/checker13_transparent.png b/res/static/img/background_patterns/checker13_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker13_transparent.png rename to res/static/img/background_patterns/checker13_transparent.png diff --git a/res/include/img/background_patterns/checker14.png b/res/static/img/background_patterns/checker14.png similarity index 100% rename from res/include/img/background_patterns/checker14.png rename to res/static/img/background_patterns/checker14.png diff --git a/res/include/img/background_patterns/checker14_transparent.png b/res/static/img/background_patterns/checker14_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker14_transparent.png rename to res/static/img/background_patterns/checker14_transparent.png diff --git a/res/include/img/background_patterns/checker15.png b/res/static/img/background_patterns/checker15.png similarity index 100% rename from res/include/img/background_patterns/checker15.png rename to res/static/img/background_patterns/checker15.png diff --git a/res/include/img/background_patterns/checker15_transparent.png b/res/static/img/background_patterns/checker15_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker15_transparent.png rename to res/static/img/background_patterns/checker15_transparent.png diff --git a/res/include/img/background_patterns/checker16.png b/res/static/img/background_patterns/checker16.png similarity index 100% rename from res/include/img/background_patterns/checker16.png rename to res/static/img/background_patterns/checker16.png diff --git a/res/include/img/background_patterns/checker16_transparent.png b/res/static/img/background_patterns/checker16_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker16_transparent.png rename to res/static/img/background_patterns/checker16_transparent.png diff --git a/res/include/img/background_patterns/checker17.png b/res/static/img/background_patterns/checker17.png similarity index 100% rename from res/include/img/background_patterns/checker17.png rename to res/static/img/background_patterns/checker17.png diff --git a/res/include/img/background_patterns/checker17_transparent.png b/res/static/img/background_patterns/checker17_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker17_transparent.png rename to res/static/img/background_patterns/checker17_transparent.png diff --git a/res/include/img/background_patterns/checker1_transparent.png b/res/static/img/background_patterns/checker1_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker1_transparent.png rename to res/static/img/background_patterns/checker1_transparent.png diff --git a/res/include/img/background_patterns/checker2.png b/res/static/img/background_patterns/checker2.png similarity index 100% rename from res/include/img/background_patterns/checker2.png rename to res/static/img/background_patterns/checker2.png diff --git a/res/include/img/background_patterns/checker2_transparent.png b/res/static/img/background_patterns/checker2_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker2_transparent.png rename to res/static/img/background_patterns/checker2_transparent.png diff --git a/res/include/img/background_patterns/checker3.png b/res/static/img/background_patterns/checker3.png similarity index 100% rename from res/include/img/background_patterns/checker3.png rename to res/static/img/background_patterns/checker3.png diff --git a/res/include/img/background_patterns/checker3_transparent.png b/res/static/img/background_patterns/checker3_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker3_transparent.png rename to res/static/img/background_patterns/checker3_transparent.png diff --git a/res/include/img/background_patterns/checker4.png b/res/static/img/background_patterns/checker4.png similarity index 100% rename from res/include/img/background_patterns/checker4.png rename to res/static/img/background_patterns/checker4.png diff --git a/res/include/img/background_patterns/checker4_transparent.png b/res/static/img/background_patterns/checker4_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker4_transparent.png rename to res/static/img/background_patterns/checker4_transparent.png diff --git a/res/include/img/background_patterns/checker5.png b/res/static/img/background_patterns/checker5.png similarity index 100% rename from res/include/img/background_patterns/checker5.png rename to res/static/img/background_patterns/checker5.png diff --git a/res/include/img/background_patterns/checker5_transparent.png b/res/static/img/background_patterns/checker5_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker5_transparent.png rename to res/static/img/background_patterns/checker5_transparent.png diff --git a/res/include/img/background_patterns/checker6.png b/res/static/img/background_patterns/checker6.png similarity index 100% rename from res/include/img/background_patterns/checker6.png rename to res/static/img/background_patterns/checker6.png diff --git a/res/include/img/background_patterns/checker6_transparent.png b/res/static/img/background_patterns/checker6_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker6_transparent.png rename to res/static/img/background_patterns/checker6_transparent.png diff --git a/res/include/img/background_patterns/checker7.png b/res/static/img/background_patterns/checker7.png similarity index 100% rename from res/include/img/background_patterns/checker7.png rename to res/static/img/background_patterns/checker7.png diff --git a/res/include/img/background_patterns/checker7_transparent.png b/res/static/img/background_patterns/checker7_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker7_transparent.png rename to res/static/img/background_patterns/checker7_transparent.png diff --git a/res/include/img/background_patterns/checker8.png b/res/static/img/background_patterns/checker8.png similarity index 100% rename from res/include/img/background_patterns/checker8.png rename to res/static/img/background_patterns/checker8.png diff --git a/res/include/img/background_patterns/checker8_transparent.png b/res/static/img/background_patterns/checker8_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker8_transparent.png rename to res/static/img/background_patterns/checker8_transparent.png diff --git a/res/include/img/background_patterns/checker9.png b/res/static/img/background_patterns/checker9.png similarity index 100% rename from res/include/img/background_patterns/checker9.png rename to res/static/img/background_patterns/checker9.png diff --git a/res/include/img/background_patterns/checker9_transparent.png b/res/static/img/background_patterns/checker9_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker9_transparent.png rename to res/static/img/background_patterns/checker9_transparent.png diff --git a/res/include/img/background_patterns/checker_christmas.png b/res/static/img/background_patterns/checker_christmas.png similarity index 100% rename from res/include/img/background_patterns/checker_christmas.png rename to res/static/img/background_patterns/checker_christmas.png diff --git a/res/include/img/background_patterns/checker_christmas_transparent.png b/res/static/img/background_patterns/checker_christmas_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker_christmas_transparent.png rename to res/static/img/background_patterns/checker_christmas_transparent.png diff --git a/res/include/img/background_patterns/checker_developers.png b/res/static/img/background_patterns/checker_developers.png similarity index 100% rename from res/include/img/background_patterns/checker_developers.png rename to res/static/img/background_patterns/checker_developers.png diff --git a/res/include/img/background_patterns/checker_developers_transparent.png b/res/static/img/background_patterns/checker_developers_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker_developers_transparent.png rename to res/static/img/background_patterns/checker_developers_transparent.png diff --git a/res/include/img/background_patterns/checker_dwarf.png b/res/static/img/background_patterns/checker_dwarf.png similarity index 100% rename from res/include/img/background_patterns/checker_dwarf.png rename to res/static/img/background_patterns/checker_dwarf.png diff --git a/res/include/img/background_patterns/checker_dwarf_transparent.png b/res/static/img/background_patterns/checker_dwarf_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker_dwarf_transparent.png rename to res/static/img/background_patterns/checker_dwarf_transparent.png diff --git a/res/include/img/background_patterns/checker_halloween.png b/res/static/img/background_patterns/checker_halloween.png similarity index 100% rename from res/include/img/background_patterns/checker_halloween.png rename to res/static/img/background_patterns/checker_halloween.png diff --git a/res/include/img/background_patterns/checker_halloween_transparent.png b/res/static/img/background_patterns/checker_halloween_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker_halloween_transparent.png rename to res/static/img/background_patterns/checker_halloween_transparent.png diff --git a/res/include/img/background_patterns/checker_ukraine.png b/res/static/img/background_patterns/checker_ukraine.png similarity index 100% rename from res/include/img/background_patterns/checker_ukraine.png rename to res/static/img/background_patterns/checker_ukraine.png diff --git a/res/include/img/background_patterns/checker_ukraine_transparent.png b/res/static/img/background_patterns/checker_ukraine_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker_ukraine_transparent.png rename to res/static/img/background_patterns/checker_ukraine_transparent.png diff --git a/res/include/img/background_patterns/checker_wednesday.png b/res/static/img/background_patterns/checker_wednesday.png similarity index 100% rename from res/include/img/background_patterns/checker_wednesday.png rename to res/static/img/background_patterns/checker_wednesday.png diff --git a/res/include/img/background_patterns/checker_wednesday_transparent.png b/res/static/img/background_patterns/checker_wednesday_transparent.png similarity index 100% rename from res/include/img/background_patterns/checker_wednesday_transparent.png rename to res/static/img/background_patterns/checker_wednesday_transparent.png diff --git a/res/include/img/background_patterns/create_transparent.sh b/res/static/img/background_patterns/create_transparent.sh similarity index 100% rename from res/include/img/background_patterns/create_transparent.sh rename to res/static/img/background_patterns/create_transparent.sh diff --git a/res/include/img/icons/built-with-Sia-mono.svg b/res/static/img/misc/built-with-Sia-mono.svg similarity index 100% rename from res/include/img/icons/built-with-Sia-mono.svg rename to res/static/img/misc/built-with-Sia-mono.svg diff --git a/res/include/style/layout.css b/res/static/style/layout.css similarity index 99% rename from res/include/style/layout.css rename to res/static/style/layout.css index 87b6425..1f7c2ec 100644 --- a/res/include/style/layout.css +++ b/res/static/style/layout.css @@ -72,12 +72,13 @@ body { background: var(--background); min-height: 100vh; padding: 0; + transition: opacity 0.2s; } header, footer, .checkers { - background-image: url("{{.BackgroundPattern}}"); + background-image: var(--background_pattern); background-color: var(--background_pattern_color); background-repeat: repeat; } diff --git a/res/template/404.html b/res/template/404.html index c4ac34e..0f3b264 100644 --- a/res/template/404.html +++ b/res/template/404.html @@ -2,7 +2,6 @@ {{template "meta_tags" "Not Found"}} - {{template "user_style" .}} diff --git a/res/template/451.html b/res/template/451.html index 57efc43..e8e35d3 100644 --- a/res/template/451.html +++ b/res/template/451.html @@ -2,7 +2,6 @@ {{template "meta_tags" "451, Unavailable For Legal Reasons"}} - {{template "user_style" .}} diff --git a/res/template/500.html b/res/template/500.html index 9c23e69..7e367d4 100644 --- a/res/template/500.html +++ b/res/template/500.html @@ -2,7 +2,6 @@ {{template "meta_tags" "500, Internal Server Error"}} - {{template "user_style" .}} diff --git a/res/template/admin.html b/res/template/admin.html index 92353d6..8f7c4e7 100644 --- a/res/template/admin.html +++ b/res/template/admin.html @@ -4,7 +4,6 @@ {{if and .Authenticated .User.IsAdmin}} {{template "meta_tags" "Administrator panel"}} - {{template "user_style" .}} {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/apps.html b/res/template/apps.html index eea6100..c7ddffd 100644 --- a/res/template/apps.html +++ b/res/template/apps.html @@ -2,7 +2,6 @@ {{template "meta_tags" "Apps"}} - {{template "user_style" .}} -{{end}} diff --git a/res/template/history.html b/res/template/history.html index fbdef79..73ec726 100644 --- a/res/template/history.html +++ b/res/template/history.html @@ -2,7 +2,6 @@ {{template "meta_tags" "Upload History"}} - {{template "user_style" .}} {{template "page_top" .}} @@ -23,7 +22,93 @@ {{template "analytics"}} diff --git a/res/template/home.html b/res/template/home.html index 19c99cf..0e5ce36 100644 --- a/res/template/home.html +++ b/res/template/home.html @@ -3,7 +3,7 @@ {{template "meta_tags" "Free file sharing service"}} - {{template "user_style" .}} +