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

feat: render home page #12

Merged
merged 7 commits into from
Jan 7, 2025
Merged

feat: render home page #12

merged 7 commits into from
Jan 7, 2025

Conversation

sripwoud
Copy link
Member

@sripwoud sripwoud commented Dec 17, 2024

Towards redesign the different screens/pages according to the figma designs.
This PR only focuses on the first home/in page (https://forum.pse.dev/inn/0).

I am currently using

mock data
{
  "page_data": {
    "title": "Science Enthusiasts",
    "site_name": "Freedit",
    "site_description": "<p>Welcome to Freedit, the best platform for inn enthusiasts.</p>",
    "claim": null,
    "has_unread": false,
    "lang": "en"
  },
  "posts": [
    {
      "pid": 123,
      "iid": 1,
      "inn_name": "Science",
      "uid": 456,
      "username": "alice",
      "title": "How to Conduct an Experiment",
      "created_at": "2023-10-05T14:48:00Z",
      "comment_count": 10,
      "last_reply": [789, "bob"],
      "is_pinned": true
    },
    {
      "pid": 124,
      "iid": 1,
      "inn_name": "Science",
      "uid": 457,
      "username": "carol",
      "title": "Theories of Everything",
      "created_at": "2023-10-04T10:30:00Z",
      "comment_count": 5,
      "last_reply": null,
      "is_pinned": false
    }
  ],
  "iid": 1,
  "inn_name": "Science",
  "about": "A place to discuss scientific topics.",
  "description": "This inn focuses on various scientific disciplines and breakthroughs.",
  "anchor": 0,
  "n": 10,
  "is_desc": true,
  "inn_role": 3,
  "filter": null,
  "username": null,
  "inn_users_count": 150,
  "is_mod": false,
  "inns": [
    [2, "Technology", true],
    [3, "Art", false],
    [4, "Mathematics", true]
  ],
  "recommend_users": [
    [501, "dave"],
    [502, "eve"],
    [503, "frank"]
  ],
  "counts": 20
}

that I am simply serving with a static server
(eg darkhttpd apps/server/mock --header 'Access-Control-Allow-Origin: *').

image

Test plan

just dev
Click on Inn, should render as screenshot above

@sripwoud sripwoud self-assigned this Dec 17, 2024
@sripwoud sripwoud marked this pull request as ready for review January 7, 2025 13:36
@sripwoud sripwoud merged commit d94bb97 into main Jan 7, 2025
7 checks passed
@sripwoud sripwoud deleted the sripwoud/style-inn branch January 7, 2025 13:38
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

Successfully merging this pull request may close these issues.

1 participant