This commit is contained in:
Jarian Cottingham 2025-10-14 10:42:40 -05:00
parent b55c97c117
commit 79ecd8db81
4 changed files with 33 additions and 33 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -1,15 +1,15 @@
<!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">