From 6d954c96c5eaca0e5d7613a1adf9ba83b36b4597 Mon Sep 17 00:00:00 2001 From: Alexyy Date: Sun, 12 Nov 2023 10:43:33 +0700 Subject: [PATCH 1/2] Fixed navbar issue not appearing when clicked --- static/styles/claim.css | 28 ++++++++++++++++++++++++---- templates/claim.html | 6 ++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/static/styles/claim.css b/static/styles/claim.css index 7930c66..11227bd 100644 --- a/static/styles/claim.css +++ b/static/styles/claim.css @@ -36,21 +36,31 @@ body { width: 100%; top: 0; } + .navbar-nav { justify-content: center; - margin-left:530px; + text-align: center; + margin-left: 0; gap: 10px; + padding: 10px; + margin-left: 510px; } + .nav-link { color: white !important; position: relative; transition: all 0.3s ease-in-out; + padding: 10px 15px; + text-align: center; + display: block; } + .nav-link::after { content: ''; position: absolute; - bottom: -2px; - left: 0; + bottom: 0; + left: 50%; + transform: translateX(-50%); width: 0; height: 2px; background-color: white; @@ -60,4 +70,14 @@ body { .nav-link:hover::after, .nav-link:focus::after { width: 100%; -} \ No newline at end of file +} + +@media (max-width: 768px) { + .navbar-nav { + justify-content: space-around; + text-align: center; + margin-left: 0; + gap: 10px; + padding: 10px; + } +} diff --git a/templates/claim.html b/templates/claim.html index 5cb53ae..9ad4ec3 100644 --- a/templates/claim.html +++ b/templates/claim.html @@ -54,6 +54,12 @@ + \ No newline at end of file From 18f10a7bcc3c4e60c9620fecd6aa238f1cc412ef Mon Sep 17 00:00:00 2001 From: DWAA1660 Date: Sun, 12 Nov 2023 16:31:41 -0700 Subject: [PATCH 2/2] used module --- concurrency.py | 39 +-------------------------------------- main.py | 2 +- requirements.txt | 3 ++- 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/concurrency.py b/concurrency.py index a383453..b189be4 100644 --- a/concurrency.py +++ b/concurrency.py @@ -1,3 +1,4 @@ +from threadedreturn import ThreadWithReturnValue from threading import Thread ''' @@ -5,45 +6,7 @@ Code here is designed to speed up certain processes that might take too long -ThreadWithReturnValue is used on functions that returns a certain variable ''' -class ThreadWithReturnValue(Thread): - def __init__(self, group=None, target=None, name=None, - args=(), kwargs={}, Verbose=None): - """ - Initialize a ThreadWithReturnValue instance. - - Parameters: - - group: Thread group (not commonly used, defaults to None). - - target: The callable object to be invoked when the thread starts. - - name: The thread name. - - args: A tuple of positional arguments to pass to the target function. - - kwargs: A dictionary of keyword arguments to pass to the target function. - - Verbose: Verbose level (not commonly used, defaults to None). - """ - Thread.__init__(self, group, target, name, args, kwargs) - self._return = None - - def run(self): - """ - Override the run method to execute the target function and store its return value. - """ - if self._target is not None: - self._return = self._target(*self._args, - **self._kwargs) - def join(self, *args): - """ - Override the join method to return the stored return value after joining the thread. - - Parameters: - - args: Additional arguments to pass to the join method (not commonly used). - - Returns: - - object: The return value of the target function executed by the thread. - """ - Thread.join(self, *args) - return self._return - def cloudf_doms(DOMAINS, CLOUDFLARE) -> list: """ Retrieve all subdomains for a list of domains using Cloudflare API. diff --git a/main.py b/main.py index f551c28..7777a4b 100644 --- a/main.py +++ b/main.py @@ -7,7 +7,7 @@ from data_sql import * from discord import get_github_username, send_discord_message from concurrency import * - +from threadedreturn import ThreadWithReturnValue #Sql Wrapper database = dataSQL(dbfile="database.db") #Flask App diff --git a/requirements.txt b/requirements.txt index e965afc..6217a1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ Flask==3.0.0 Requests==2.31.0 GitHub-Flask -authlib \ No newline at end of file +authlib +threadedreturn \ No newline at end of file