Skip to content

Commit

Permalink
Merge pull request 'for release 2023.12' (#8) from for-release-2023.1…
Browse files Browse the repository at this point in the history
  • Loading branch information
dakkar committed Dec 31, 2023
2 parents 2e10ecf + 2f49310 commit 1899330
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 16 deletions.
2 changes: 1 addition & 1 deletion config/_default/markup.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ defaultMarkdownHandler = "goldmark"
tabWidth = 4

[tableOfContents]
endLevel = 3
endLevel = 4
ordered = false
startLevel = 2
56 changes: 48 additions & 8 deletions content/en/docs/comparsion/misskey.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ toc: true
and other people's replies to your posts may not get imported)
* admins can require approval for new users' signups
* admins can silence users
* admins can mark all of a user's media as NSFW
* admins can mark all of a user's media, or a whole remote instance,
as NSFW
* GDPR-style Data Subject Access Requests (users can export all data
related to themselves)
* "bubble" timeline, showing all known notes from an admin-configured
list of remote instances
* you can specify the visibility of each boost / renote
* thread view updates in real time
* check signature on ActivityPub GET requests, also known as "secure
mode" or "authorized fetch" (experimental)

### Fun ones

Expand All @@ -28,9 +35,14 @@ toc: true
* (federated) background image on user profiles
* "speak as cat" separate from "is a cat" (both setting are federated
with compatible software)
* themes can specify a font, so you can use whatever font is most
legible for you
* you can change the way note threads are show to be more like
Firefish (with lines connecting notes and their replies)
* MFM renders mathematical formulas

### UI/UX

* option to open a note's detailed view by clicking on the note (most
useful on mobile)
* images lacking alt text are marked as such
Expand All @@ -39,38 +51,57 @@ toc: true
* user profile page has "notes" / "all" / "including files" tabs
* attachments can be collapsed by default
* buttons to show/hide all notes with CWs in a conversation
* you can choose to always show long notes in their entirety
* you can choose to always expand notes that have a CW
* one-button "like" (plus custom reactions on a separate button)
* animated MFM can be enabled/disabled on each note
* italic, bold, hashtags accept more characters (so `#æîç` is a valid
hashtag)
* supports longer alt text
* pop-up user profiles show if follow requests to the user require
approval, have a "open remote profile" option, and show custom
fields (e.g. the user's website address)
* user profile pages always show the whole user description
* MFM cheatsheet when composing notes
* MFM won't create a search box just because a sentence ends in
"search"
* usernames with dots (like `@some.one@example.com`) are correctly
recognised
* emoji auto-complete is case-insensitive
* it's always clear if a note has a poll (misskey sometimes hides
that)
* multiple-choice polls are clearly marked as such
* boosts and quote-boost are accounted separately
* only 1 boost per note per user is allowed
* admins can remove bots from "trending"
* users can hide bots from their timelines
* you can hide bots from your timelines
* translatable notes are shown translated regardless of where they're
shown (e.g. when quoted, or when looking at their replies)
* when searching, users can restrict results to notes with attachments
* when searching, you can restrict results to notes with attachments
* CSS class names are human-readable, to simplify browser-side
customisation
* users can disable indexing of their notes (the setting is federated)
* you can disable indexing of your notes (the setting is federated)
* "likes" and "reactions" federate correctly to Mastodon / Pleroma /
Akkoma (Misskey sends them all as reactions)
* different error icons
* users can disable the "disconnected" warning (connection is usually
* you can disable the "disconnected" warning (connection is usually
re-established automatically, so the warning is rarely useful)
* users can set a default emoji for their likes/reactions
* you can set a default emoji for your likes/reactions
* when the instance is using meilisearch to index notes, Sharkey will
use it in more cases (e.g. when limiting results to notes containing
images)
* when showing a reply containing many mentions, they are shortened
* the depth of the thread / detailed view of notes can be changed
(still defaults to 5)
* there's a search widget
* the search functions (both the dedicated pages and the widget) also
cover the functionality of the "lookup" feature, so you can search
for a fully-qualified remote username and have their profile fetched
and shown
* there's a "back" button at the top of each page
* timelines will show notes from users you follow, even if their
instance is muted
* tag view respects blocks, mutes, suspensions
* you won't receive any notification for muted threads

### Ones of interest to admins

Expand All @@ -82,5 +113,14 @@ toc: true
* admins can disable achievements
* admins can refresh remote user details
* admins can set a default emoji for likes/reactions
* admins can set a list of custom "message of the day"
* admins can change the maximum note length
* the PWA icon matches the instance icon
* deleted custom emoji are automatically removed from Drive
* container images are much smaller (we don't ship unused
dependencies)
* CWs can be up to 500 characters
* admins can use multiple configuration files by setting the
`MISSKEY_CONFIG_YML` environment variable to a path with wildcards
(e.g. `MISSKEY_CONFIG_YML=/path/to/files/*.yml`, they'll be merged
in alphabetical order)
5 changes: 5 additions & 0 deletions content/en/docs/customisation/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Customisation"
weight: 3000
toc: true
---
181 changes: 181 additions & 0 deletions content/en/docs/customisation/themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
---
title: "Themes"
weight: 1000
toc: true
---

## General structure

```json
{
id: "your-unique-identifier",

name: "The Name of Your Theme",
author: "your-name",
desc: "Describe your fabulous theme",
base: "light",

props: {
}
}
```

The `id` must be unique across all the existing themes anywere. We
suggest using a version 4 UUID (you may have a `uuidgen` command, or
you may use [an online generator](https://www.uuidgenerator.net/))

Name, author, and description are pretty much free-form.

`base` must be either `light` or `dark`, and it marks your theme as a
light theme or a dark theme, plus it pulls in the default values from
the built-in base theme of that kind.

### List of properties

These are the keys you can set inside the `props` dictionary. A few of
them are probably not used, and many are used in several places. The
simplest way to see where a key is used is to set it to something
obviously out of place (e.g. `#FF0000` full red) and see what happens.

#### Colours

`accent` `accentDarken` `accentLighten` `accentedBg` `focus` `bg`
`acrylicBg` `fg` `fgTransparentWeak` `fgTransparent` `fgHighlighted`
`fgOnAccent` `fgOnWhite` `divider` `indicator` `panel`
`panelHighlight` `panelHeaderBg` `panelHeaderFg` `panelHeaderDivider`
`acrylicPanel` `windowHeader` `popup` `shadow` `header` `navBg`
`navFg` `navHoverFg` `navActive` `navIndicator` `link` `hashtag`
`mention` `mentionMe` `renote` `modalBg` `scrollbarHandle`
`scrollbarHandleHover` `dateLabelFg` `infoBg` `infoFg` `infoWarnBg`
`infoWarnFg` `switchBg` `buttonBg` `buttonHoverBg` `buttonGradateA`
`buttonGradateB` `switchOffBg` `switchOffFg` `switchOnBg` `switchOnFg`
`inputBorder` `inputBorderHover` `listItemHoverBg` `driveFolderBg`
`wallpaperOverlay` `badge` `messageBg` `success` `error` `warn`
`codeString` `codeNumber` `codeBoolean` `deckBg` `htmlThemeColor` `X2`
`X3` `X4` `X5` `X6` `X7` `X8` `X9` `X10` `X11` `X12` `X13` `X14` `X15`
`X16` `X17`

These can be specified in many ways:

* `#112233` RGB hex codes
* `rgb(0.5, 0.7, 1.0, 0.5)` RGB floating-point tuples (values between
0 and 1)
* `rgba(0.5, 0.7, 1.0, 0.5)` RGBA floating-point tuples (values
between 0 and 1), the last component is transparency
* `@fg` reference to another colour
* `$something` reference to a constant (see below)
* `:darken<0.5<@fg` a function call with one floating-point argument
and one colour argument

The available functions are: `darken` `lighten` `alpha` `hue`
`saturate`. The colour argument can be in any of the above forms (so
yes `:darken<2<:alpha<0.4<@fg` is a valid colour specification: it
takes the `fg` colour, makes it more transparent, then makes it
darker).

#### Borders

`panelBorder` is the only property that's not used directly as a
colour. The default value is something like `" solid 1px
var(--divider)`. The value starts with a double-quote to tell the
theme engine "don't try parsing this as a colour" (notice that it
*doesn't end* with another quote!). `var(--divider)` here is CSS
syntax, with an effect pretty much the same as `@divider` in the
colour specifications described above.

#### Fonts

(This feature is currently only implemented by Sharkey)

`fontFaceSrc` can be set to a string (no starting quote! this is never
parsed as a colour) describing the source of a font. It can be
anything that [the `FontFace` constructor can understand as a
source](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace#source):

* `local(Arial)` a reference to a locally-installed font
* `url(https://example.com/somefont.ttf)` a URL to a
network-accessible font file
* `url(https://example.com/somefont.ttf) format('truetype')` a URL and
a specific format
* `url(https://example.com/somefont.woff) format('woff'),
url(https://example.com/somefont.ttf) format('truetype'),
local(Arial)` a comma-separated list of any of the above (each
source is tried in order, the first one that the browser understands
and can fetch is used)

`fontFaceOpts` can be set to a dictionary, that will be passed
straight to [the `descriptors` argument to the `FontFace`
constructor](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace#descriptors). You
very rarely need this.

If you want, you can even use a font from your drive: upload the file,
then click on its icon in the drive, copy the URL, and use it in
`fontFaceSrc`, like
`url(https://instance.example.com/files/8b0cc94f-0307-4aef-867b-b2e9ee6fd79f)`.

#### Constants

You can also add extra values for colour specifications, using keys
starting with `$`. For example:

```json
props: {
"$base": "#aa0044",
"fg": ":darken<3<$base",
"bg": ":lighten<4<$base",
"accent": "$base"
}
```

The difference between `$foo` and `foo` is that the latter will be set
as a CSS variable, so a user's custom CSS could refer to it, while the
former won't escape the theme.

## Example

This is one of the built-in Misskey themes:

```json
{
id: "504debaf-4912-6a4c-5059-1db08a76b737",

name: "Mi Botanical Dark",
author: "syuilo",

base: "dark",

props: {
accent: "rgb(148, 179, 0)",
bg: "rgb(37, 38, 36)",
fg: "rgb(216, 212, 199)",
fgHighlighted: "#fff",
fgOnWhite: "@accent",
divider: "rgba(255, 255, 255, 0.14)",
panel: "rgb(47, 47, 44)",
panelHeaderDivider: "rgba(0, 0, 0, 0)",
header: ":alpha<0.7<@panel",
navBg: "#363636",
renote: "@accent",
mention: "rgb(212, 153, 76)",
mentionMe: "rgb(212, 210, 76)",
hashtag: "#5bcbb0",
link: "@accent",
},
}
```

This is a minimal theme that just sets a font:

```json
{
id: "0fb6f73a-02ea-4722-8394-4b02188b7cfa",
name: "Prank",
author: "dakkar",
desc: "Sets a funny font",
base: "light",
props:{
fontFaceSrc: "url(https://fonts.gstatic.com/s/rubikbubbles/v3/JIA1UVdwbHFJtwA7Us1BPFbRNTE.ttf) format('truetype')",
}
}
```
2 changes: 1 addition & 1 deletion content/en/docs/install/fresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Fetch all required examples and enter directory:

```bash
wget -O Sharkey/docker-compose.yml https://git.joinsharkey.org/Sharkey/Sharkey/raw/branch/stable/docker-compose.yml.example
wget -O Sharkey/.config/default.yml https://git.joinsharkey.org/Sharkey/Sharkey/raw/branch/stable/.config/example.yml
wget -O Sharkey/.config/default.yml https://git.joinsharkey.org/Sharkey/Sharkey/raw/branch/stable/.config/docker_example.yml
wget -O Sharkey/.config/docker.env https://git.joinsharkey.org/Sharkey/Sharkey/raw/branch/stable/.config/docker_example.env
cd Sharkey
```
Expand Down
15 changes: 9 additions & 6 deletions tools/get-new-changes
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
# cd ..

# run this program from the root of that clone, update the comparison
# document, edit each `last_commit_checked` to be the output of `git
# rev-parse sharkey/stable` in the corresponding clone, commit all the
# changes
# document, edit `last_commit_checked` to contain the lines that the
# script printed at the end, commit all the changes

declare -A last_commit_checked=(
["Sharkey"]=10222804655445e8c9f6be4203fd566132de2e50
["sfm.js"]=0448eedb812fd300fbf12257c9960a914d48613c
["Sharkey"]=7b04c6ade4dc11c604ccbf39b834988a16621e85
["sfm.js"]=3eb78bc54ffc2fc22624b1a68ed650f2ab458d00
)

log_cmd=( git log -u -b --word-diff=color --word-diff-regex='[[:alnum:]_]+|[^[:space:]]' --no-merges )

for repo in "${!last_commit_checked[@]}"; do
( cd "$repo"; exec "${log_cmd[@]}" sharkey/stable ^misskey/develop ^"${last_commit_checked[$repo]}"; )
( cd "$repo"; exec "${log_cmd[@]}" sharkey/develop ^misskey/develop ^misskey/master ^"${last_commit_checked[$repo]}"; )
done

for repo in "${!last_commit_checked[@]}"; do
( cd "$repo"; echo "[\"$repo\"]=$(git rev-parse HEAD)" )
done

0 comments on commit 1899330

Please sign in to comment.