Some optimizations. Improve font loading and embed global.css directly
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
|
||||
function uploadText() {
|
||||
var text = $("#textarea").val();
|
||||
if(!text.endsWith("\n")){
|
||||
text += "\n";
|
||||
}
|
||||
|
||||
var blob = new Blob([text], {type: "text/plain"});
|
||||
|
||||
startFileUpload(blob);
|
||||
|
@@ -13,13 +13,27 @@
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Ubuntu Regular'), local('Ubuntu-Regular'), local('Ubuntu'), url(/res/misc/Ubuntu-R.ttf) format('truetype');
|
||||
font-display: auto;
|
||||
src:
|
||||
local('Ubuntu'),
|
||||
local('Ubuntu Regular'),
|
||||
local('Ubuntu, Regular'),
|
||||
local('Ubuntu-Regular'),
|
||||
url(/res/misc/Ubuntu-R.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
src: local('Lato Hairline'), local('Lato-Hairline'), url(/res/misc/Lato-Hairline.ttf) format('truetype');
|
||||
font-display: auto;
|
||||
src:
|
||||
local('Lato Thin'),
|
||||
local('Lato, Thin'),
|
||||
local('Lato-Thin'),
|
||||
local('Lato Hairline'),
|
||||
local('Lato, Hairline'),
|
||||
local('Lato-Hairline'),
|
||||
url(/res/misc/Lato-Hairline.ttf) format('truetype');
|
||||
}
|
||||
|
||||
/* Page rendering configuration */
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Not Found"}}
|
||||
{{template "user_style" .}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Internal Server Error"}}
|
||||
{{template "user_style" .}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "File Manager"}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
<style>
|
||||
.file_manager {
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Login"}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Logging out..."}}
|
||||
{{template "user_style" .}}
|
||||
</head>
|
||||
<body>
|
||||
<div id='body' class="body">
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Register"}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
</head>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Files"}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" .Username}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Lists"}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" .Username}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "API Documentation"}}
|
||||
{{template "user_style" .}}
|
||||
<style>
|
||||
.api_doc_details{
|
||||
border-top: 1px solid;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "File Not Found"}}
|
||||
{{template "user_style" .}}
|
||||
</head>
|
||||
<body>
|
||||
<div id="body">
|
||||
|
@@ -5,7 +5,9 @@
|
||||
<title>{{.Title}}</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" href="/global.css"/>
|
||||
<style>
|
||||
{{.UserStyle}}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/res/style/viewer.css"/>
|
||||
<link rel="stylesheet" href="/res/style/layout.css"/>
|
||||
<link rel="stylesheet" href="/res/style/listview.css"/>
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<title>{{.}} ~ PixelDrain</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" href="/global.css"/>
|
||||
<link rel="stylesheet" href="/res/style/layout.css"/>
|
||||
<link rel="shortcut icon" href="/res/img/tray32.png"/>
|
||||
<meta name="theme-color" content="#9FCF6C"/>
|
5
res/template/fragments/user_style.html
Normal file
5
res/template/fragments/user_style.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{define "user_style"}}
|
||||
<style>
|
||||
{{.UserStyle}}
|
||||
</style>
|
||||
{{end}}
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Upload History"}}
|
||||
{{template "user_style" .}}
|
||||
<script src="res/script/jquery.js"></script>
|
||||
<script src="res/script/jquery-cookie.js"></script>
|
||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css"/>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Free file sharing service"}}
|
||||
{{template "user_style" .}}
|
||||
<script src="/res/script/jquery-2.1.4.min.js"></script>
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Text Upload"}}
|
||||
{{template "user_style" .}}
|
||||
<link rel="stylesheet" href="/res/style/viewer.css"/>
|
||||
<script src="/res/script/jquery-2.1.4.min.js"></script>
|
||||
<style>
|
||||
|
Reference in New Issue
Block a user