Compare commits
20 commits
feature/ac
...
main
Author | SHA1 | Date | |
---|---|---|---|
Simon Vieille | 19ecd40190 | ||
Simon Vieille | 039a924976 | ||
Simon Vieille | be8a3eee4d | ||
Simon Vieille | 1bd4ceb41f | ||
Simon Vieille | 50604d0f8e | ||
Simon Vieille | 55745685cc | ||
Simon Vieille | 403253337f | ||
Simon Vieille | bafd49b9f8 | ||
Simon Vieille | 31e6ec6dc2 | ||
Simon Vieille | 55a8eb8429 | ||
Simon Vieille | c4a6c74f03 | ||
Simon Vieille | 0da5a6529a | ||
Simon Vieille | 9d3c6c2b6c | ||
Simon Vieille | ce89b59a83 | ||
Simon Vieille | 0c9010b3a2 | ||
Simon Vieille | 7b5573529e | ||
Simon Vieille | 8e23bd78df | ||
Simon Vieille | e22dd7e567 | ||
Simon Vieille | 12b8a0af40 | ||
Simon Vieille | b88e4b5cc7 |
4
.env
|
@ -1,4 +0,0 @@
|
|||
LIVE_RELOAD_SUPPORT=true
|
||||
ADD_MODULES=
|
||||
DOCS_DIRECTORY=/app
|
||||
FAST_MODE=false
|
|
@ -1,19 +0,0 @@
|
|||
name: Build and release
|
||||
on: [push]
|
||||
jobs:
|
||||
build_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
- run: |
|
||||
lsb_release -a
|
||||
- run: |
|
||||
pip install mkdocs-material
|
||||
pip install mkdocs-table-reader-plugin
|
||||
pip install mkdocs-git-revision-date-localized-plugin
|
||||
pip install pillow cairosvg
|
||||
pip install mkdocs-autolinks-plugin
|
||||
pip install mkdocs-markdownextradata-plugin
|
||||
pip install mkdocs_version_annotations
|
||||
pip install mkdocs-enumerate-headings-plugin
|
||||
pip install mkdocs-redirects
|
4
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
/.cache
|
||||
/build
|
||||
/node_modules
|
||||
/.docusaurus
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
steps:
|
||||
build:
|
||||
image: gitnet.fr/deblan/mkdocs
|
||||
image: node:20
|
||||
pull: true
|
||||
commands:
|
||||
- sed -i 's/# site_url/site_url/' mkdocs.yml
|
||||
- sed -i 's,<!-- ci_scripts -->,<script async defer data-website-id="d4104cec-6e3d-41df-bf72-74a9297def23" src="https://umami.deblan.org/umami.js"></script>,' overrides/main.html
|
||||
- mkdocs build
|
||||
- git checkout mkdocs.yml
|
||||
- git checkout overrides/main.html
|
||||
- npm install --force
|
||||
- npm run build
|
||||
|
||||
update:
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git fetch --no-tags origin +refs/heads/pages
|
||||
- git switch pages
|
||||
- mv build /tmp/
|
||||
- git config --global user.email ci@gitnet.fr
|
||||
- git config --global user.name CI
|
||||
- mv site /tmp/
|
||||
- git add .
|
||||
- git commit -m build -a
|
||||
- git fetch --no-tags origin +refs/heads/pages
|
||||
- git switch pages
|
||||
- rm * -fr
|
||||
- mv /tmp/site/* .
|
||||
- mv /tmp/build/* .
|
||||
- git add .
|
||||
- git commit -m "Build ${CI_BUILD_NUMBER}"
|
||||
|
||||
|
|
3
Makefile
|
@ -1,3 +1,6 @@
|
|||
changelog:
|
||||
./bin/changelog-generator -l debug -u https://gitnet.fr/deblan/side_menu/raw/branch/master/CHANGELOG.md > docs/changelog.md
|
||||
|
||||
serve:
|
||||
docker run \
|
||||
-it --rm \
|
||||
|
|
41
README.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Website
|
||||
|
||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
$ yarn
|
||||
```
|
||||
|
||||
### Local Development
|
||||
|
||||
```
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
### Build
|
||||
|
||||
```
|
||||
$ yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
3
babel.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
printf "Usage: %s [-l DEBUG_LEVEL] [-h] -f /path/to/CHANGELOG.md\n" "$0"
|
||||
printf "Usage: %s [-l DEBUG_LEVEL] [-h] [-f /path/to/CHANGELOG.md] [-u https://example.com/CHANGELOG.md]\n" "$0"
|
||||
}
|
||||
|
||||
help() {
|
||||
cat << EOH
|
||||
SYNOPSIS
|
||||
$0 [-l DEBUG_LEVEL] [-h] -f /path/to/CHANGELOG.md
|
||||
$0 [-l DEBUG_LEVEL] [-h] [-f /path/to/CHANGELOG.md] [-u https://example.com/CHANGELOG.md]
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
|
@ -20,6 +20,9 @@ help() {
|
|||
-f FILE
|
||||
Path to changelog
|
||||
|
||||
-u URL
|
||||
URL of the changelog
|
||||
|
||||
-l debug|info|notice|warning|error
|
||||
Debug level
|
||||
EOH
|
||||
|
@ -32,34 +35,44 @@ on_interrupt() {
|
|||
}
|
||||
|
||||
main() {
|
||||
while getopts "hf:" option; do
|
||||
CHANGELOG_FILE="${CHANGELOG_FILE:-}"
|
||||
CHANGELOG_URL="${CHANGELOG_URL:-}"
|
||||
LOG_VERBOSE="${CHANGELOG_FILE:-info}"
|
||||
|
||||
while getopts "l:hf:u:" option; do
|
||||
case "${option}" in
|
||||
h) help; exit 0;;
|
||||
f) CHANGELOG_FILE="$OPTARG";;
|
||||
u) CHANGELOG_URL="$OPTARG";;
|
||||
l) LOG_VERBOSE="$OPTARG";;
|
||||
?) log -l error "$(usage)"; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$CHANGELOG_FILE" ]; then
|
||||
log -l error "The file of the changelog is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$CHANGELOG_FILE" ]; then
|
||||
log -l error "No such file: $CHANGELOG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
temp_directory="$(mktemp -d)"
|
||||
temp_directory="$(mktemp -d)"
|
||||
version=
|
||||
is_first=1
|
||||
|
||||
if [ -n "$CHANGELOG_FILE" ]; then
|
||||
if [ ! -f "$CHANGELOG_FILE" ]; then
|
||||
log -l error "No such file: $CHANGELOG_FILE"
|
||||
else
|
||||
log -l info "File used: $CHANGELOG_FILE"
|
||||
fi
|
||||
elif [ -n "$CHANGELOG_URL" ]; then
|
||||
log -l debug "URL used: $CHANGELOG_URL"
|
||||
|
||||
CHANGELOG_FILE="$temp_directory/_changelog"
|
||||
|
||||
curl -sS -o "$CHANGELOG_FILE" "$CHANGELOG_URL" || exit 0
|
||||
else
|
||||
log -l error "You must define a file or an url"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
---
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Changelog
|
||||
|
@ -85,16 +98,10 @@ EOF
|
|||
if [ "$version" != "[Unreleased]" ]; then
|
||||
log -l info "Version detected: $version"
|
||||
|
||||
if [ $is_first -eq 1 ]; then
|
||||
printf "???+ success \"%s\"\n" "$version"
|
||||
is_first=0
|
||||
else
|
||||
printf "??? abstract \"%s\"\n" "$version"
|
||||
fi
|
||||
printf "## %s\n" "$version"
|
||||
|
||||
sed \
|
||||
-e 's/### \(.*\)/\n **\1**\n/g' \
|
||||
-e 's/^/ /g' \
|
||||
-e 's/### \(.*\)/\n**\1**\n/g' \
|
||||
"$temp_directory/$version"
|
||||
fi
|
||||
fi
|
||||
|
@ -144,7 +151,7 @@ log() {
|
|||
|
||||
if [ $LEVEL -ge $LOG_VERBOSE_VALUE ]; then
|
||||
printf "%s\n" "$*" | while IFS='' read -r LINE; do
|
||||
printf "%s%s%s\n" "${COLOR:-}" "${TIME:-}" "$LINE" >&2
|
||||
printf "%s%s%s%s\n" "${COLOR:-}" "${TIME:-}" "$LINE" "$(tput init)" >&2
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
|
12
docs/FAQ/apporder.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# How to replace Apporder?
|
||||
|
||||
Custom Menu could replace [Apporder](https://github.com/juliushaertl/apporder).
|
||||
|
||||
1. Go to user or global settings
|
||||
2. Scroll to `Top menu` check all apps in `Applications kept in the top menu`
|
||||
3. Scroll to `Applications` and customize sorting
|
||||
4. Save
|
11
docs/FAQ/default-app.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Use first top menu app as default app
|
||||
|
||||
You can easily let Custom Menu redirect to the first app in the top menu by changing the following parameter in your configuration:
|
||||
|
||||
```php-inline title="config/config.php"
|
||||
'defaultapp' => 'side_menu',
|
||||
```
|
13
docs/FAQ/export-config.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# How to export the configuration?
|
||||
|
||||
1. Go global settings
|
||||
2. Click on `Export the configuration`
|
||||
|
||||
<figure markdown>
|
||||
[![](@site/static/content/export_conf.png)](@site/static/content/export_conf.png)
|
||||
<figcaption>Export the configuration</figcaption>
|
||||
</figure>
|
11
docs/FAQ/guest-users.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Custom Menu doesn't work for guest users
|
||||
|
||||
Custom menu must be added in app's allowlist.
|
||||
|
||||
<figure markdown>
|
||||
[![](@site/static/content/allowlist.png)](@site/static/content/allowlist.png)
|
||||
</figure>
|
1650
docs/changelog.md
|
@ -8,11 +8,6 @@ hide:
|
|||
|
||||
You can report a bug or request a feature by opening an issue: https://gitnet.fr/deblan/side_menu/issues
|
||||
|
||||
!!! info "Support"
|
||||
**You like this app and you want to support me?**
|
||||
|
||||
[![](https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png){width=120px}](https://www.buymeacoffee.com/deblan)
|
||||
|
||||
## You are a translator
|
||||
|
||||
Translations are managed from [translate.codeberg.org](https://translate.codeberg.org/projects/custom-menu/application/).
|
||||
|
|
41
docs/faq.md
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
|
||||
# FAQ
|
||||
|
||||
## How to replace Apporder?
|
||||
|
||||
Custom Menu could replace [Apporder](https://github.com/juliushaertl/apporder).
|
||||
|
||||
1. Go to user or global settings
|
||||
2. Scroll to `Top menu` check all apps in `Applications kept in the top menu`
|
||||
3. Scroll to `Applications` and customize sorting
|
||||
4. Save
|
||||
|
||||
## Use first top menu app as default app
|
||||
|
||||
You can easily let Custom Menu redirect to the first app in the top menu by changing the following parameter in your configuration:
|
||||
|
||||
```php-inline title="config/config.php"
|
||||
'defaultapp' => 'side_menu',
|
||||
```
|
||||
|
||||
## How to export the configuration?
|
||||
|
||||
1. Go global settings
|
||||
2. Click on `Export the configuration`
|
||||
|
||||
<figure markdown>
|
||||
[![](./_static/img/export_conf.png)](./_static/img/export_conf.png){target="blank"}
|
||||
<figcaption>Export the configuration</figcaption>
|
||||
</figure>
|
||||
|
||||
## Custom Menu doesn't work for guest users
|
||||
|
||||
Custom menu must be added in app's allowlist.
|
||||
|
||||
<figure markdown>
|
||||
[![](./_static/img/allowlist.png)](./_static/img/allowlist.png){target="blank"}
|
||||
</figure>
|
|
@ -1,11 +1,9 @@
|
|||
---
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
sidebar_position: 1
|
||||
title: Overview
|
||||
---
|
||||
|
||||
🤙 Nextcloud app / Custom menu 🎨
|
||||
===============================
|
||||
# Overview
|
||||
|
||||
[![Build Status](https://ci.gitnet.fr/api/badges/deblan/side_menu/status.svg)](https://ci.gitnet.fr/deblan/side_menu)
|
||||
[![Translations](https://translate.codeberg.org/widgets/custom-menu/-/application/svg-badge.svg)](https://translate.codeberg.org/engage/custom-menu/)
|
||||
|
@ -18,17 +16,9 @@ This application is rather suitable for instances that activate a lot of applica
|
|||
|
||||
You can customize colors depending of the theme (Dark theme and Breeze Dark).
|
||||
|
||||
* [Screenshots](screenshots.md)
|
||||
* [Installation and upgrade](setup.md)
|
||||
* [FAQ](faq.md)
|
||||
* [Support](support.md)
|
||||
* [Contribute](contrib.md)
|
||||
**You like this app and you want to support me?**
|
||||
|
||||
|
||||
!!! info "Support"
|
||||
**You like this app and you want to support me?**
|
||||
|
||||
[![](https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png){width=120px}](https://www.buymeacoffee.com/deblan)
|
||||
[![](https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png)](https://www.buymeacoffee.com/deblan)
|
||||
|
||||
## Support
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
sidebar_position: 2
|
||||
title: Screenshots
|
||||
---
|
||||
|
||||
# Screenshots
|
||||
|
@ -10,48 +9,48 @@ hide:
|
|||
<tr>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/n19_big_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/n19_big_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/n19_big_menu.png" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc18_menu_always_displayed.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc18_menu_always_displayed.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc18_menu_always_displayed.png" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc19_default_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc19_default_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc19_default_menu.png" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc20_big_menu_responsive.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc20_big_menu_responsive.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc20_big_menu_responsive.png" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/personal_settings.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/personal_settings.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/personal_settings.png" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a target="_blank" href="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/admin_settings.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/admin_settings.png">
|
||||
<img src="https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/admin_settings.png" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
sidebar_position: 2
|
||||
title: Installation and upgrade
|
||||
---
|
||||
|
||||
Installation and upgrade
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
sidebar_position: 5
|
||||
title: Support
|
||||
---
|
||||
|
||||
# Support
|
||||
|
@ -10,73 +9,9 @@ Bugs and feature requests should be reported with an issue on https://gitnet.fr/
|
|||
|
||||
You can also join the official room on Matrix: [#custommenu:neutralnetwork.org](https://matrix.to/#/#custommenu:neutralnetwork.org).
|
||||
|
||||
| Version | Security | Bug | New feature |
|
||||
| :--: | :--: | :--: | :--: |
|
||||
| 3.x | {{ icon.check }} | {{ icon.check }} | {{ icon.check }} |
|
||||
| 2.x | {{ icon.check }} | {{ icon.check }} | {{ icon.uncheck }} |
|
||||
| 1.x | {{ icon.uncheck }} | {{ icon.uncheck }} | {{ icon.uncheck }} |
|
||||
| Version | Security | Bug | New feature |
|
||||
| :--: | :--: | :--: | :--: |
|
||||
| 3.x | Yes | Yes | Yes |
|
||||
| 2.x | Yes | Yes | No |
|
||||
| 1.x | No | No | No |
|
||||
|
||||
<div id="issues">
|
||||
<h3>Current issue(s)</h3>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const issues = document.querySelector('#issues')
|
||||
const createAdmonition = (type, prefix, item) => {
|
||||
const element = document.createElement('div')
|
||||
element.innerHTML = `
|
||||
<div class="admonition ${type}">
|
||||
<p class="admonition-title">
|
||||
<a href="${item.html_url}" target="_blank">${prefix} #${item.number}</a>
|
||||
</p>
|
||||
<p>${item.title}</p>
|
||||
</div>
|
||||
`
|
||||
return element
|
||||
}
|
||||
|
||||
const createEnhancement = (item) => {
|
||||
return createAdmonition('example', 'Feature', item)
|
||||
}
|
||||
|
||||
const createBug = (item) => {
|
||||
return createAdmonition('bug', 'Bug', item)
|
||||
}
|
||||
|
||||
const createQuestion = (item) => {
|
||||
return createAdmonition('question', 'Issue', item)
|
||||
}
|
||||
|
||||
fetch('https://gitnet.fr/api/v1/repos/deblan/side_menu/issues?state=open', {
|
||||
headers: new Headers({'accept': 'application/json'})
|
||||
})
|
||||
.then((response) => {
|
||||
return response.json()
|
||||
})
|
||||
.then((json) => {
|
||||
if (json.length === 0) {
|
||||
issues.style.display = 'none'
|
||||
}
|
||||
|
||||
json.forEach((item) => {
|
||||
let isBug = false
|
||||
let isEnhancement = false
|
||||
|
||||
item.labels.forEach((label) => {
|
||||
if (label.name === 'bug') {
|
||||
isBug = true
|
||||
} else if (label.name === 'enhancement') {
|
||||
isEnhancement = true
|
||||
}
|
||||
})
|
||||
|
||||
if (isBug) {
|
||||
issues.appendChild(createBug(item))
|
||||
} else if (isEnhancement) {
|
||||
issues.appendChild(createEnhancement(item))
|
||||
} else {
|
||||
issues.appendChild(createQuestion(item))
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
112
docusaurus.config.js
Normal file
|
@ -0,0 +1,112 @@
|
|||
// @ts-check
|
||||
// `@type` JSDoc annotations allow editor autocompletion and type checking
|
||||
// (when paired with `@ts-check`).
|
||||
// There are various equivalent ways to declare your Docusaurus config.
|
||||
// See: https://docusaurus.io/docs/api/docusaurus-config
|
||||
|
||||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Custom menu',
|
||||
tagline: 'Improves the day-to-day usability and user interface of Nextcloud',
|
||||
favicon: 'ontent/icon.svg',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://deblan.gitnet.page/',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/side_menu_doc/',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'deblan', // Usually your GitHub org/user name.
|
||||
projectName: 'side_menu', // Usually your repo name.
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internationalization, you can use this field to set
|
||||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||||
// may want to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: './sidebars.js',
|
||||
},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
image: 'https://deblan.gitnet.page/side_menu_doc/content/card.jpg',
|
||||
navbar: {
|
||||
title: 'Home',
|
||||
logo: {
|
||||
alt: 'Logo',
|
||||
src: 'content/icon.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
position: 'left',
|
||||
label: 'Documentation',
|
||||
},
|
||||
{
|
||||
href: 'https://gitnet.fr/deblan/side_menu',
|
||||
label: 'Gitnet',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Issue',
|
||||
href: 'https://gitnet.fr/deblan/side_menu/issues',
|
||||
},
|
||||
{
|
||||
label: 'Matrix',
|
||||
href: 'https://matrix.to/#/!TFPucDATKODpHNVAtu:neutralnetwork.org?via=neutralnetwork.org',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Blog of the author',
|
||||
to: 'https://www.deblan.io',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `It's free! Fork and hack it!`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
},
|
||||
}),
|
||||
plugins: [require.resolve('docusaurus-lunr-search')],
|
||||
};
|
||||
|
||||
export default config;
|
76
mkdocs.yml
|
@ -1,76 +0,0 @@
|
|||
site_name: Custom menu
|
||||
# site_url: "https://deblan.gitnet.page/side_menu_doc/"
|
||||
|
||||
plugins:
|
||||
- search
|
||||
- social
|
||||
- autolinks
|
||||
- markdownextradata
|
||||
- redirects:
|
||||
redirect_maps:
|
||||
'tips.md': 'faq.md'
|
||||
|
||||
extra_css:
|
||||
- _static/css/extra.css
|
||||
|
||||
extra:
|
||||
generator: false
|
||||
icon:
|
||||
check: ":fontawesome-solid-check:"
|
||||
uncheck: ":fontawesome-solid-xmark:"
|
||||
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: overrides
|
||||
logo: _static/img/logo.svg
|
||||
favicon: _static/img/logo.svg
|
||||
features:
|
||||
- content.code.copy
|
||||
- navigation.tabs
|
||||
- navigation.footer
|
||||
palette:
|
||||
- scheme: default
|
||||
primary: "light blue"
|
||||
media: "(prefers-color-scheme: light)"
|
||||
toggle:
|
||||
icon: material/brightness-7
|
||||
name: Passer en mode sombre
|
||||
- scheme: slate
|
||||
primary: "black"
|
||||
media: "(prefers-color-scheme: dark)"
|
||||
toggle:
|
||||
icon: material/brightness-4
|
||||
name: Passer en mode clair
|
||||
|
||||
markdown_extensions:
|
||||
- extra
|
||||
- admonition
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
extend_pygments_lang:
|
||||
- name: php-inline
|
||||
lang: php
|
||||
options:
|
||||
startinline: true
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
||||
- pymdownx.highlight
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.details
|
||||
- attr_list
|
||||
- md_in_html
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
|
||||
nav:
|
||||
- Overview: index.md
|
||||
- Screenshots: screenshots.md
|
||||
- Install and upgrade: setup.md
|
||||
- FAQ: faq.md
|
||||
- Support: support.md
|
||||
- Contribute: contrib.md
|
||||
- Changelog: changelog.md
|
|
@ -1,7 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
|
||||
<!-- ci_scripts -->
|
||||
{% endblock %}
|
15403
package-lock.json
generated
Normal file
45
package.json
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"name": "deblan/side_menu_doc",
|
||||
"version": "dev",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.1.0",
|
||||
"@docusaurus/preset-classic": "3.1.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"docusaurus-lunr-search": "^3.3.2",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.1.0",
|
||||
"@docusaurus/types": "3.1.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 3 chrome version",
|
||||
"last 3 firefox version",
|
||||
"last 5 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
25
sidebars.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// @ts-check
|
||||
|
||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||
const sidebars = {
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
'screenshots',
|
||||
'setup',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'FAQ',
|
||||
items: [
|
||||
'FAQ/apporder',
|
||||
'FAQ/default-app',
|
||||
'FAQ/export-config',
|
||||
'FAQ/guest-users',
|
||||
],
|
||||
},
|
||||
'support',
|
||||
'contrib',
|
||||
'changelog',
|
||||
],
|
||||
};
|
||||
|
||||
export default sidebars;
|
61
src/components/HomepageFeatures/index.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
import clsx from 'clsx';
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
const FeatureList = [
|
||||
{
|
||||
title: 'Reorganize the access to your apps',
|
||||
Svg: require('@site/static/content/organize.svg').default,
|
||||
description: (
|
||||
<>
|
||||
<em>Custom menu</em> allows you to modify the position of the main menu by creating a panel on the left of the interface or with a big menu on the top. You can also define apps that must be displayed in the top menu.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Fully customizable',
|
||||
Svg: require('@site/static/content/customization.svg').default,
|
||||
description: (
|
||||
<>
|
||||
<em>Custom menu</em> offers a multitude of settings, giving you the flexibility to configure Nextcloud to suit your specific needs and preferences.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Free and open-source',
|
||||
Svg: require('@site/static/content/free.svg').default,
|
||||
description: (
|
||||
<>
|
||||
You have the freedom to inspect the code, duplicate it, learn with it, modify it or distribute it as you see fit.
|
||||
</>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
function Feature({Svg, title, description}) {
|
||||
return (
|
||||
<div className={clsx('col col--4')}>
|
||||
<div className="text--center">
|
||||
<Svg className={styles.featureSvg} role="img" />
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
<Heading as="h3">{title}</Heading>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function HomepageFeatures() {
|
||||
return (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
{FeatureList.map((props, idx) => (
|
||||
<Feature key={idx} {...props} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
11
src/components/HomepageFeatures/styles.module.css
Normal file
|
@ -0,0 +1,11 @@
|
|||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.featureSvg {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
30
src/css/custom.css
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #2e8555;
|
||||
--ifm-color-primary-dark: #29784c;
|
||||
--ifm-color-primary-darker: #277148;
|
||||
--ifm-color-primary-darkest: #205d3b;
|
||||
--ifm-color-primary-light: #33925d;
|
||||
--ifm-color-primary-lighter: #359962;
|
||||
--ifm-color-primary-lightest: #3cad6e;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #25c2a0;
|
||||
--ifm-color-primary-dark: #21af90;
|
||||
--ifm-color-primary-darker: #1fa588;
|
||||
--ifm-color-primary-darkest: #1a8870;
|
||||
--ifm-color-primary-light: #29d5b0;
|
||||
--ifm-color-primary-lighter: #32d8b4;
|
||||
--ifm-color-primary-lightest: #4fddbf;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
}
|
43
src/pages/index.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import Layout from '@theme/Layout';
|
||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './index.module.css';
|
||||
|
||||
function HomepageHeader() {
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<Heading as="h1" className="hero__title">
|
||||
{siteConfig.title}
|
||||
</Heading>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
className="button button--secondary button--lg"
|
||||
to="/docs/intro">
|
||||
Get started!
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<Layout
|
||||
title={`${siteConfig.title}`}
|
||||
description="Allows you to modify the position of the main menu by creating a panel on the left of the interface or with a big menu on the top.">
|
||||
<HomepageHeader />
|
||||
<main>
|
||||
<HomepageFeatures />
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
23
src/pages/index.module.css
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||
* and scoped locally.
|
||||
*/
|
||||
|
||||
.heroBanner {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 996px) {
|
||||
.heroBanner {
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
7
src/pages/markdown-page.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Markdown page example
|
||||
---
|
||||
|
||||
# Markdown page example
|
||||
|
||||
You don't need React to write simple standalone pages.
|
0
static/.nojekyll
Normal file
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
BIN
static/content/card.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
1
static/content/customization.svg
Normal file
After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 237 KiB After Width: | Height: | Size: 237 KiB |
1
static/content/free.svg
Normal file
After Width: | Height: | Size: 8.3 KiB |
70
static/content/icon.svg
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="145.889"
|
||||
height="145.889"
|
||||
viewBox="0 0 38.6 38.6"
|
||||
version="1.1"
|
||||
id="svg885"
|
||||
sodipodi:docname="icon.svg"
|
||||
inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
|
||||
<metadata
|
||||
id="metadata891">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs889" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1038"
|
||||
id="namedview887"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.5190383"
|
||||
inkscape:cx="132.60659"
|
||||
inkscape:cy="131.23851"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg885" />
|
||||
<rect
|
||||
width="34.535"
|
||||
height="34.535"
|
||||
x="2.0330019"
|
||||
y="2.0320034"
|
||||
overflow="visible"
|
||||
rx="5.4809999"
|
||||
ry="5.4809999"
|
||||
style="fill:#e2ffef;stroke:#2e8555;marker:none;stroke-opacity:1;fill-opacity:1"
|
||||
color="#000000"
|
||||
stroke-width="4.065"
|
||||
stroke-linecap="round"
|
||||
paint-order="fill markers stroke"
|
||||
id="rect881" />
|
||||
<path
|
||||
d="M 7.423,19.242 H 17.42 M 7.423,11.885 h 11.4 m -11.4,14.714 h 11.4"
|
||||
stroke-width="3.165"
|
||||
id="path879"
|
||||
style="fill:none;stroke:#2e8555;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
1
static/content/organize.svg
Normal file
After Width: | Height: | Size: 25 KiB |