AshishP23 commited on
Commit
8a55b7f
·
verified ·
1 Parent(s): 91d9d19

Upload 28 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,13 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ static/assets/img/about-bg.jpg filter=lfs diff=lfs merge=lfs -text
37
+ static/assets/img/contact-bg.jpg filter=lfs diff=lfs merge=lfs -text
38
+ static/assets/img/home-bg.jpg filter=lfs diff=lfs merge=lfs -text
39
+ static/assets/img/post-bg.jpg filter=lfs diff=lfs merge=lfs -text
40
+ static/assets/img/post-sample-image.jpg filter=lfs diff=lfs merge=lfs -text
41
+ static/img/about-bg.jpg filter=lfs diff=lfs merge=lfs -text
42
+ static/img/contact-bg.jpg filter=lfs diff=lfs merge=lfs -text
43
+ static/img/home-bg.jpg filter=lfs diff=lfs merge=lfs -text
44
+ static/img/post-bg.jpg filter=lfs diff=lfs merge=lfs -text
45
+ static/img/post-sample-image.jpg filter=lfs diff=lfs merge=lfs -text
codingthunder.sql ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- phpMyAdmin SQL Dump
2
+ -- version 5.2.1
3
+ -- https://www.phpmyadmin.net/
4
+ --
5
+ -- Host: 127.0.0.1
6
+ -- Generation Time: Jul 11, 2025 at 08:14 PM
7
+ -- Server version: 10.4.32-MariaDB
8
+ -- PHP Version: 8.0.30
9
+
10
+ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11
+ START TRANSACTION;
12
+ SET time_zone = "+00:00";
13
+
14
+
15
+ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16
+ /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17
+ /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18
+ /*!40101 SET NAMES utf8mb4 */;
19
+
20
+ --
21
+ -- Database: `codingthunder`
22
+ --
23
+
24
+ -- --------------------------------------------------------
25
+
26
+ --
27
+ -- Table structure for table `contact`
28
+ --
29
+
30
+ CREATE TABLE `contact` (
31
+ `sno` int(50) NOT NULL,
32
+ `name` text NOT NULL,
33
+ `email` varchar(50) NOT NULL,
34
+ `phone_num` varchar(50) NOT NULL,
35
+ `mes` text NOT NULL,
36
+ `date` datetime DEFAULT current_timestamp()
37
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
38
+
39
+ --
40
+ -- Dumping data for table `contact`
41
+ --
42
+
43
+ INSERT INTO `contact` (`sno`, `name`, `email`, `phone_num`, `mes`, `date`) VALUES
44
+ (1, 'first post', '[email protected]', '123456789', 'first post', '2025-07-07 16:25:34'),
45
+ (2, 'this_name', '[email protected]', '6565656565', 'This is a test message', NULL),
46
+ (3, 'this_name', '[email protected]', '6565656565', 'This is a test message', '2025-07-07 16:49:24'),
47
+ (4, 'this_name', '[email protected]', '4545454545', 'NO', '2025-07-07 23:31:44'),
48
+ (5, 'this_name', '[email protected]', '4545454545', 'NO', '2025-07-07 23:35:11'),
49
+ (6, 'this_name', '[email protected]', '4545454545', 'NO', '2025-07-07 23:38:58'),
50
+ (7, 'Trail', '[email protected]', '9512638475', 'This is a trial for sending email', '2025-07-08 00:17:15'),
51
+ (8, 'Trail', '[email protected]', '9512638475', 'This is a trial for sending email', '2025-07-08 00:34:34'),
52
+ (9, 'Trail', '[email protected]', '9512638475', 'This is a trial for sending email', '2025-07-08 00:34:58'),
53
+ (10, 'Trail', '[email protected]', '9512638475', 'This is a trial for sending email', '2025-07-08 00:46:27'),
54
+ (11, 'Trail', '[email protected]', '9512638475', 'This is a trial for sending email', '2025-07-08 00:52:18'),
55
+ (12, 'Ashish', '[email protected]', '1234567890', 'I am sending this mail after successfully adding background image for post.html ', '2025-07-08 11:50:08'),
56
+ (13, 'Ashish', '[email protected]', '1234567890', 'I am sending this mail after successfully adding background image for post.html ', '2025-07-08 12:02:17'),
57
+ (14, 'Ashish', '[email protected]', '1234567890', 'this is trial after upload file #20', '2025-07-11 23:30:39');
58
+
59
+ -- --------------------------------------------------------
60
+
61
+ --
62
+ -- Table structure for table `posts`
63
+ --
64
+
65
+ CREATE TABLE `posts` (
66
+ `sno` int(11) NOT NULL,
67
+ `title` text NOT NULL,
68
+ `tagline` text NOT NULL,
69
+ `slug` varchar(25) NOT NULL,
70
+ `content` text NOT NULL,
71
+ `img_file` varchar(12) NOT NULL,
72
+ `date` datetime NOT NULL DEFAULT current_timestamp()
73
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
74
+
75
+ --
76
+ -- Dumping data for table `posts`
77
+ --
78
+
79
+ INSERT INTO `posts` (`sno`, `title`, `tagline`, `slug`, `content`, `img_file`, `date`) VALUES
80
+ (1, 'Let\'s learn about stock market', 'This is first post', 'first_post', 'A stock is a security that represents ownership of a fraction of the corporation that issued it. Units of stock are called shares and entitle the owner to a portion of the corporation’s profits equal to the number of shares owned.\r\n\r\nStocks are bought and sold predominantly on public exchanges. The exchanges and the stocks that are listed on them are required to conform to government regulations meant to protect investors from fraudulent practices.', 'home-bg.jpg', '2025-07-11 00:38:55'),
81
+ (3, 'Why Side Projects Matter', 'Because building for yourself is the fastest way to grow.', 'third_post', 'In a world dominated by structured learning, side projects are your playground for creativity and experimentation. They’re where theory meets practice — and where true learning begins.\r\n\r\nUnlike classroom assignments or office tasks, side projects are entirely yours. You pick the stack, the goals, the features, and the timeline. That freedom lets you explore technologies you\'re curious about — whether it’s building a REST API with Flask, experimenting with AI, or designing a mobile app in Flutter.\r\n\r\nSide projects also act as a personal portfolio. They tell future employers (and yourself) that you\'re driven, self-motivated, and capable of building something from scratch. It\'s one thing to say you know Python — it\'s another to show a working app that uses Flask and SQLAlchemy.\r\n\r\nMore importantly, side projects keep the spark alive. They’re fun, challenging, and often the reason many developers fall in love with coding in the first place.\r\n\r\nSo if you’re waiting for the perfect idea or the perfect time — don’t. Start small, stay consistent, and keep building.', 'home-bg.jpg', '2025-07-11 14:58:41'),
82
+ (4, 'Breaking Through the Tutorial Phase', 'When watching tutorials isn\'t enough — build, break, and repeat.', 'fourth_post', 'If you’ve ever felt stuck in the “tutorial loop” — constantly watching videos or reading articles without actually building something — you’re not alone. It’s one of the most common phases for beginners and even experienced devs when learning something new.\r\n\r\nTutorials are a great starting point. They teach you structure, syntax, and step-by-step logic. But they often give a false sense of mastery. That’s because following along doesn’t require problem-solving — you’re guided every step of the way.\r\n\r\nThe real growth happens when you try to build something without a walkthrough. That’s when the questions start flooding in: How do I structure this app? What database should I use? How do I fix this error? These struggles aren’t signs of failure — they’re signs that you’re learning.\r\n\r\nThe key is to treat tutorials like a launchpad, not a destination. Watch, take notes, then close the tab and try it on your own — even if you fail. Especially if you fail.\r\n\r\nBecause breaking through the tutorial phase is exactly where real developers are made.', '', '2025-07-08 12:41:55'),
83
+ (5, 'Embracing Debugging: Your Best Teacher', ' Every bug has a lesson — if you\'re willing to find it.', 'embracing-debugging', 'Debugging might seem frustrating, but it\'s one of the most powerful ways to truly understand how your code works. When something breaks, it forces you to slow down, think critically, and trace logic step by step.\r\n\r\nNo tutorial can replicate the real-world chaos of a sneaky off-by-one error or a database connection issue. Yet it’s through these challenges that you grow. Over time, you start recognizing patterns: how Flask handles routes, where SQL queries go wrong, or why a CSS change won’t reflect.\r\n\r\nMore importantly, debugging teaches resilience. You stop fearing failure and start welcoming it as part of the process.\r\n\r\nSo the next time your code crashes — pause, breathe, and dig in. That bug might be annoying now, but solving it will sharpen your skills for life.', '', '2025-07-08 12:45:08'),
84
+ (6, 'Learning One Stack at a Time', 'Tech is vast — go deep, not wide.', 'one-stack-at-a-time', 'With so many tools, frameworks, and languages out there, it’s tempting to learn everything at once — React, Flask, Docker, Tailwind, GraphQL… the list never ends.\r\n\r\nBut trying to master everything at the same time often leads to burnout and confusion. The best approach? Choose one stack and go deep. For example, learn Flask thoroughly before moving to Django. Understand HTML/CSS fundamentals before diving into JavaScript frameworks.\r\n\r\nA focused learning path builds strong foundations. Once you\'re confident with one tech stack, picking up the next one becomes much easier.\r\n\r\nRemember, the goal isn\'t to collect buzzwords — it’s to build real projects that work. And that only happens when you know your tools inside out.\r\n\r\nSo go deep. Master one thing. Then move to the next.', '', '2025-07-08 12:45:08'),
85
+ (7, '7th. Embracing Minimalism: A Simpler Life in a Complex World', 'minimalist-living', 'Less is more: discovering', 'In today’s fast-paced and consumer-driven world, minimalism offers a refreshing shift in perspective. It’s not about living with nothing, but about living with intention — keeping only what adds value to your life and letting go of the rest.\r\n\r\nA minimalist lifestyle can reduce stress, increase focus, and give you the mental space to prioritize what truly matters: health, relationships, personal growth, and peace of mind. It’s about clearing the clutter — physically, digitally, and emotionally.\r\n\r\nMinimalism isn\'t a strict rulebook; it’s a mindset. Whether you\'re decluttering your home, simplifying your schedule, or spending less time on social media, every small step towards simplicity counts.\r\n\r\nStart small. One drawer. One hour of tech-free time. One day without buying anything unnecessary. You’ll be amazed at how much clearer your life feels.', 'img.jpg', '2025-07-11 00:27:20');
86
+
87
+ --
88
+ -- Indexes for dumped tables
89
+ --
90
+
91
+ --
92
+ -- Indexes for table `contact`
93
+ --
94
+ ALTER TABLE `contact`
95
+ ADD PRIMARY KEY (`sno`);
96
+
97
+ --
98
+ -- Indexes for table `posts`
99
+ --
100
+ ALTER TABLE `posts`
101
+ ADD PRIMARY KEY (`sno`);
102
+
103
+ --
104
+ -- AUTO_INCREMENT for dumped tables
105
+ --
106
+
107
+ --
108
+ -- AUTO_INCREMENT for table `contact`
109
+ --
110
+ ALTER TABLE `contact`
111
+ MODIFY `sno` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
112
+
113
+ --
114
+ -- AUTO_INCREMENT for table `posts`
115
+ --
116
+ ALTER TABLE `posts`
117
+ MODIFY `sno` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
118
+ COMMIT;
119
+
120
+ /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
121
+ /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
122
+ /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "params":
3
+ {
4
+ "local_server":"True",
5
+ "local_uri": "mysql://root:@localhost/codingthunder",
6
+ "prod_uri":"mysql://root:@localhost/codingthunder",
7
+ "fb_url":"https://facebook.com/codingthunder",
8
+ "tw_url":"https://twitter.com/codingthunder",
9
+ "gh_url":"https://github.com/codingthunder",
10
+ "blog_name": "Coding Thunder",
11
+ "tag_line" : "A Blog liked by Programmers",
12
+ "gmail-user":"[email protected]",
13
+ "gmail-password":"ooakrohssontnqak",
14
+
15
+ "about_text":"Hi, my name is Ashish and I am creating my website using Flask",
16
+ "no_of_posts":2,
17
+
18
+ "login_image":"login.svg",
19
+ "admin_user":"Ashish",
20
+ "admin_password": "admin",
21
+
22
+ "upload_location":"D:\\Python\\Flask\\Project\\static\\img"
23
+ }
24
+
25
+ }
main.py ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, render_template, request, session, redirect, flash
2
+ from flask_sqlalchemy import SQLAlchemy
3
+ from datetime import datetime
4
+
5
+ from flask_mail import Mail
6
+
7
+ import pymysql
8
+ pymysql.install_as_MySQLdb()
9
+
10
+ import json
11
+
12
+ import os
13
+ from werkzeug.utils import secure_filename
14
+
15
+ #19
16
+ import math
17
+
18
+
19
+ with open('config.json', 'r') as c:
20
+ params= json.load(c)["params"]
21
+
22
+ local_server = True
23
+ app = Flask(__name__, template_folder="temp")
24
+
25
+ app.secret_key= 'super-secret-key'
26
+ app.config['UPLOAD_FOLDER'] = params['upload_location']
27
+ #add email to this
28
+ app.config.update(
29
+ MAIL_SERVER = 'smtp.gmail.com',
30
+ MAIL_PORT = '465',
31
+ MAIL_USE_SSL = True,
32
+ MAIL_USERNAME = params['gmail-user'],
33
+ MAIL_PASSWORD = params['gmail-password']
34
+ )
35
+ mail = Mail(app)
36
+
37
+ #adding configurations
38
+ if(local_server):
39
+ app.config['SQLALCHEMY_DATABASE_URI'] = params['local_uri']
40
+ else:
41
+ app.config['SQLALCHEMY_DATABASE_URI'] = params['prod_uri']
42
+
43
+ db = SQLAlchemy(app)
44
+
45
+ class Contact(db.Model):
46
+ '''
47
+ sno,name, phone_num, msg,date,email'''
48
+ id = db.Column(db.Integer, primary_key=True)
49
+ name = db.Column(db.String(80), nullable=False)
50
+ phone_num = db.Column(db.String(12), nullable=False)
51
+ mes = db.Column(db.String(120), nullable=False)
52
+ date = db.Column(db.String(12), nullable=True)
53
+ email = db.Column(db.String(20), nullable=False)
54
+
55
+ # def __init__(self, username, email):
56
+ # self.username = username
57
+ # self.email = email
58
+
59
+ # def __repr__(self):
60
+ # return '<User %r>' % self.username
61
+
62
+
63
+ class Posts(db.Model):
64
+ sno = db.Column(db.Integer, primary_key=True)
65
+ title = db.Column(db.String(80), nullable=False)
66
+ slug = db.Column(db.String(21), nullable=False)
67
+ content = db.Column(db.String(120), nullable=False)
68
+ tagline = db.Column(db.String(120), nullable=False)
69
+ date = db.Column(db.String(12), nullable=True)
70
+ img_file = db.Column(db.String(12), nullable=True)
71
+
72
+
73
+
74
+ @app.route("/")
75
+
76
+ def home():
77
+ # flash("Subscribe to CodeWithHarry!", "success")
78
+ # flash("Like this app","danger")
79
+
80
+ posts = Posts.query.filter_by().all()
81
+ #[0: params['no_of_posts]]
82
+ last = math.ceil(len(posts)/int(params['no_of_posts']))
83
+ page = request.args.get('page')
84
+ if (not str(page).isnumeric()):
85
+ page = 1
86
+
87
+ #pagination logic
88
+ #first page
89
+ page = int(page)
90
+ posts = posts[(page-1)*int(params['no_of_posts']):(page-1)*int(params['no_of_posts'])+ int(params['no_of_posts'])]
91
+ if page==1:
92
+ prev = "#"
93
+ next = "/?page="+ str(page+1)
94
+ #last page
95
+ elif page==last:
96
+ prev = "/?page="+ str(page-1)
97
+ next = "#"
98
+ #middle page
99
+ else:
100
+ prev = "/?page="+ str(page-1)
101
+ next = "/?page="+ str(page+1)
102
+
103
+ return render_template('index.html', params=params, posts=posts, prev=prev, next=next)
104
+
105
+ @app.route("/about")
106
+ def about():
107
+ return render_template('about.html',params=params)
108
+
109
+
110
+ #fetching posts from database
111
+ @app.route("/post/<string:post_slug>", methods=['GET'])
112
+ def post_route(post_slug):
113
+ post = Posts.query.filter_by(slug=post_slug).first()
114
+ return render_template('post.html', params=params, post=post)
115
+
116
+
117
+ @app.route("/dashboard", methods=['GET','POST'])
118
+ def dashboard():
119
+
120
+ if ('user' in session and session['user'] == params['admin_user'] ):
121
+ posts = Posts.query.all()
122
+ return render_template('dashboard.html', params=params, posts=posts)
123
+
124
+ if request.method=='POST':
125
+ #redirect to admin panel
126
+ username = request.form.get('uname')
127
+ userpass = request.form.get("pass")
128
+ if username==params['admin_user'] and userpass==params['admin_password']:
129
+ # set the session variable
130
+ session['user'] = username
131
+ posts = Posts.query.all()
132
+ return render_template('dashboard.html', params=params)
133
+
134
+ else:
135
+ return render_template("login.html", params=params)
136
+
137
+
138
+ #17
139
+ @app.route("/uploader" , methods=['GET', 'POST'])
140
+ def uploader():
141
+ if "user" in session and session['user']==params['admin_user']:
142
+ if request.method=='POST':
143
+ f = request.files['file1']
144
+ f.save(os.path.join(app.config['UPLOAD_FOLDER'], secure_filename(f.filename)))
145
+ return "Uploaded successfully!"
146
+
147
+ #17
148
+ @app.route('/logout')
149
+ def logout():
150
+ session.pop('user')
151
+ return redirect('/dashboard')
152
+
153
+ #18
154
+ @app.route("/delete/<string:sno>" , methods=['GET', 'POST'])
155
+ def delete(sno):
156
+ if "user" in session and session['user']==params['admin_user']:
157
+ post = Posts.query.filter_by(sno=sno).first()
158
+ db.session.delete(post)
159
+ db.session.commit()
160
+ return redirect("/dashboard")
161
+
162
+
163
+ @app.route("/contact", methods =['GET','POST'])
164
+ def contact():
165
+ if (request.method=='POST'):
166
+ #Add entry to the database
167
+ name = request.form.get('name')
168
+ email = request.form.get('email')
169
+ phone = request.form.get('phone')
170
+ message = request.form.get('message')
171
+
172
+ entry = Contact(name=name, phone_num = phone, mes= message,date= datetime.now(), email=email)
173
+ db.session.add(entry)
174
+ db.session.commit()
175
+
176
+ #send a email
177
+ mail.send_message('New message from ' + name,
178
+ sender=email,
179
+ recipients = [params['gmail-user']],
180
+ body = message + "\n" + phone
181
+ )
182
+ flash("Thanks for submitting your details. We will get back to you soon","success")
183
+
184
+ return render_template('contact.html',params=params)
185
+
186
+
187
+
188
+ @app.route("/edit/<string:sno>", methods =['GET','POST'])
189
+ def edit(sno):
190
+ if ('user' in session and session['user'] == params['admin_user'] ):
191
+ if request.method=="POST":
192
+ box_title = request.form.get('title')
193
+ tline = request.form.get('tline')
194
+ slug = request.form.get('slug')
195
+ content = request.form.get('content')
196
+ img_file = request.form.get('img_file')
197
+ date = datetime.now()
198
+
199
+ if sno=='0':
200
+ post = Posts(title=box_title, slug=slug, content=content, tagline=tline, img_file=img_file, date=date)
201
+ db.session.add(post)
202
+ db.session.commit()
203
+ else:
204
+ post = Posts.query.filter_by(sno=sno).first()
205
+ post.box_title = box_title
206
+ post.tline = tline
207
+ post.slug = slug
208
+ post.content = content
209
+ post.img_file = img_file
210
+ post.date = date
211
+ db.session.commit()
212
+ return redirect('/edit/'+sno)
213
+
214
+ post = Posts.query.filter_by(sno=sno).first()
215
+ return render_template('edit.html', params=params,post=post, sno=sno)
216
+
217
+
218
+ app.run(debug=True)
219
+
static/assets/favicon.ico ADDED
static/assets/img/about-bg.jpg ADDED

Git LFS Details

  • SHA256: 7bf373a8440436f74778bbfd6caf9bc91a65411b5822b4b4d1b3216fb930ef7f
  • Pointer size: 132 Bytes
  • Size of remote file: 2.55 MB
static/assets/img/contact-bg.jpg ADDED

Git LFS Details

  • SHA256: 55fa654fa6c599df8a57a1a13b45365b69541a98877d303849fa5bbf8de16f0c
  • Pointer size: 131 Bytes
  • Size of remote file: 501 kB
static/assets/img/home-bg.jpg ADDED

Git LFS Details

  • SHA256: b0c2990966a32dbf3fe4ed7f2bafcd37428e9808c660950e66c70a808aab6ab4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.01 MB
static/assets/img/post-bg.jpg ADDED

Git LFS Details

  • SHA256: 998d75a7b556b3106129d59cc14fd403255225e851cf2ffa552f2666a6f8dfb8
  • Pointer size: 132 Bytes
  • Size of remote file: 1.8 MB
static/assets/img/post-sample-image.jpg ADDED

Git LFS Details

  • SHA256: a3c36ec3463aaa4503459c5afd9a1f29460144d90e488d6fba56845c8eb2179e
  • Pointer size: 131 Bytes
  • Size of remote file: 115 kB
static/css/signin.css ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html,
2
+ body {
3
+ height: 100%;
4
+ }
5
+
6
+ body {
7
+ display: -ms-flexbox;
8
+ display: flex;
9
+ -ms-flex-align: center;
10
+ align-items: center;
11
+ padding-top: 40px;
12
+ padding-bottom: 40px;
13
+ background-color: #f5f5f5;
14
+ }
15
+
16
+ .form-signin {
17
+ width: 100%;
18
+ max-width: 330px;
19
+ padding: 15px;
20
+ margin: auto;
21
+ }
22
+ .form-signin .checkbox {
23
+ font-weight: 400;
24
+ }
25
+ .form-signin .form-control {
26
+ position: relative;
27
+ box-sizing: border-box;
28
+ height: auto;
29
+ padding: 10px;
30
+ font-size: 16px;
31
+ }
32
+ .form-signin .form-control:focus {
33
+ z-index: 2;
34
+ }
35
+ .form-signin input[type="email"] {
36
+ margin-bottom: -1px;
37
+ border-bottom-right-radius: 0;
38
+ border-bottom-left-radius: 0;
39
+ }
40
+ .form-signin input[type="password"] {
41
+ margin-bottom: 10px;
42
+ border-top-left-radius: 0;
43
+ border-top-right-radius: 0;
44
+ }
static/css/styles.css ADDED
The diff for this file is too large to render. See raw diff
 
static/img/about-bg.jpg ADDED

Git LFS Details

  • SHA256: 7bf373a8440436f74778bbfd6caf9bc91a65411b5822b4b4d1b3216fb930ef7f
  • Pointer size: 132 Bytes
  • Size of remote file: 2.55 MB
static/img/contact-bg.jpg ADDED

Git LFS Details

  • SHA256: 55fa654fa6c599df8a57a1a13b45365b69541a98877d303849fa5bbf8de16f0c
  • Pointer size: 131 Bytes
  • Size of remote file: 501 kB
static/img/dypcoe.jpg ADDED
static/img/home-bg.jpg ADDED

Git LFS Details

  • SHA256: b0c2990966a32dbf3fe4ed7f2bafcd37428e9808c660950e66c70a808aab6ab4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.01 MB
static/img/login.svg ADDED
static/img/onlineexamsystem.jpg ADDED
static/img/post-bg.jpg ADDED

Git LFS Details

  • SHA256: 998d75a7b556b3106129d59cc14fd403255225e851cf2ffa552f2666a6f8dfb8
  • Pointer size: 132 Bytes
  • Size of remote file: 1.8 MB
static/img/post-sample-image.jpg ADDED

Git LFS Details

  • SHA256: a3c36ec3463aaa4503459c5afd9a1f29460144d90e488d6fba56845c8eb2179e
  • Pointer size: 131 Bytes
  • Size of remote file: 115 kB
static/js/scripts.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Start Bootstrap - Clean Blog v6.0.9 (https://startbootstrap.com/theme/clean-blog)
3
+ * Copyright 2013-2023 Start Bootstrap
4
+ * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-clean-blog/blob/master/LICENSE)
5
+ */
6
+ window.addEventListener('DOMContentLoaded', () => {
7
+ let scrollPos = 0;
8
+ const mainNav = document.getElementById('mainNav');
9
+ const headerHeight = mainNav.clientHeight;
10
+ window.addEventListener('scroll', function() {
11
+ const currentTop = document.body.getBoundingClientRect().top * -1;
12
+ if ( currentTop < scrollPos) {
13
+ // Scrolling Up
14
+ if (currentTop > 0 && mainNav.classList.contains('is-fixed')) {
15
+ mainNav.classList.add('is-visible');
16
+ } else {
17
+ console.log(123);
18
+ mainNav.classList.remove('is-visible', 'is-fixed');
19
+ }
20
+ } else {
21
+ // Scrolling Down
22
+ mainNav.classList.remove(['is-visible']);
23
+ if (currentTop > headerHeight && !mainNav.classList.contains('is-fixed')) {
24
+ mainNav.classList.add('is-fixed');
25
+ }
26
+ }
27
+ scrollPos = currentTop;
28
+ });
29
+ })
temp/about.html ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "layout.html" %}
2
+ {% block body %}
3
+
4
+
5
+
6
+ <!-- Page Header -->
7
+ <header class="masthead" style="background-image: url(' static/img/about-bg.jpg')">
8
+ <div class="overlay"></div>
9
+ <div class="container">
10
+ <div class="row">
11
+ <div class="col-lg-8 col-md-10 mx-auto">
12
+ <div class="page-heading">
13
+ <h1>About Me</h1>
14
+ <span class="subheading">This is what I do.</span>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </header>
20
+
21
+ <!-- Main Content -->
22
+ <div class="container">
23
+ <div class="row">
24
+ <div class="col-lg-8 col-md-10 mx-auto">
25
+ <!-- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis sit soluta odio, adipisci quas excepturi maxime quae totam ducimus consectetur?</p>
26
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius praesentium recusandae illo eaque architecto error, repellendus iusto reprehenderit, doloribus, minus sunt. Numquam at quae voluptatum in officia voluptas voluptatibus, minus!</p>
27
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut consequuntur magnam, excepturi aliquid ex itaque esse est vero natus quae optio aperiam soluta voluptatibus corporis atque iste neque sit tempora!</p> -->
28
+ <p>{{params['about_text']}}</p>
29
+ </div>
30
+ </div>
31
+ </div>
32
+
33
+
34
+
35
+ {% endblock %}
36
+
37
+
temp/contact.html ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "layout.html" %}
2
+ {% block body %}
3
+
4
+
5
+
6
+ <!-- Page Header -->
7
+ <header class="masthead" style="background-image: url(' static/img/contact-bg.jpg')">
8
+ <div class="overlay"></div>
9
+ <div class="container">
10
+ <div class="row">
11
+ <div class="col-lg-8 col-md-10 mx-auto">
12
+ <div class="page-heading">
13
+ <h1>Contact Me</h1>
14
+ <span class="subheading">Have questions? I have answers.</span>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </header>
20
+
21
+
22
+ <!-- Message Flashing -->
23
+ {% with messages = get_flashed_messages(with_categories=true)%}
24
+ {% if messages %}
25
+ {% for category, message in messages %}
26
+ <div class="alert alert-{{category}} alert-dismissible fade show" role="alert">
27
+ {{message}}
28
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
29
+ <span aria-hidden="true">&times;</span>
30
+ </button>
31
+ </div>
32
+ {% endfor %}
33
+ {% endif %}
34
+ {% endwith %}
35
+
36
+ <!-- Main Content -->
37
+ <div class="container">
38
+ <div class="row">
39
+ <div class="col-lg-8 col-md-10 mx-auto">
40
+ <p>Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!</p>
41
+ <!-- Contact Form - Enter your email address on line 19 of the mail/contact_me.php file to make this form work. -->
42
+ <!-- WARNING: Some web hosts do not allow emails to be sent through forms to common mail hosts like Gmail or Yahoo. It's recommended that you use a private domain email address! -->
43
+ <!-- To use the contact form, your site must be on a live web host with PHP! The form will not work locally! -->
44
+ <form name="sentMessage" id="contactForm" action="/contact" method="POST" novalidate>
45
+ <div class="control-group">
46
+ <div class="form-group floating-label-form-group controls">
47
+ <label>Name</label>
48
+ <input type="text" class="form-control" placeholder="Name" id="name" name="name" required data-validation-required-message="Please enter your name.">
49
+ <p class="help-block text-danger"></p>
50
+ </div>
51
+ </div>
52
+ <div class="control-group">
53
+ <div class="form-group floating-label-form-group controls">
54
+ <label>Email Address</label>
55
+ <input type="email" class="form-control" placeholder="Email Address" id="email" name="email" required data-validation-required-message="Please enter your email address.">
56
+ <p class="help-block text-danger"></p>
57
+ </div>
58
+ </div>
59
+ <div class="control-group">
60
+ <div class="form-group col-xs-12 floating-label-form-group controls">
61
+ <label>Phone Number</label>
62
+ <input type="tel" class="form-control" placeholder="Phone Number" id="phone" name="phone" required data-validation-required-message="Please enter your phone number.">
63
+ <p class="help-block text-danger"></p>
64
+ </div>
65
+ </div>
66
+ <div class="control-group">
67
+ <div class="form-group floating-label-form-group controls">
68
+ <label>Message</label>
69
+ <textarea rows="5" class="form-control" placeholder="Message" id="message" name="message" required data-validation-required-message="Please enter a message."></textarea>
70
+ <p class="help-block text-danger"></p>
71
+ </div>
72
+ </div>
73
+ <br>
74
+ <div id="success"></div>
75
+ <div class="form-group">
76
+ <button type="submit" class="btn btn-primary" id="sendMessageButton">Send</button>
77
+ </div>
78
+ </form>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ <hr>
84
+
85
+
86
+ {% endblock %}
87
+
88
+
temp/dashboard.html ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "layout.html" %}
2
+ {% block body %}
3
+
4
+ <!-- Page Header-->
5
+ <header class="masthead" style="background-image: url(' static/img/home-bg.jpg ')">
6
+ <div class="container position-relative px-4 px-lg-5">
7
+ <div class="row gx-4 gx-lg-5 justify-content-center">
8
+ <div class="col-md-10 col-lg-8 col-xl-7">
9
+ <div class="site-heading">
10
+ <h1>Admin Panel</h1>
11
+ <span class="subheading">Manage your posts and change them</span>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </header>
17
+ <!-- Main Content-->
18
+ <div class="container px-4 px-lg-5">
19
+ <div class="row gx-4 gx-lg-5 justify-content-center">
20
+ <div class="col-md-10 col-lg-8 col-xl-7">
21
+ <h1>Basic Actions</h1>
22
+
23
+ <a href="/edit/0"><button class="btn btn-primary">Add a new post</button></a>
24
+ <a href="/logout"><button class="btn btn-primary">Logout</button></a>
25
+
26
+
27
+ <hr>
28
+ <h1>Upload a File</h1>
29
+ <form action="/uploader" method="post" enctype="multipart/form-data">
30
+ <input type="file" name="file1">
31
+ <button type="submit" class="btn btn-primary">Submit</button>
32
+ </form>
33
+
34
+ <hr>
35
+ <h1>Edit Posts</h1>
36
+ <table class="table">
37
+ <thead>
38
+ <tr>
39
+ <th>Sr no.</th>
40
+ <th>Title</th>
41
+ <th>Date</th>
42
+ <th>Edit</th>
43
+ <th>Delete</th>
44
+ </tr>
45
+ </thead>
46
+ <tbody>
47
+
48
+ {% for post in posts %}
49
+
50
+ <tr>
51
+ <td>{{post.sno}}</td>
52
+ <td>{{post.title}}</td>
53
+ <td>{{post.date}}</td>
54
+ <td><a href="/edit/{{post.sno}}"><button class="btn btn-primary">Edit</button></a></td>
55
+ <td><a href="/delete/{{post.sno}}"><button class="btn btn-primary">Delete</button></a></td>
56
+ </tr>
57
+
58
+ {% endfor %}
59
+
60
+ </tbody>
61
+ </table>
62
+
63
+ </div>
64
+ </div>
65
+ </div>
66
+
67
+ {% endblock %}
68
+
temp/edit.html ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "layout.html" %}
2
+ {% block body %}
3
+
4
+ <!-- Page Header-->
5
+ <header class="masthead" style="background-image: url('static/img/about-bg.jpg')">
6
+ <div class="container position-relative px-4 px-lg-5">
7
+ <div class="row gx-4 gx-lg-5 justify-content-center">
8
+ <div class="col-md-10 col-lg-8 col-xl-7">
9
+ <div class="site-heading">
10
+ <h1>Admin Panel</h1>
11
+ <span class="subheading">Manage your posts and change them</span>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </header>
17
+ <!-- Main Content-->
18
+ <div class="container px-4 px-lg-5">
19
+ <div class="row gx-4 gx-lg-5 justify-content-center">
20
+ <div class="col-md-10 col-lg-8 col-xl-7">
21
+
22
+ <h1>Basic Actions</h1>
23
+
24
+ <a href="/dashboard"><button class="btn btn-primary">Dashboard Home</button></a>
25
+ <a href="/logout"><button class="btn btn-primary">Logout</button></a>
26
+ <hr>
27
+
28
+ <h1>Add/Edit Posts</h1>
29
+
30
+
31
+
32
+ <form name="sentMessage" id="contactForm" action="/edit/{{sno}}" method="POST" novalidate>
33
+ <div class="control-group">
34
+ <div class="form-group floating-label-form-group controls">
35
+ <label>Title</label>
36
+ <input type="text" class="form-control" placeholder="Title" id="title" name="title" required data-validation-required-message="Please enter your name." value="{{post.title}}">
37
+ <p class="help-block text-danger"></p>
38
+ </div>
39
+ </div>
40
+ <div class="control-group">
41
+ <div class="form-group floating-label-form-group controls">
42
+ <label>Tagline</label>
43
+ <input type="text" class="form-control" placeholder="Tagline" id="tline" name="tline" required data-validation-required-message="Please enter tagline" value="{{post.tagline}}">
44
+ <p class="help-block text-danger"></p>
45
+ </div>
46
+ </div>
47
+ <div class="control-group">
48
+ <div class="form-group col-xs-12 floating-label-form-group controls">
49
+ <label>Slug</label>
50
+ <input type="text" class="form-control" placeholder="Slug" id="slug" name="slug" required data-validation-required-message="Please enter slug." value="{{post.slug}}">
51
+ <p class="help-block text-danger"></p>
52
+ </div>
53
+ </div>
54
+ <div class="control-group">
55
+ <div class="form-group floating-label-form-group controls">
56
+ <label>Content</label>
57
+ <textarea rows="5" class="form-control" placeholder="Content" id="content" name="content" required data-validation-required-message="Please enter a message.">{{post.content}}</textarea>
58
+ <p class="help-block text-danger"></p>
59
+ </div>
60
+ </div>
61
+
62
+ <div class="control-group">
63
+ <div class="form-group floating-label-form-group controls">
64
+ <label>Image File</label>
65
+ <input class="form-control" placeholder="Image" id="img_file" name="img_file" value="{{post.img_file}}">
66
+ <p class="help-block text-danger"></p>
67
+ </div>
68
+ </div>
69
+ <br>
70
+ <div id="success"></div>
71
+ <div class="form-group">
72
+ <button type="submit" class="btn btn-primary" id="sendMessageButton">Submit</button>
73
+ </div>
74
+ </form>
75
+
76
+
77
+
78
+
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ {% endblock %}
84
+
temp/index.html ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "layout.html" %}
2
+ {% block body %}
3
+
4
+ <!-- Page Header-->
5
+ <header class="masthead mb-0" style="background-image: url(' static/img/home-bg.jpg ')">
6
+ <div class="container position-relative px-4 px-lg-5">
7
+ <div class="row gx-4 gx-lg-5 justify-content-center">
8
+ <div class="col-md-10 col-lg-8 col-xl-7">
9
+ <div class="site-heading">
10
+ <h1>{{ params['blog_name'] }}</h1>
11
+ <span class="subheading">{{ params['tag_line'] }}</span>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </header>
17
+
18
+
19
+ <!-- Message Flashing -->
20
+ {% with messages = get_flashed_messages(with_categories=true)%}
21
+ {% if messages %}
22
+ {% for category, message in messages %}
23
+ <div class="alert alert-{{category}} alert-dismissible fade show" role="alert">
24
+ {{message}}
25
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
26
+ <span aria-hidden="true">&times;</span>
27
+ </button>
28
+ </div>
29
+ {% endfor %}
30
+ {% endif %}
31
+ {% endwith %}
32
+
33
+
34
+ <!-- Main Content-->
35
+ <div class="container px-4 px-lg-5">
36
+ <div class="row gx-4 gx-lg-5 justify-content-center">
37
+ <div class="col-md-10 col-lg-8 col-xl-7">
38
+
39
+
40
+ <!-- Todo: Fetch it using for loop from the database -->
41
+ <!-- Post preview-->
42
+
43
+ {% for post in posts %}
44
+
45
+ <div class="post-preview">
46
+ <a href="/post/{{post.slug}}">
47
+ <h2 class="post-title">{{ post.title }}</h2>
48
+ <h3 class="post-subtitle">{{post.tagline}}</h3>
49
+ </a>
50
+ <p class="post-meta">
51
+ Posted by
52
+ <a href="#!">AP</a>
53
+ on {{post.date}}
54
+ </p>
55
+ </div>
56
+ {{post.content[0:143]}}...
57
+ <!-- Divider-->
58
+ <hr class="my-4" />
59
+ {% endfor %}
60
+ <!-- Pager-->
61
+ <!-- <div class="d-flex justify-content-end mb-4"> -->
62
+ <div class="d-flex justify-content-between mb-4">
63
+ <a class="btn btn-primary" href="{{prev}}">&larr; Previous Posts</a>
64
+ <a class="btn btn-primary" href="{{next}}">Next Posts &rarr;</a>
65
+ </div>
66
+
67
+ </div>
68
+ </div>
69
+ </div>
70
+
71
+ {% endblock %}
72
+
temp/layout.html ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
6
+ <meta name="description" content="" />
7
+ <meta name="author" content="" />
8
+ <title>{{ params['blog_name'] }}</title>
9
+ <link rel="icon" type="image/x-icon" href=" {{ url_for('static', filename= 'assets/favicon.ico ') }}" />
10
+ <!-- Font Awesome icons (free version)-->
11
+ <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
12
+ <!-- Google fonts-->
13
+ <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css" />
15
+ <!-- Core theme CSS (includes Bootstrap)-->
16
+ <link href="{{ url_for('static', filename= 'css/styles.css') }} " rel="stylesheet" />
17
+
18
+
19
+ <!-- Adding JS scripts -->
20
+ <!-- jQuery first, then Popper.js, then Bootstrap JS -->
21
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" crossorigin="anonymous"></script>
23
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" crossorigin="anonymous"></script>
24
+
25
+
26
+ </head>
27
+ <body>
28
+ <!-- Navigation-->
29
+ <nav class="navbar navbar-expand-lg navbar-light" id="mainNav">
30
+ <div class="container px-4 px-lg-5">
31
+ <a class="navbar-brand" href="/">{{ params['blog_name'] }}</a>
32
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
33
+ Menu
34
+ <i class="fas fa-bars"></i>
35
+ </button>
36
+ <div class="collapse navbar-collapse" id="navbarResponsive">
37
+ <ul class="navbar-nav ms-auto py-4 py-lg-0">
38
+ <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/">Home</a></li>
39
+ <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/about">About</a></li>
40
+ <!-- <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/post">Sample Post</a></li> -->
41
+ <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/contact">Contact</a></li>
42
+ </ul>
43
+ </div>
44
+ </div>
45
+ </nav>
46
+
47
+ {% block body %} {% endblock %}
48
+
49
+ <!-- Footer-->
50
+ <footer class="border-top">
51
+ <div class="container px-4 px-lg-5">
52
+ <div class="row gx-4 gx-lg-5 justify-content-center">
53
+ <div class="col-md-10 col-lg-8 col-xl-7">
54
+ <ul class="list-inline text-center">
55
+ <li class="list-inline-item">
56
+ <a href="{{params['tw_url']}}" target="_blank">
57
+ <span class="fa-stack fa-lg">
58
+ <i class="fas fa-circle fa-stack-2x"></i>
59
+ <i class="fab fa-twitter fa-stack-1x fa-inverse"></i>
60
+ </span>
61
+ </a>
62
+ </li>
63
+ <li class="list-inline-item">
64
+ <a href="{{params['fb_url']}}" target="_blank">
65
+ <span class="fa-stack fa-lg">
66
+ <i class="fas fa-circle fa-stack-2x"></i>
67
+ <i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i>
68
+ </span>
69
+ </a>
70
+ </li>
71
+ <li class="list-inline-item">
72
+ <a href="{{params['gh_url']}}" target="_blank">
73
+ <span class="fa-stack fa-lg">
74
+ <i class="fas fa-circle fa-stack-2x"></i>
75
+ <i class="fab fa-github fa-stack-1x fa-inverse"></i>
76
+ </span>
77
+ </a>
78
+ </li>
79
+ </ul>
80
+ <div class="small text-center text-muted fst-italic">Copyright &copy; AP 2025</div>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </footer>
85
+ <!-- Bootstrap core JS-->
86
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
87
+ <!-- Core theme JS-->
88
+ <script src="{{ url_for('static', filename='js/scripts.js') }}"></script>
89
+ </body>
90
+ </html>
temp/login.html ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6
+ <meta name="description" content="">
7
+ <meta name="author" content="">
8
+ <link rel="icon" href="../../../../favicon.ico">
9
+
10
+ <title>Admin </title>
11
+
12
+ <!-- Bootstrap core CSS -->
13
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
14
+
15
+ <!-- Custom styles for this template -->
16
+ <!-- <link href="signin.css" rel="stylesheet"> -->
17
+ </head>
18
+
19
+ <body class="text-center">
20
+
21
+ <link href="{{url_for('static', filename='css/signin.css')}}" rel="stylesheet">
22
+
23
+ <form class="form-signin" action="/dashboard" method="post">
24
+ {% set fname = 'img/'+ params['login_image'] %}
25
+ <img class="mb-4" src="{{url_for('static', filename=fname)}}" alt="" width="72" height="72">
26
+ <h1 class="h3 mb-3 font-weight-normal">Admin Login</h1>
27
+ <label for="uname" class="sr-only">Username</label>
28
+ <input type="text" id="uname" name="uname" class="form-control" placeholder="Username" required autofocus>
29
+ <label for="pass" class="sr-only">Password</label>
30
+ <input type="password" id="pass" name="pass" class="form-control" placeholder="Password" required>
31
+ <div class="checkbox mb-3">
32
+ <label>
33
+ <input type="checkbox" value="remember-me"> Remember me
34
+ </label>
35
+ </div>
36
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
37
+ <p class="mt-5 mb-3 text-muted">© {{params['blog_name'] }} 2025</p>
38
+ </form>
39
+
40
+
41
+ </body>
42
+ </html>
temp/post.html ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "layout.html" %}
2
+ {% block body %}
3
+
4
+
5
+
6
+ <!-- Page Header -->
7
+ {% set fname= 'img/' + post.img_file %}
8
+ <header class="masthead" data-bg="{{ url_for('static', filename='img/' ~ post.img_file) }}">
9
+
10
+ <div class="overlay"></div>
11
+ <div class="container">
12
+ <div class="row">
13
+ <div class="col-lg-8 col-md-10 mx-auto">
14
+ <div class="post-heading">
15
+ {% if post %}
16
+ <h1>{{ post.title }}</h1>
17
+ {% else %}
18
+ <p>Post not found.</p>
19
+ {% endif %}
20
+
21
+ <h2 class="subheading">{{post.tagline}}</h2>
22
+ <span class="meta">Posted by
23
+ <a href="#">Admin</a>
24
+ on {{post.date}}</span>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </header>
30
+
31
+ <!-- Post Content -->
32
+ <article>
33
+ <div class="container">
34
+ <div class="row">
35
+ <div class="col-lg-8 col-md-10 mx-auto">
36
+ {{post.content}}
37
+ <!-- <p>Placeholder text by -->
38
+ <!-- <a href="http://spaceipsum.com/">Space Ipsum</a>. Photographs by
39
+ <a href="https://www.flickr.com/photos/nasacommons/">NASA on The Commons</a>.</p> -->
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </article>
44
+
45
+
46
+ <!-- This is to add the background image for the post.html -->
47
+ <script>
48
+ document.addEventListener("DOMContentLoaded", function () {
49
+ const masthead = document.querySelector(".masthead");
50
+ const bgUrl = masthead.getAttribute("data-bg");
51
+ if (bgUrl) {
52
+ masthead.style.backgroundImage = `url('${bgUrl}')`;
53
+ }
54
+ });
55
+ </script>
56
+
57
+
58
+
59
+ {% endblock %}
60
+