Dewikification - Create app for resources + index page of resources#395
Conversation
| from django.views import View | ||
|
|
||
|
|
||
| class ResourcesView(View): |
There was a problem hiding this comment.
Did you consider using a TemplateView here? It would do away with all of the boilerplate code:
class ResourcesView(TemplateView):
template_name = "resources/resources.html"There was a problem hiding this comment.
Woah, I didn't know about TemplateView 😅 . Now this use this.
| <section class="breadcrumb-section section"> | ||
| <div class="container"> | ||
| <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> | ||
| <ul> | ||
| <li class="is-active"><a href="/resources">Resources</a></li> | ||
| </ul> | ||
| </nav> | ||
| </div> | ||
| </section> |
There was a problem hiding this comment.
Including breadcrumbs at the index feels redundant, especially since there's the "Resources" title right below. Does anyone else feel the same way? Is it better to keep it for consistency?
There was a problem hiding this comment.
As other resources pages will have it too, I think it is better to leave it.
There was a problem hiding this comment.
The previous version removed/hid it because it was considered redundant and we'd have a page title, a breadcrumb and a content title all with the same word, which looked kinda weird. Take that how you will.
There was a problem hiding this comment.
Actually I removed this breadcrumb now.
| <h1>Resources</h1> | ||
|
|
||
| <div class="tile is-ancestor"> | ||
| <a class="tile is-parent" href="/articles/category/guides"> |
There was a problem hiding this comment.
I'm aware this endpoint hasn't been implemented yet, but just making a note here so you're aware:
It's preferable to use django's {% url %} tag when referencing views, so we can reference it by namespace rather than the relative URL. When the articles endpoint exists we'll need to go back and use the url tag here.
There was a problem hiding this comment.
I this we should get this merged faster than content app one, as then I can make change there about it.
Co-authored-by: Jeremiah Boby <mail@jeremiahboby.me>
Created app for resources. Made index of it (where is all types of resources) looks exactly same than wiki version of it. Now this page is only clean HTML (with CSS included). Moved some blocks who defined custom background color these color definition to CSS file.
Fixes #387 .