From 3a4c7208099b3928c29b2dcb4227ffb628fd1eac Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Mon, 6 Jul 2020 15:11:32 +0100 Subject: [PATCH] Updated Building (markdown) --- Building.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Building.md b/Building.md index db92176..f193ccc 100644 --- a/Building.md +++ b/Building.md @@ -8,31 +8,21 @@ Then enter the directory, grab python dependencies and enter the venv. ``` hrfee@lab:~$ cd jellyfin-accounts hrfee@lab:~/jellyfin-accounts# poetry update -hrfee@lab:~$ poetry shell +hrfee@lab:~/jellyfin-accounts# poetry shell ``` -Next, you need to get bootstrap. jellyfin-accounts provides Bootstrap 4 and the v5 alpha, as well as a Jellyfin theme for each. You will need to acquire/create the css files for each permutation of these. +Next, you need to get bootstrap. jellyfin-accounts provides Bootstrap 4 and the v5 alpha, as well as a Jellyfin theme for each. The entire process can now be done with one command, but you will need to install [npm](https://www.npmjs.com/get-npm) first. -Acquire `npm`, then, making sure you're still in the main directory, run: +Once you have it, run ``` -hrfee@lab:~/jellyfin-accounts# npm install bootstrap@next -hrfee@lab:~/jellyfin-accounts# npm install bootstrap4@npm:bootstrap -``` -This will install bs4 and bs5 into `./node_modules/bootstrap4` and `./node_modules/bootstrap` respectively. - -Next, copy each of their pre-compiled CSS files into the `jellyfin_accounts/data/static` directory: -``` -hrfee@lab:~/jellyfin-accounts# cp node_modules/bootstrap4/dist/css/bootstrap.min.css jellyfin_accounts/data/static/bs4.css -hrfee@lab:~/jellyfin-accounts# cp node_modules/bootstrap/dist/css/bootstrap.min.css jellyfin_accounts/data/static/bs5.css +hrfee@lab:~/jellyfin-accounts# poetry run task compile-css ``` -You then need to compile the SCSS for the Jellyfin theme. This is explained in the README for the [scss](https://github.com/hrfee/jellyfin-accounts/tree/master/scss) directory. +This will install BS5, BS4, `clean-css`, `postcss`, and `autoprefixer`, the last of which help clean up the resulting files. It then copies the Bootstrap files into the `jellyfin_accounts/data/static/` directory, and compiles the alternate theme. Once done, you should have `bs4.css, bs5.css, bs4-jf.css, bs5-jf.css` inside the `jellyfin_accounts/data/static/` directory. -Before you build, you will need to delete or move `.gitignore` as otherwise poetry will not include the new `.css` files. Finally, you can build and install: ``` -hrfee@lab:~/jellyfin-accounts# rm .gitignore hrfee@lab:~/jellyfin-accounts# poetry build hrfee@lab:~/jellyfin-accounts# poetry install ```