Matrix
In order for this badge to work, the host of your room must allow guest accounts or dummy accounts to register, and the room must be world readable (chat history visible to anyone).
Alternatively access via the experimental summary
endpoint (MSC3266) can be configured with the query parameter fetchMode
for less server load and better performance, if supported by the homeserver
For the matrix.org
homeserver fetchMode
is hard-coded to summary
.
The following steps will show you how to setup the badge URL using the Element Matrix client.
- Select the desired room inside the Element client
- Click on the room settings button (gear icon) located near the top right of the client
- Scroll to the very bottom of the settings page and look under the
Addresses
section - You should see one or more
room addresses (or aliases)
, which can be easily identified with their starting hash (#
) character (ex:#twim:matrix.org
) - If there is no address for this room, add one under
Local addresses for this room
- Remove the starting hash character (
#
) - The final badge URL should look something like this
/matrix/twim:matrix.org.svg
Some Matrix homeservers don't hold a server name matching where they live (e.g. if the homeserver example.com
that created the room alias #mysuperroom:example.com
lives at matrix.example.com
).
If that is the case of the homeserver that created the room alias used for generating the badge, you will need to add the server's FQDN (fully qualified domain name) as a query parameter.
The final badge URL should then look something like this /matrix/mysuperroom:example.com.svg?server_fqdn=matrix.example.com
.
Path Parameters |
---|
roomAlias string — REQUIREDExample:
|
Query Parameters |
---|
server_fqdn stringExample:
|
fetchMode stringPossible values: [
Example:
|
style stringPossible values: [ Если не указано, стиль по умолчанию для этого значка будет "flat". Example:
|
logo stringИконка из simple-icons. Вы можете щелкнуть по названию иконки на simple-icons, чтобы скопировать slug, или они могут быть найдены в файле slugs.md в репозитории simple-icons. Дополнительная информация. Example:
|
logoColor stringЦвет логотипа (hex, rgb, rgba, hsl, hsla и css-названия цветов поддерживаются). Поддерживается для логотипов simple-icons, но не для кастомных логотипов. Example:
|
logoSize stringНастройте адаптивный размер иконок, установив значение Example:
|
label stringПереопределите текст на левой части значка (URL-encoded для пробелов или специальных символов!). Example:
|
labelColor stringЦвет фона левой части (поддерживаются hex, rgb, rgba, hsl, hsla и css-названия цветов). Example:
|
color stringЦвет фона правой части (поддерживаются hex, rgb, rgba, hsl, hsla и css-названия цветов). Example:
|
cacheSeconds stringВремя жизни HTTP-кэша (правила применяются для вычисления значения по умолчанию для каждого значка, любые указанные значения, ниже значения по умолчанию, будут игнорироваться). Example:
|
link string[]Укажите, что должно происходить при клике на левую/правую часть значка. Обратите внимание, что это работает только при интеграции значка в тег HTML |