-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure site #45
Restructure site #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't push .DS_Store and .idea files 😛
.idea/community.iml
Outdated
@@ -0,0 +1,25 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need all this .idea/
stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating an issue for it (gitignore)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Editor added files I guess. :/
@@ -1,41 +0,0 @@ | |||
<!doctype html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please leave the activity/
area in place. it will grow. you can include the one activity widget on the front page to fill the white space, but it also needs to be on activity/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
ada99d1
to
6d0f65d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove .DS_Store
and can you load materialize from a CDN instead of putting it in the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep CSS separate from templates
templates/index.html
Outdated
<!--Import materialize.css--> | ||
<link type="text/css" rel="stylesheet" href="../static/css/materialize.min.css" media="screen,projection"/> | ||
<style> | ||
nav { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create a new style.css
for this don't include CSS in here, we may need to add new things in future.
6d0f65d
to
e79ec05
Compare
@Monal5031 done! |
No. it is a generic community website which other orgs can fork and use without customisation. (see GCI task ). |
.gitignore
Outdated
@@ -103,3 +103,4 @@ ENV/ | |||
_site/ | |||
/public/ | |||
org_name.txt | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate issue for it is there #46 revert this change
static/css/style.css
Outdated
-moz-user-select: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline please 😛
static/css/style.css
Outdated
@@ -0,0 +1,13 @@ | |||
nav { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, just realised we already have a main.css
we should keep this there. Sorry 😓
@ashwini0529 |
@jayvdb it would be a tough job to eliminate things like this. We can minimize the work by using a config file. That could contain several parameters like |
templates/activity.html
Outdated
|
||
<nav> | ||
<div class="nav-wrapper"> | ||
<a href="#" class="brand-logo"> <img src="https://api.coala.io/en/latest/_static/images/coala_logo.svg"></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should i remove the logo? 😟
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've referred this issue in the commit message. Will that work?
templates/index.html
Outdated
<li><a href="/activity/">GitHub activity</a> | ||
</ul> | ||
</body> | ||
{% include 'activity.html' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOL
templates/footer.html
Outdated
<a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a> | ||
</div> | ||
</div> | ||
</footer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOL
templates/activity.html
Outdated
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<!--Import materialize.css--> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"> | ||
<link rel="stylesheet" href="../static/css/style.css"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
../static
does appear in the deployed website. use django-distill
No. This is an architecture choice. See the GCI task. This is supposed to be challenging.
Please push your current code so we can take a look at how you've solved the other problems, and investigate how to solve this one. |
e79ec05
to
ec600af
Compare
813ae4d
to
6ca750e
Compare
6ca750e
to
994c3cc
Compare
@jayvdb the way to access |
it may be easier, but it is wrong. You will understand why if you review my PR, and read the issues that it solves. |
community/context_processors.py
Outdated
@@ -0,0 +1,3 @@ | |||
def get_org_name(request): | |||
org_name = open('org_name.txt').readline() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated now that 'org_name.txt' is no longer generated.
28bb4a1
to
5bc8864
Compare
community/context_processors.py
Outdated
|
||
def get_org_name(request): | ||
org_name = get_owner() | ||
print (org_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
Origin: PEP8Bear, Section: all.autopep8
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpkpr3iyck/community/context_processors.py
+++ b/tmp/tmpkpr3iyck/community/context_processors.py
@@ -3,5 +3,5 @@
def get_org_name(request):
org_name = get_owner()
- print (org_name)
+ print(org_name)
return {'org_name': org_name}
community/context_processors.py
Outdated
|
||
def get_org_name(request): | ||
org_name = get_owner() | ||
print (org_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E211 whitespace before '('
Origin: PycodestyleBear (E211), Section: all.autopep8
.
templates/footer.html
Outdated
</div> | ||
<div class="col m6 s12 center"> | ||
<div class="gitter-btn center"> | ||
<a href="https://gitter.im/coala" class="waves-effect waves-light btn-large"><i class="fa fa-commenting-o" aria-hidden="true"></i><span class="footer-btn-text">Join Chat On Gitter</span></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line contains the keyword 'coala'.
Origin: KeywordBear, Section: generalization
.
5bc8864
to
e1e4b6b
Compare
@jayvdb changes done! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add an HTML linter bear too.
templates/index.html
Outdated
<div class="section no-pad-bot" id="index-banner"> | ||
|
||
{% include 'issues_graph.html' %} | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation seems weird here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
templates/twitter_feed.html
Outdated
<div class="container"> | ||
<a class="twitter-timeline" href="https://twitter.com/{{ org_twitter_handle }}">Tweets by {{ org_twitter_handle }} | ||
</a> | ||
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this indentation is really off. Closing divs should go on their own lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
twitter/view_twitter.py
Outdated
twitter_handle=org_twitter_handle)) | ||
return render(request, 'twitter_feed.html', context=org_data) | ||
else: | ||
return HttpResponse("Sorry, Organisation's twitter handle not found!") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
templates/footer.html
Outdated
<div class="row footer-btn-row"> | ||
<div class="col m6 s12 center"> | ||
<div class="twitter-btn center"> | ||
<a href="https://twitter.com/{{ org_name }}_io" class="waves-effect waves-light btn-large"><i class="fa fa-twitter" aria-hidden="true"></i><span class="footer-btn-text">Follow Us On Twitter</span></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO doing stuff like this is completely against the point of not using the word coala
as this will only work for us, not any other org. This might have already been discussed and will be fixed later, just wanted to provide my input on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. We’ll have to create a config file. But as discussed, we’ll come up with config file in next PR
e1e4b6b
to
41655e6
Compare
{% extends 'includes.html' %} | ||
{% block content %} | ||
<div class="section no-pad-bot" id="index-banner"> | ||
<div class="container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This div
is all a repeat of what is on index.html
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. it generates code something like http://paste.ubuntu.com/26200076/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why?
This page should have the standard header and footer and no extra stuff. It is just a page, like any other. The activity page is not the main page.
templates/index.html
Outdated
<div class="card" style="overflow: visible;"> | ||
<div class="card-image waves-effect waves-block waves-light"> | ||
<img class="activator" | ||
src="https://api.{{ org_name }}.io/en/latest/_static/images/{{ org_name }}_logo.svg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, no, no. This is coala specific URLs.
What is more, we have actually already built a solution for generic logos. You only need to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please tell me the usage? I was coming up with a proposal of introducing a config file to have all the org related information in my next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jayvdb should I use the header.png
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it shouldnt use header.png
. I've created #55 to remove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please stop consuming so much of other mentors time. It is counter productive. search this repo for "logo".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your next iteration of this PR does not comply with the goals of this project, I am closing the PR and unassigning.
41655e6
to
879517b
Compare
@jayvdb this would be the last major update that I would like to propose for this PR. Please have a look at the website. |
{% block content %} | ||
<div class="section no-pad-bot" id="index-banner"> | ||
<div class="container"> | ||
<h1 class="header center col-test">Welcome</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double space
<br> | ||
|
||
{% include 'footer.html' %} | ||
<!--Import jQuery before materialize.js--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed,
and the comment is in wrong location.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
<link rel="stylesheet" href="../static/css/main.css"> | ||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jquery can stay in the bottom of the body.
$('#chartType').on('change', function () { | ||
updateChart($('#chartType').val()) | ||
}); | ||
updateChart($('#chartType').val()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to charts.js so it's not duplicated in issues_graph page.
This PR has conflicts :/ |
And there are review comments by @blazeu which havent been done. |
<li class="collection-item">{{ log }}<a href="#!" class="secondary-content"> | ||
{% if '[ERROR]' in log %} | ||
<i class="fa fa-times-circle fa-2x"></i></a> | ||
{% elif '[WARNING]' in log %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indentation
{% elif '[WARNING]' in log %} | ||
<i class="fa fa-exclamation-triangle fa-2x"></i></a> | ||
{% else %} | ||
<i class="fa fa-info-circle fa-2x"></i></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indentation
<div class="footer-copyright"> | ||
<div class="container"> | ||
<span class="left">© 2017 {{ org_name }}</span> | ||
<a class="grey-text text-lighten-4 right" href="https://github.com/{{ org_name }}"><i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, how does "github.com{{ org_name }}"
end up as github.com/coala
? django automatically adds the /
? o_O
<span class="left">© 2017 {{ org_name }}</span> | ||
<a class="grey-text text-lighten-4 right" href="https://github.com/{{ org_name }}"><i | ||
class="fa fa-github fa-2x"></i></a> | ||
<a class="grey-text text-lighten-4 right" href="https://twitter.com/{{ org_name }}"><i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange alignment of the <i...
<footer class="page-footer"> | ||
<div class="footer-copyright"> | ||
<div class="container"> | ||
<span class="left">© 2017 {{ org_name }}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2017
should be a generated value.
but more importantly, this implies something different than https://github.com/coala/community/blob/master/LICENSE says
<h1 class="header center col-test">Welcome</h1> | ||
<div class="row center"> | ||
<h5 class="header col s12 light">Hello, world. You are at the {{ org_name }} community website.</h5> | ||
<h4 class="header col s12 light">Meet awesome mentors</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not how we would do a mentors app. please remove, and let that be achieved in the relevant issue.
<nav> | ||
<div class="nav-wrapper"> | ||
<a href="#" class="brand-logo"> <img | ||
src="{{ org_logo }}"></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
org_logo
isnt declared, and thus it does not appear on https://deploy-preview-45--coala-community.netlify.com/
It is currently working on http://coala-community.netlify.com/
<a href="#" class="brand-logo"> <img | ||
src="{{ org_logo }}"></a> | ||
<ul id="nav-mobile" class="right hide-on-med-and-down"> | ||
<li><a href="/gci">GCI</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps this list can be generated?
from django.shortcuts import render | ||
|
||
|
||
def index(request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this duplicates information in community/urls.py
. why do we need it here? (what are the benefits of this duplication?)
If we have it here, can we somehow avoid having it also in community/urls.py
? Maybe a feature request in django-distill?
@@ -121,3 +121,5 @@ | |||
MEDIA_URL = '/media/' | |||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | |||
STATICFILES_DIRS = ['static/'] | |||
TEMPLATES[0]['OPTIONS']['context_processors'].append( | |||
'community.context_processors.get_org_name') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this into the TEMPLATES
declaration.
Fixes #44