feat: first version

This commit is contained in:
SamTV12345 2025-07-29 20:55:58 +02:00 committed by SamTV12345
parent 341691d44a
commit 4e734eb19e
7 changed files with 189 additions and 91 deletions

View File

@ -15,5 +15,5 @@ You can choose a skin changing the parameter `skinName` in `settings.json`.
Since Etherpad **1.7.5**, two skins are included:
* `no-skin`: an empty skin, leaving the default Etherpad appearance unchanged, that you can use as a guidance to develop your own.
* `no-skin`: an empty skin, leaving the default Etherpad appearance unchanged, that you can use as guidance to develop your own.
* `colibris`: a new, experimental skin, that will become the default in Etherpad 2.0.

View File

@ -52,10 +52,12 @@
"admin_settings.current_save.value": "Einstellungen speichern",
"admin_settings.page-title": "Einstellungen - Etherpad",
"index.newPad": "Neues Pad",
"index.createOpenPad": "oder ein Pad mit folgendem Namen erstellen/öffnen:",
"index.createOpenPad": "Pad öffnen",
"index.openPad": "Öffne ein vorhandenes Pad mit folgendem Namen:",
"index.recentPads": "Zuletzt bearbeitete Pads",
"index.recentPadsEmpty": "Keine kürzlich bearbeiteten Pads gefunden.",
"index.generateNewPad": "Neues Pad generieren",
"index.labelPad": "Padname (optional)",
"pad.toolbar.bold.title": "Fett (Strg-B)",
"pad.toolbar.italic.title": "Kursiv (Strg-I)",
"pad.toolbar.underline.title": "Unterstrichen (Strg-U)",

View File

@ -34,10 +34,12 @@
"admin_settings.page-title": "Settings - Etherpad",
"index.newPad": "New Pad",
"index.createOpenPad": "or create/open a Pad with the name:",
"index.createOpenPad": "Open pad by name",
"index.openPad": "open an existing Pad with the name:",
"index.recentPads": "Recent Pads",
"index.recentPadsEmpty": "No recent pads found.",
"index.generateNewPad": "Generate random pad name",
"index.labelPad": "Pad name (optional)",
"pad.toolbar.bold.title": "Bold (Ctrl+B)",

View File

@ -1,99 +1,164 @@
#button,
body,
form {
border: none
:root {
--etherpad-color: #64d29b;
--etherpad-color-dark: #4a5d5c;
--etherpad-border: oklch(92.8% 0.006 264.531);
--muted-text: oklch(44.6% 0.03 256.802);
--muted-border: oklch(87.2% 0.01 258.338);
--muted-background: hsl(240 4.8% 95.9%);
--ep-color: rgb(22 163 74);
}
body {
background: url(images/fond.jpg) center center no-repeat fixed #fff;
font-family: Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-size: 16px;
line-height: 1.42857143;
color: #333;
display: flex;
align-items: center;
justify-content: center;
background-size: cover;
border-top: 0;
background: oklch(98.5% 0.002 247.839);
}
h1 {
margin: auto 0 0;
font-size: 26px;
}
.pad-datalist {
position: absolute;
top: 110%;
background-color: #586a69;
border-radius: 3px;
min-height: 200px;
width: 350px;
.mission-statement h2 {
font-weight: 700;
font-size: 2.25rem;
text-align: center;
margin-top: 4rem;
}
.mission-statement p {
color: var(--muted-text);
font-size: 20px;
text-align: center;
max-width: 40%;
margin: auto;
}
#wrapper {
border-top: none;
border-top: 0;
margin-top: 0;
padding: 0;
background: 0 0;
box-shadow: none
}
input {
color: #4a5d5c;
background: unset;
box-shadow: none;
}
#inner {
background: transparent;
padding-top: 0;
width: 350px;
max-width: 350px;
text-align: center;
color:#FFF;
display: flex;
flex-direction: column;
position: relative;
margin-top: 20px;
margin-bottom: 20px;
max-width: 80%;
}
#label {
text-shadow: none;
color: #FFF;
font-weight: normal;
text-align: center;
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 700;
color: rgb(55 65 81);
margin-bottom: 0.5rem;
margin-top: 0;
}
#button {
margin: 0 auto;
text-align: center;
#go2Name {
order: 1;
}
#padname, #go2Name, #go2Name [type="submit"], #button, #button:hover {
all: unset;
}
#padname {
width: 100%;
text-shadow: none;
font-size: 23px;
line-height: 1.8;
color: #64d29b;
background: #586a69;
border-radius: 3px;
box-shadow: none;
height: 53px;
border: none;
display: block;
}
button[type=submit] {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
left: 305px;
color: #64d29b;
background: #586a69;
border: none;
top: 0;
opacity: 1;
transition: .2s background;
}
#button:hover,
button[type=submit]:hover {
cursor: pointer;
background: #4a5d5c;
color: #64d29b;
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 1rem;
margin-bottom: 0.5rem;
outline: none;
transition: border 0.2s;
}
#padname {
height: 38px;
max-width: 350px;
padding: 0 12px;
position: relative;
box-sizing: border-box;
width: 100%;
color: var(--muted-text);
border: 1px solid var(--muted-border);
border-radius: 5px;
}
#button, #button:hover, #go2Name [type="submit"] {
order: 2;
margin-top: 0.5rem;
line-height: 1.25rem;
background: white;
border: 1px solid var(--muted-border);
text-align: center;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
font-size: 14px;
font-weight: 700;
border-radius: 5px;
cursor: pointer;
}
#button, #button:hover {
order: 2;
}
#button:hover {
background-color: var(--muted-background);
}
#go2Name input {
width: 100%;
}
#go2Name [type="submit"] {
display: block;
background-color: var(--ep-color);
color: white;
width: 100%;
}
body nav {
display: flex;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: var(--etherpad-border);
padding: 1rem 1.5rem;
}
.logo-box svg {
width: 1.25rem;
height: 1.25rem;
color: #fff;
}
.logo-box {
width: 2rem;
height: 2rem;
background: #16a34a;
display: flex;
align-items: center;
justify-content: center;
margin-right: 1rem;
}
#wrapper {
width: 100%;
max-width: 28rem;
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 0.75rem;
box-shadow: 0 1px 2px 0 #0001;
margin: 2rem auto auto;
}
.card-content {
padding: 1.5rem;
}

View File

@ -8,7 +8,7 @@ window.customStart = () => {
const recentPadList = document.getElementById('recent-pads');
const parentStyle = recentPadList.parentElement.style;
const recentPadListHeading = document.querySelector('[data-l10n-id="index.recentPads"]');
const recentPadsFromLocalStorage = localStorage.getItem('recent-pads');
const recentPadsFromLocalStorage = localStorage.getItem('recentPads');
let recentPadListData = [];
if (recentPadsFromLocalStorage != null) {
recentPadListData = JSON.parse(recentPadsFromLocalStorage);

View File

@ -6,7 +6,17 @@ window.customStart = () => {
$('.buttonicon').on('mouseup', function () { $(this).parent().removeClass('pressed'); });
const pathSegments = window.location.pathname.split('/').filter(Boolean);
const lastSegment = pathSegments[pathSegments.length - 1];
const padName = window.location.href
const padName = pathSegments[pathSegments.length - 1];
const recentPads = localStorage.getItem('recentPads');
if (recentPads == null) {
localStorage.setItem('recentPads', JSON.stringify([]));
}
const recentPadsList = JSON.parse(localStorage.getItem('recentPads'));
if (!recentPadsList.includes(padName)) {
if (recentPadsList.length >= 10) {
recentPadsList.shift(); // Remove the oldest pad if we have more than 10
}
recentPadsList.push(padName);
localStorage.setItem('recentPads', JSON.stringify(recentPadsList));
}
};

View File

@ -109,6 +109,10 @@
width: 45px;
height: 38px;
}
nav {
display: none;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 800px) {
body {
background: #bbb;
@ -131,29 +135,44 @@
<link href="static/skins/<%=encodeURI(settings.skinName)%>/index.css?v=<%=settings.randomVersionString%>" rel="stylesheet">
<% e.end_block(); %>
<nav>
<div class="logo-box">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-text w-5 h-5 text-white"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><path d="M10 9H8"></path><path d="M16 13H8"></path><path d="M16 17H8"></path></svg>
</div>
<h1>Etherpad</h1>
</nav>
<div class="mission-statement">
<h2>Create and share documents</h2>
<p>
Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser.
</p>
</div>
<div id="wrapper">
<% e.begin_block("indexWrapper"); %>
<div id="inner">
<% if (!settings.requireSession) { %>
<% if (settings.editOnly) { %>
<label id="label" for="padname" data-l10n-id="index.openPad"></label>
<button data-l10n-id="index.openPad"></button>
<% } else {%>
<button id="button" data-l10n-id="index.newPad"></button>
<label id="label" for="padname" data-l10n-id="index.createOpenPad"></label>
<button id="button" data-l10n-id="index.generateNewPad"></button>
<% } %>
<form action="#" id="go2Name">
<input type="text" id="padname" maxlength="50" autofocus x-webkit-speech>
<button type="submit">OK</button>
<label id="label" for="padname" data-l10n-id="index.labelPad"></label>
<input type="text" id="padname" maxlength="50" autofocus placeholder="Enter pad name...">
<button type="submit" data-l10n-id="index.createOpenPad"></button>
</form>
<div class="pad-datalist">
<h3 data-l10n-id="index.recentPads"></h3>
<ul id="recent-pads">
</ul>
</div>
<% } %>
</div>
<% e.end_block(); %>
</div>
<div class="pad-datalist">
<h3 data-l10n-id="index.recentPads"></h3>
<ul id="recent-pads">
</ul>
</div>
<script src="<%=entrypoint%>"></script>
<% e.begin_block("indexCustomScripts"); %>