Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shgkme/nextcloud-styles-extractor

Nextcloud server global styles for testing and development
https://github.com/shgkme/nextcloud-styles-extractor

nextcloud

Last synced: about 1 month ago
JSON representation

Nextcloud server global styles for testing and development

Awesome Lists containing this project

README

        

# Nextcloud Server Styles

> Extracted Nextcloud server global styles
- ⚑ Zero dependencies
- 🌲 Different branches: `master`, `stable30`, `stable29`
- βœ… `REUSE.toml` included

## πŸ“₯ Install

```sh
npm i @shgk/nextcloud-styles
```

## πŸ—οΈ Prerequisites

Requires a bundler with `.css` import support, such as Webpack with `css-loader` ot Vite.

## πŸ§‘β€πŸ’» Usage

Import all styles and themes:

```js
// master
import '@shgk/nextcloud-styles'
// or a specific branch
import '@shgk/nextcloud-styles/master'
import '@shgk/nextcloud-styles/stable30'
import '@shgk/nextcloud-styles/stable29'
```

Importing a specific file:

```js
// master
import '@shgk/nextcloud-styles/apps/theming/theme/dark.css'
import '@shgk/nextcloud-styles/core/img/logo/logo.svg'
// or a specific branch
import '@shgk/nextcloud-styles/master/apps/theming/css/default.css'
import '@shgk/nextcloud-styles/stable30/core/css/server.css'
```

## πŸ“¦ Details

Styles are close to the original. Changes:
- Added `light.plain.css` and `light.dark.css` to be used as server's
```html


```
- Absolute paths in `url()` are changed to relative
- Added `REUSE.toml` for license information
- Added `theme.css` for re-export theming styles including plain style on `prefers-color-scheme`
- Added `index.js` for re-export all styles and `themes.css`

Styles structure:

```
└───BRANCH
β”œβ”€β”€β”€apps
β”‚ └───theming
β”‚ β”œβ”€β”€β”€css
β”‚ β”‚ └───default.css
β”‚ β”œβ”€β”€β”€img
β”‚ β”‚ └───...
β”‚ └───theme
β”‚ β”œβ”€β”€β”€dark.css
β”‚ β”œβ”€β”€β”€dark.plain.css
β”‚ β”œβ”€β”€β”€dark.css
β”‚ └───light.plain.css
β”œβ”€β”€β”€core
β”‚ β”œβ”€β”€β”€css
β”‚ β”‚ β”œβ”€β”€β”€apps.css
β”‚ β”‚ └───server.css
β”‚ └───img
β”‚ └───...
β”œβ”€β”€β”€dist
β”‚ └───icons.css
β”œβ”€β”€β”€REUSE.toml
β”œβ”€β”€β”€theme.css = apps/theming/css/default.css + apps/theming/theme/* with prefers-color-scheme
└───index.js = core/css/server.css + core/css/apps.css + theme.css
```

Based on awesome [`szaimen/nextcloud-simple-test`](https://github.com/szaimen/nextcloud-easy-test/).

## πŸ‘Ύ Development

Update styles:
```sh
node ./build/extract.js
```

## TODO

- [ ] Add high-contrast theme and dyslexia-friendly font
- [ ] Add automatic updates
- [ ] Add custom themes support
- [ ] Add private servers support
- [ ] Improve building performance
- [ ] Remove unneeded images