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

fix(gnoweb): template and md style #2223

Merged
merged 17 commits into from
May 28, 2024

Conversation

alexiscolin
Copy link
Member

This PR is a hotfix to markdown style.

fixes: #1967
fixes: #2166

Maybe not the best way to handle it, but as we are gonna refactor gnoweb and pages are rendered as blog, what is not very clean, this is a quick fix before a better refactor.

It create a Kind variable for rendered pages in gnoweb, that is used as CSS classname to wrap the body content. This is made to separate Section and Page contents: while first ones are created with a detailed architecture of sub-sections (invisible list, columns etc), the second kind is made for generic content.

This separation allow to create different styles for the two kinds of structure we have on gno.land website:
"page" one will have bullet lists, centered images etc by default and "section" one will be more transparent regarding the style.

To achieve this, the PR creates a dedicated package for "events" instead of a blog rendered page (because this page is a section) and adds a default page CSS classname in blog content.

In the future, we should use dedicated md / web components to display elements whatever the page type.

@alexiscolin alexiscolin requested review from moul, zivkovicmilos and a team as code owners May 28, 2024 07:01
@alexiscolin alexiscolin requested a review from leohhhn May 28, 2024 07:01
@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 ⛰️ gno.land Issues or PRs gno.land package related labels May 28, 2024
@alexiscolin alexiscolin marked this pull request as draft May 28, 2024 07:11
Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.93%. Comparing base (3cc4952) to head (d1c2429).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2223   +/-   ##
=======================================
  Coverage   49.93%   49.93%           
=======================================
  Files         576      576           
  Lines       77827    77827           
=======================================
  Hits        38864    38864           
  Misses      35839    35839           
  Partials     3124     3124           
Flag Coverage Δ
gno.land 61.67% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexiscolin alexiscolin marked this pull request as ready for review May 28, 2024 08:10
wal/cs.wal/wal Outdated Show resolved Hide resolved
@thehowl thehowl changed the title fix: template and md style fix(gnoweb): template and md style May 28, 2024
Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

Played around with this, deployed all blogs locally. Blogs look awesome 💯

@leohhhn leohhhn merged commit 77071e4 into gnolang:master May 28, 2024
46 checks passed
@alexiscolin alexiscolin deleted the fix/global-md-styles branch May 30, 2024 05:04
omarsy pushed a commit to TERITORI/gno that referenced this pull request Jun 3, 2024
This PR is a hotfix to markdown style.

fixes: gnolang#1967 
fixes: gnolang#2166

Maybe not the best way to handle it, but as we are gonna refactor gnoweb
and pages are rendered as blog, what is not very clean, this is a quick
fix before a better refactor.

It create a `Kind` variable for rendered pages in `gnoweb`, that is used
as CSS classname to wrap the body content. This is made to separate
`Section` and `Page` contents: while first ones are created with a
detailed architecture of sub-sections (invisible list, columns etc), the
second kind is made for generic content.

This separation allow to create different styles for the two kinds of
structure we have on gno.land website:
"page" one will have bullet lists, centered images etc by default and
"section" one will be more transparent regarding the style.

To achieve this, the PR creates a dedicated package for "events" instead
of a blog rendered page (because this page is a `section`) and adds a
default `page` CSS classname in blog content.

In the future, we should use dedicated md / web components to display
elements whatever the page type.

---------

Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[gnoweb] Scale images in relation to page size [gnoweb] Bullet points not rendered properly
3 participants