Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db.sqlite3
Binary file not shown.
17 changes: 14 additions & 3 deletions resources/templates/resources/all_groups.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
{% endblock title %}

{% block body %}
{% for group in groups %}
<a href="{% url 'resources:group_detail' group.id %}"><h2>{{ group.name }}</h2></a>
{% endfor %}
{% include "navbar.html" with home="" tips="" resources="active" %}

<div class="container">
<ul class="list-unstyled">
<li><h2>All Resource Groups</h2>
<ul>
{% for group in groups %}
<h4><a href="{% url 'resources:group_detail' group.id %}"><li>{{ group.name }}</li></a></h4>
{% endfor %}
</ul>
</li>
</ul>
</div>

{% endblock body %}
31 changes: 19 additions & 12 deletions resources/templates/resources/all_resources_and_groups.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@
{% endblock title %}

{% block body %}
{% for group in groups %}
<h2>{{ group.name }}:</h2>
<ul>
{% for resource in resources %}
{% for r in resource %}
{% if group == r.group %}
<li><a href="{{ r.link }}"><h3>{{ r.name }}</h3></a></li>
<p>{{ r.description }}</p>
{% endif %}
{% include "navbar.html" with home="" tips="" resources="active" %}

<div class="container">
<h2>All Resource and Groups</h2>
{% for group in groups %}
<ul class="list-unstyled">
<h2><a href="{% url 'resources:group_detail' group.id %}">{{ group.name }}:</a></h2>
{% for resource in resources %}
<ul>
{% for r in resource %}
{% if group == r.group %}
<li><a href="{{ r.link }}"><h4>{{ r.name }}</h4></a></li>
<tiny>{{ r.description }}</tiny>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
{% endfor %}
</ul>
{% endfor %}
</ul>
{% endfor %}
</div>
{% endblock body %}
21 changes: 14 additions & 7 deletions resources/templates/resources/group_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
{% endblock title %}

{% block body %}
<h1>{{ group.name }}</h1>
<ul>
{% for r in resources %}
<li><a href="{{ r.link }}"><h2>{{ r.name }}</h2></a></li>
<p>{{ r.description }}</p>
{% endfor %}
</ul>
{% include "navbar.html" with home="" tips="" resources="active" %}

<div class="container">
<ul class="list-unstyled">
<li><h2>{{ group.name }}</h2>
<ul>
{% for r in resources %}
<h4><a href="{{ r.link }}"><li>{{ r.name }}</li></a></h4>
<tiny>{{ r.description }}</tiny>
{% endfor %}
</ul>
</li>
</ul>
</div>
{% endblock body %}
5 changes: 2 additions & 3 deletions resources/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

app_name = 'resources'
urlpatterns = [
url(r'^$', views.all_resources_and_groups),
url(r'^groups/$', views.all_groups),
url(r'^categories/', views.all_groups),
url(r'^$', views.all_resources_and_groups, name="index"),
url(r'^groups/$', views.all_groups, name="groups"),
url(r'^groups/(?P<group_id>[0-9]+)', views.group_detail, name='group_detail'),
]
19 changes: 15 additions & 4 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@
{% endblock title %}

{% block body %}
{% include "navbar.html" %}
<h1>Welcome!</h1>
<small>Bye</small>
<small>hello!</small>
{% include "navbar.html" with home="active" %}
<div class="container">
<img src="http://logos.cs.uic.edu/reed/Wordle%20Computer%20Science.jpg" alt="Coding" class="img-responsive center-block">
<br />
<div class="row">
<h3 class="col-xs-12 text-center">Curiosity == Knowledge</h3>
</div>
<div class="row">
<h4 class="col-xs-12">
Pro Coding Tips is a project that aims to help developers with getting started on coding while assisting them with challenges they may face throughout their own experience.
</h4>
</div>
<a href="{% url 'tips:all-tips' %}" class="btn btn-block btn-primary">Read Some Tips</a>
</div>
<div class="footer" style="margin-top: 30px;"></div>
{% endblock body %}
26 changes: 25 additions & 1 deletion templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://bootswatch.com/paper/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#303f9f">
<meta name="msapplication-TileColor" content="#303f9f">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>{% block title %}{% endblock title %}</title>
<link rel="stylesheet" href="https://bootswatch.com/paper/bootstrap.min.css">
</head>

<body>
{% block body %}{% endblock body %}
</body>
Expand Down
17 changes: 12 additions & 5 deletions templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@

<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home <span class="sr-only">(current)</span></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Tips <span class="caret"></span></a>
<li class="{{ home|default:'' }}"><a href="#">Home <span class="sr-only">(current)</span></a></li>
<li class="{{ tips|default:'' }} dropdown">
<a href="" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Tips <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Series</a></li>
<li><a href="#">All Tips</a></li>
<li><a href="{% url 'tips:series' %}">Series</a></li>
<li><a href="{% url 'tips:all-tips' %}">All Tips</a></li>
</ul>
</li>
<li class="{{ resources|default:'' }} dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url 'resources:index' %}">Resources and Groups</a></li>
<li><a href="{% url 'resources:groups' %}">All Groups</a></li>
</ul>
</li>
</ul>
Expand Down
48 changes: 38 additions & 10 deletions tips/templates/tips/all_tips_in_series.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,42 @@
{% endblock title %}

{% block body %}
<h2>Series: {{ series.name }}</h2>
{% for t in tip %}
<h3>{{ t.title }}</h3>
<h4>{{ t.author }}</h4>
<h4>Tip {{ t.order }} of {{ series_length }} of Series {{ t.series.name }}</h4>
<h4>Resources we will be using: {{ t.resources }}</h4>
<p>{{ t.body }}</p>
<h4>Post on: {{ t.pub_date }}</h4>
<h4>Likes: {{ t.likes }} Dislikes: {{ t.dislikes }}</h4>
{% endfor %}
{% include "navbar.html" with home="" tips="active" resources="" %}

<div class="container">
<h2>Series: {{ series.name }}</h2>
{% for t in tip %}
<bold><h2>{{ t.title }}</h2></bold>
<h5 style="color: gray;">By: {{ t.author }}</h5>
<h4>Tip {{ t.order }} of {{ series_length }} of Series {{ t.series.name }}</h4>
<h4>
<div style="position: relative">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Resources
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li>{{ t.resources }}</li>
</ul>
</div>
</div>
</h4>
<br>
<p>{{ t.body }}</p>
</br>
<div class="row">
<div class="col-xs-6">
<h4>Posted on: {{ t.pub_date }}</h4>
</div>
<div class="col-xs-6">
<h4>Likes: {{ t.likes }} Dislikes:{{ t.dislikes }}</h4>
</div>
</div>
{% endfor %}
</div>




{% endblock body %}
19 changes: 13 additions & 6 deletions tips/templates/tips/series_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
{% endblock title %}

{% block body %}
<h1>All Series:</h1>
<ul>
{% for s in series %}
<li><h3><a href="{% url 'tips:series_detail' s.id %}">{{ s.name }}</a></h3></li>
{% endfor %}
</ul>
{% include "navbar.html" with home="" tips="active" resources="" %}

<div class="container">
<ul class="list-unstyled">
<li><h2>All Series</h2>
<ul>
{% for s in series %}
<h4><a href="{% url 'tips:series_detail' s.id %}"><li>{{ s.name }}</li></a></h4>
{% endfor %}
</ul>
</li>
</ul>
</div>
{% endblock body %}
38 changes: 33 additions & 5 deletions tips/templates/tips/tip_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,41 @@
{% endblock title %}

{% block body %}
{% include "navbar.html" with home="" tips="active" resources="" %}
{% for tip in tips %}
<h3>{{ tip.title }}</h3>
<h4>By: {{ tip.author }}</h4>

<div class="container">
<bold><h2>{{ tip.title }}</h2></bold>
<h5 style="color: gray;">By: {{ tip.author }}</h5>
<h4>Tip {{ tip.order }} of {{ series_length }} of Series {{ tip.series.name }}</h4>
<h4>Resources we will be using: {{ tip.resources }}</h4>
<h4>
<div style="position: relative">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Resources
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li>{{ tip.resources }}</li>
</ul>
</div>
</div>
</h4>
<br>
<p>{{ tip.body }}</p>
<h4>Post on: {{ tip.pub_date }}</h4>
<h4>Likes: {{ tip.likes }} Dislikes:{{ tip.dislikes }}</h4>
</br>
<div class="row">
<div class="col-xs-6">
<h4>Posted on: {{ tip.pub_date }}</h4>
</div>
<div class="col-xs-6">
<h4>Likes: {{ tip.likes }} Dislikes:{{ tip.dislikes }}</h4>
</div>
</div>
</div>




{% endfor %}
{% endblock body %}
6 changes: 3 additions & 3 deletions tips/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

app_name = 'tips'
urlpatterns = [
url(r'^$', views.all_tip_list),
url(r'^series/$', views.all_series_list),
url(r'^tips/', views.all_tip_list),
url(r'^$', views.all_tip_list, name="all-tips"),
url(r'^series/$', views.all_series_list, name="series"),
url(r'^tips/', views.all_tip_list, name="tips"),
url(r'^series/(?P<pk>[0-9]+)/', views.all_tips_in_series, name='series_detail'),
]
1 change: 1 addition & 0 deletions tips/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Create your views here.
def all_series_list(request):
series = Series.objects.all()
print series
return render(request, 'tips/series_list.html', { 'series': series })

def all_tip_list(request):
Expand Down