from django.shortcuts import render from django.template import loader from django.http import HttpResponse img_pth = "static/assets/img/portfolio/" base_url = "/" def index(request): template = loader.get_template('index.html') context = { 'base_url': '', } return HttpResponse(template.render(context, request)) def portfolio_item_1(request): template = loader.get_template('portfolio/pi1.html') context = { 'name': "Discord RandBot", 'imgs': [f"{img_pth}pi1/logo.jpg",f"{img_pth}pi1/example-1.jpg", f"{img_pth}pi1/example-2.jpg",f"{img_pth}pi1/example-3.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_2(request): template = loader.get_template('portfolio/pi2.html') context = { 'name': "3D Character Controller", 'imgs': [f"{img_pth}pi2/logo.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_3(request): template = loader.get_template('portfolio/pi3.html') context = { 'name': "CI/CD Nexus PyPi", 'imgs': [f"{img_pth}pi3/logo.jpg",f"{img_pth}pi3/example-1.jpg", f"{img_pth}pi3/example-2.jpg",f"{img_pth}pi3/example-3.jpg",f"{img_pth}pi3/example-4.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_4(request): template = loader.get_template('portfolio/pi4.html') context = { 'name': "Platformania", 'imgs': [f"{img_pth}pi4/logo.jpg",f"{img_pth}pi4/example-1.jpg", f"{img_pth}pi4/example-2.jpg",f"{img_pth}pi4/example-3.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_5(request): template = loader.get_template('portfolio/pi5.html') context = { 'name': "CS50 Labs", 'imgs': [f"{img_pth}pi5/logo.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_6(request): template = loader.get_template('portfolio/pi6.html') context = { 'name': "Jobs Aggregator", 'imgs': [f"{img_pth}pi6/logo.jpg",f"{img_pth}pi6/example-1.jpg", f"{img_pth}pi6/example-2.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_7(request): template = loader.get_template('portfolio/pi7.html') context = { 'name': "CUDA Stresser", 'imgs': [f"{img_pth}pi7/logo.jpg",f"{img_pth}pi7/example-1.jpg", f"{img_pth}pi7/example-2.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request)) def portfolio_item_9(request): template = loader.get_template('portfolio/pi9.html') context = { 'name': "jirikarlik.com", 'imgs': [f"{img_pth}pi9/logo.jpg",f"{img_pth}pi9/example-1.jpg"], 'base_url' : base_url } return HttpResponse(template.render(context, request))