Skip to content

Commit 13c807e

Browse files
Template Added
1 parent 66fd7d1 commit 13c807e

File tree

4 files changed

+280
-160
lines changed

4 files changed

+280
-160
lines changed

junction/profiles/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55

66
urlpatterns = [
77
url(r'^$', views.dashboard, name='dashboard'),
8+
url(r'edit/$', views.profile, name='profile')
89
]

junction/profiles/views.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ def dashboard(request):
2222
conf_proposals[conf.name] = [proposal]
2323
return render(request, 'profiles/dashboard.html',
2424
{'conf_proposals': conf_proposals})
25+
26+
27+
@login_required
28+
def profile(request):
29+
return render(request, 'profiles/userprofile.html')

junction/templates/base.html

Lines changed: 161 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -3,173 +3,174 @@
33
{% load static from staticfiles %}
44
{% load django_bootstrap_breadcrumbs %}
55
{% block breadcrumbs %}
6-
{% clear_breadcrumbs %}
7-
{% breadcrumb_safe "<i class='fa fa-home'></i>" "page-home" %}
6+
{% clear_breadcrumbs %}
7+
{% breadcrumb_safe "<i class='fa fa-home'></i>" "page-home" %}
88
{% endblock %}
99
<head>
10-
<meta charset="utf-8">
11-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12-
<meta name="viewport" content="width=device-width, initial-scale=1">
13-
14-
<meta name="HandheldFriendly" content="True">
15-
<meta name="format-detection" content="telephone=no">
16-
<meta http-equiv="cleartype" content="on">
17-
<meta name="apple-mobile-web-app-capable" content="yes">
18-
<meta name="apple-mobile-web-app-status-bar-style" content="black">
19-
20-
{# Place icon files in the root if possible (let browsers look for them where they expect them to be) #}
21-
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}">
22-
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{% static 'apple-touch-icon-144x144-precomposed.png' %}">
23-
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{% static 'apple-touch-icon-114x114-precomposed.png' %}">
24-
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{% static 'apple-touch-icon-72x72-precomposed.png' %}">
25-
<link rel="apple-touch-icon-precomposed" href="{% static 'apple-touch-icon-precomposed.png' %}">
26-
<link rel="apple-touch-icon" href="{% static 'apple-touch-icon-precomposed.png' %}">
27-
28-
{# Tile icon for Win8 (144x144 + tile color) #}
29-
<meta name="msapplication-TileImage" content="{% static 'metro-icon-144x144-precomposed.png' %}"><!-- white shape -->
30-
<meta name="msapplication-TileColor" content="#3673a5"><!-- python blue -->
31-
<meta name="msapplication-navbutton-color" content="#3673a5">
32-
33-
{# Theme color on android #}
34-
<meta name="theme-color" content="#3673a5">
35-
36-
<title>{% block head_title %}{{ SITE_INFO.site_name }}{% endblock head_title %}</title>
37-
<meta property="og:title" content="{% block og_title %}{{ SITE_INFO.site_name }}{% endblock %}">
38-
39-
{# SEO and OpenGraph data - Needs to be fed dynamically according to the content of the page #}
40-
<meta name="description" content="{% block page_description %}{{ SITE_INFO.site_description }}{% endblock %}">
41-
<meta property="og:description" content="{% block og_description %}{{ SITE_INFO.site_description }}{% endblock %}">
42-
<meta name="keywords" content="{% block page-keywords %}{% endblock %}">
43-
<meta property="og:tag" content="{% block og_keywords %}{% endblock %}">
44-
<meta property="og:published_time" content="{% block og_publishedtime %}{% endblock %}">
45-
<meta property="og:modified_time" content="{% block og_modifiedtime %}{% endblock %}">
46-
<meta property="og:author" content="{% block og_author %}{% endblock %}">
47-
<meta property="og:section" content="{% block og_section %}{% endblock %}"> {# A high-level section name. E.g. Technology #}
48-
<meta property="og:url" content="{% block og_url %}{{ get_absolute_url }}{% endblock %}">{# permalink to the curent page #}
49-
<meta property="og:image" content="{% block og_image %}{% endblock %}">{# A path to an image used on the page. Helpful for telling crawlers what image to use for a page preview. Can be an array, meaning, there can be more than one of these tags (duplicate the WHOLE tag). #}
50-
<meta property="og:video" content="{% block og_video %}{% endblock %}">
51-
<link href="{% static 'css/app.css' %}" rel="stylesheet">
52-
53-
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
54-
<link href='//fonts.googleapis.com/css?family=Josefin+Slab:400,700' rel='stylesheet' type='text/css'>
55-
{% block style_extra %} {% endblock %}
56-
57-
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
58-
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
59-
<!--[if lt IE 9]>
60-
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
61-
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
62-
<![endif]-->
63-
64-
<!-- jQuery Version 1.11.0 -->
65-
<script src="{% static 'js/jquery-1.11.0.js' %}"></script>
66-
<script src="{% static 'js/Chart.min.js' %}"></script>
67-
68-
{% block endhead %}
69-
{% endblock %}
10+
<meta charset="utf-8">
11+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12+
<meta name="viewport" content="width=device-width, initial-scale=1">
13+
14+
<meta name="HandheldFriendly" content="True">
15+
<meta name="format-detection" content="telephone=no">
16+
<meta http-equiv="cleartype" content="on">
17+
<meta name="apple-mobile-web-app-capable" content="yes">
18+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
19+
20+
{# Place icon files in the root if possible (let browsers look for them where they expect them to be) #}
21+
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}">
22+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{% static 'apple-touch-icon-144x144-precomposed.png' %}">
23+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{% static 'apple-touch-icon-114x114-precomposed.png' %}">
24+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{% static 'apple-touch-icon-72x72-precomposed.png' %}">
25+
<link rel="apple-touch-icon-precomposed" href="{% static 'apple-touch-icon-precomposed.png' %}">
26+
<link rel="apple-touch-icon" href="{% static 'apple-touch-icon-precomposed.png' %}">
27+
28+
{# Tile icon for Win8 (144x144 + tile color) #}
29+
<meta name="msapplication-TileImage" content="{% static 'metro-icon-144x144-precomposed.png' %}"><!-- white shape -->
30+
<meta name="msapplication-TileColor" content="#3673a5"><!-- python blue -->
31+
<meta name="msapplication-navbutton-color" content="#3673a5">
32+
33+
{# Theme color on android #}
34+
<meta name="theme-color" content="#3673a5">
35+
36+
<title>{% block head_title %}{{ SITE_INFO.site_name }}{% endblock head_title %}</title>
37+
<meta property="og:title" content="{% block og_title %}{{ SITE_INFO.site_name }}{% endblock %}">
38+
39+
{# SEO and OpenGraph data - Needs to be fed dynamically according to the content of the page #}
40+
<meta name="description" content="{% block page_description %}{{ SITE_INFO.site_description }}{% endblock %}">
41+
<meta property="og:description" content="{% block og_description %}{{ SITE_INFO.site_description }}{% endblock %}">
42+
<meta name="keywords" content="{% block page-keywords %}{% endblock %}">
43+
<meta property="og:tag" content="{% block og_keywords %}{% endblock %}">
44+
<meta property="og:published_time" content="{% block og_publishedtime %}{% endblock %}">
45+
<meta property="og:modified_time" content="{% block og_modifiedtime %}{% endblock %}">
46+
<meta property="og:author" content="{% block og_author %}{% endblock %}">
47+
<meta property="og:section" content="{% block og_section %}{% endblock %}"> {# A high-level section name. E.g. Technology #}
48+
<meta property="og:url" content="{% block og_url %}{{ get_absolute_url }}{% endblock %}">{# permalink to the curent page #}
49+
<meta property="og:image" content="{% block og_image %}{% endblock %}">{# A path to an image used on the page. Helpful for telling crawlers what image to use for a page preview. Can be an array, meaning, there can be more than one of these tags (duplicate the WHOLE tag). #}
50+
<meta property="og:video" content="{% block og_video %}{% endblock %}">
51+
<link href="{% static 'css/app.css' %}" rel="stylesheet">
52+
53+
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
54+
<link href='//fonts.googleapis.com/css?family=Josefin+Slab:400,700' rel='stylesheet' type='text/css'>
55+
{% block style_extra %} {% endblock %}
56+
57+
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
58+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
59+
<!--[if lt IE 9]>
60+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
61+
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
62+
<![endif]-->
63+
64+
<!-- jQuery Version 1.11.0 -->
65+
<script src="{% static 'js/jquery-1.11.0.js' %}"></script>
66+
<script src="{% static 'js/Chart.min.js' %}"></script>
67+
68+
{% block endhead %}
69+
{% endblock %}
7070

7171
</head>
7272

7373
<body class="{% block page_classes %}page {% endblock page_classes %}">
7474

75-
<!-- Navigation -->
76-
<div class="navbar-wrapper">
77-
<nav class="navbar navbar-default" role="navigation">
78-
<div class="container-fluid">
79-
<!-- Brand and toggle get grouped for better mobile display -->
80-
<div class="navbar-header">
81-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
82-
<span class="sr-only">Toggle navigation</span>
83-
<span class="icon-bar"></span>
84-
<span class="icon-bar"></span>
85-
<span class="icon-bar"></span>
86-
</button>
87-
88-
{% block navbar_logo %}
89-
<a class="navbar-brand" href="{% url 'page-home' %}">
90-
{{ SITE_INFO.site_name }}
91-
</a>
92-
{% endblock navbar_logo %}
93-
94-
</div>
95-
<!-- Collect the nav links, forms, and other content for toggling -->
96-
<div class="collapse navbar-collapse" id="navbar-collapse-1">
97-
<ul class="nav navbar-nav navbar-right">
98-
<!-- <li class="active"><a href="{% url 'speakers-static' %}">Speakers</a></li>
99-
<li><a href="{% url 'schedule-static' %}">Schedule</a></li>
100-
<li><a href="/test-conference/proposals/">Proposals</a></li>
101-
<li><a href="{% url 'venue-static' %}">Venue</a></li>
102-
<li><a href="{% url 'sponsors-static' %}">Sponsors</a></li>
103-
<li><a href="{% url 'blog-archive' %}">Blog</a></li>
104-
<li><a href="{% url 'coc-static' %}">Code of Conduct</a></li>
105-
<li><a href="{% url 'faq-static' %}">FAQ</a></li> -->
106-
<li class="dropdown">
107-
{% if user.is_authenticated %}
108-
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="">{{ user.get_full_name|default:user.username }}</span> <span class="caret"></span></a>
109-
<ul class="dropdown-menu" role="menu">
110-
<li><a href="{% url 'profiles:dashboard' %}">Dashboard</a></li>
111-
<li><a href="{% url 'socialaccount_connections' %}">Social Accounts</a></li>
112-
{% if user.is_staff %}
113-
<li><a href="{% url 'admin:index' %}" target="_blank">Admin</a></li>
114-
{% endif %}
115-
<li class="divider"></li>
116-
<li><a href="{% url 'account_logout' %}?next={{request.path}}">Logout</a></li>
117-
</ul>
118-
{% else %}
119-
<a href="{% url 'account_login' %}?next={{request.path}}">Login / Register</a>
120-
{% endif %}
121-
</li>
122-
</ul>
123-
</div>
124-
<!-- /.navbar-collapse -->
125-
</div>
126-
<!-- /.container -->
127-
</nav>
128-
</div>
129-
130-
{% block header %}
131-
{% endblock %}
132-
133-
{% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap3.html" %}
134-
135-
<!-- Page Content -->
136-
<div class="container-fluid" role="main">
137-
<div class="row-fluid clearfix">
138-
<div class="col-md-10 col-md-offset-1">
139-
{% block content %}
140-
{% endblock %}
141-
</div>
142-
</div>
143-
</div>
144-
145-
<!-- Footer -->
146-
<footer>
147-
<div class="container-fluid">
148-
<div class="row-fluid">
149-
<div class="col-xs-12 text-center">
150-
<p class="push-half-top clear-margin">{{ SITE_INFO.footer|safe }} • Powered by <a href="https://github.com/pythonindia/junction">Junction</a></p>
151-
</div>
152-
</div><!-- /.row -->
153-
</div>
154-
</footer>
155-
<!-- /.container -->
156-
157-
<!-- Bootstrap Core JavaScript -->
158-
<script src="{% static 'js/bootstrap.min.js' %}"></script>
159-
<script src="{% static 'js/main.js' %}"></script>
160-
{% block script_extra %}{% endblock %}
161-
162-
{# -- Google Analytics -- #}
163-
{% if SITE_INFO.google_analytics_id %}
164-
<script>
165-
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
166-
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
167-
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
168-
e.src='//www.google-analytics.com/analytics.js';
169-
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
170-
ga('create','{{ SITE_INFO.google_analytics_id }}','auto');ga('send','pageview');
171-
</script>
172-
{% endif %}
75+
<!-- Navigation -->
76+
<div class="navbar-wrapper">
77+
<nav class="navbar navbar-default" role="navigation">
78+
<div class="container-fluid">
79+
<!-- Brand and toggle get grouped for better mobile display -->
80+
<div class="navbar-header">
81+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
82+
<span class="sr-only">Toggle navigation</span>
83+
<span class="icon-bar"></span>
84+
<span class="icon-bar"></span>
85+
<span class="icon-bar"></span>
86+
</button>
87+
88+
{% block navbar_logo %}
89+
<a class="navbar-brand" href="{% url 'page-home' %}">
90+
{{ SITE_INFO.site_name }}
91+
</a>
92+
{% endblock navbar_logo %}
93+
94+
</div>
95+
<!-- Collect the nav links, forms, and other content for toggling -->
96+
<div class="collapse navbar-collapse" id="navbar-collapse-1">
97+
<ul class="nav navbar-nav navbar-right">
98+
<!-- <li class="active"><a href="{% url 'speakers-static' %}">Speakers</a></li>
99+
<li><a href="{% url 'schedule-static' %}">Schedule</a></li>
100+
<li><a href="/test-conference/proposals/">Proposals</a></li>
101+
<li><a href="{% url 'venue-static' %}">Venue</a></li>
102+
<li><a href="{% url 'sponsors-static' %}">Sponsors</a></li>
103+
<li><a href="{% url 'blog-archive' %}">Blog</a></li>
104+
<li><a href="{% url 'coc-static' %}">Code of Conduct</a></li>
105+
<li><a href="{% url 'faq-static' %}">FAQ</a></li> -->
106+
<li class="dropdown">
107+
{% if user.is_authenticated %}
108+
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="">{{ user.get_full_name|default:user.username }}</span> <span class="caret"></span></a>
109+
<ul class="dropdown-menu" role="menu">
110+
<li><a href="{% url 'profiles:dashboard' %}">Dashboard</a></li>
111+
<li><a href="{% url 'socialaccount_connections' %}">Social Accounts</a></li>
112+
<li><a href="{% url 'profiles:profile' %}">Profile</a></li>
113+
{% if user.is_staff %}
114+
<li><a href="{% url 'admin:index' %}" target="_blank">Admin</a></li>
115+
{% endif %}
116+
<li class="divider"></li>
117+
<li><a href="{% url 'account_logout' %}?next={{request.path}}">Logout</a></li>
118+
</ul>
119+
{% else %}
120+
<a href="{% url 'account_login' %}?next={{request.path}}">Login / Register</a>
121+
{% endif %}
122+
</li>
123+
</ul>
124+
</div>
125+
<!-- /.navbar-collapse -->
126+
</div>
127+
<!-- /.container -->
128+
</nav>
129+
</div>
130+
131+
{% block header %}
132+
{% endblock %}
133+
134+
{% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap3.html" %}
135+
136+
<!-- Page Content -->
137+
<div class="container-fluid" role="main">
138+
<div class="row-fluid clearfix">
139+
<div class="col-md-10 col-md-offset-1">
140+
{% block content %}
141+
{% endblock %}
142+
</div>
143+
</div>
144+
</div>
145+
146+
<!-- Footer -->
147+
<footer>
148+
<div class="container-fluid">
149+
<div class="row-fluid">
150+
<div class="col-xs-12 text-center">
151+
<p class="push-half-top clear-margin">{{ SITE_INFO.footer|safe }} • Powered by <a href="https://github.com/pythonindia/junction">Junction</a></p>
152+
</div>
153+
</div><!-- /.row -->
154+
</div>
155+
</footer>
156+
<!-- /.container -->
157+
158+
<!-- Bootstrap Core JavaScript -->
159+
<script src="{% static 'js/bootstrap.min.js' %}"></script>
160+
<script src="{% static 'js/main.js' %}"></script>
161+
{% block script_extra %}{% endblock %}
162+
163+
{# -- Google Analytics -- #}
164+
{% if SITE_INFO.google_analytics_id %}
165+
<script>
166+
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
167+
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
168+
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
169+
e.src='//www.google-analytics.com/analytics.js';
170+
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
171+
ga('create','{{ SITE_INFO.google_analytics_id }}','auto');ga('send','pageview');
172+
</script>
173+
{% endif %}
173174

174175
</body>
175176
</html>

0 commit comments

Comments
 (0)