diff --git a/README.md b/README.md index ddb7890859..29917c3952 100644 --- a/README.md +++ b/README.md @@ -96,47 +96,18 @@ CLI_), on your local machine. 2. In a terminal, `cd` to the directory where you downloaded/cloned Music Blocks, using `cd path/to/musicblocks/`. -3. If you do not have [_Python_](https://www.python.org) installed, -you'll need to install it. You can test for Python in a terminal -using `python`. Type `exit()` to exit Python. (Note that on some older -Linux systems, the `python3` command is not bound to python. You may -need to perform a `sudo apt install python-is-python3` on Debian-like -distros, or equivalent on others.) - -4. After cloning the musicblocks repository, you can choose one of two methods to start a local server: using Python or using npm - - **Using Python** - - for _Linux_ and _macOS_: - - ```bash - python -c "import os, sys; os.system('python -m SimpleHTTPServer 3000 --bind 127.0.0.1') if sys.version_info.major==2 else os.system('python -m http.server 3000 --bind 127.0.0.1')" - ``` - - for _Windows_: +3. After you are in `path/to/musicblocks/` directory, install the dependencies using the following command ```bash - python -c "import os, sys; os.system('python -m SimpleHTTPServer 3000') if sys.version_info.major==2 else os.system('python -m http.server 3000 --bind 127.0.0.1')" + npm install ``` - - **Using npm** - - for _Linux_ and _macOS_: +4. After cloning the musicblocks repository, you can start a local server using npm ```bash - npm run serve + npm run dev ``` - for _Windows_: - - ```bash - npm run winserve - ``` - - **NOTE:** _Make sure you can run either `python` or `py` from your - terminal, to launch the Python prompt._ - 6. You should see a message `Serving HTTP on 127.0.0.1 port 3000 (http://127.0.0.1:3000/) ...` since the HTTP Server is set to start listening on port 3000. diff --git a/index.html b/index.html index d1909336e4..d7adaf7367 100644 --- a/index.html +++ b/index.html @@ -1,1005 +1,702 @@ - - - - - Music Blocks - + + + + + + + + + Music Blocks + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Solfege Pitch Preview

+ + + + +
+ + +
+
+ +
+
- - - - - - - - - - - - + + + - + + loadL10nSplashScreen(); - - + setTimeout(function () { + const loadingText = document.getElementById("loadingText"); + const texts = [_("Do, Re, Mi, Fa, Sol, La, Ti, Do"), _("Loading Music Blocks..."), _("Reading Music...")]; + let index = 0; - + const intervalId = setInterval(function () { + loadingText.textContent = texts[index]; + index = (index + 1) % texts.length; + }, 1500); - + // Stop changing text and finalize loading after 6 seconds + setTimeout(function () { + clearInterval(intervalId); + loadingText.textContent = _("Loading Complete!"); + loadingText.style.opacity = 1; + }, 6000); + }, 4000); + }); - + +
- + + function resizeFixed() { + setTimeout(function () { + $t_fixed.find("th").each(function (index) { + $(this).css( + "width", + $this + .find("th") + .eq(index) + .outerWidth() + "px" + ); + }); + }, 100); + } - + function scrollFixed() { + let offset = $(this).scrollTop(), + tableOffsetTop = $this.offset().top, + tableOffsetBottom = + tableOffsetTop + + $this.height() - + $this.find("thead").height(); + + if ( + offset < tableOffsetTop || + offset > tableOffsetBottom + ) { + $t_fixed.hide(); + } else if ( + offset >= tableOffsetTop && + offset <= tableOffsetBottom && + $t_fixed.is(":hidden") + ) { + $t_fixed.show(); + } + } - + $(window).resize(resizeFixed); + $(window).scroll(scrollFixed); + init(); + }); + }; + jQuery; + + $(document).ready(function () { + $("solfa").fixMe(); + $(".up").click(function () { + $("html, body").animate( + { + scrollTop: 0 + }, + 2000 + ); + }); + }); + }); - + let isDragging = false; + - + + + - + +