diff --git a/content/tutorial/Install Cantara.en.md b/content/tutorial/Install Cantara.en.md index a08e1e2..fb4503c 100644 --- a/content/tutorial/Install Cantara.en.md +++ b/content/tutorial/Install Cantara.en.md @@ -28,7 +28,13 @@ If you would like to remove Cantara from your system, you can run `winget uninst If you don't like to use winget, you can also download and run the installer manually which will lead you through the process of installation. -Simply [download and run the installer](https://github.com/reckel-jm/cantara/releases/download/v2.4.1/cantara-2.4.1_setup_win64.exe), go through the questions and install Cantara. After the installation, you will find the program in your start menu. In addition, if you have chosen the option during the setup process, you will also have a shortcut on your desktop. +Simply [download and run the installer](https://github.com/reckel-jm/cantara/releases/download/v2.5.0/cantara-v2.5.0_setup_x84_64.exe), go through the questions and install Cantara. After the installation, you will find the program in your start menu. In addition, if you have chosen the option during the setup process, you will also have a shortcut on your desktop. + +{{% notice info %}} +When starting the installer, Windows might warn you that the source is unknown and the executable unsigned. In this case, you can choose "Proceed" to continue. +This is due to the fact that I don't own a certificate which I could use for certification of the executable. +However as the software has been published to Winget, you can safely install it from there and without seeing this notification. +{{% /notice %}} ## Linux @@ -64,26 +70,19 @@ Once installed, Cantara can be uninstalled via pacman: `sudo pacman -R cantara`. If you don't like to use the AUR, you can also use the pre-built Pacman package from the Github repository. For downloading and installing the package, simply enter the following commands in the command line: ```bash -wget https://github.com/reckel-jm/cantara/releases/download/v2.4.1/cantara-2.4.1-1-x86_64.pkg.tar.zst -sudo pacman -U cantara-2.4.1-1-x86_64.pkg.tar.zst +wget https://github.com/reckel-jm/cantara/releases/download/v2.5.0/cantara-2.5.0-1-x86_64.pkg.tar.zst +sudo pacman -U cantara-2.5.0-1-x86_64.pkg.tar.zst ``` Cantara is now installed and ready for use. If you later would like to uninstall it, you can use Pacman as well: - sudo pacman -R cantara +```bash +sudo pacman -R cantara +``` ### Ubuntu/Debian based Linux distributions -There is a DEB-Package for 2.3 Beta which works well with Ubuntu. You can [download it here](https://github.com/reckel-jm/cantara/releases/download/v2.2.3beta/cantara-2.2.3beta.deb) and then open it with "Software Installation" or use `dpkg` in the command line: - - wget https://github.com/reckel-jm/cantara/releases/download/v2.3/cantara-2.3.deb - sudo dpkg -i cantara-2.3.deb - -If you would like to remove Cantara at a later point, you can use `sudo apt-get remove cantara`. In addition to that, you can get Cantara as a [Snap](#snap) via the Ubuntu Software Store. - -{{% notice warning %}} -This is not the latest version at the moment. Please wait till the latest versios been deployed as a Debian package or use snap in the meantime. -{{% /notice %}} +Please use [Snap](#snap) or [Flatpak](#flatpakflathub) as described in the concerning sections. ### Snap @@ -91,7 +90,9 @@ Cantara is available at the Snap Store! The snap package now only takes 4.5 MB a [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/cantara) - sudo snap install cantara +```bash +sudo snap install cantara +``` {{% notice info %}} The way how a Snap application is running is different from a normal package. Therefore there might be some different behavior e.g. a different look of the program. In any case, feel free to report every unexpected behavior so that I can try to fix it. @@ -109,33 +110,38 @@ Cantara has been packaged as a Flatpak as well and can be installed and updated Installing a flatpak from flathub can be done via a graphical software management tool, for example Gnome Software or KDE Discover, or via the command line: - flatpak install app.cantara.Cantara +```bash +flatpak install app.cantara.Cantara +``` Depending on the flats you have already installed, flatpak might download several houndreds of megabytes for the required KDE/Qt-runtimes. That being said, although the actual Cantara flat is less then 4 MB installing Cantara via flatpak is for sure not the most disk space friendly way. -### Generic Installation of Binaries - -As an other distribution-independant way of using Cantara, you can manually download and install the binaries. Please be aware that Cantara needs the libqt5pas library which is normally resolved by the package dependancy management of your distribution's package manager. However, if you don't use the package manager for installation, you need to install libqt5pas manually. Afterwards, download the Zip-File from the Github Repository, extract it and run `make install`: +### Generic Run of Binaries - wget https://github.com/reckel-jm/cantara/releases/download/v2.4.0/cantara-2.4.0-linux-x86_64_bin.zip - tar -zxvf cantara-2.4.0-linux-x86_64_bin.zip - sh install.sh +{{% notice warning %}} +Installing Cantara without using your native package manager or a containerized format (Snap/Flatpak) is strongly discouraged and not recommended. Use this only for locally running Cantara without installation. +{{% /notice %}} -This will install Cantara globally on your system. You could also run Cantara directly from the dictionary without installing it. If you later want to uninstall a global installed Cantara, run the following commands: +As an other distribution-independant way of using Cantara, you can manually download and run the binary. Please be aware that Cantara needs the libqt5pas library which is normally resolved by the package dependancy management of your distribution's package manager. However, if you don't use the package manager for installation, you need to install libqt5pas manually. Afterwards, download the Zip-File from the Github Repository, extract it, make the binary executable and run `cantara`: - sudo rm /usr/bin/cantara - sudo rm /usr/share/icons/cantara.png - sudo xdg-desktop-menu uninstall reckel-cantara.desktop - sudo rm /usr/share/locale/en/cantara.mo +```sh +wget https://github.com/reckel-jm/cantara/releases/download/v2.5.0/cantara-2.5.0-linux-x86_64_bin.tar.gz +tar -zxvf cantara-2.5.0-linux-x86_64_bin.tar.gz +cd cantara-2.5.0-linux-x86_64_bin +chmod +x cantara +./cantara +``` ### Generic Compilation Install `lazarus` and `lazbuild` from your local repository. If you prefer QT5, you could also install `lazarus-qt` instead of lazarus if the distribution provides a certain package. After you have done that, the compilation is quite easy: Download the source code, extract it and run lazbuild with the appropriate options. - wget https://github.com/reckel-jm/cantara/archive/refs/tags/v2.4.0.tar.gz - tar -zxvf v2.4.0.tar.gz - cd v2.3 - make +```sh +wget https://github.com/reckel-jm/cantara/archive/refs/tags/v2.5.0.tar.gz +tar -zxvf v2.5.0.tar.gz +cd v2.5.0 +make +``` If you prefer GTK2, change the option to `--ws=gtk2` in the makefile. If done with no errors, you will find the executable binary `cantara` in the same folder. diff --git a/data/carousel.yaml b/data/carousel.yaml deleted file mode 100644 index 55bdd30..0000000 --- a/data/carousel.yaml +++ /dev/null @@ -1,9 +0,0 @@ -images: - - image: /images/cantara1.png - content_html: "" - - image: /images/cantara2.png - content_html: "" - - image: /images/cantara3.png - content_html: "" - - image: /images/cantara4.png - content_html: "" diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html deleted file mode 100644 index f0310d8..0000000 --- a/layouts/partials/carousel.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ .context.Scratch.Set "height" .height }} -{{ .context.Scratch.Set "unit" .unit }} -{{ .context.Scratch.Set "items" .items }} - \ No newline at end of file diff --git a/layouts/partials/custom-footer.html b/layouts/partials/custom-footer.html deleted file mode 100644 index acf5e00..0000000 --- a/layouts/partials/custom-footer.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html deleted file mode 100644 index 01d7c6a..0000000 --- a/layouts/shortcodes/carousel.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ .Scratch.Set "height" (.Get "height") }} -{{ .Scratch.Set "unit" (.Get "unit") }} -{{ .Scratch.Set "ordinal" .Ordinal }} -{{ .Scratch.Set "items" (.Get "items") }} - diff --git a/static/css/carousel.css b/static/css/carousel.css deleted file mode 100644 index ad5233a..0000000 --- a/static/css/carousel.css +++ /dev/null @@ -1,13 +0,0 @@ -.carousel {position: relative;} -.carousel ul {overflow: auto; display: flex; flex-wrap: nowrap; scroll-snap-type: x mandatory; scroll-snap-points-y: repeat(100%); scroll-behavior: smooth; background: transparent; -ms-overflow-style: none; scrollbar-width: none; margin: 0; padding: 0;} -.carousel ul::-webkit-scrollbar {display: none; /* Hide scrollbar for Chrome, Safari and Opera */} -.carousel ul li {position: relative; min-width: 100%; list-style: none; background: url() center center / cover no-repeat; scroll-snap-align: start;} -.carousel ul li > * {position: absolute; left: 0; top: 0; width: 100%; height: 100%; } -.carousel ul li > img {object-fit: cover;} -.carousel ul li > div {display: flex; justify-content: center; align-items: center; color: white; font-weight: bold; font-size: 20px;} -.carousel ol {position: absolute; bottom: 15px; display: flex; justify-content: center; left: 50%; transform: translateX(-50%); z-index: 9;} -.carousel ol li {list-style: none; padding: 0 5px;} -.carousel ol li a {display: block; height: 10px; width: 10px; border: 2px solid white; background: transparent; border-radius: 100%;} -.carousel ol li.selected a {background: white;} -.carousel .prev, .carousel .next {display: none; user-select:none; cursor: pointer; font-size: 50px; color: white; position: absolute; left: 0; padding: 15px 15px 30px; top: 50%; transform: translateY(-50%); z-index: 9; line-height: 0;} -.carousel .next {left: auto; right: 0;} \ No newline at end of file diff --git a/static/js/carousel.js b/static/js/carousel.js deleted file mode 100644 index a6b4f2e..0000000 --- a/static/js/carousel.js +++ /dev/null @@ -1,127 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - - const carousels = document.querySelectorAll('.carousel'); - carousels.forEach(function( carousel ) { - - const ele = carousel.querySelector('ul'); - const amountvisible = Math.round(ele.offsetWidth/ele.querySelector('li:nth-child(1)').offsetWidth); - const bullets = carousel.querySelectorAll('ol li'); - const slides = carousel.querySelectorAll('ul li'); - const nextarrow = carousel.querySelector('.next'); - const prevarrow = carousel.querySelector('.prev'); - - // Initialize the carousel - nextarrow.style.display = 'block'; - prevarrow.style.display = 'block'; - ele.scrollLeft = 0; - bullets[0].classList.add('selected'); - slides[0].classList.add('selected'); - if(amountvisible>1) { - var removeels = carousel.querySelectorAll('ol li:nth-last-child(-n + '+(amountvisible-1)+')'); - removeels.forEach(function(removeel) { - removeel.remove(); - }); - } - - const setSelected = function() { - bullets.forEach(function(bullet) { - bullet.classList.remove('selected'); - }); - slides.forEach(function(slide) { - slide.classList.remove('selected'); - }); - const scrolllength = carousel.querySelector('ul li:nth-child(2)').offsetLeft - carousel.querySelector('ul li:nth-child(1)').offsetLeft; - const nthchild = (Math.round((ele.scrollLeft/scrolllength)+1)); - carousel.querySelector('ol li:nth-child('+nthchild+')').classList.add('selected'); - carousel.querySelector('ul li:nth-child('+nthchild+')').classList.add('selected'); - if(carousel.parentElement.parentElement.querySelector('.dynamictitle')) { - const title = carousel.querySelector('ul li:nth-child('+nthchild+') img').getAttribute('title'); - if(title) carousel.parentElement.parentElement.querySelector('.dynamictitle').innerHTML = title; - } - } - - const scrollTo = function(event) { - event.preventDefault(); - ele.scrollLeft = ele.querySelector(this.getAttribute('href')).offsetLeft; - } - - const nextSlide = function() { - if(!carousel.querySelector('ol li:last-child').classList.contains('selected')) { - carousel.querySelector('ol li.selected').nextElementSibling.querySelector('a').click(); - } else { - carousel.querySelector('ol li:first-child a').click(); - } - } - - const prevSlide = function() { - if(!carousel.querySelector('ol li:first-child').classList.contains('selected')) { - carousel.querySelector('ol li.selected').previousElementSibling.querySelector('a').click(); - } else { - carousel.querySelector('ol li:last-child a').click(); - } - } - - const setInteracted = function() { - ele.classList.add('interacted'); - } - - // Attach the handlers - ele.addEventListener("scroll", debounce(setSelected)); - ele.addEventListener("touchstart", setInteracted); - ele.addEventListener('keydown', function (e){ - if(e.key == 'ArrowLeft') ele.classList.add('interacted'); - if(e.key == 'ArrowRight') ele.classList.add('interacted'); - }); - - nextarrow.addEventListener("click", nextSlide); - nextarrow.addEventListener("mousedown", setInteracted); - nextarrow.addEventListener("touchstart", setInteracted); - - prevarrow.addEventListener("click", prevSlide); - prevarrow.addEventListener("mousedown", setInteracted); - prevarrow.addEventListener("touchstart", setInteracted); - - bullets.forEach(function(bullet) { - bullet.querySelector('a').addEventListener('click', scrollTo); - bullet.addEventListener("mousedown", setInteracted); - bullet.addEventListener("touchstart", setInteracted); - }); - - //setInterval for autoplay - if(carousel.getAttribute('duration')) { - setInterval(function(){ - if (ele != document.querySelector(".carousel:hover ul") && ele.classList.contains('interacted')==false) { - nextarrow.click(); - } - }, carousel.getAttribute('duration')); - } - - - }); //end foreach - -}); //end onload - - -/** -* Debounce functions for better performance -* (c) 2021 Chris Ferdinandi, MIT License, https://gomakethings.com -* @param {Function} fn The function to debounce -*/ -function debounce (fn) { -// Setup a timer -let timeout; -// Return a function to run debounced -return function () { - // Setup the arguments - let context = this; - let args = arguments; - // If there's a timer, cancel it - if (timeout) { - window.cancelAnimationFrame(timeout); - } - // Setup the new requestAnimationFrame() - timeout = window.requestAnimationFrame(function () { - fn.apply(context, args); - }); -}; -}