diff --git a/pro1/blog/static/blog/images/codingBG.jpg b/pro1/blog/static/blog/images/codingBG.jpg
new file mode 100644
index 0000000..bc86662
Binary files /dev/null and b/pro1/blog/static/blog/images/codingBG.jpg differ
diff --git a/pro1/blog/static/blog/images/gopavasanth.jpeg b/pro1/blog/static/blog/images/gopavasanth.jpeg
deleted file mode 100644
index f374908..0000000
Binary files a/pro1/blog/static/blog/images/gopavasanth.jpeg and /dev/null differ
diff --git a/pro1/blog/static/blog/images/gutsytechster.jpeg b/pro1/blog/static/blog/images/gutsytechster.jpeg
deleted file mode 100644
index df6b5ce..0000000
Binary files a/pro1/blog/static/blog/images/gutsytechster.jpeg and /dev/null differ
diff --git a/pro1/blog/static/blog/images/harry-hov.jpeg b/pro1/blog/static/blog/images/harry-hov.jpeg
deleted file mode 100644
index 0ff859b..0000000
Binary files a/pro1/blog/static/blog/images/harry-hov.jpeg and /dev/null differ
diff --git a/pro1/blog/static/blog/images/monsij.jpeg b/pro1/blog/static/blog/images/monsij.jpeg
deleted file mode 100644
index bf78b0a..0000000
Binary files a/pro1/blog/static/blog/images/monsij.jpeg and /dev/null differ
diff --git a/pro1/blog/static/blog/images/r3trd.jpeg b/pro1/blog/static/blog/images/r3trd.jpeg
deleted file mode 100644
index 124bd20..0000000
Binary files a/pro1/blog/static/blog/images/r3trd.jpeg and /dev/null differ
diff --git a/pro1/blog/static/blog/js/card.js b/pro1/blog/static/blog/js/card.js
new file mode 100644
index 0000000..cd1e13c
--- /dev/null
+++ b/pro1/blog/static/blog/js/card.js
@@ -0,0 +1,223 @@
+function querystring() {
+ var href = window.location.href, kv;
+ var params = href.slice(href.indexOf('?') + 1).split('&');
+ var qs = [];
+
+ for (i = 0; i < params.length; i++) {
+ kv = params[i].split('=');
+ qs.push(kv[0]);
+ qs[kv[0]] = kv[1];
+ }
+ return qs;
+}
+
+var qs = querystring();
+
+(function(d) {
+ var baseurl = 'https://api.github.com/', i;
+
+ function store(key, value) {
+ try {
+ if (window.localStorage) {
+ if (value) {
+ value._timestamp = new Date().valueOf();
+ localStorage[key] = JSON.stringify(value);
+ } else {
+ var ret = localStorage[key];
+ if (ret) {
+ return JSON.parse(ret);
+ }
+ return null;
+ }
+ }
+ } catch(e) {}
+ }
+
+ function valueof(data, key) {
+ var ret = data;
+ var bits = key.split('.');
+ for (var j = 0; j < bits.length; j++) {
+ if (ret) {
+ ret = ret[bits[j]];
+ } else {
+ break;
+ }
+ }
+ if (ret === undefined || ret === null) {
+ return '';
+ }
+ return ret;
+ }
+
+ function template(type, data) {
+ var t = d.getElementById(type + '-card');
+ var regex = /{([^}]+)}/g;
+ var text = t.innerHTML;
+ var m = text.match(regex);
+ for (i = 0; i < m.length; i++) {
+ text = text.replace(m[i], valueof(data, m[i].slice(1, -1)));
+ }
+ return text;
+ }
+
+ function request(url, callback) {
+ var cache = store(url);
+ if (cache && cache._timestamp) {
+ // cache in 10s
+ if (new Date().valueOf() - cache._timestamp < 10000) {
+ return callback(cache);
+ }
+ }
+ if (qs.client_id && qs.client_secret) {
+ url += '?client_id=' + qs.client_id + '&client_secret=' + qs.client_secret;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.onload = function() {
+ callback(JSON.parse(xhr.response));
+ };
+ xhr.send();
+ }
+
+ function linky(card, identity) {
+ var links = card.getElementsByTagName('a');
+ for (i = 0; i < links.length; i++) {
+ (function(link) {
+ link.target = '_' + (qs.target || 'top');
+ })(links[i]);
+ }
+ d.body.appendChild(card);
+ d.body.className = 'ready';
+ if (parent !== self && parent.postMessage) {
+ var height = Math.max(
+ d.body.scrollHeight,
+ d.documentElement.scrollHeight,
+ d.body.offsetHeight,
+ d.documentElement.offsetHeight,
+ d.body.clientHeight,
+ d.documentElement.clientHeight
+ );
+ parent.postMessage({
+ height: height,
+ sender: qs.identity || '*'
+ }, '*');
+ }
+ }
+
+ function userCard(user) {
+ var url = baseurl + 'users/' + user;
+ request(url, function(data) {
+ data = data || {};
+ var message = data.message;
+ var defaults = '0';
+ if (message) {
+ data = store(url) || data;
+ defaults = '?';
+ } else {
+ store(url, data);
+ }
+ data.login = user;
+ data.name = escape(data.name || user);
+ data.public_repos = numberic(data.public_repos) || defaults;
+ data.public_gists = numberic(data.public_gists) || defaults;
+ data.followers = numberic(data.followers) || defaults;
+
+ var job = 'Not available for hire.';
+ if (data.hireable) {
+ var link = '';
+ if (data.email) {
+ link = 'mailto:' + data.email;
+ } else if (data.blog) {
+ link = data.blog;
+ } else {
+ link = data.html_url;
+ }
+ job = 'Available for hire.';
+ }
+ if (message) {
+ job = message;
+ }
+ data.job = job;
+
+ var card = d.createElement('div');
+ card.className = 'github-card user-card';
+ card.innerHTML = template('user', data);
+ linky(card);
+ });
+ }
+
+ function repoCard(user, repo) {
+ var url = baseurl + 'repos/' + user + '/' + repo;
+ request(url, function(data) {
+ data = data || {};
+ var message = data.message;
+ var defaults = '0';
+ if (message) {
+ data = store(url) || data;
+ defaults = '?';
+ } else {
+ store(url, data);
+ }
+ data.login = user;
+
+ data.avatar_url = '';
+ if (data.owner && data.owner.avatar_url) {
+ data.avatar_url = data.owner.avatar_url;
+ }
+ data.forks_count = numberic(data.forks_count) || defaults;
+ data.watchers_count = numberic(data.watchers_count) || defaults;
+ if (data.fork) {
+ data.action = 'Forked by ';
+ } else {
+ data.action = 'Created by ';
+ }
+ var description = data.description;
+ if (!description && data.source) {
+ description = data.source.description;
+ }
+ if (!description && message) {
+ description = message;
+ }
+ data.description = escape(description) || 'No description';
+ var homepage = data.homepage;
+ if (!homepage && data.source) {
+ homepage = data.source.homepage;
+ }
+ if (homepage) {
+ data.homepage = ' ' + homepage.replace(/https?:\/\//, '').replace(/\/$/, '') + '';
+ } else {
+ data.homepage = '';
+ }
+
+ var card = d.createElement('div');
+ card.className = 'github-card repo-card';
+ card.innerHTML = template('repo', data);
+ linky(card);
+ });
+ }
+
+ function errorCard() {
+ }
+
+ function numberic(num) {
+ if (!num) return null;
+ if (num === 1000) return 1;
+ if (num < 1000) return num;
+ num = num / 1000;
+ if (num > 10) return parseInt(num, 10) + 'k';
+ return num.toFixed(1) + 'k';
+ }
+
+ if (!qs.user) {
+ errorCard();
+ } else if (qs.repo) {
+ repoCard(qs.user, qs.repo);
+ } else {
+ userCard(qs.user);
+ }
+
+ function escape(text) {
+ return text.replace(//g, '>');
+ }
+
+})(document);
diff --git a/pro1/blog/static/blog/jsGit/widget.js b/pro1/blog/static/blog/jsGit/widget.js
new file mode 100644
index 0000000..055d607
--- /dev/null
+++ b/pro1/blog/static/blog/jsGit/widget.js
@@ -0,0 +1 @@
+(function(v){var o="";var i,m=0;var e=v.getElementsByTagName("meta");var b,w,p,A;for(i=0;i Contributors
-
-
-
-
-
-
Monsij Biswal
-
Owner
-
-
-
-
-
-
-
-
Satyajit Das
-
Owner
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Nikhil Gupta
-
Contributor
-
-
-
-
-
+
+
+
+
+
+
+
+
{% endblock content %}
diff --git a/pro1/blog/templates/blog/gitCard/medium.html b/pro1/blog/templates/blog/gitCard/medium.html
new file mode 100644
index 0000000..cdeee34
--- /dev/null
+++ b/pro1/blog/templates/blog/gitCard/medium.html
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pro1/blog/urls.py b/pro1/blog/urls.py
index b830ea2..3008f67 100644
--- a/pro1/blog/urls.py
+++ b/pro1/blog/urls.py
@@ -4,6 +4,7 @@
urlpatterns = [
path('',auth_views.LoginView.as_view(template_name='users/login.html'),name='login'),
+ #path('', views.home, name='blog-home'),
path('about/',views.about, name='blog-about'),
path('home/', views.home, name='blog-home'),
path('contact/',views.contact, name='blog-contact'),
@@ -11,4 +12,5 @@
path('noticeboard/', include('noticeboard.urls')),
path('study/',include('study.urls')),
path('interviews/',include('interviews.urls')),
+ path('contributors/cards/medium.html', views.medium),
]
diff --git a/pro1/blog/views.py b/pro1/blog/views.py
index 7574331..0ac5eaa 100644
--- a/pro1/blog/views.py
+++ b/pro1/blog/views.py
@@ -18,3 +18,6 @@ def about(request):
def contributor(request):
return render(request, 'blog/contributor.html')
+
+def medium(request):
+ return render(request, 'blog/gitCard/medium.html')
\ No newline at end of file