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

Embedded media breaks paragraphs also #235

Open
phillipadsmith opened this issue Jul 3, 2016 · 5 comments
Open

Embedded media breaks paragraphs also #235

phillipadsmith opened this issue Jul 3, 2016 · 5 comments
Assignees

Comments

@phillipadsmith
Copy link
Member

Example of embedded media causes a weird paragraph break/wrap:
http://preview.thetyee.ca/Culture/2016/01/13/Podcast-Overload/

podcast_overload__soundtrack_to_your_new_year_s_resolutions___the_tyee

@MrBryan
Copy link
Collaborator

MrBryan commented Jul 6, 2016

In this case it actually is fitting between two paragraphs i.e. it's not breaking up text that is all in one but it is causing the left edge of the text to shift for the rest of the story? (or shift the other way above)

@phillipadsmith
Copy link
Member Author

In this case it actually is fitting between two paragraphs

Ah, yes, my mistake.

but it is causing the left edge of the text to shift for the rest of the story? (or shift the other way above)

It's doing something weird, yes.

@alexgreen
Copy link
Contributor

There's 2 problems here:

  1. The player is not appearing within a <figure> (as all media and imgs should), it's just sitting in an iframe directly within the main column. Proper figure tag markup is necessary to ensure correct styling and behaviour of media objects.
  2. There's a superfluous </div> after the iframe and this prematurely closes the main column's <div class="container-fluid clearfix ">. According to my tests this is what causes the problem with the column edge alignment.
<p>It's mesmerizing. There isn't a bad episode in more than a year's worth of podcasts. But since you need something to brighten the dark cold of January, why not start with sex? The Feb. 25, 2015 episode, "Cheating Happens," is about something roughly a quarter of married people do.</p>

                              <iframe frameborder="0" scrolling="no" height="130" width="100%" src="https://www.wnyc.org/widgets/ondemand_player/deathsexmoney/#file=/audio/json/433293/&share=1"></iframe>
</div><!--/responsive-embed--> 
<p>Happy fantasizing.</p>

@MrBryan is there some way that legacy articles can be processed so that all iframes pasted within the body text are wrapped in appropriately marked up figures? That way they'll get correct styling. If not then I can try to apply a universal style to iframes appearing within the column.

@MrBryan do you know where that extra </div> is coming from? Can it be omitted?

@alexgreen alexgreen assigned MrBryan and alexgreen and unassigned alexgreen Jul 9, 2016
@alexgreen
Copy link
Contributor

Here's an example of how it looks in Jekyll:
{% include 01-molecules/blocks/figure.html figure-contents="00-atoms/media/audio--wnyc-player" figure-caption="This is a caption describing an audio object inside a figure." media-credit="Source attribution goes here" content-source="" %}

And here's the html output:

<!-- Begin 01-molecules/blocks/figure -->
<figure class="figure " data-dev-object-descrip="01-molecules/blocks/figure" data-dev-status="IN-PROGRESS">
    <!-- 00-atoms/media/audio -- audio embed.  -->
    <div class="[ responsive-embed responsive-embed--audio ]">
       <iframe frameborder="0" scrolling="no" height="130" width="100%" src="https://www.wnyc.org/widgets/ondemand_player/deathsexmoney/#file=/audio/json/433293/&amp;share=1"></iframe>
    </div>
    <!-- END 00-atoms/media/audio -->
    <figcaption class="caption">This is a caption describing an audio object inside a figure. <span class="caption__media--credit"> Source attribution goes here</span></figcaption>
</figure>
<!-- END 01-molecules/blocks/figure -->

alexgreen added a commit that referenced this issue Jul 9, 2016
* ag--align-author-info:
  aligns author info when photo is missing; partially fixes #244
  fixes Embedded media breaks paragraphs #235
@phillipadsmith
Copy link
Member Author

Is this merged in, @MrBryan ?

alexgreen added a commit that referenced this issue Jul 14, 2016
* develop: (33 commits)
  adjusts breakpoint for removing object floats
  changes server settings
  removes the float from figures and bigbox ads at widths above 955px
  Cleans up title and some formatting
  specifies presents-badge link url -- fixes #250
  Partly fixes css linting -- #249
  adjusts position of "read more" bio link
  Aligns "read more" link with bottom of bio teaser; fixes #212
  aligns author info when photo is missing; partially fixes #244
  fixes Embedded media breaks paragraphs #235
  Sets category label in all caps
  sets _config-ag to localhost
  more clarification of fact-box comments
  clarifies comment within fact-box.html
  fixes typo in markup
  Fix storiesRequested to API
  Add favicon to redesign folder
  Fix empty.css 404 issue
  Remove logging, fix syntax, format.
  fix overreach of comment link
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants