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

Update featured shapes #277

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/featured_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 class="cell">
</svg>
{% when "shape3" %}
<svg class="bg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 650 410" preserveAspectRatio="none">
<polygon points="0 0 352 0 460 87 650 87 650 410 0 410"/>
<polygon points="0 0 350 0 300 0 400 0 850 500 0 950"/>
Copy link
Member

@chriswilty chriswilty Nov 25, 2024

Choose a reason for hiding this comment

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

Second and third points are redundant, so this can be simply
0 0 400 0 850 500 0 950

Note that commas are allowed in this value, so you can also write it like this which might help:
0,0 400,0 850,500 0,950

If you set the viewbox to the full shape, this is what you see:

image

Then truncating the viewbox gives us our shape, as preserveAspectRatio is turned off.

</svg>
{% when "shape4" %}
<svg class="bg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 650 410" preserveAspectRatio="none">
Expand Down