ubyssey / ubyssey.ca

The code that powers www.ubyssey.ca
GNU General Public License v2.0
35 stars 40 forks source link

Give option for quote block to go left and right like image block #1467

Open SamuelmdLow opened 1 month ago

SamuelmdLow commented 1 month ago

The Verge does this with their quotes

Just like in ImageBlock (found in ubyssey.ca/images/blocks.py), I think the PullQuoteBlock (found in ubyssey.ca/article/blocks.py) should have the style choiceblock that gives the option for the quote to be default, left, or right. Left or Right should add a left or right class to the quote (the template is found in ubyssey.ca/article/templates/article/stream_blocks/quote.html).

For reference you can see the imageblock tempalte in ubyssey.ca/images/templates/images/stream_blocks/image_block.html and the styling for .left and .right in ubyssey.ca/ubyssey/static_src/src/styles/modules/article/_embeds.scss

Nishim12 commented 3 days ago

If I understand the problem statement correctly then I think the embedMargins method in main.js is not used anywhere in the codebase. I commented the other unused code as well.

SamuelmdLow commented 3 days ago

If I understand the problem statement correctly then I think the embedMargins method in main.js is not used anywhere in the codebase. I commented the other unused code as well.

I meant to sasy that 'embedMargins' is used but I think there is a better way to do it using css instead of javascript