{{ post.title }}
10 |{{ post.content[:100] }}...
11 | Edit 12 | Delete 13 |├── README.md ├── add.html ├── app.py ├── base.html ├── edit.html ├── index.html ├── post.html ├── requirements.txt └── styles.css /README.md: -------------------------------------------------------------------------------- 1 | # Blog-Platform 2 | A simple blog platform where users can create, edit, and delete posts. 3 | 4 | # Technologies 5 | Python, Flask, SQLAlchemy, HTML, CSS 6 | -------------------------------------------------------------------------------- /add.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Add Post{% endblock %} 4 | 5 | {% block content %} 6 |
{{ post.content }}
8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==2.0.1 2 | Flask-SQLAlchemy==2.5.1 3 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | header { 8 | background-color: #333; 9 | color: white; 10 | padding: 10px 0; 11 | text-align: center; 12 | } 13 | 14 | nav ul { 15 | list-style: none; 16 | padding: 0; 17 | } 18 | 19 | nav ul li { 20 | display: inline; 21 | margin: 0 10px; 22 | } 23 | 24 | nav ul li a { 25 | color: white; 26 | text-decoration: none; 27 | } 28 | 29 | main { 30 | padding: 20px; 31 | } 32 | 33 | .post { 34 | margin-bottom: 20px; 35 | padding: 10px; 36 | border: 1px solid #ddd; 37 | border-radius: 5px; 38 | } 39 | 40 | footer { 41 | background-color: #333; 42 | color: white; 43 | text-align: center; 44 | padding: 10px 0; 45 | position: fixed; 46 | width: 100%; 47 | bottom: 0; 48 | } 49 | --------------------------------------------------------------------------------