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: 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. * `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.current_save.value": "Einstellungen speichern",
"admin_settings.page-title": "Einstellungen - Etherpad", "admin_settings.page-title": "Einstellungen - Etherpad",
"index.newPad": "Neues Pad", "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.openPad": "Öffne ein vorhandenes Pad mit folgendem Namen:",
"index.recentPads": "Zuletzt bearbeitete Pads", "index.recentPads": "Zuletzt bearbeitete Pads",
"index.recentPadsEmpty": "Keine kürzlich bearbeiteten Pads gefunden.", "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.bold.title": "Fett (Strg-B)",
"pad.toolbar.italic.title": "Kursiv (Strg-I)", "pad.toolbar.italic.title": "Kursiv (Strg-I)",
"pad.toolbar.underline.title": "Unterstrichen (Strg-U)", "pad.toolbar.underline.title": "Unterstrichen (Strg-U)",

View File

@ -34,10 +34,12 @@
"admin_settings.page-title": "Settings - Etherpad", "admin_settings.page-title": "Settings - Etherpad",
"index.newPad": "New Pad", "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.openPad": "open an existing Pad with the name:",
"index.recentPads": "Recent Pads", "index.recentPads": "Recent Pads",
"index.recentPadsEmpty": "No recent pads found.", "index.recentPadsEmpty": "No recent pads found.",
"index.generateNewPad": "Generate random pad name",
"index.labelPad": "Pad name (optional)",
"pad.toolbar.bold.title": "Bold (Ctrl+B)", "pad.toolbar.bold.title": "Bold (Ctrl+B)",

View File

@ -1,99 +1,164 @@
#button, :root {
body, --etherpad-color: #64d29b;
form { --etherpad-color-dark: #4a5d5c;
border: none --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 { body {
background: url(images/fond.jpg) center center no-repeat fixed #fff; border-top: 0;
font-family: Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; background: oklch(98.5% 0.002 247.839);
font-size: 16px;
line-height: 1.42857143;
color: #333;
display: flex;
align-items: center;
justify-content: center;
background-size: cover;
} }
h1 {
margin: auto 0 0;
font-size: 26px;
}
.pad-datalist { .mission-statement h2 {
position: absolute; font-weight: 700;
top: 110%; font-size: 2.25rem;
background-color: #586a69; text-align: center;
border-radius: 3px; margin-top: 4rem;
min-height: 200px; }
width: 350px;
.mission-statement p {
color: var(--muted-text);
font-size: 20px;
text-align: center;
max-width: 40%;
margin: auto;
} }
#wrapper { #wrapper {
border-top: none; border-top: 0;
margin-top: 0; margin-top: 0;
padding: 0; padding: 0;
background: 0 0; background: unset;
box-shadow: none box-shadow: none;
}
input {
color: #4a5d5c;
} }
#inner { #inner {
background: transparent; display: flex;
padding-top: 0; flex-direction: column;
width: 350px;
max-width: 350px;
text-align: center;
color:#FFF;
position: relative; position: relative;
margin-top: 20px;
margin-bottom: 20px;
max-width: 80%;
} }
#label { #label {
text-shadow: none; font-size: 0.875rem;
color: #FFF; line-height: 1.25rem;
font-weight: normal; font-weight: 700;
text-align: center; color: rgb(55 65 81);
margin-bottom: 0.5rem;
margin-top: 0;
} }
#button { #go2Name {
margin: 0 auto; order: 1;
text-align: center; }
#padname, #go2Name, #go2Name [type="submit"], #button, #button:hover {
all: unset;
}
#padname {
width: 100%; width: 100%;
text-shadow: none; padding: 0.5rem 0.75rem;
font-size: 23px; border: 1px solid #d1d5db;
line-height: 1.8; border-radius: 0.375rem;
color: #64d29b; font-size: 1rem;
background: #586a69; margin-bottom: 0.5rem;
border-radius: 3px; outline: none;
box-shadow: none; transition: border 0.2s;
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;
} }
#padname { #padname {
height: 38px; box-sizing: border-box;
max-width: 350px; width: 100%;
padding: 0 12px; color: var(--muted-text);
position: relative; 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 recentPadList = document.getElementById('recent-pads');
const parentStyle = recentPadList.parentElement.style; const parentStyle = recentPadList.parentElement.style;
const recentPadListHeading = document.querySelector('[data-l10n-id="index.recentPads"]'); const recentPadListHeading = document.querySelector('[data-l10n-id="index.recentPads"]');
const recentPadsFromLocalStorage = localStorage.getItem('recent-pads'); const recentPadsFromLocalStorage = localStorage.getItem('recentPads');
let recentPadListData = []; let recentPadListData = [];
if (recentPadsFromLocalStorage != null) { if (recentPadsFromLocalStorage != null) {
recentPadListData = JSON.parse(recentPadsFromLocalStorage); recentPadListData = JSON.parse(recentPadsFromLocalStorage);

View File

@ -6,7 +6,17 @@ window.customStart = () => {
$('.buttonicon').on('mouseup', function () { $(this).parent().removeClass('pressed'); }); $('.buttonicon').on('mouseup', function () { $(this).parent().removeClass('pressed'); });
const pathSegments = window.location.pathname.split('/').filter(Boolean); const pathSegments = window.location.pathname.split('/').filter(Boolean);
const lastSegment = pathSegments[pathSegments.length - 1]; const padName = pathSegments[pathSegments.length - 1];
const padName = window.location.href 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; width: 45px;
height: 38px; height: 38px;
} }
nav {
display: none;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 800px) { @media only screen and (min-device-width: 320px) and (max-device-width: 800px) {
body { body {
background: #bbb; background: #bbb;
@ -131,29 +135,44 @@
<link href="static/skins/<%=encodeURI(settings.skinName)%>/index.css?v=<%=settings.randomVersionString%>" rel="stylesheet"> <link href="static/skins/<%=encodeURI(settings.skinName)%>/index.css?v=<%=settings.randomVersionString%>" rel="stylesheet">
<% e.end_block(); %> <% 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"> <div id="wrapper">
<% e.begin_block("indexWrapper"); %> <% e.begin_block("indexWrapper"); %>
<div id="inner"> <div id="inner">
<% if (!settings.requireSession) { %> <% if (!settings.requireSession) { %>
<% if (settings.editOnly) { %> <% if (settings.editOnly) { %>
<label id="label" for="padname" data-l10n-id="index.openPad"></label> <button data-l10n-id="index.openPad"></button>
<% } else {%> <% } else {%>
<button id="button" data-l10n-id="index.newPad"></button> <button id="button" data-l10n-id="index.generateNewPad"></button>
<label id="label" for="padname" data-l10n-id="index.createOpenPad"></label>
<% } %> <% } %>
<form action="#" id="go2Name"> <form action="#" id="go2Name">
<input type="text" id="padname" maxlength="50" autofocus x-webkit-speech> <label id="label" for="padname" data-l10n-id="index.labelPad"></label>
<button type="submit">OK</button> <input type="text" id="padname" maxlength="50" autofocus placeholder="Enter pad name...">
<button type="submit" data-l10n-id="index.createOpenPad"></button>
</form> </form>
<div class="pad-datalist">
<h3 data-l10n-id="index.recentPads"></h3>
<ul id="recent-pads">
</ul>
</div>
<% } %> <% } %>
</div> </div>
<% e.end_block(); %> <% e.end_block(); %>
</div> </div>
<div class="pad-datalist">
<h3 data-l10n-id="index.recentPads"></h3>
<ul id="recent-pads">
</ul>
</div>
<script src="<%=entrypoint%>"></script> <script src="<%=entrypoint%>"></script>
<% e.begin_block("indexCustomScripts"); %> <% e.begin_block("indexCustomScripts"); %>