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.
@ -61,4 +61,4 @@ To connect to a real Reddit API:
The application is fully responsive and will adapt to:
- Desktop: Grid layout with 2-3 columns based on screen width
- Tablet: Reduced grid columns
- Mobile: Single column layout with appropriate spacing
- Mobile: Single column layout with appropriate spacing

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
@ -96,4 +96,4 @@ You can test the endpoints directly using curl or a browser:
- `http://localhost:5000/posts` - Get initial posts
- `http://localhost:5000/posts/more?count=10` - Get more posts starting from index 10
- `http://localhost:5000/posts/total` - Get total post count
- `http://localhost:5000/posts/total` - Get total post count

View File

@ -7,7 +7,7 @@ app = Flask(__name__)
script_dir = os.path.dirname(os.path.abspath(__file__))
# Import our archive parser
from parse_archive import ArchiveParser
from .parse_archive import ArchiveParser
# Initialize the archive parser
archive_parser = ArchiveParser()
@ -46,7 +46,7 @@ def get_total_posts():
# Get total from archive parser
total = archive_parser.get_total_posts()
return jsonify({"total": total})
except Exception as e:
except Exception:
return jsonify({"error": "Failed to fetch total count"}), 500

View File

@ -1,32 +1,32 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reddit Clone</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header class="header">
<h1>Reddit Clone</h1>
</header>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Red Head</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="container">
<header class="header">
<h1>Red Head</h1>
</header>
<main class="content">
<div id="posts-container" class="posts-container">
<!-- Posts will be loaded here -->
</div>
<main class="content">
<div id="posts-container" class="posts-container">
<!-- Posts will be loaded here -->
</div>
<div id="loading" class="loading hidden">
Loading more posts...
</div>
<div id="loading" class="loading hidden">
Loading more posts...
</div>
<div id="no-more" class="no-more hidden">
No more posts to load
</div>
</main>
</div>
<div id="no-more" class="no-more hidden">
No more posts to load
</div>
</main>
</div>
<script src="app.js"></script>
</body>
<script src="app.js"></script>
</body>
</html>