renames
This commit is contained in:
parent
b55c97c117
commit
79ecd8db81
@ -1,4 +1,4 @@
|
|||||||
# Red Head
|
# red head
|
||||||
|
|
||||||
A responsive Reddit-like application with infinite scroll functionality that displays the latest Reddit articles.
|
A responsive Reddit-like application with infinite scroll functionality that displays the latest Reddit articles.
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Reddit Clone API Server
|
# red head API Server
|
||||||
|
|
||||||
A Python Flask server that serves data for the Reddit clone application.
|
A Python Flask server that serves data for the red head application.
|
||||||
|
|
||||||
## Endpoints
|
## Endpoints
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ app = Flask(__name__)
|
|||||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
# Import our archive parser
|
# Import our archive parser
|
||||||
from parse_archive import ArchiveParser
|
from .parse_archive import ArchiveParser
|
||||||
|
|
||||||
# Initialize the archive parser
|
# Initialize the archive parser
|
||||||
archive_parser = ArchiveParser()
|
archive_parser = ArchiveParser()
|
||||||
@ -46,7 +46,7 @@ def get_total_posts():
|
|||||||
# Get total from archive parser
|
# Get total from archive parser
|
||||||
total = archive_parser.get_total_posts()
|
total = archive_parser.get_total_posts()
|
||||||
return jsonify({"total": total})
|
return jsonify({"total": total})
|
||||||
except Exception as e:
|
except Exception:
|
||||||
return jsonify({"error": "Failed to fetch total count"}), 500
|
return jsonify({"error": "Failed to fetch total count"}), 500
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,32 +1,32 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Reddit Clone</title>
|
<title>Red Head</title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<h1>Reddit Clone</h1>
|
<h1>Red Head</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="content">
|
<main class="content">
|
||||||
<div id="posts-container" class="posts-container">
|
<div id="posts-container" class="posts-container">
|
||||||
<!-- Posts will be loaded here -->
|
<!-- Posts will be loaded here -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="loading" class="loading hidden">
|
<div id="loading" class="loading hidden">
|
||||||
Loading more posts...
|
Loading more posts...
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="no-more" class="no-more hidden">
|
<div id="no-more" class="no-more hidden">
|
||||||
No more posts to load
|
No more posts to load
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user