Skip to content
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

Bread styling #71

Merged
merged 14 commits into from
Feb 27, 2017
Merged

Bread styling #71

merged 14 commits into from
Feb 27, 2017

Conversation

hminnovation
Copy link
Contributor

@hminnovation hminnovation commented Feb 24, 2017

Ready for review

  • Style index page
  • Amend context on index page model to pass through all fields
  • Style detail page

@hminnovation hminnovation self-assigned this Feb 24, 2017
@hminnovation hminnovation changed the title Initial styling of blog index page. Workson #57 Bread styling Feb 24, 2017
page = request.GET.get('page')
paginator = Paginator(self.breads, 2)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've put 2 just for the moment to make testing easier so you only need to create three bread objects to test pagination.

@daaray
Copy link
Contributor

daaray commented Feb 25, 2017

Looking good; a few comments:

  • We need a margin between the entries when the window is narrowed and the entries stack
  • images should have a fixed width (or become hidden?) when the window narrows else they get distorted.

screen shot 2017-02-25 at 4 19 03 am


paginator = Paginator(all_resources, 5) # Show 5 resources per page
@property
def breads(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To conform to convention, as @shacker pointed out in the Blog model, this should be renamed get_breads and not be a property.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem to change the name to get_breads. But removing the @property raises an error object of type 'method' has no len() on the pagintor. I'm not sure why that's happening. Would welcome suggestions on how to resolve.

@daaray
Copy link
Contributor

daaray commented Feb 25, 2017

@heymonkeyriot I pushed a change for; it looks as though when you changed from the property to a method, you weren't invoking the method:

self.get_breads vs self.get_breads()

@hminnovation
Copy link
Contributor Author

:face-palm: knew it'd be something daft! Thanks @daaray.

Copy link
Contributor Author

@hminnovation hminnovation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In reference to df3a587 I'll amend commit message on that commit since to make it clearer what index page, and the fact it didn't actually finish the styling of it.

@hminnovation
Copy link
Contributor Author

Screenshots for desktop and mobile for the BreadIndexPage and BreadPage
screencapture-localhost-8000-breads-index-page-1488049657437
screencapture-localhost-8000-breads-index-page-1488133549236
screencapture-localhost-8000-breads-index-page-afoioingefffega-1488133405803
screencapture-localhost-8000-breads-index-page-afoioingefffega-1488133427368

@@ -10,7 +10,7 @@
<h1>{{ page.title }}</h1>

<figure class="hidden-md-up">
{% image self.image width-600 %}
{% image self.image width-500 %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we only need to load a single image asset for the mobile viewport and desktop, which makes me feel a little better about using the visibility class.

{% image self.image width-500 %}
</figure>
<ul class="bread-meta">
{% if page.origin %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's slightly confusing to use self.image and page.origin in the same template. Would these both work with page.foo ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, and absolutely correct that we should keep them consistent. Will amend to page.foo throughout and push up.

@shacker
Copy link
Contributor

shacker commented Feb 27, 2017

This is looking great.

Side question (not quite about this PR): I notice you put some thought into punny bread titles - they're very good. I'm already working with Tumi's original breads and have them in the "master" content copy. Were you wanting to go with funny title instead, or was that just placeholder content?

@shacker
Copy link
Contributor

shacker commented Feb 27, 2017

Travis is not happy with Docker.

@hminnovation
Copy link
Contributor Author

Side question (not quite about this PR): I notice you put some thought into punny bread titles - they're very good.

I was sort of doing them for my own amusement, and was just placeholder content. I'm not sure how well they'll travel. I'd suggest we keep it fairly neutral in tone, though perhaps it wouldn't hurt to hide one or two puns around the place?

@shacker
Copy link
Contributor

shacker commented Feb 27, 2017

Roger dodger, we'll stick with wikipedia content with maybe a pun here or there.

I had parents in town this weekend and wasn't able to put in time, but back on the case tonight hopefully.

@shacker shacker merged commit e44888e into master Feb 27, 2017
@shacker shacker deleted the 57-styling-bread branch February 27, 2017 16:35
@hminnovation hminnovation mentioned this pull request Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants