mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
Updates~ 😉
Thanks to Zephyrrus for the hints about nunjucks, sort of (he did not really give out any specific hints to me, I stalked his fork, lmao). * Replaced Handlebars with Nunjucks. * Replaced all static HTML files with their NJK-equivalent (excluding error pages). * Renamed "albumDomain" to "homeDomain" in config.sample.js (make sure you update your config.js too). * Updated dependencies: knex and eslint-plugin-import (dev). * Updated vscode's settings.json (I may update this again very soon).
This commit is contained in:
parent
1aee22d6a2
commit
09f51c8448
@ -1,6 +1,5 @@
|
||||
{
|
||||
"indent_size": 2,
|
||||
"indent_char": " ",
|
||||
"indent_inner_html": true,
|
||||
"indent_handlebars": true
|
||||
"indent_inner_html": true
|
||||
}
|
||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -11,8 +11,7 @@
|
||||
"html": [
|
||||
"htm",
|
||||
"html",
|
||||
"hbs",
|
||||
"handlebars"
|
||||
"njk" // this probably does not even work
|
||||
]
|
||||
},
|
||||
"discord.enabled": true,
|
||||
|
@ -30,8 +30,9 @@ module.exports = {
|
||||
/*
|
||||
If you are serving your files with a different domain than your lolisafe homepage,
|
||||
then fill this option with your lolisafe homepage, otherwise leave it null (or other falsy value).
|
||||
This will be used when listing album links in the dashboard.
|
||||
*/
|
||||
albumDomain: null,
|
||||
homeDomain: null,
|
||||
|
||||
// Port on which to run the server
|
||||
port: 9999,
|
||||
|
@ -8,8 +8,9 @@ const Zip = require('jszip')
|
||||
|
||||
const albumsController = {}
|
||||
|
||||
const homeDomain = config.homeDomain || config.domain
|
||||
|
||||
albumsController.list = async (req, res, next) => {
|
||||
const albumDomain = config.albumDomain || config.domain
|
||||
const user = await utils.authorize(req, res)
|
||||
if (!user) { return }
|
||||
|
||||
@ -34,7 +35,7 @@ albumsController.list = async (req, res, next) => {
|
||||
for (const album of albums) {
|
||||
album.date = utils.getPrettyDate(new Date(album.timestamp * 1000))
|
||||
|
||||
album.identifier = `${albumDomain}/a/${album.identifier}`
|
||||
album.identifier = `${homeDomain}/a/${album.identifier}`
|
||||
ids.push(album.id)
|
||||
}
|
||||
|
||||
|
30
lolisafe.js
30
lolisafe.js
@ -3,12 +3,12 @@ const api = require('./routes/api')
|
||||
const album = require('./routes/album')
|
||||
const nojs = require('./routes/nojs')
|
||||
const express = require('express')
|
||||
const helmet = require('helmet')
|
||||
const bodyParser = require('body-parser')
|
||||
const RateLimit = require('express-rate-limit')
|
||||
const db = require('knex')(config.database)
|
||||
const fs = require('fs')
|
||||
const exphbs = require('express-handlebars')
|
||||
const helmet = require('helmet')
|
||||
const nunjucks = require('nunjucks')
|
||||
const RateLimit = require('express-rate-limit')
|
||||
const safe = express()
|
||||
|
||||
require('./database/db.js')(db)
|
||||
@ -23,8 +23,11 @@ fs.existsSync('./' + config.uploads.folder + '/zips') || fs.mkdirSync('./' + con
|
||||
safe.use(helmet())
|
||||
safe.set('trust proxy', 1)
|
||||
|
||||
safe.engine('handlebars', exphbs({ defaultLayout: 'main' }))
|
||||
safe.set('view engine', 'handlebars')
|
||||
nunjucks.configure('views', {
|
||||
autoescape: true,
|
||||
express: safe
|
||||
})
|
||||
safe.set('view engine', 'njk')
|
||||
safe.enable('view cache')
|
||||
|
||||
const limiter = new RateLimit({ windowMs: 5000, max: 2 })
|
||||
@ -51,24 +54,23 @@ safe.use('/', nojs)
|
||||
safe.use('/api', api)
|
||||
|
||||
for (const page of config.pages) {
|
||||
let root = './pages/'
|
||||
if (fs.existsSync(`./pages/custom/${page}.html`)) {
|
||||
root = './pages/custom/'
|
||||
}
|
||||
if (page === 'home') {
|
||||
safe.get('/', (req, res, next) => res.sendFile(`${page}.html`, { root }))
|
||||
safe.get(`/${page}`, (req, res, next) => res.sendFile(`${page}.html`, { root: './pages/custom/' }))
|
||||
} else {
|
||||
safe.get(`/${page}`, (req, res, next) => res.sendFile(`${page}.html`, { root }))
|
||||
if (page === 'home') {
|
||||
safe.get('/', (req, res, next) => res.render('home'))
|
||||
} else {
|
||||
safe.get(`/${page}`, (req, res, next) => res.render(page))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: Uses fiery.me branch of https://github.com/BobbyWibowo/HttpErrorPages
|
||||
safe.use((req, res, next) => {
|
||||
res.status(404).sendFile('HTTP404.html', { root: './../HttpErrorPages/dist/' })
|
||||
res.status(404).sendFile('HTTP404.html', { root: './pages/errors/' })
|
||||
})
|
||||
safe.use((error, req, res, next) => {
|
||||
console.error(error)
|
||||
res.status(500).sendFile('HTTP500.html', { root: './../HttpErrorPages/dist/' })
|
||||
res.status(500).sendFile('HTTP500.html', { root: './pages/errors/' })
|
||||
})
|
||||
|
||||
safe.listen(config.port, () => console.log(`lolisafe started on port ${config.port}`))
|
||||
|
@ -28,15 +28,16 @@
|
||||
"gm": "^1.23.1",
|
||||
"helmet": "^3.12.0",
|
||||
"jszip": "^3.1.5",
|
||||
"knex": "^0.14.4",
|
||||
"knex": "^0.14.6",
|
||||
"multer": "^1.3.0",
|
||||
"nunjucks": "^3.1.2",
|
||||
"randomstring": "^1.1.5",
|
||||
"sqlite3": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-config-standard": "^11.0.0",
|
||||
"eslint-plugin-import": "^2.10.0",
|
||||
"eslint-plugin-import": "^2.11.0",
|
||||
"eslint-plugin-node": "^6.0.1",
|
||||
"eslint-plugin-promise": "^3.7.0",
|
||||
"eslint-plugin-standard": "^3.0.1"
|
||||
|
@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>safe.fiery.me – A small safe worth protecting.</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v=L4ZeQAC3XC">
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="js/album.js?v=L4ZeQAC3XC"></script>
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="safe.fiery.me – A small safe worth protecting." />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="https://safe.fiery.me/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="https://safe.fiery.me/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="safe.fiery.me – A small safe worth protecting.">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="https://safe.fiery.me/icons/600px.png">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<section class="hero is-fullheight">
|
||||
<div class="hero-head">
|
||||
<div class="container">
|
||||
<h1 class="title" id="title" style='margin-top: 1.5rem;'></h1>
|
||||
<h1 class="subtitle" id="count"></h1>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-body">
|
||||
<div class="container" id="container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
103
pages/auth.html
103
pages/auth.html
@ -1,103 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>safe.fiery.me – A small safe worth protecting.</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/auth.css?v=L4ZeQAC3XC">
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="js/auth.js?v=L4ZeQAC3XC"></script>
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="safe.fiery.me – A small safe worth protecting." />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="https://safe.fiery.me/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="https://safe.fiery.me/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="safe.fiery.me – A small safe worth protecting.">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="https://safe.fiery.me/icons/600px.png">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section id="login" class="hero is-fullheight" style="background-color: #232629">
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-one-third is-hidden-touch"></div>
|
||||
<div class="column">
|
||||
<h1 class="title">
|
||||
Dashboard Access
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
Login or register
|
||||
</h2>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<input id="user" class="input" type="text" onkeypress="page.onkeypress(event, this)" placeholder="Your username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<input id="pass" class="input" type="password" onkeypress="page.onkeypress(event, this)" placeholder="Your password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped is-grouped-right">
|
||||
<div class="control">
|
||||
<a id="registerBtn" class="button" onclick="page.do('register')">
|
||||
<span class="icon">
|
||||
<i class="icon-user-plus"></i>
|
||||
</span>
|
||||
<span>Register</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="control">
|
||||
<a id="loginBtn" class="button" onclick="page.do('login')">
|
||||
<span class="icon">
|
||||
<i class="icon-login"></i>
|
||||
</span>
|
||||
<span>Log in</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-one-third is-hidden-mobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,138 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>safe.fiery.me – A small safe worth protecting.</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/dashboard.css?v=FAdsWVZ4uz">
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/clipboard.js/clipboard.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="js/dashboard.js?v=L4ZeQAC3XC"></script>
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="safe.fiery.me – A small safe worth protecting." />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="https://safe.fiery.me/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="https://safe.fiery.me/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="safe.fiery.me – A small safe worth protecting.">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="https://safe.fiery.me/icons/600px.png">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section id="auth" class="hero is-light is-fullheight">
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<h1 class="title">
|
||||
Admin dashboard
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
<p class="control has-addons">
|
||||
<input id="token" class="input is-danger" type="text" placeholder="Your admin token">
|
||||
<a id="tokenSubmit" class="button is-danger is-outlined">Check</a>
|
||||
</p>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="dashboard" class="section">
|
||||
<div id="panel" class="container">
|
||||
<h1 class="title">
|
||||
Dashboard
|
||||
</h1>
|
||||
<h1 class="subtitle">
|
||||
A simple <strong>dashboard</strong>, to sort your uploaded stuff
|
||||
</h1>
|
||||
<hr>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-one-quarter">
|
||||
<aside id="menu" class="menu">
|
||||
<p class="menu-label">General</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a href=".">Frontpage</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemUploads" onclick="panel.getUploads()">Uploads</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label">Albums</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a id="itemManageGallery" onclick="panel.getAlbums()">Manage your albums</a>
|
||||
</li>
|
||||
<li>
|
||||
<ul id="albumsContainer"></ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label">Administration</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a id="itemFileLength" onclick="panel.changeFileLength()">File name length</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemTokens" onclick="panel.changeToken()">Manage your token</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemPassword" onclick="panel.changePassword()">Change your password</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemLogout" onclick="panel.logout()">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</div>
|
||||
<div id="page" class="column has-text-centered is-third-quarters">
|
||||
<img src="images/logo.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="modal" class="modal">
|
||||
<div class="modal-background" onclick="panel.closeModal()"></div>
|
||||
<div class="modal-content">
|
||||
<figure class="image">
|
||||
<img id="modalImage">
|
||||
</figure>
|
||||
</div>
|
||||
<button class="modal-close is-large" aria-label="close" onclick="panel.closeModal()"></button>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
1
pages/errors/HTTP404.html
Symbolic link
1
pages/errors/HTTP404.html
Symbolic link
@ -0,0 +1 @@
|
||||
../../../HttpErrorPages/dist/HTTP404.html
|
1
pages/errors/HTTP500.html
Symbolic link
1
pages/errors/HTTP500.html
Symbolic link
@ -0,0 +1 @@
|
||||
../../../HttpErrorPages/dist/HTTP500.html
|
130
pages/faq.html
130
pages/faq.html
@ -1,130 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>safe.fiery.me – A small safe worth protecting.</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v=L4ZeQAC3XC">
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="safe.fiery.me – A small safe worth protecting." />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="https://safe.fiery.me/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="https://safe.fiery.me/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="safe.fiery.me – A small safe worth protecting.">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="https://safe.fiery.me/icons/600px.png">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
|
||||
<style>
|
||||
.message {
|
||||
background-color: #31363b;
|
||||
}
|
||||
|
||||
.message-body {
|
||||
color: #eff0f1;
|
||||
border: 0;
|
||||
-webkit-box-shadow: 0 20px 60px rgba(10, 10, 10, 0.05), 0 5px 10px rgba(10, 10, 10, 0.1), 0 1px 1px rgba(10, 10, 10, 0.2);
|
||||
box-shadow: 0 20px 60px rgba(10, 10, 10, 0.05), 0 5px 10px rgba(10, 10, 10, 0.1), 0 1px 1px rgba(10, 10, 10, 0.2);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section class="hero is-fullheight has-text-centered" id="home">
|
||||
<div class="hero-body">
|
||||
<div class="container has-text-left">
|
||||
<h2 class='subtitle'>What is safe.fiery.me?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
safe.fiery.me is merely another clone of lolisafe. We accept your files, photos, documents, anything, and give you back a shareable link for you to send to others.<br> lolisafe itself is an easy to use, open source and completely free file
|
||||
upload service.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Will you keep my files forever?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Unless I receive a copyright complain or some other bullshit, I will.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>How can I keep track of my uploads?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Simply create a user on the site and every upload will be associated with your account, granting you access to your uploaded files through our dashboard.<br> By having an account, you will also be able to set file name length for your new
|
||||
uploads!
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Do you have any No-JS uploader?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Yes, check out <a href="../nojs" target="_blank">this page</a>.<br> Unfortunately you will not be able to associate your uploads to your account, if you have any.<br> Then again, if you want to use the No-JS uploader, then it's very likely
|
||||
that you will not use the Dashboard anyways.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>What are albums?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Albums are a simple way of sorting uploads together. Right now you can create albums through the dashboard, then afterwards you can use them through the homepage uploader or with <a href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj"
|
||||
target="_blank">our chrome extension</a>, which will enable you to <strong>right click -> send to lolisafe</strong> or to a desired album if you have any. You will probably have to change some things involving <b>https://safe.fiery.me/api/upload</b> if you want to use the extension though.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Why should I use this?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
I don't know.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>I saw something too illegal for my tastes here, what do?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Send a strongly worded email to <a href="mailto:bobby@fiery.me">bobby@fiery.me</a> and I will try to get back to you within 24 hours.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Do you support chunked uploads?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Yes, the homepage uploader will chunk your uploads into 10 MB pieces by default. If you want to utilize chunked uploads with the API, then feel free to inspect the HTTP requests.
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
183
pages/home.html
183
pages/home.html
@ -1,183 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>safe.fiery.me – A small safe worth protecting.</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/home.css?v=KqYMorNQh2">
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/dropzone/dropzone.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="libs/clipboard.js/clipboard.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="js/home.js?v=L4ZeQAC3XC"></script>
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="safe.fiery.me – A small safe worth protecting." />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="https://safe.fiery.me/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="https://safe.fiery.me/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="safe.fiery.me – A small safe worth protecting.">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="https://safe.fiery.me/icons/600px.png">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section class="hero is-fullheight has-text-centered" id="home">
|
||||
<div class="hero-body section">
|
||||
<div class="container">
|
||||
<p id="b">
|
||||
<img class="logo" src="images/logo_smol.png">
|
||||
</p>
|
||||
<h1 class="title">safe.fiery.me</h1>
|
||||
<h2 class="subtitle">
|
||||
A <strong>modern</strong> self-hosted file upload service
|
||||
</h2>
|
||||
|
||||
<h3 class="subtitle" id="maxFileSize"></h3>
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div id="uploadContainer" class="column">
|
||||
<a id="loginToUpload" class="button is-danger is-loading" style="display: flex"></a>
|
||||
<div id="albumDiv" class="field" style="display: none">
|
||||
<p class="control select-wrapper">
|
||||
<span class="select">
|
||||
<select id="albumSelect">
|
||||
<option value="">Upload to album</option>
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
|
||||
<div id="uploads">
|
||||
<div id="template" class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<progress class="progress is-small is-danger" value="0" max="100"></progress>
|
||||
<img class="is-unselectable" data-dz-thumbnail>
|
||||
<p class="error"></p>
|
||||
<p class="link" style="display: none">
|
||||
<a target="_blank"></a>
|
||||
</p>
|
||||
<p class="clipboard-mobile is-hidden-desktop" style="display: none">
|
||||
<a class="button is-info is-outlined clipboard-js" style="display: flex">
|
||||
<span class="icon">
|
||||
<i class="icon-clipboard-1"></i>
|
||||
</span>
|
||||
<span>Copy link to clipboard</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="subtitle">
|
||||
<a href="auth" id="loginLinkText"></a>
|
||||
</h3>
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<div id="linksColumn" class="columns is-mobile is-multiline is-centered">
|
||||
<div class="column is-narrow">
|
||||
<a href="https://fiery.me" title="Home">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-home icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://blog.fiery.me" title="Blog">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-archive icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a id="ShareX" href="https://safe.fiery.me/safe.fiery.me.sxcu" title="ShareX">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-sharex icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj" target="_blank" title="Chrome extension">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-chrome icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://github.com/BobbyWibowo/uguush/tree/lolisafe-kde" target="_blank" title="Bash uploader">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-terminal icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="faq" title="FAQ">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-help-circled icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="auth" title="Dashboard">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-gauge icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://github.com/BobbyWibowo/lolisafe" target="_blank" title="GitHub">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-github-circled icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -4,6 +4,8 @@ const db = require('knex')(config.database)
|
||||
const path = require('path')
|
||||
const utils = require('./../controllers/utilsController')
|
||||
|
||||
const homeDomain = config.homeDomain || config.domain
|
||||
|
||||
routes.get('/a/:identifier', async (req, res, next) => {
|
||||
const identifier = req.params.identifier
|
||||
if (identifier === undefined) {
|
||||
@ -52,7 +54,8 @@ routes.get('/a/:identifier', async (req, res, next) => {
|
||||
thumb,
|
||||
files,
|
||||
identifier,
|
||||
enableDownload
|
||||
enableDownload,
|
||||
url: `${homeDomain}/a/${album.identifier}`
|
||||
})
|
||||
})
|
||||
|
||||
|
78
views/_globals.njk
Normal file
78
views/_globals.njk
Normal file
@ -0,0 +1,78 @@
|
||||
{% set name = "safe.fiery.me" %}
|
||||
{% set root = "https://safe.fiery.me" %}
|
||||
{% set motto = "A small safe worth protecting." %}
|
||||
{% set description = "A pomf-like file uploading service that doesn't suck." %}
|
||||
{% set keywords = "upload,lolisafe,file,images,hosting,bobby,fiery" %}
|
||||
|
||||
{% set home_subtitle = "A <strong>modern</strong> self-hosted file upload service" %}
|
||||
|
||||
{#
|
||||
This will be appended to all CSS and JS files, and should be changed on every updates to make sure clients load the very latest version of them.
|
||||
#}
|
||||
{% set v = "wOEAXfLNwY" %}
|
||||
|
||||
{#
|
||||
These will be the links in the homepage and the No-JS uploader.
|
||||
You may remove icons by removing "icon" property. It will then automatically use "attrs.title" as the display text.
|
||||
#}
|
||||
{% set home_links = [
|
||||
{
|
||||
attrs: {
|
||||
title: 'Home',
|
||||
href: 'https://fiery.me'
|
||||
},
|
||||
icon: 'icon-home icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
title: 'Blog',
|
||||
href: 'https://blog.fiery.me'
|
||||
},
|
||||
icon: 'icon-archive icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
id: 'ShareX',
|
||||
title: 'ShareX',
|
||||
href: 'https://safe.fiery.me/safe.fiery.me.sxcu'
|
||||
},
|
||||
icon: 'icon-sharex icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
title: 'Chrome extension',
|
||||
href: 'https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj',
|
||||
target: '_blank'
|
||||
},
|
||||
icon: 'icon-chrome icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
title: 'Bash uploader',
|
||||
href: 'https://github.com/BobbyWibowo/uguush/tree/lolisafe-kde',
|
||||
target: '_blank'
|
||||
},
|
||||
icon: 'icon-terminal icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
title: 'FAQ',
|
||||
href: 'faq'
|
||||
},
|
||||
icon: 'icon-help-circled icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
title: 'Dashboard',
|
||||
href: 'auth'
|
||||
},
|
||||
icon: 'icon-gauge icon-2x'
|
||||
},
|
||||
{
|
||||
attrs: {
|
||||
title: 'View on GitHub',
|
||||
href: 'https://github.com/BobbyWibowo/lolisafe'
|
||||
},
|
||||
icon: 'icon-github-circled icon-2x'
|
||||
}
|
||||
] %}
|
@ -1,70 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>{{ title }}</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="../libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="../css/style.css?v=L4ZeQAC3XC">
|
||||
<script type="text/javascript" src="../libs/sweetalert/sweetalert.min.js?v=L4ZeQAC3XC"></script>
|
||||
<script type="text/javascript" src="../libs/axios/axios.min.js?v=L4ZeQAC3XC"></script>
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ title }} | {{ count }} files" />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="{{ thumb }}" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{{ title }} | {{ count }} files">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="{{ thumb }}">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 id="title" class="title">
|
||||
{{ title }}
|
||||
</h1>
|
||||
<h1 id="count" class="subtitle">
|
||||
{{ count }} files
|
||||
</h1>
|
||||
{{#if enableDownload}}
|
||||
<a class="button is-primary is-outlined" title="Download album" href="../api/album/zip/{{ identifier }}">Download Album</a>
|
||||
{{/if}}
|
||||
<hr>
|
||||
<div id="table" class="columns is-multiline is-mobile is-centered">
|
||||
{{#each files}}
|
||||
<div class="column is-narrow">
|
||||
<a href="{{ this.file }}" target="_blank">{{{ this.thumb }}}</a>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
57
views/album.njk
Normal file
57
views/album.njk
Normal file
@ -0,0 +1,57 @@
|
||||
{% extends "layout.njk" %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<!-- Stylesheets -->
|
||||
<link rel="stylesheet" type="text/css" href="../libs/bulma/bulma.min.css?v={{ globals.v }}">
|
||||
<link rel="stylesheet" type="text/css" href="../css/style.css?v={{ globals.v }}">
|
||||
<style>
|
||||
html {
|
||||
background-color: #232629;
|
||||
}
|
||||
|
||||
.section {
|
||||
background: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block meta %}
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ title }} – {{ count }} files" />
|
||||
<meta property="og:url" content="{{ url }}" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="{{ thumb }}" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{{ title }} – {{ count }} files">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="{{ thumb }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 id="title" class="title">
|
||||
{{ title }}
|
||||
</h1>
|
||||
<h1 id="count" class="subtitle">
|
||||
{{ count }} files
|
||||
</h1>
|
||||
{% if enableDownload %}
|
||||
<a class="button is-primary is-outlined" title="Download album" href="../api/album/zip/{{ identifier }}">Download Album</a>
|
||||
{% endif %}
|
||||
<hr>
|
||||
<div id="table" class="columns is-multiline is-mobile is-centered">
|
||||
{% for item in files %}
|
||||
<div class="column is-narrow">
|
||||
<a href="{{ item.file }}" target="_blank">{{ item.thumb | safe }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
64
views/auth.njk
Normal file
64
views/auth.njk
Normal file
@ -0,0 +1,64 @@
|
||||
{% extends "layout.njk" %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v={{ globals.v }}">
|
||||
<link rel="stylesheet" type="text/css" href="css/auth.css?v={{ globals.v }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="js/auth.js?v={{ globals.v }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<section id="login" class="hero is-fullheight" style="background-color: #232629">
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-one-third is-hidden-touch"></div>
|
||||
<div class="column">
|
||||
<h1 class="title">
|
||||
Dashboard Access
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
Login or register
|
||||
</h2>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<input id="user" class="input" type="text" onkeypress="page.onkeypress(event, this)" placeholder="Your username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<input id="pass" class="input" type="password" onkeypress="page.onkeypress(event, this)" placeholder="Your password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped is-grouped-right">
|
||||
<div class="control">
|
||||
<a id="registerBtn" class="button" onclick="page.do('register')">
|
||||
<span class="icon">
|
||||
<i class="icon-user-plus"></i>
|
||||
</span>
|
||||
<span>Register</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="control">
|
||||
<a id="loginBtn" class="button" onclick="page.do('login')">
|
||||
<span class="icon">
|
||||
<i class="icon-login"></i>
|
||||
</span>
|
||||
<span>Log in</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-one-third is-hidden-mobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
99
views/dashboard.njk
Normal file
99
views/dashboard.njk
Normal file
@ -0,0 +1,99 @@
|
||||
{% extends "layout.njk" %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v={{ globals.v }}">
|
||||
<link rel="stylesheet" type="text/css" href="css/dashboard.css?v={{ globals.v }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="libs/clipboard.js/clipboard.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="js/dashboard.js?v={{ globals.v }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<section id="auth" class="hero is-light is-fullheight">
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<h1 class="title">
|
||||
Admin dashboard
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
<p class="control has-addons">
|
||||
<input id="token" class="input is-danger" type="text" placeholder="Your admin token">
|
||||
<a id="tokenSubmit" class="button is-danger is-outlined">Check</a>
|
||||
</p>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="dashboard" class="section">
|
||||
<div id="panel" class="container">
|
||||
<h1 class="title">
|
||||
Dashboard
|
||||
</h1>
|
||||
<h1 class="subtitle">
|
||||
A simple <strong>dashboard</strong>, to sort your uploaded stuff
|
||||
</h1>
|
||||
<hr>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-one-quarter">
|
||||
<aside id="menu" class="menu">
|
||||
<p class="menu-label">General</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a href=".">Frontpage</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemUploads" onclick="panel.getUploads()">Uploads</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label">Albums</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a id="itemManageGallery" onclick="panel.getAlbums()">Manage your albums</a>
|
||||
</li>
|
||||
<li>
|
||||
<ul id="albumsContainer"></ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label">Administration</p>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a id="itemFileLength" onclick="panel.changeFileLength()">File name length</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemTokens" onclick="panel.changeToken()">Manage your token</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemPassword" onclick="panel.changePassword()">Change your password</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="itemLogout" onclick="panel.logout()">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</div>
|
||||
<div id="page" class="column has-text-centered is-third-quarters">
|
||||
<img src="images/logo.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="modal" class="modal">
|
||||
<div class="modal-background" onclick="panel.closeModal()"></div>
|
||||
<div class="modal-content">
|
||||
<figure class="image">
|
||||
<img id="modalImage">
|
||||
</figure>
|
||||
</div>
|
||||
<button class="modal-close is-large" aria-label="close" onclick="panel.closeModal()"></button>
|
||||
</div>
|
||||
{% endblock %}
|
86
views/faq.njk
Normal file
86
views/faq.njk
Normal file
@ -0,0 +1,86 @@
|
||||
{% extends "layout.njk" %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ super() }}
|
||||
<style>
|
||||
.message {
|
||||
background-color: #31363b;
|
||||
}
|
||||
|
||||
.message-body {
|
||||
color: #eff0f1;
|
||||
border: 0;
|
||||
-webkit-box-shadow: 0 20px 60px rgba(10, 10, 10, 0.05), 0 5px 10px rgba(10, 10, 10, 0.1), 0 1px 1px rgba(10, 10, 10, 0.2);
|
||||
box-shadow: 0 20px 60px rgba(10, 10, 10, 0.05), 0 5px 10px rgba(10, 10, 10, 0.1), 0 1px 1px rgba(10, 10, 10, 0.2);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<section class="hero is-fullheight has-text-centered" id="home">
|
||||
<div class="hero-body">
|
||||
<div class="container has-text-left">
|
||||
<h2 class='subtitle'>What is safe.fiery.me?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
safe.fiery.me is merely another clone of lolisafe. We accept your files, photos, documents, anything, and give you back a shareable link for you to send to others.<br> lolisafe itself is an easy to use, open source and completely free file
|
||||
upload service.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Will you keep my files forever?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Unless I receive a copyright complain or some other bullshit, I will.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>How can I keep track of my uploads?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Simply create a user on the site and every upload will be associated with your account, granting you access to your uploaded files through our dashboard.<br> By having an account, you will also be able to set file name length for your new
|
||||
uploads!
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Do you have any No-JS uploader?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Yes, check out <a href="../nojs" target="_blank">this page</a>.<br> Unfortunately you will not be able to associate your uploads to your account, if you have any.<br> Then again, if you want to use the No-JS uploader, then it's very likely
|
||||
that you will not use the Dashboard anyways.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>What are albums?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Albums are a simple way of sorting uploads together. Right now you can create albums through the dashboard, then afterwards you can use them through the homepage uploader or with <a href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj"
|
||||
target="_blank">our chrome extension</a>, which will enable you to <strong>right click -> send to lolisafe</strong> or to a desired album if you have any. You will probably have to change some things involving <b>https://safe.fiery.me/api/upload</b> if you want to use the extension though.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Why should I use this?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
I don't know.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>I saw something too illegal for my tastes here, what do?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Send a strongly worded email to <a href="mailto:bobby@fiery.me">bobby@fiery.me</a> and I will try to get back to you within 24 hours.
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<h2 class='subtitle'>Do you support chunked uploads?</h2>
|
||||
<article class="message">
|
||||
<div class="message-body">
|
||||
Yes, the homepage uploader will chunk your uploads into 10 MB pieces by default. If you want to utilize chunked uploads with the API, then feel free to inspect the HTTP requests.
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
79
views/home.njk
Normal file
79
views/home.njk
Normal file
@ -0,0 +1,79 @@
|
||||
{% extends "layout.njk" %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v={{ globals.v }}">
|
||||
<link rel="stylesheet" type="text/css" href="css/home.css?v={{ globals.v }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="libs/dropzone/dropzone.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="libs/clipboard.js/clipboard.min.js?v={{ globals.v }}"></script>
|
||||
<script type="text/javascript" src="js/home.js?v={{ globals.v }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<section class="hero is-fullheight has-text-centered" id="home">
|
||||
<div class="hero-body section">
|
||||
<div class="container">
|
||||
<p id="b">
|
||||
<img class="logo" src="images/logo_smol.png">
|
||||
</p>
|
||||
<h1 class="title">{{ globals.name }}</h1>
|
||||
<h2 class="subtitle">{{ globals.home_subtitle | safe }}</h2>
|
||||
|
||||
<h3 class="subtitle" id="maxFileSize"></h3>
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div id="uploadContainer" class="column">
|
||||
<a id="loginToUpload" class="button is-danger is-loading" style="display: flex"></a>
|
||||
<div id="albumDiv" class="field" style="display: none">
|
||||
<p class="control select-wrapper">
|
||||
<span class="select">
|
||||
<select id="albumSelect">
|
||||
<option value="">Upload to album</option>
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
|
||||
<div id="uploads">
|
||||
<div id="template" class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<progress class="progress is-small is-danger" value="0" max="100"></progress>
|
||||
<img class="is-unselectable" data-dz-thumbnail>
|
||||
<p class="error"></p>
|
||||
<p class="link" style="display: none">
|
||||
<a target="_blank"></a>
|
||||
</p>
|
||||
<p class="clipboard-mobile is-hidden-desktop" style="display: none">
|
||||
<a class="button is-info is-outlined clipboard-js" style="display: flex">
|
||||
<span class="icon">
|
||||
<i class="icon-clipboard-1"></i>
|
||||
</span>
|
||||
<span>Copy link to clipboard</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="subtitle">
|
||||
<a href="auth" id="loginLinkText"></a>
|
||||
</h3>
|
||||
|
||||
{% include "links.njk" %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
58
views/layout.njk
Normal file
58
views/layout.njk
Normal file
@ -0,0 +1,58 @@
|
||||
{% import '_globals.njk' as globals %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="{{ globals.description }}">
|
||||
<meta name="keywords" content="upload,{{ globals.name }},file,images,hosting">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ title | default(globals.name + ' – ' + globals.motto) | safe }}</title>
|
||||
|
||||
{% block stylesheets %}
|
||||
<!-- Stylesheets -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v={{ globals.v }}">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v={{ globals.v }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block meta %}
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:url" content="{{ globals.root }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ globals.name }} – {{ globals.motto }}" />
|
||||
<meta property="og:description" content="{{ globals.description }}" />
|
||||
<meta property="og:image" content="{{ globals.root }}/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="{{ globals.root }}/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{{ globals.name }} – {{ globals.motto }}">
|
||||
<meta name="twitter:description" content="{{ globals.description }}">
|
||||
<meta name="twitter:image" content="{{ globals.root }}/icons/600px.png">
|
||||
{% endblock %}
|
||||
|
||||
<!-- Icons, configs, etcetera -->
|
||||
<link rel="icon" type="image/png" href="{{ globals.root }}/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{ globals.root }}/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="{{ globals.root }}/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="{{ globals.root }}/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="{{ globals.root }}/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="{{ globals.root }}/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="{{ globals.root }}/icons/manifest.json?v={{ globals.v }}">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ globals.name }}">
|
||||
<meta name="application-name" content="{{ globals.name }}">
|
||||
<meta name="msapplication-config" content="{{ globals.root }}/icons/browserconfig.xml?v={{ globals.v }}">
|
||||
<meta name="theme-color" content="#232629">
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
{% block scripts %}
|
||||
<!-- Scripts -->
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
28
views/links.njk
Normal file
28
views/links.njk
Normal file
@ -0,0 +1,28 @@
|
||||
{% macro attrs(obj) %}
|
||||
{% set space = joiner(' ') %}
|
||||
{% for id, val in obj -%}
|
||||
{{ space() }}{{ id }}="{{ val }}"
|
||||
{%- endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<div id="linksColumn" class="columns is-mobile is-multiline is-centered">
|
||||
{% for link in globals.home_links %}
|
||||
<div class="column is-narrow">
|
||||
<a {{ attrs(link.attrs) | trim }}>
|
||||
{% if link.icon %}
|
||||
<span class="icon is-medium">
|
||||
<i class="{{ link.icon }}"></i>
|
||||
</span>
|
||||
{% else %}
|
||||
{{ link.attrs.title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
@ -1,183 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="keywords" content="upload,lolisafe,file,images,hosting,bobby,fiery">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>safe.fiery.me – A small safe worth protecting.</title>
|
||||
|
||||
<!-- Stylesheets and scripts -->
|
||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?v=L4ZeQAC3XC">
|
||||
<link rel="stylesheet" type="text/css" href="css/home.css?v=KqYMorNQh2">
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="safe.fiery.me – A small safe worth protecting." />
|
||||
<meta property="og:url" content="https://safe.fiery.me/" />
|
||||
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
||||
<meta property="og:image" content="https://safe.fiery.me/icons/600px.png" />
|
||||
<meta property="og:image:width" content="600" />
|
||||
<meta property="og:image:height" content="600" />
|
||||
<meta property="og:image" content="https://safe.fiery.me/images/fb_share.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<!-- Twitter Card tags -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="safe.fiery.me – A small safe worth protecting.">
|
||||
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
||||
<meta name="twitter:image" content="https://safe.fiery.me/icons/600px.png">
|
||||
|
||||
<!-- Icons and configs -->
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/32pxr.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://safe.fiery.me/icons/96pxr.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/120px.png" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/152px.png" sizes="152x152">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/167px.png" sizes="167x167">
|
||||
<link rel="apple-touch-icon" href="https://safe.fiery.me/icons/180px.png" sizes="180x180">
|
||||
<link rel="manifest" href="https://safe.fiery.me/icons/manifest.json?v=L4ZeQAC3XC">
|
||||
<meta name="apple-mobile-web-app-title" content="safe.fiery.me">
|
||||
<meta name="application-name" content="safe.fiery.me">
|
||||
<meta name="msapplication-config" content="https://safe.fiery.me/icons/browserconfig.xml?v=L4ZeQAC3XC">
|
||||
<meta name="theme-color" content="#232629">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section class="hero is-fullheight has-text-centered" id="home">
|
||||
<div class="hero-body section">
|
||||
<div class="container">
|
||||
<p id="b">
|
||||
<img class="logo" src="images/logo_smol.png">
|
||||
</p>
|
||||
<h1 class="title">safe.fiery.me</h1>
|
||||
<h2 class="subtitle">
|
||||
A <strong>modern</strong> self-hosted file upload service
|
||||
</h2>
|
||||
|
||||
<h3 class="subtitle" id="maxFileSize">
|
||||
Maximum upload size per file is {{ maxFileSize }}
|
||||
</h3>
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<div class="content">
|
||||
<p class="subtitle" style="font-size: 1rem">
|
||||
Files uploaded through this No-JS uploader will not be associated to your account, if you have any.
|
||||
</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{#if uploadDisabled }}
|
||||
<a class="button is-danger" style="display: flex" href="auth">{{{ uploadDisabled }}}</a>
|
||||
{{else}}
|
||||
<form id="form" action="" method="post" enctype="multipart/form-data">
|
||||
<div class="field">
|
||||
<input type="file" name="files[]" multiple="multiple" style="width: 100%">
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="submit" class="button is-danger" value="Upload" style="width: 100%">
|
||||
</div>
|
||||
</form>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
|
||||
{{#if files}}
|
||||
<div id="uploads" style="display: block">
|
||||
{{#each files}}
|
||||
<div class="columns">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
{{#if ./../errorMessage}}
|
||||
<p class="error">{{{ ./../errorMessage }}}</p>
|
||||
{{/if}}
|
||||
{{#if this.url }}
|
||||
<p class="link">
|
||||
<a href="{{ this.url }}" target="_blank">{{{ this.url }}}</a>
|
||||
</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<div id="linksColumn" class="columns is-mobile is-multiline is-centered">
|
||||
<div class="column is-narrow">
|
||||
<a href="https://fiery.me" title="Home">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-home icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://blog.fiery.me" title="Blog">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-archive icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a id="ShareX" href="https://safe.fiery.me/safe.fiery.me.sxcu" title="ShareX">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-sharex icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj" target="_blank" title="Chrome extension">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-chrome icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://github.com/BobbyWibowo/uguush/tree/lolisafe-kde" target="_blank" title="Bash uploader">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-terminal icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="faq" title="FAQ">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-help-circled icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="auth" title="Dashboard">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-gauge icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<a href="https://github.com/BobbyWibowo/lolisafe" target="_blank" title="GitHub">
|
||||
<span class="icon is-medium">
|
||||
<i class="icon-github-circled icon-2x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
75
views/nojs.njk
Normal file
75
views/nojs.njk
Normal file
@ -0,0 +1,75 @@
|
||||
{% extends "layout.njk" %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" type="text/css" href="libs/fontello/fontello.css?v={{ globals.v }}">
|
||||
<link rel="stylesheet" type="text/css" href="css/home.css?v={{ globals.v }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<section class="hero is-fullheight has-text-centered" id="home">
|
||||
<div class="hero-body section">
|
||||
<div class="container">
|
||||
<p id="b">
|
||||
<img class="logo" src="images/logo_smol.png">
|
||||
</p>
|
||||
<h1 class="title">{{ globals.name }}</h1>
|
||||
<h2 class="subtitle">{{ globals.home_subtitle }}</h2>
|
||||
|
||||
<h3 class="subtitle" id="maxFileSize">
|
||||
Maximum upload size per file is {{ maxFileSize }}
|
||||
</h3>
|
||||
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
<div class="content">
|
||||
<p class="subtitle" style="font-size: 1rem">
|
||||
Files uploaded through this No-JS uploader will not be associated to your account, if you have any.
|
||||
</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
{% if uploadDisabled %}
|
||||
<a class="button is-danger" style="display: flex" href="auth">{{ uploadDisabled }}</a>
|
||||
{% else %}
|
||||
<form id="form" action="" method="post" enctype="multipart/form-data">
|
||||
<div class="field">
|
||||
<input type="file" name="files[]" multiple="multiple" style="width: 100%">
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="submit" class="button is-danger" value="Upload" style="width: 100%">
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
|
||||
{% if files %}
|
||||
<div id="uploads" style="display: block">
|
||||
{% for item in files %}
|
||||
<div class="columns">
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
<div class="column">
|
||||
{% if errorMessage %}
|
||||
<p class="error">{{ errorMessage | safe }}</p>
|
||||
{% endif %}
|
||||
{% if item.url %}
|
||||
<p class="link">
|
||||
<a href="{{ item.url }}" target="_blank">{{ item.url | safe }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% include "links.njk" %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user