Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

National Dishes and BMI Gallery

A simple website to display the information from the following wikipedia articles:

Tech Stack

  • Backend: Go
  • Frontend: Standard Library html/template, JavaScript
  • Data: CSV-based storage
  • Environment: godotenv for configuration

Prerequisites

  • Go 1.16 or higher
  • A .env file in the root directory
  • A countries.csv file in the root directory

Setup

  1. Environment Configuration
    Create a .env file in the root directory and define your image source (CDN or local path):

    IMG_SOURCE=https://your-image-bucket.com
    
  2. Data Format
    Ensure your countries.csv follows this column structure:

    • 0: Country Name
    • 1: BMI Value (Float)
    • 4: National Dish Name
    • 5: Wikipedia Link
    • 6: Image Filename
    • 7: Image Aspect Ratio (Float)
    • 8: Order (2 Columns)
    • 9: Order (3 Columns)
    • 10: Order (4 Columns)
  3. Run the Application

    go run main.go

    or

    air

    The server will start on http://localhost:8083.

Project Structure

  • main.go: Handles CSV parsing, template rendering, and API logic for content updates.
  • static/:
    • base.html: The core HTML boilerplate.
    • home.html: The main view containing the JavaScript observers and UI components.
    • content.html: The partial template used for rendering the gallery grid.
    • style.css: styling

About

national dishes by bmi

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages