Fixed the Images

fixed the images not showing error now all images in `/media/` are accesible using `src = '/media/<name>'`
with_posts
surya 2024-07-07 11:51:22 +05:30
parent 1eac0d0b97
commit 844f40b465
4 changed files with 6 additions and 2 deletions

BIN
media/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -41,7 +41,7 @@
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #000;"> <nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #000;">
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<img src="{% static 'logo.png' %}" alt="BH Logo" height="40"> Beyond Heroes <img src="/media/logo.jpg" alt="BH Logo" height="40"> Beyond Heroes
</a> </a>
<!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>

BIN
templates/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -1,7 +1,11 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<style type="text/css">
body {
background-image: url('/media/bg.jpg'); background-size: cover; background-repeat: no-repeat;
}
</style>
<div style="position: absolute; bottom: 1; right: 0;margin: 25px; width: 30%; background-color: rgba(0, 0, 0, 0.6); color: #eeeeee; border-radius: 2px;"> <div style="position: absolute; bottom: 1; right: 0;margin: 25px; width: 30%; background-color: rgba(0, 0, 0, 0.6); color: #eeeeee; border-radius: 2px;">
<div style="padding: 20px;"> <div style="padding: 20px;">
<h2 style="text-align: justify;">Beyond Heroes</h2> <h2 style="text-align: justify;">Beyond Heroes</h2>