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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions website/migrations/0239_remove_first_suggestion_badge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.1.8 on 2025-05-12 13:30

from django.db import migrations


def remove_first_suggestion_badge(apps, schema_editor):
Badge = apps.get_model("website", "Badge")
badge_title = "First Suggestion"
Badge.objects.filter(title=badge_title).delete()


class Migration(migrations.Migration):
dependencies = [
("website", "0238_add_reminder_settings"),
]

operations = [
migrations.RunPython(remove_first_suggestion_badge),
]
37 changes: 37 additions & 0 deletions website/migrations/0240_add_first_forum_post_badge_icon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Generated by Django 5.1.8 on 2025-05-12

import os
import shutil

from django.conf import settings
from django.core.files import File
from django.db import migrations


def add_first_forum_post_badge_icon(apps, schema_editor):
Badge = apps.get_model("website", "Badge")
badge_title = "First Forum Post"
icon_relative_path = "badges/icons8-forum-96.png"

badge = Badge.objects.filter(title=badge_title).first()
if badge:
static_icon_path = os.path.join("website", "static", "img", icon_relative_path)

if os.path.exists(static_icon_path):
media_icon_path = os.path.join(settings.MEDIA_ROOT, "badges", os.path.basename(static_icon_path))
os.makedirs(os.path.dirname(media_icon_path), exist_ok=True)
shutil.copy(static_icon_path, media_icon_path)

with open(media_icon_path, "rb") as f:
badge.icon.save(os.path.basename(media_icon_path), File(f), save=True)
badge.save()


class Migration(migrations.Migration):
dependencies = [
("website", "0239_remove_first_suggestion_badge"),
]

operations = [
migrations.RunPython(add_first_forum_post_badge_icon),
]
2 changes: 1 addition & 1 deletion website/static/img/badges/icon_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ icons8-edit-96.png
icons8-eslint-pluggable-and-configurable-linter-tool-for-identifying-and-reporting-on-patterns-in-javascript-96.png
icons8-fail-32.png
icons8-feedback-80.png
icons8-forum-96.png
icons8-host-64.png
icons8-ip-48.png
icons8-markdown-56.png
Expand All @@ -37,7 +38,6 @@ icons8-security-configuration-40.png
icons8-security-shield-96.png
icons8-social-50.png
icons8-star-96.png
icons8-suggestion-64.png
icons8-survey-96.png
icons8-tag-100.png
icons8-test-60.png
Expand Down
Binary file added website/static/img/badges/icons8-forum-96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed website/static/img/badges/icons8-suggestion-64.png
Binary file not shown.
Binary file added website/static/img/features/forum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed website/static/img/features/suggestions.png
Binary file not shown.
40 changes: 20 additions & 20 deletions website/templates/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="container mx-auto px-4 py-6 m-2 ">
<div class="relative sm:flex sm:flex-col">
<h1 class="text-3xl font-bold mb-4 text-center">BLT Features</h1>
<a href="/suggestion/"
<a href="/forum/"
class=" absolute top-0 right-9 border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors shadow-md">Suggest New Feature</a>
<p class="text-gray-600 mb-6 text-center">
Explore the key features of OWASP BLT, designed to enhance bug tracking and security collaboration.
Expand Down Expand Up @@ -384,6 +384,25 @@ <h2 class="text-xl font-semibold">Flutter APP</h2>
class="border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors">View Repo</a>
</div>
</div>
<!-- forum -->
<div class="bg-white shadow-md rounded-lg p-4 hover:scale-105 transition-transform w-full sm:w-[300px] md:w-[320px] lg:w-[350px] flex flex-col h-full">
<img src="{% static 'img/features/forum.png' %}"
alt="forum"
height="100"
width="200"
class="rounded-md mb-3 w-full h-56 object-contain">
<h2 class="text-xl font-semibold">Forum</h2>
<p class="text-gray-600 my-2">
Encourages users to submit ideas and feedback to improve the platform, fostering community-driven development.
</p>
<p class="text-gray-500 text-sm">Added on: 2025-02-22</p>
<div class="flex justify-between mt-auto">
<a href="/forum/"
class="border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors"> View Forum</a>
<a href="https://github.com/OWASP-BLT/BLT/commit/b7994191bfbbf79814965c832442d61f1160d50c"
class="border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors">View commit</a>
</div>
</div>
<!-- github action -->
<div class="bg-white shadow-md rounded-lg p-4 hover:scale-105 transition-transform w-full sm:w-[300px] md:w-[320px] lg:w-[350px] flex flex-col h-full">
<img src="{% static 'img/features/github-action.png' %}"
Expand Down Expand Up @@ -707,25 +726,6 @@ <h2 class="text-xl font-semibold">Steak based point system</h2>
class="border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors">View PR</a>
</div>
</div>
<!-- suggestions -->
<div class="bg-white shadow-md rounded-lg p-4 hover:scale-105 transition-transform w-full sm:w-[300px] md:w-[320px] lg:w-[350px] flex flex-col h-full">
<img src="{% static 'img/features/suggestions.png' %}"
alt="suggestion"
height="100"
width="200"
class="rounded-md mb-3 w-full h-56 object-contain">
<h2 class="text-xl font-semibold">Suggetions</h2>
<p class="text-gray-600 my-2">
Encourages users to submit ideas and feedback to improve the platform, fostering community-driven development.
</p>
<p class="text-gray-500 text-sm">Added on: 2024-07-28</p>
<div class="flex justify-between mt-auto">
<a href="/suggestion/"
class="border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors">Suggetions</a>
<a href="https://github.com/OWASP-BLT/BLT/pull/2443"
class="border border-red-500 bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 transition-colors">View PR</a>
</div>
</div>
<!-- Teams -->
<div class="bg-white shadow-md rounded-lg p-4 hover:scale-105 transition-transform w-full sm:w-[300px] md:w-[320px] lg:w-[350px] flex flex-col h-full">
<img src="{% static 'img/features/teams.png' %}"
Expand Down