Skip to content

Commit 21f0992

Browse files
authored
chore: added settings for darkmode and relaxed width and height of inputs (#7204)
* chore: added settings for darkmode and relaxed width and height of inputs * chore: add explanation for showRecentPads
1 parent c64d6ff commit 21f0992

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

settings.json.docker

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@
104104
*/
105105
"title": "${TITLE:Etherpad}",
106106

107+
/*
108+
* Whether to show recent pads on the homepage or not.
109+
*/
110+
"showRecentPads": "${SHOW_RECENT_PADS:true}",
111+
107112
/*
108113
* Pathname of the favicon you want to use. If null, the skin's favicon is
109114
* used if one is provided by the skin, otherwise the default Etherpad favicon

settings.json.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@
9595
*/
9696
"title": "Etherpad",
9797

98+
/*
99+
* Whether to show recent pads on the homepage or not.
100+
*/
101+
"showRecentPads": true,
102+
98103
/*
99104
* Pathname of the favicon you want to use. If null, the skin's favicon is
100105
* used if one is provided by the skin, otherwise the default Etherpad favicon

src/node/utils/Settings.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export type SettingsType = {
161161
settingsFilename: string,
162162
credentialsFilename: string,
163163
title: string,
164+
showRecentPads: boolean,
164165
favicon: string | null,
165166
ttl: {
166167
AccessToken: number,
@@ -303,6 +304,12 @@ const settings: SettingsType = {
303304
* The app title, visible e.g. in the browser window
304305
*/
305306
title: 'Etherpad',
307+
308+
/**
309+
* Whether to show recent pads on the homepage
310+
*/
311+
showRecentPads: true,
312+
306313
/**
307314
* Pathname of the favicon you want to use. If null, the skin's favicon is
308315
* used if one is provided by the skin, otherwise the default Etherpad favicon

src/templates/index.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
background: -moz-linear-gradient(#fff,#ccc);
3434
background: -ms-linear-gradient(#fff,#ccc);
3535
background: -o-linear-gradient(#fff,#ccc);
36-
box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
36+
box-shadow: 0 1px 8px rgba(0,0,0,0.3);
3737
}
3838
#inner {
3939
position:relative;
@@ -43,7 +43,6 @@
4343
#button {
4444
margin: 0 auto;
4545
text-align: center;
46-
font: 36px verdana,arial,sans-serif;
4746
width:300px;
4847
border:none;
4948
color: white;
@@ -76,7 +75,6 @@
7675
display:block;
7776
}
7877
#padname{
79-
height:38px;
8078
max-width:280px;
8179
}
8280
form {
@@ -106,8 +104,6 @@
106104
button[type="submit"] {
107105
position: absolute;
108106
left:253px;
109-
width: 45px;
110-
height: 38px;
111107
}
112108
nav, .mission-statement, .pad-datalist {
113109
display: none;
@@ -168,11 +164,13 @@ <h2 data-l10n-id="index.createAndShareDocuments"></h2>
168164
<% e.end_block(); %>
169165
</div>
170166
<div style="display: none" data-l10n-id="index.placeholderPadEnter"></div>
167+
<% if (settings.showRecentPads) { %>
171168
<div class="pad-datalist">
172169
<h2 data-l10n-id="index.recentPads"></h2>
173170
<ul id="recent-pads">
174171
</ul>
175172
</div>
173+
<% } %>
176174
</div>
177175
<script src="<%=entrypoint%>"></script>
178176

0 commit comments

Comments
 (0)