Skip to content

Commit

Permalink
update interface
Browse files Browse the repository at this point in the history
- remove exemple
- use html time tag
- update robots.txt
- add humans.txt
  • Loading branch information
Equinox4 committed Jul 30, 2023
1 parent 3f07ae9 commit d453318
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
12 changes: 9 additions & 3 deletions public/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ body
{
background-color: var(--bg-color);
color: var(--fg-color);
margin-top: 0;
margin-bottom: 0;
margin: 0 auto 0 auto;
overflow: auto;
font-family: sans-serif;
display: flex;
flex-direction: column;
max-width: 80rem;
}

main
Expand All @@ -35,14 +35,20 @@ textarea
{
resize: vertical;
width: 100%;
height: 40vh;
height: 35vh;
}

fieldset
{
display: grid;
}

form
{
margin-top: 2rem;
margin-bottom: 1rem;
}

textarea, select, input
{
margin-top: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion public/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$post_content = $_POST['content'];
$post_duration = $_POST['duration'];

// Calculate length from the HTML spec
// Calculate textarea length from the HTML spec
$len_content = strlen(mb_convert_encoding($post_content, 'UTF-16', 'UTF-8')) / 2 - mb_substr_count($post_content, "\r\n", 'UTF-8');

if ($len_content > MAX_CONTENT_LEN) {
Expand Down
7 changes: 7 additions & 0 deletions public/humans.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* TEAM */
Me: Made with love by Mjöllnir in France
Discord: mjollnir4

/* SITE */
Last update:2023-07-18
IDE: Nano
7 changes: 3 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@
<meta property="og:image" content="/assets/images/icons/paste_icon_128.png">
<meta property="og:type" content="website">
<meta property="og:url" content="https://paste.mjollnir.fr">

<link href="/assets/images/icons/paste_icon_16.png" rel="icon"/>
<link rel="stylesheet" href="/assets/css/main.css" integrity="sha384-XWQORtaIM5ro0pLIYmjWB0lGQW3AEiySVzggmNJQYPHvaIfOpFXLCWZ1UNgVPEHt"/>
<link rel="stylesheet" href="/assets/css/main.css" integrity="sha384-uqG8HETqBInUhiJnIs8iHhXJdz7lVTWCda05O2sJ1/HQ6Mf5pvxxCjzxIJAfR4Ri"/>
</head>
<body>
<main>
<h1>Texte ephémère</h1>
<p>
Vous pouvez créer ici un document texte qui sera stocké et accessible pour une durée maximale de 24 heures.<br/>
Les documents créés ne sont pas conservés au-delà de la limite sélectionnée dans le formulaire ci-dessous.<br/>
En cliquant sur "Enregistrer", vous obtenez un lien unique qui permet de consulter votre document jusqu'à son expiration, par exemple:
<a href="https://paste.mjollnir.fr/v/hello">https://paste.mjollnir.fr/v/hello</a>
En cliquant sur "Enregistrer", vous obtenez un lien unique qui permet de consulter votre document jusqu'à son expiration.
</p>
<p>
<strong>Attention:</strong><br/>
Expand Down
2 changes: 1 addition & 1 deletion public/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<p>Texte brut:
<a href="<?= $raw_link ?>"><?= $raw_link ?></a>
</p>
<p>Ce document expire dans: <?= $redis->ttl($key) >= 0 ? gmdate("H\Hi:s", $redis->ttl($key) - 1) : 'longtemps' ?></p>
<p>Ce document expire dans: <time datetime="<?= gmdate("H:i:s", $redis->ttl($key) - 1) ?>"><?= gmdate("H\Hi:s", $redis->ttl($key) - 1) ?></time></p>
<p>
<a href="/">[ Accueil ]</a>
</p>
Expand Down
3 changes: 0 additions & 3 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
user-agent: *
Disallow: /v/hello

User-agent: AdsBot-Google
Disallow: /

0 comments on commit d453318

Please sign in to comment.