hirusha-adi / photos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Photos Website | Hirusha Adikari


πŸ–₯ Online Preview

Website with display my photos. 

πŸ“‚ Folder Structure

./
β”œβ”€β”€β”€assets          # Code for the main site
|   |               # -----
β”‚   β”œβ”€β”€β”€img         # Favicon + Profile Picture
β”‚   └─── ...        # Other Code
|
β”œβ”€β”€β”€media           # Images generated by thumbsup
|   |               # -----
β”‚   β”œβ”€β”€β”€large       # Compressed, full sized images - used in both galleries
β”‚   β”œβ”€β”€β”€small       # Small sized images - for thhumbsup only
β”‚   └───thumbs      # Extremely small image resolution - for thhumbsup only
|
β”œβ”€β”€β”€original_photos # High Quality original photos.
|                   # Not used anywhere. Used to generat thhumbsup images
|
└───public          # Code for thhumbsup
    |               # -----
    ...

Guide for Windows

πŸ”Œ Prerequisites

πŸ“₯ Setting up thumbsup

  1. Install thumbsup witn npm, globally.
npm install -g thumbsup
  1. Download GraphicsMagick (Installer) and install it.

  2. Download exiftool (Windows Executable), extract it and copy it to a folder.

  3. Add both of these folders to System PATH (GraphicsMagick installation folder and the folder which has our exiftool.exe)

πŸ“š Adding new images

  • Copy your high quality images into ./original_photos

    • You may compress it with File Converter
    • All images should be in .jpg

πŸ›  Updating the website

  • Run the command below

    thumbsup --input ./original_photos --output ./gallery --theme cards --index quick.html --title "Hirusha Adikari | Photography" --footer "Copyright Β© 2021-2024 Hirusha Adikari" --albums-output-folder "albums" --albums-from %path

  • The newly compressed images and the other thumbsup files will be generated inside ./gallery

  • Rename ./gallery/index.html to ./gallery/quick.html

  • Move and replace everything from ./gallery to ./

  • Run the gallery.py file, to update the gallery of my main site

    python gallery.py
    
  • Test with a local server, for example using VSCode Live Server.

  • Commit and push changes to your GitHub repository, and wait for GitHub Pages to update the live site.

Guide for Ubuntu

πŸ”Œ Prerequisites

  • Open a terminal and run the following commands to install the necessary tools:
    sudo apt-get update
    sudo apt-get install python3 nodejs npm -y

πŸ“₯ Setting up thumbsup

  1. Install thumbsup with npm, globally.

    sudo npm install -g thumbsup
  2. Install GraphicsMagick:

    sudo apt-get install graphicsmagick -y
  3. Install exiftool:

    sudo apt install exiftool -y

πŸ“š Adding new images

  • Copy your high quality images into ./original_photos

πŸ›  Updating the website

  • Run the following command:

    thumbsup --input ./original_photos --output ./gallery --theme cards --index quick.html --title "Hirusha Adikari | Photography" --footer "Copyright Β© 2021-2024 Hirusha Adikari" --albums-output-folder "albums" --albums-from %path

    Thumbsup Demo

  • The newly compressed images and other thumbsup files will be generated inside ./gallery.

  • Rename ./gallery/index.html to ./gallery/quick.html:

    mv ./gallery/index.html ./gallery/quick.html
  • Move and replace everything from ./gallery to ./:

    mv ./gallery/* ./
  • Run the ./gallery.py file to update the gallery on your main site:

    python3 gallery.py
  • Test with a local server, for example using VSCode Live Server.

  • Commit and push changes to your GitHub repository, and wait for GitHub Pages to update the live site.

License

Licensed under the MIT License

About

License:MIT License


Languages

Language:HTML 72.6%Language:JavaScript 23.0%Language:CSS 3.3%Language:Python 1.0%