Skip to content

Commit 0daaf5d

Browse files
committed
Ted website
1 parent 4d88795 commit 0daaf5d

13 files changed

+328
-209
lines changed

.idea/workspace.xml

+157-82
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cam/templates/cam/about.html

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{% extends 'cam/basic.html' %}
2+
3+
{% block about %}
4+
<div class="container marketing">
5+
6+
<div class="row featurette">
7+
<div class="col-lg-10">
8+
<h2 class="featurette-heading"></h2>
9+
<p class="lead">This website is a simple example to demonstrate Ted's web development.
10+
It is still under constructed. If you have any advice, please contact
11+
<a href="mailto:[email protected]?subject=Ted's%20Camera%20Website%20Advice">Ted</a>.</p>
12+
13+
<p class="lead">The skills and tools used in this site include:</p>
14+
<ul>
15+
<li> <b>Front-end:</b> HTML, CSS, Javascript, Jquery, Bootstrap, JSON
16+
<li> <b>Server side:</b> Python, Django, Jinja2, AWS
17+
<li> <b>Database:</b> SQLite
18+
<li> <b>Test:</b> Unit Test
19+
<li> <b>Other:</b> Eclipse, PyCharm, Linux
20+
</ul>
21+
<p class="lead"> If you want to know more about Ted, please go to his
22+
<a href="https://github.com/YuanyeZ" >github</a>
23+
for resume and other projects.
24+
</p>
25+
</div>
26+
</div>
27+
</div>
28+
{% endblock %}

cam/templates/cam/base.html

-110
This file was deleted.

cam/templates/cam/basic.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
8+
<meta name="description" content="">
9+
<meta name="author" content="">
10+
<link rel="icon" href="../../static/cam/images/">
11+
12+
<title>Ted Camera 360</title>
13+
14+
<!-- Bootstrap core CSS -->
15+
<link href="../../static/cam/css/bootstrap.min.css" rel="stylesheet">
16+
17+
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
18+
<!--[if lt IE 9]>
19+
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
20+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
21+
<![endif]-->
22+
23+
<!-- Custom styles for this template -->
24+
<link href="../../static/cam/css/carousel.css" rel="stylesheet">
25+
</head>
26+
<!-- NAVBAR
27+
================================================== -->
28+
<body>
29+
<!-- Navigation Bar--!>
30+
{% include 'cam/navbar.html' %}
31+
32+
{% block home %}{% endblock %}
33+
{% block about %}{% endblock %}
34+
35+
36+
<!-- FOOTER -->
37+
{% include "cam/footer.html" %}
38+
39+
<!-- Bootstrap core JavaScript
40+
================================================== -->
41+
<!-- Placed at the end of the document so the pages load faster -->
42+
<script src="../../static/cam/js/jquery.min.js"></script>
43+
<script src="../../static/cam/js/bootstrap.min.js"></script>
44+
45+
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
46+
<script src="../../static/cam/js/ie10-viewport-bug-workaround.js"></script>
47+
</body>
48+
</html>
File renamed without changes.

cam/templates/cam/footer.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<footer class="footer">
1+
<div class="container marketing">
2+
<hr class="featurette-divider">
3+
<footer class="footer">
24
<p class="pull-right"><a href="">Back to top</a></p>
35
<p>&copy; 2015 Ted &middot; <a href="/about">Privacy</a> &middot; <a href="/about">Terms</a></p>
4-
</footer>
6+
</footer>
7+
</div>

cam/templates/cam/home.html

+64-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,68 @@
1-
{% extends 'cam/base.html' %}
1+
{% extends 'cam/basic.html' %}
22

3-
{% block content%}
3+
{% block home%}
4+
<!-- Carousel
5+
================================================== -->
6+
<div id="myCarousel" class="carousel slide" data-ride="carousel">
7+
<!-- Indicators -->
8+
<ol class="carousel-indicators">
9+
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
10+
<li data-target="#myCarousel" data-slide-to="1"></li>
11+
<li data-target="#myCarousel" data-slide-to="2"></li>
12+
</ol>
13+
<div class="carousel-inner" role="listbox">
14+
<div class="item active">
15+
<img class="first-slide" src="../../static/cam/images/home.jpg" alt="Join Us">
16+
<div class="container">
17+
<div class="carousel-caption">
18+
<h1>Welcome to Ted's Online DSLR Camera Store!</h1>
19+
<br><br>
20+
<p><a class="btn btn-lg btn-primary" href="" role="button">Sign up today for 10% off at Amazon</a></p>
21+
</div>
22+
</div>
23+
</div>
24+
<div class="item">
25+
<img class="second-slide" src="../../static/cam/images/camera_list.jpg" alt="Camera List">
26+
<div class="container">
27+
<div class="carousel-caption">
28+
<h1>The Camera book list</h1>
29+
<p>See all the DSLR cameras</p>
30+
<p><a class="btn btn-lg btn-primary" href="/camera/brands" role="button">Learn More</a></p>
31+
</div>
32+
</div>
33+
</div>
34+
<div class="item">
35+
<img class="third-slide" src="../../static/cam/images/reviews.jpg" alt="Review">
36+
<div class="container">
37+
<div class="carousel-caption">
38+
<h1>Camera Reviews </h1>
39+
<p>The most professional reviews</p>
40+
<p><a class="btn btn-lg btn-primary" href="/camera/review" role="button">Show Me</a></p>
41+
</div>
42+
</div>
43+
</div>
44+
</div>
45+
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
46+
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
47+
<span class="sr-only">Previous</span>
48+
</a>
49+
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
50+
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
51+
<span class="sr-only">Next</span>
52+
</a>
53+
</div><!-- /.carousel -->
454

5-
<h1> It is my Camera Website</h1>
55+
<div class="container marketing">
56+
57+
<div class="row featurette">
58+
<div class="col-md-7">
59+
<h2 class="featurette-heading">Ted Example Website</h2>
60+
<p class="lead">Hi, Everyone! This website lists several camera models and reviews</p>
61+
<p class="lead">For more information, please see
62+
<a class="btn btn-lg btn-primary" href="/camera/about" role="button">About</a>
63+
</p>
64+
</div>
65+
</div>
66+
</div>
667

768
{% endblock %}

cam/templates/cam/navbar.html

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<nav class="navbar navbar-inverse navbar-fixed-top">
1+
<div class="navbar-wrapper">
2+
<div class="container">
3+
<nav class="navbar navbar-inverse navbar-fixed-top">
24
<div class="container">
35
<div class="navbar-header">
46
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
@@ -12,16 +14,15 @@
1214

1315
<div id="navbar" class="navbar-collapse collapse">
1416
<ul class="nav navbar-nav">
15-
<li><a href="/about">About</a></li>
17+
<li><a href="/camera/about">About</a></li>
1618

1719
<li class="dropdown">
18-
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Brands <span class="caret"></span></a>
20+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">More <span class="caret"></span></a>
1921
<ul class="dropdown-menu">
20-
<li><a href="/brands/canon">Canon</a></li>
22+
<li><a href="/brands">Camera List</a></li>
2123
<li role="separator" class="divider"></li>
22-
<li><a href="/brands/nikon">Nikon</a></li>
23-
<li role="separator" class="divider"></li>
24-
<li><a href="/brands/sony">Sony</a></li>
24+
<li><a href="/reviews">Review</a></li>
25+
2526
</ul>
2627
</li>
2728
</ul>
@@ -38,4 +39,7 @@
3839
</form>
3940
</div><!--/.navbar-collapse -->
4041
</div>
41-
</nav>
42+
</nav>
43+
44+
</div>
45+
</div>

cam/templates/cam/specific.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'cam/forum.html' %}
1+
{% extends 'cam/brands.html' %}
22

33
{% block content %}
44
<h1>New</h1>

cam/urls.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
urlpatterns = [
1010
url(r'^$', views.HomeView.as_view(), name='home'),
11-
url(r'^review/', views.CameraView.as_view(), name='review'),
11+
12+
url(r'^about/', views.AboutView.as_view(), name='about'),
13+
14+
url(r'^reviews/', views.CameraView.as_view(), name='reviews'),
15+
1216
url(r'^brands/', views.CameraList.as_view(), name='brands'),
1317
]

cam/urls.pyc

67 Bytes
Binary file not shown.

cam/views.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ class HomeView(generic.ListView):
1010
model = Camera
1111
template_name = 'cam/home.html'
1212

13+
class AboutView(generic.ListView):
14+
model = Camera
15+
template_name = 'cam/about.html'
16+
1317
class CameraList(generic.ListView):
1418
model = Camera
15-
template_name = 'cam/forum.html'
19+
template_name = 'cam/brands.html'
1620

17-
class CameraView(generic.ListView):
21+
class CameraView(generic.DetailView):
1822
CameraModel = Camera
1923
ReviewModel = Review
2024
template_name = 'cam/reviews.html'
2125

2226

27+
28+

cam/views.pyc

239 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)