1
0
mirror of https://github.com/JustKato/FreePad.git synced 2026-02-24 00:00:46 +02:00

+ Restructuring!

This commit is contained in:
2022-05-17 23:27:20 +03:00
parent 31c74620c2
commit 6268ee2b7f
52 changed files with 122 additions and 54 deletions

20
dist/templates/inc/footer.html vendored Normal file
View File

@@ -0,0 +1,20 @@
{{ define "inc/footer.html"}}
<footer class="footer">
<div class="content has-text-centered">
<p>
<strong>FreePad</strong> by <a href="https://justkato.me">Kato Twofold</a>.
<br>
The source code is licensed under the
<a href="http://opensource.org/licenses/mit-license.php">MIT</a> License.
<br>
The project is <b>Free and Open Source</b>, check out our <a href="https://github.com/JustKato/FreePad">Github Repo</a>.
<br>
Powered by <b>Go</b>phers!
</p>
</div>
</footer>
<script src="/static/js/main.js"></script>
{{ end }}

22
dist/templates/inc/header.html vendored Normal file
View File

@@ -0,0 +1,22 @@
{{ define "inc/header.html"}}
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FreePad - {{.title}}</title>
<meta name="description" content="Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time." />
<meta property="og:description" content="Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time." />
<meta property="fb:app_id" content="231493360234820" />
<meta property="og:title" content="FreePad.com - #1 paste tool since 2002!" />
<meta property="og:type" content="article" />
<meta property="og:site_name" content="FreePad" />
<meta property="og:url" content="{{.domain_base}}/" />
<link rel="icon" type="image/png" href="/static/img/gopher.png"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/bulma-prefers-dark" />
<link rel="stylesheet" href="/static/css/main.css">
</head>
{{ end }}

42
dist/templates/pages/index.html vendored Normal file
View File

@@ -0,0 +1,42 @@
{{ template "inc/header.html" .}}
<body>
<div class="container is-fullhd p-4 mb-6" style="min-height: 50rem; height: calc(100vh - 18rem)">
<h1 class="title">FreePad</h1>
<h2 class="subtitle">Free and Open source internet notepad</h2>
<hr class="mb-6">
<div class="content">
<form class="columns px-4 mt-6" onsubmit="goToPost(); return false;">
<span class="mt-2 is-size-4" style="font-family: monospace">{{.domain_base}}/</span>
<input class="mt-2 input mr-4" type="text" name="postName" id="postName" style="font-family: monospace" placeholder="Something memorable">
<button class="mt-2 button" type="submit">Open</button>
</form>
</div>
<div class="content my-4">
<h3>Why FreePad</h3>
<p>Why should you use FreePad and not some other provider?</p>
<ol>
<li style="list-style-type: none;">Keep it simple 😎</li>
<li style="list-style-type: none;">Don't worry about passwords 📔</li>
<li style="list-style-type: none;">You can be a mess, it's all temporary 🗑</li>
<li style="list-style-type: none;">Quick and Clean 🧼</li>
</ol>
</div>
<div class="content my-6">
<h3>Some Rules</h3>
<p>FreePad has an API and you can use it to interact with it, although there are some limitations.</p>
<ol>
<li>You are going to be rate-limited if you spam too much and put on a cooldown</li>
<li>There's only so many pages that can be stored before affecting performance</li>
<li>Automatic Shadowbanning</li>
</ol>
</div>
</div>
{{ template "inc/footer.html" .}}
</body>

28
dist/templates/pages/page.html vendored Normal file
View File

@@ -0,0 +1,28 @@
{{ template "inc/header.html" .}}
<body>
<div class="container is-fullhd p-4 mb-6" style="min-height: 35rem; height: calc(100vh - 18rem)">
<h1 class="title">FreePad</h1>
<h2 class="subtitle">Reading from <code>{{.domain_base}}/{{.title}}</code></h2>
<hr>
<div class="content">
<div class="block">
<a href="/" class="button is-light">Back Home</a>
<a href="javascript:updateSelf()" class="button is-primary">Save</a>
<p class="mt-3">Status: <code class="has-text-primary" id="status-indicator">Loaded</code></p>
</div>
<textarea class="input" name="post_content" id="post_content" onchange="updateSelf()">{{.post_content}}</textarea>
</div>
</div>
<script>
function updateSelf() {
updatePost({{.title}})
}
</script>
{{ template "inc/footer.html" .}}
</body>