Skip to content

Commit

Permalink
Merge branch 'Hashnode:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
victornwakpa authored Nov 1, 2023
2 parents b90a4e3 + 28048fc commit 5aaef65
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ If you prefer to build your frontend from scratch, you can use our public GraphQ

- [Docs](https://apidocs.hashnode.com)
- [GraphQL Playground](https://gql.hashnode.com)
- [Generate queries/mutations by talking to AI](https://chatgql.com/chat?url=https://gql.hashnode.com)

## Demo Videos

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const DateFormatter = ({ dateString }: Props) => {

return (
<>
<span className="mx-3 hidden font-bold text-slate-500 md:block">&middot;</span>
<time dateTime={dateString}>{format(date, 'LLL d, yyyy')}</time>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ export const PostHeader = ({ title, coverImage, date, author, readTimeInMinutes
return (
<>
<PostTitle>{title}</PostTitle>
<div className="flex w-full flex-col items-center justify-center gap-5 text-slate-700 dark:text-neutral-300 md:flex-row md:gap-0">
<div className="flex w-full flex-col items-center justify-center gap-2 text-slate-700 dark:text-neutral-300 md:flex-row">
<Avatar
username={author.username}
name={author.name}
size={8}
picture={author.profilePicture}
/>
<section className="flex">
<DateFormatter dateString={date} />
<ReadTimeInMinutes readTimeInMinutes={readTimeInMinutes} />
</section>
<span className="block font-bold text-slate-500">&middot;</span>
<DateFormatter dateString={date} />
{readTimeInMinutes && <span className="block font-bold text-slate-500">&middot;</span>}
<ReadTimeInMinutes readTimeInMinutes={readTimeInMinutes} />
</div>
{coverImage && (
<div className="w-full px-5 sm:mx-0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ type Props = { readTimeInMinutes: number };
export const ReadTimeInMinutes = ({ readTimeInMinutes }: Props) => {
return (
<>
<span className="mx-3 block font-bold text-slate-500">&middot;</span>
<p className="flex flex-row items-center">
<BookOpenSVG className="mr-2 h-5 w-5 fill-current opacity-75" />
<span>{readTimeInMinutes} min read</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ export type Draft = Node & {
lastFailedBackupAt?: Maybe<Scalars['DateTime']['output']>;
/** The date the draft was last successfully backed up. */
lastSuccessfulBackupAt?: Maybe<Scalars['DateTime']['output']>;
/** The subtitle of the draft. It would become the subtitle of the post when published. */
subtitle?: Maybe<Scalars['String']['output']>;
/** Returns list of tags added to the draft. Contains tag id, name, slug, etc. */
tags: Array<Tag>;
/** The title of the draft. It would become the title of the post when published. */
Expand Down Expand Up @@ -1675,6 +1677,7 @@ export enum Scope {
PublicationAdmin = 'publication_admin',
RecommendPublications = 'recommend_publications',
Signup = 'signup',
UpdatePost = 'update_post',
WebhookAdmin = 'webhook_admin',
WritePost = 'write_post',
WriteSeries = 'write_series'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ type Draft implements Node {
"""The date the draft was last successfully backed up."""
lastSuccessfulBackupAt: DateTime
"""
The subtitle of the draft. It would become the subtitle of the post when published.
"""
subtitle: String
"""
Returns list of tags added to the draft. Contains tag id, name, slug, etc.
"""
tags: [Tag!]!
Expand Down Expand Up @@ -1684,6 +1688,7 @@ enum Scope {
publication_admin
recommend_publications
signup
update_post
webhook_admin
write_post
write_series
Expand Down
5 changes: 1 addition & 4 deletions packages/blog-starter-kit/themes/enterprise/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ export default function Index({ publication, initialAllPosts, initialPageInfo }:
{firstPost && (
<HeroPost
title={firstPost.title}
coverImage={
firstPost.coverImage?.url ||
DEFAULT_COVER
}
coverImage={firstPost.coverImage?.url || DEFAULT_COVER}
date={firstPost.publishedAt}
slug={firstPost.slug}
excerpt={firstPost.brief}
Expand Down

0 comments on commit 5aaef65

Please sign in to comment.