diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..bab9248
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,18 @@
+body {
+ font-family: 'Inter', sans-serif;
+ background-color: #F8F9FA;
+}
+
+.post-card {
+ transition: transform .2s;
+}
+
+.post-card:hover {
+ transform: scale(1.02);
+}
+
+.post-content img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 0.5rem;
+}
\ No newline at end of file
diff --git a/db/config.php b/db/config.php
index cc9229f..9f126f2 100644
--- a/db/config.php
+++ b/db/config.php
@@ -5,6 +5,22 @@ define('DB_NAME', 'app_30972');
define('DB_USER', 'app_30972');
define('DB_PASS', '9eb17a13-4a89-4e11-8517-0c201096e935');
+function run_migrations() {
+ $pdo = db();
+ $migration_dir = __DIR__ . '/migrations';
+ if (!is_dir($migration_dir)) {
+ return;
+ }
+ $migration_files = glob($migration_dir . '/*.sql');
+ foreach ($migration_files as $file) {
+ $p = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';charset=utf8mb4', DB_USER, DB_PASS, [
+ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
+ PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
+ ]);
+ $p->exec(file_get_contents($file));
+ }
+}
+
function db() {
static $pdo;
if (!$pdo) {
diff --git a/db/migrations/001_create_posts_table.sql b/db/migrations/001_create_posts_table.sql
new file mode 100644
index 0000000..07c3f28
--- /dev/null
+++ b/db/migrations/001_create_posts_table.sql
@@ -0,0 +1,7 @@
+CREATE TABLE IF NOT EXISTS posts (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ title VARCHAR(255) NOT NULL,
+ content TEXT NOT NULL,
+ author VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
\ No newline at end of file
diff --git a/db/migrations/002_insert_dummy_posts.sql b/db/migrations/002_insert_dummy_posts.sql
new file mode 100644
index 0000000..747046f
--- /dev/null
+++ b/db/migrations/002_insert_dummy_posts.sql
@@ -0,0 +1,4 @@
+INSERT INTO posts (title, content, author) VALUES
+('The Future of Web Development', 'Web development is constantly evolving. In this post, we explore the upcoming trends and technologies that will shape the future of the web, from AI-powered tools to the rise of WebAssembly.', 'Admin'),
+('A Guide to Mindful Productivity', 'In a world of distractions, staying focused is a superpower. This article provides practical tips on how to be more productive by being more mindful, managing your energy, and setting clear intentions.', 'Admin'),
+('The Art of Storytelling in Marketing', 'Stories sell. Learn how to craft compelling narratives that resonate with your audience and build a strong brand identity. We cover the key elements of storytelling and how to apply them to your marketing strategy.', 'Admin');
\ No newline at end of file
diff --git a/footer.php b/footer.php
new file mode 100644
index 0000000..5575c12
--- /dev/null
+++ b/footer.php
@@ -0,0 +1,9 @@
+
+
+
+