Skip to content

Commit

Permalink
normalized 3rd level headings and adapted the max-width of the body (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
najanajana authored Oct 19, 2023
1 parent cc22c19 commit 97a3f27
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 42 deletions.
4 changes: 2 additions & 2 deletions doc/api/hooks_client-side.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Things in context:
This hook is called on the client side whenever a user joins or changes. This
can be used to create notifications or an alternate user list.

=== `chatNewMessage`
=== chatNewMessage

Called from: `src/static/js/chat.js`

Expand Down Expand Up @@ -319,7 +319,7 @@ Context properties:
* `duration`: How long (in milliseconds) to display the gritter notification (0
to disable).

=== `chatSendMessage`
=== chatSendMessage

Called from: `src/static/js/chat.js`

Expand Down
46 changes: 23 additions & 23 deletions doc/api/hooks_server-side.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Things in context:

If this hook returns an error, the callback to the install function gets an error, too. This seems useful for adding in features when a particular plugin is installed.

=== `init_<plugin name>`
=== init_<plugin name>

Called from: `src/static/js/pluginfw/plugins.js`

Expand All @@ -62,7 +62,7 @@ Context properties:
* `logger`: An object with the following `console`-like methods: `debug`,
`info`, `log`, `warn`, `error`.

=== `expressPreSession`
=== expressPreSession

Called from: `src/node/hooks/express.js`

Expand Down Expand Up @@ -92,7 +92,7 @@ exports.expressPreSession = async (hookName, {app}) => {
};
----

=== `expressConfigure`
=== expressConfigure

Called from: `src/node/hooks/express.js`

Expand All @@ -107,7 +107,7 @@ Context properties:
* `app`: The Express https://expressjs.com/en/4x/api.html==app[Application]
object.

=== `expressCreateServer`
=== expressCreateServer

Called from: `src/node/hooks/express.js`

Expand Down Expand Up @@ -210,7 +210,7 @@ Things in context:
This hook gets called when the access to the concrete pad is being checked.
Return `false` to deny access.

=== `getAuthorId`
=== getAuthorId

Called from `src/node/db/AuthorManager.js`

Expand Down Expand Up @@ -267,7 +267,7 @@ exports.getAuthorId = async (hookName, context) => {
};
----

=== `padCreate`
=== padCreate

Called from: `src/node/db/Pad.js`

Expand All @@ -279,7 +279,7 @@ Context properties:
* `authorId`: The ID of the author who created the pad.
* `author` (**deprecated**): Synonym of `authorId`.

=== `padDefaultContent`
=== padDefaultContent

Called from `src/node/db/Pad.js`

Expand All @@ -304,7 +304,7 @@ Context properties:
be updated to match. Plugins must check the value of the `type` property
before reading this value.

=== `padLoad`
=== padLoad

Called from: `src/node/db/PadManager.js`

Expand All @@ -315,7 +315,7 @@ Context properties:
* `pad`: The Pad object.

[#_padupdate]
=== `padUpdate`
=== padUpdate

Called from: `src/node/db/Pad.js`

Expand All @@ -329,7 +329,7 @@ Context properties:
* `revs`: The index of the new revision.
* `changeset`: The changeset of this revision (see <<_padupdate>>).

=== `padCopy`
=== padCopy

Called from: `src/node/db/Pad.js`

Expand All @@ -355,7 +355,7 @@ Usage examples:

* https://github.com/ether/ep_comments_page

=== `padRemove`
=== padRemove

Called from: `src/node/db/Pad.js`

Expand All @@ -370,7 +370,7 @@ Usage examples:

* https://github.com/ether/ep_comments_page

=== `padCheck`
=== padCheck

Called from: `src/node/db/Pad.js`

Expand All @@ -393,7 +393,7 @@ Things in context:

I have no idea what this is useful for, someone else will have to add this description.

=== `preAuthorize`
=== preAuthorize

Called from: `src/node/hooks/express/webaccess.js`

Expand Down Expand Up @@ -700,7 +700,7 @@ exports.authzFailure = (hookName, context, cb) => {
};
----

=== `handleMessage`
=== handleMessage

Called from: `src/node/handler/PadMessageHandler.js`

Expand Down Expand Up @@ -733,7 +733,7 @@ exports.handleMessage = async (hookName, {message, socket}) => {
};
----

=== `handleMessageSecurity`
=== handleMessageSecurity

Called from: `src/node/handler/PadMessageHandler.js`

Expand Down Expand Up @@ -819,7 +819,7 @@ exports.clientVars = (hookName, context, callback) => {
};
----

=== `getLineHTMLForExport`
=== getLineHTMLForExport

Called from: `src/node/utils/ExportHtml.js`

Expand Down Expand Up @@ -968,7 +968,7 @@ exports.exportHtmlAdditionalTagsWithData = function(hook, pad, cb){
};
----

=== `exportEtherpadAdditionalContent`
=== exportEtherpadAdditionalContent

Called from `src/node/utils/ExportEtherpad.js` and
`src/node/utils/ImportEtherpad.js`.
Expand All @@ -990,7 +990,7 @@ Example:
exports.exportEtherpadAdditionalContent = () => ['comments'];
----

=== `exportEtherpad`
=== exportEtherpad

Called from `src/node/utils/ExportEtherpad.js`.

Expand All @@ -1013,7 +1013,7 @@ Context properties:
should not assume that it is either the pad's real writable ID or its
read-only ID.

=== `importEtherpad`
=== importEtherpad

Called from `src/node/utils/ImportEtherpad.js`.

Expand All @@ -1032,7 +1032,7 @@ Context properties:
modified.
* `srcPadId`: The pad ID used for the pad-specific information in `data`.

=== `import`
=== import

Called from: `src/node/handler/ImportHandler.js`

Expand Down Expand Up @@ -1062,7 +1062,7 @@ exports.import = async (hookName, {fileEnding, ImportError}) => {
};
----

=== `userJoin`
=== userJoin

Called from: `src/node/handler/PadMessageHandler.js`

Expand All @@ -1086,7 +1086,7 @@ exports.userJoin = async (hookName, {authorId, displayName, padId}) => {
};
```

=== `userLeave`
=== userLeave

Called from: `src/node/handler/PadMessageHandler.js`

Expand All @@ -1110,7 +1110,7 @@ exports.userLeave = async (hookName, {author, padId}) => {
};
----

=== `chatNewMessage`
=== chatNewMessage

Called from: `src/node/handler/PadMessageHandler.js`

Expand Down
25 changes: 14 additions & 11 deletions doc/assets/style.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
body {
border-top: solid #44b492 5pt;
line-height:150%;
font-family: 'Quicksand',sans-serif;
line-height: 150%;
font-family: "Quicksand", sans-serif;
color: #313b4a;
max-width:800px;
max-width: 1440px;
margin: 0 auto;
padding: 20px;
}
Expand All @@ -12,24 +12,25 @@ a {
color: #555;
}

h1,h2 {
h1,
h2 {
color: #44b492;
line-height:100%;
line-height: 100%;
}

h2 {
font-size: 48px ;
font-size: 48px;
}

h3 {
font-size: 1.8rem;
}

h4{
h4 {
font-size: 1.5rem;
}

h5{
h5 {
font-size: 1.2rem;
}

Expand All @@ -39,7 +40,7 @@ a:hover {

pre {
background-color: #e0e0e0;
padding:20px;
padding: 20px;
}

code {
Expand All @@ -50,15 +51,17 @@ img {
max-width: 100%;
}

table, th, td {
table,
th,
td {
text-align: left;
border: 1px solid gray;
border-collapse: collapse;
}

th {
padding: 0.5em;
background: #EEE;
background: #eee;
}

td {
Expand Down
8 changes: 4 additions & 4 deletions doc/cookies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Cookies used by Etherpad.
| Session
| true
| true
| Session ID of the https://expressjs.com[Express web framework]. When Etherpad is behind a reverse proxy, and an administrator wants to use session stickiness, he may use this cookie. If you are behind a reverse proxy, please remember to set `trustProxy: true` in `settings.json`. Set in [webaccess.js#L131](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/hooks/express/webaccess.js#L131).
| Session ID of the https://expressjs.com[Express web framework]. When Etherpad is behind a reverse proxy, and an administrator wants to use session stickiness, he may use this cookie. If you are behind a reverse proxy, please remember to set `trustProxy: true` in `settings.json`. Set in https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/hooks/express/webaccess.js#L131[webaccess.js#L131].


|language
Expand All @@ -29,7 +29,7 @@ Cookies used by Etherpad.
| Session
| false
| true
| The language of the UI (e.g.: `en-GB`, `it`). Set in [pad_editor.js#L111](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_editor.js#L111).
| The language of the UI (e.g.: `en-GB`, `it`). Set in https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_editor.js#L111[pad_editor.js#L111].


|prefs / prefsHttp
Expand All @@ -39,7 +39,7 @@ Cookies used by Etherpad.
| year 3000
| false
| true
| Client-side preferences (e.g.: font family, chat always visible, show authorship colors, ...). Set in [pad_cookie.js#L49](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_cookie.js#L49). `prefs` is used if Etherpad is accessed over HTTPS, `prefsHttp` if accessed over HTTP. For more info see https://github.com/ether/etherpad-lite/issues/3179.
| Client-side preferences (e.g.: font family, chat always visible, show authorship colors, ...). Set in https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_cookie.js#L49[pad_cookie.js#L49]. `prefs` is used if Etherpad is accessed over HTTPS, `prefsHttp` if accessed over HTTP. For more info see https://github.com/ether/etherpad-lite/issues/3179.



Expand All @@ -50,7 +50,7 @@ Cookies used by Etherpad.
| 60 days
| false
| true
| A random token representing the author, of the form `t.randomstring_of_lenght_20`. The random string is generated by the client, at (https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L55-L66[pad.js#L55-L66]). This cookie is always set by the client (at (https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L153-L158[pad.js#L153-L158])) without any solicitation from the server. It is used for all the pads accessed via the web UI (not used for the HTTP API). On the server side, its value is accessed at [SecurityManager.js#L33](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/db/SecurityManager.js#L33).
| A random token representing the author, of the form `t.randomstring_of_lenght_20`. The random string is generated by the client, at https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L55-L66[pad.js#L55-L66]. This cookie is always set by the client at https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L153-L158[pad.js#L153-L158] without any solicitation from the server. It is used for all the pads accessed via the web UI (not used for the HTTP API). On the server side, its value is accessed at https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/db/SecurityManager.js#L33[SecurityManager.js#L33].
|===

For more info, visit the related discussion at https://github.com/ether/etherpad-lite/issues/3563.
Expand Down
4 changes: 2 additions & 2 deletions doc/plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ translations into `locales/`, though, in order to have them integrated. (See
Your plugin definition goes into `ep.json`. In this file you register your hook
functions, indicate the parts of your plugin and the order of execution. (A
documentation of all available events to hook into can be found in chapter
[hooks](#all_hooks).)
<<Server-side hooks>>.)

[source,json]
----
Expand All @@ -88,7 +88,7 @@ A hook function registration maps a hook name to a hook function specification.
The hook function specification looks like `ep_example/file.js:functionName`. It
consists of two parts separated by a colon: a module name to `require()` and the
name of a function exported by the named module. See
[`module.exports`](https://nodejs.org/docs/latest/api/modules.html#modules_module_exports)
https://nodejs.org/docs/latest/api/modules.html#modules_module_exports[`module.exports`]
for how to export a function.

For the module name you can omit the `.js` suffix, and if the file is `index.js`
Expand Down

0 comments on commit 97a3f27

Please sign in to comment.