Skip to content

Commit af4fb3a

Browse files
Merge pull request #137 from keshavsingh4522/keshav
flask configuration and some other imp logic
2 parents abc7551 + 61afa4b commit af4fb3a

File tree

1,003 files changed

+135883
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,003 files changed

+135883
-0
lines changed

Diff for: Flask/Linkedin learning/01/enrollment/.flaskenv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FLASK_ENV=development
2+
FLASK_APP=main.py
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from flask import Flask
2+
3+
app=Flask(__name__)
4+
5+
6+
from application import routes
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from application import app
2+
from flask import render_template
3+
4+
@app.route("/")
5+
@app.route("/index")
6+
@app.route("/home")
7+
def index():
8+
return render_template("index.html",index=True)
9+
10+
11+
@app.route("/courses")
12+
def courses():
13+
data=[{'id':1,'title':'html','description':'html for frontend','credits':'html rtr','term':'fr'},
14+
{'id':2,'title':'css','description':'css for frontend','credits':'css ffd','term':'ffff'},
15+
{'id':3,'title':'javascript','description':'its javascript not java','credits':'javascrtip gfh','term':'trtr'},
16+
{'id':4,'title':'python','description':'python very easy to learn','credits':'python tt','term':'ghf'}]s
17+
return render_template("courses.html",courses=True,courseData=data)
18+
19+
20+
@app.route("/login")
21+
def login():
22+
return render_template("login.html",login=True)
23+
24+
@app.route("/register")
25+
def register():
26+
return render_template("register.html",register=True)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
a {
2+
color: #92badd;
3+
display: inline-block;
4+
text-decoration: none;
5+
font-weight: 400;
6+
}
7+
8+
h2 {
9+
text-align: center;
10+
font-size: 16px;
11+
font-weight: 600;
12+
text-transform: uppercase;
13+
display: inline-block;
14+
margin: 40px 8px 10px 8px;
15+
color: #cccccc;
16+
}
17+
18+
/* STRUCTURE */
19+
.wrapper {
20+
display: flex;
21+
align-items: center;
22+
flex-direction: column;
23+
justify-content: center;
24+
width: 100%;
25+
min-height: 100%;
26+
padding: 20px;
27+
}
28+
29+
#formContent {
30+
-webkit-border-radius: 10px 10px 10px 10px;
31+
border-radius: 10px 10px 10px 10px;
32+
background: #fff;
33+
padding: 30px;
34+
width: 90%;
35+
max-width: 450px;
36+
position: relative;
37+
padding: 0px;
38+
-webkit-box-shadow: 0 30px 60px 0 rgba(0, 0, 0, 0.3);
39+
box-shadow: 0 30px 60px 0 rgba(0, 0, 0, 0.3);
40+
text-align: center;
41+
}
42+
43+
#formFooter {
44+
background-color: #f6f6f6;
45+
border-top: 1px solid #dce8f1;
46+
padding: 25px;
47+
text-align: center;
48+
-webkit-border-radius: 0 0 10px 10px;
49+
border-radius: 0 0 10px 10px;
50+
}
51+
52+
/* TABS */
53+
h2.inactive {
54+
color: #cccccc;
55+
}
56+
57+
h2.active {
58+
color: #0d0d0d;
59+
border-bottom: 2px solid #5fbae9;
60+
}
61+
62+
/* FORM TYPOGRAPHY*/
63+
input[type=button], input[type=submit], input[type=reset] {
64+
background-color: #56baed;
65+
border: none;
66+
color: white;
67+
padding: 15px 80px;
68+
text-align: center;
69+
text-decoration: none;
70+
display: inline-block;
71+
text-transform: uppercase;
72+
font-size: 13px;
73+
-webkit-box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4);
74+
box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4);
75+
-webkit-border-radius: 5px 5px 5px 5px;
76+
border-radius: 5px 5px 5px 5px;
77+
margin: 5px 20px 40px 20px;
78+
-webkit-transition: all 0.3s ease-in-out;
79+
-moz-transition: all 0.3s ease-in-out;
80+
-ms-transition: all 0.3s ease-in-out;
81+
-o-transition: all 0.3s ease-in-out;
82+
transition: all 0.3s ease-in-out;
83+
}
84+
85+
input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
86+
background-color: #39ace7;
87+
}
88+
89+
input[type=button]:active, input[type=submit]:active, input[type=reset]:active {
90+
-moz-transform: scale(0.95);
91+
-webkit-transform: scale(0.95);
92+
-o-transform: scale(0.95);
93+
-ms-transform: scale(0.95);
94+
transform: scale(0.95);
95+
}
96+
97+
input[type=text] {
98+
background-color: #f6f6f6;
99+
border: none;
100+
color: #0d0d0d;
101+
padding: 15px 32px;
102+
text-align: center;
103+
text-decoration: none;
104+
display: inline-block;
105+
font-size: 16px;
106+
margin: 5px;
107+
width: 85%;
108+
border: 2px solid #f6f6f6;
109+
-webkit-transition: all 0.5s ease-in-out;
110+
-moz-transition: all 0.5s ease-in-out;
111+
-ms-transition: all 0.5s ease-in-out;
112+
-o-transition: all 0.5s ease-in-out;
113+
transition: all 0.5s ease-in-out;
114+
-webkit-border-radius: 5px 5px 5px 5px;
115+
border-radius: 5px 5px 5px 5px;
116+
}
117+
118+
input[type=text]:focus {
119+
background-color: #fff;
120+
border-bottom: 2px solid #5fbae9;
121+
}
122+
123+
input[type=text]:placeholder {
124+
color: #cccccc;
125+
}
126+
127+
/* ANIMATIONS */
128+
129+
/* Simple CSS3 Fade-in-down Animation */
130+
.fadeInDown {
131+
-webkit-animation-name: fadeInDown;
132+
animation-name: fadeInDown;
133+
-webkit-animation-duration: 1s;
134+
animation-duration: 1s;
135+
-webkit-animation-fill-mode: both;
136+
animation-fill-mode: both;
137+
}
138+
139+
@-webkit-keyframes fadeInDown {
140+
0% {
141+
opacity: 0;
142+
-webkit-transform: translate3d(0, -100%, 0);
143+
transform: translate3d(0, -100%, 0);
144+
}
145+
146+
100% {
147+
opacity: 1;
148+
-webkit-transform: none;
149+
transform: none;
150+
}
151+
152+
}
153+
154+
@keyframes fadeInDown {
155+
0% {
156+
opacity: 0;
157+
-webkit-transform: translate3d(0, -100%, 0);
158+
transform: translate3d(0, -100%, 0);
159+
}
160+
161+
100% {
162+
opacity: 1;
163+
-webkit-transform: none;
164+
transform: none;
165+
}
166+
167+
}
168+
169+
/* Simple CSS3 Fade-in Animation */
170+
@-webkit-keyframes fadeIn {
171+
from {
172+
opacity: 0;
173+
}
174+
175+
to {
176+
opacity: 1;
177+
}
178+
179+
}
180+
181+
@-moz-keyframes fadeIn {
182+
from {
183+
opacity: 0;
184+
}
185+
186+
to {
187+
opacity: 1;
188+
}
189+
190+
}
191+
192+
@keyframes fadeIn {
193+
from {
194+
opacity: 0;
195+
}
196+
197+
to {
198+
opacity: 1;
199+
}
200+
201+
}
202+
203+
.fadeIn {
204+
opacity: 0;
205+
-webkit-animation: fadeIn ease-in 1;
206+
-moz-animation: fadeIn ease-in 1;
207+
animation: fadeIn ease-in 1;
208+
-webkit-animation-fill-mode: forwards;
209+
-moz-animation-fill-mode: forwards;
210+
animation-fill-mode: forwards;
211+
-webkit-animation-duration: 1s;
212+
-moz-animation-duration: 1s;
213+
animation-duration: 1s;
214+
}
215+
216+
.fadeIn.first {
217+
-webkit-animation-delay: 0.4s;
218+
-moz-animation-delay: 0.4s;
219+
animation-delay: 0.4s;
220+
}
221+
222+
.fadeIn.second {
223+
-webkit-animation-delay: 0.6s;
224+
-moz-animation-delay: 0.6s;
225+
animation-delay: 0.6s;
226+
}
227+
228+
.fadeIn.third {
229+
-webkit-animation-delay: 0.8s;
230+
-moz-animation-delay: 0.8s;
231+
animation-delay: 0.8s;
232+
}
233+
234+
.fadeIn.fourth {
235+
-webkit-animation-delay: 1s;
236+
-moz-animation-delay: 1s;
237+
animation-delay: 1s;
238+
}
239+
240+
/* Simple CSS3 Fade-in Animation */
241+
.underlineHover:after {
242+
display: block;
243+
left: 0;
244+
bottom: -10px;
245+
width: 0;
246+
height: 2px;
247+
background-color: #56baed;
248+
content: "";
249+
transition: width 0.2s;
250+
}
251+
252+
.underlineHover:hover {
253+
color: #0d0d0d;
254+
}
255+
256+
.underlineHover:hover:after {
257+
width: 100%;
258+
}
259+
260+
/* OTHERS */
261+
*:focus {
262+
outline: none;
263+
}
264+
265+
#icon {
266+
width: 60%;
267+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
*{
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
body{
7+
background-color: rgba(0, 0, 0, 0.3);
8+
overflow-x: hidden;
9+
}
10+
/*.footer-f{
11+
position: absolute;
12+
bottom: 0;
13+
width: 100%;
14+
height: 30px;
15+
padding-top: 5px;
16+
color: white;
17+
background-color: black;
18+
}*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Page</title>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
8+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
9+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
10+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
11+
12+
<link rel="stylesheet" type="text/css" href="{{url_for('static',filename='css/main.css')}}">
13+
</head>
14+
<body>
15+
16+
{% include "/includes/nav.html" %}
17+
18+
19+
{% block content %}
20+
21+
{% endblock %}
22+
23+
{# {{ self.content() }}
24+
{{ self.content() }} #}
25+
26+
{% include "/includes/footer.html" %}
27+
28+
</body>
29+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{% extends "_Layout.html" %}
2+
{% block content %}
3+
<div class="container">
4+
<table class="table table-condensed">
5+
<thead>
6+
<tr>
7+
<th>Id </th>
8+
<th>Title</th>
9+
<th>Description</th>
10+
<th>credits</th>
11+
<th>term</th>
12+
<th></th>
13+
</tr>
14+
</thead>
15+
<tbody>
16+
{% for data in courseData %}
17+
<tr>
18+
<td>{{data.id}}</td>
19+
<td>{{data['title']}}</td>
20+
<td>{{data.description}}</td>
21+
<td>{{data.credits}}</td>
22+
<td>{{data['term']}}</td>
23+
<td><button class="btn btn-success">Enroll</button></td>
24+
</tr>
25+
{% endfor %}
26+
27+
</tbody>
28+
</table>
29+
</div>
30+
{% endblock %}

0 commit comments

Comments
 (0)