Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 2, 2024
2 parents 9a66df0 + 562a08e commit dc178eb
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 61 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 免费安装使用教程

点此链接访问帮助:[NotionNext帮助手册 - (完全免费)](https://docs.tangly1024.com/)

## 权利声明

本项目教程为免费、公开资源,仅限个人学习使用。严禁任何个人或组织将本教程用于商业用途,包括但不限于直接售卖、间接收费、或其他变相盈利行为。转载、复制或介绍本教程内容时,须保留作者信息并明确注明来源。

本项目仅提供由作者团队授权的付费咨询服务,请注意辨别,谨防诈骗行为。任何未经授权的收费服务均可能存在法律风险。

只需几分钟即可搭建您的个人站点,以下是我的免费教程链接:


# NotionNext

<p>
Expand Down Expand Up @@ -31,20 +44,6 @@
|--|--|--|--|
| <img src='./docs/theme-next.png' width='300'/> [预览NEXT](https://preview.tangly1024.com/?theme=next) | <img src='./docs/theme-medium.png' width='300'/> [预览MEDIUM](https://preview.tangly1024.com/?theme=medium) | <img src='./docs/theme-hexo.png' width='300'/> [预览HEXO](https://preview.tangly1024.com/?theme=hexo) | <img src='./docs/theme-fukasawa.png' width='300'/> [预览FUKASAWA](https://preview.tangly1024.com/?theme=fukasawa) |

## 我要如何开始?

只需几分钟即可搭建您的个人站点:

- [部署教程 (支持多方案)](https://docs.tangly1024.com/)

- [配置手册 - (自定义插件)](https://docs.tangly1024.com/article/notion-next-guide)

- [二次开发 - (开发手册)](https://docs.tangly1024.com/article/notion-next-secondary-menu)

- [更新指南 - (升级您的代码)](https://docs.tangly1024.com/article/how-to-update-notionnext)

- [版本汇总 - (查询变动功能)](https://docs.tangly1024.com/article/notion-next-changelogs)

## 致谢
感谢Craig Hart发起的Nobelium项目

Expand Down
26 changes: 12 additions & 14 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Free Installation and Usage Guide

Click here to access the help documentation: NotionNext Help Manual - (Completely Free)

## Rights Statement

This project's tutorial is a free and open resource intended solely for personal learning use. It is strictly prohibited for any individual or organization to use this tutorial for commercial purposes, including but not limited to direct sales, indirect charges, or any other forms of profit. When reproducing, copying, or sharing this tutorial, the author's information must be retained, and the source clearly cited.

This project only offers paid consultation services authorized by the author's team. Please be vigilant against fraud. Any unauthorized paid services may be subject to legal risks.

You can set up your personal website in just a few minutes. Here is the link to my free tutorial:

# NotionNext

<p>
Expand Down Expand Up @@ -31,20 +43,6 @@ Live Demo:[https://preview.tangly1024.com/](https://preview.tangly1024.com/)
|--|--|--|--|
| <img src='./docs/theme-next.png' width='300'/> [NEXT](https://preview.tangly1024.com/?theme=next) | <img src='./docs/theme-medium.png' width='300'/> [MEDIUM](https://preview.tangly1024.com/?theme=medium) | <img src='./docs/theme-hexo.png' width='300'/> [HEXO](https://preview.tangly1024.com/?theme=hexo) | <img src='./docs/theme-fukasawa.png' width='300'/> [FUKASAWA](https://preview.tangly1024.com/?theme=fukasawa) |

## Get Start!

It only takes a few minutes to set up your personal site:

- [Quick Deployment Tutorial - Multiple Options Available](https://docs.tangly1024.com/article/vercel-deploy-notion-next)

- [Customization Guide - How to Configure Feature Plugins](https://docs.tangly1024.com/article/how-to-config-notion-next)

- [Development Guide - How to Conduct Local Development](https://docs.tangly1024.com/article/how-to-develop-with-notion-next)

- [Update Guide - How to Get the Latest Upgrade Patch](https://docs.tangly1024.com/article/how-to-update-notionnext)

- [Version History - Check Feature Highlights for Each Version](https://docs.tangly1024.com/article/latest)

## Acknowledgements

Special thanks to Craig Hart for initiating the Nobelium project.
Expand Down
32 changes: 12 additions & 20 deletions themes/heo/components/BlogPostCard.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import LazyImage from '@/components/LazyImage'
import NotionIcon from '@/components/NotionIcon'
import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import CONFIG from '../config'
import TagItemMini from './TagItemMini'

const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
const { NOTION_CONFIG } = useGlobal()

const showPreview =
siteConfig('HEO_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap
if (
Expand All @@ -23,32 +20,29 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
post?.pageCoverThumbnail &&
!showPreview

const POST_TWO_COLS = siteConfig(
'HEO_HOME_POST_TWO_COLS',
null,
NOTION_CONFIG
const POST_TWO_COLS = siteConfig('HEO_HOME_POST_TWO_COLS', true, CONFIG)
const COVER_HOVER_ENLARGE = siteConfig(
'HEO_POST_LIST_COVER_HOVER_ENLARGE',
true,
CONFIG
)

return (
<article
className={` ${siteConfig('HEO_POST_LIST_COVER_HOVER_ENLARGE', null, CONFIG) ? ' hover:scale-110 transition-all duration-150' : ''}`}>
className={` ${COVER_HOVER_ENLARGE} ? ' hover:scale-110 transition-all duration-150' : ''}`}>
<div
data-wow-delay='.2s'
className={
POST_TWO_COLS
? '2xl:h-96 2xl:flex-col'
: '' +
'wow fadeInUp border bg-white dark:bg-[#1e1e1e] flex mb-4 flex-col h-[23rem] md:h-52 md:flex-row group w-full dark:border-gray-600 hover:border-indigo-600 dark:hover:border-yellow-600 duration-300 transition-colors justify-between overflow-hidden rounded-xl'
(POST_TWO_COLS ? '2xl:h-96 2xl:flex-col' : '') +
' wow fadeInUp border bg-white dark:bg-[#1e1e1e] flex mb-4 flex-col h-[23rem] md:h-52 md:flex-row group w-full dark:border-gray-600 hover:border-indigo-600 dark:hover:border-yellow-600 duration-300 transition-colors justify-between overflow-hidden rounded-xl'
}>
{/* 图片封面 */}
{showPageCover && (
<Link href={post?.href} passHref legacyBehavior>
<div
className={
POST_TWO_COLS
? ' 2xl:w-full'
: '' +
'w-full md:w-5/12 overflow-hidden cursor-pointer select-none'
(POST_TWO_COLS ? ' 2xl:w-full' : '') +
' w-full md:w-5/12 overflow-hidden cursor-pointer select-none'
}>
<LazyImage
priority={index === 0}
Expand All @@ -63,10 +57,8 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
{/* 文字区块 */}
<div
className={
POST_TWO_COLS
? '2xl:p-4 2xl:h-48 2xl:w-full'
: '' +
'flex p-6 flex-col justify-between h-48 md:h-full w-full md:w-7/12'
(POST_TWO_COLS ? '2xl:p-4 2xl:h-48 2xl:w-full' : '') +
' flex p-6 flex-col justify-between h-48 md:h-full w-full md:w-7/12'
}>
<header>
{/* 分类 */}
Expand Down
11 changes: 4 additions & 7 deletions themes/heo/components/BlogPostListPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import CONFIG from '../config'
import BlogPostCard from './BlogPostCard'
import BlogPostListEmpty from './BlogPostListEmpty'
import PaginationNumber from './PaginationNumber'
Expand All @@ -14,22 +15,18 @@ import PaginationNumber from './PaginationNumber'
*/
const BlogPostListPage = ({ page = 1, posts = [], postCount, siteInfo }) => {
const { NOTION_CONFIG } = useGlobal()
const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG)
const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
const totalPage = Math.ceil(postCount / POSTS_PER_PAGE)
const showPagination = postCount >= POSTS_PER_PAGE
const POST_TWO_COLS = siteConfig(
'HEO_HOME_POST_TWO_COLS',
null,
NOTION_CONFIG
)
const POST_TWO_COLS = siteConfig('HEO_HOME_POST_TWO_COLS', true, CONFIG)
if (!posts || posts.length === 0 || page > totalPage) {
return <BlogPostListEmpty />
} else {
return (
<div id='container' className='w-full'>
{/* 文章列表 */}
<div
className={`2xl:grid ${POST_TWO_COLS && '2xl:grid-cols-2'} grid-cols-1 gap-5`}>
className={`${POST_TWO_COLS && '2xl:grid 2xl:grid-cols-2'} grid-cols-1 gap-5`}>
{posts?.map(post => (
<BlogPostCard
index={posts.indexOf(post)}
Expand Down
8 changes: 2 additions & 6 deletions themes/heo/components/BlogPostListScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,15 @@ const BlogPostListScroll = ({
})

const targetRef = useRef(null)
const POST_TWO_COLS = siteConfig(
'HEO_HOME_POST_TWO_COLS',
null,
NOTION_CONFIG
)
const POST_TWO_COLS = siteConfig('HEO_HOME_POST_TWO_COLS', true, CONFIG)
if (!postsToShow || postsToShow.length === 0) {
return <BlogPostListEmpty currentSearch={currentSearch} />
} else {
return (
<div id='container' ref={targetRef} className='w-full'>
{/* 文章列表 */}
<div
className={`2xl:grid ${POST_TWO_COLS && '2xl:grid-cols-2'} grid-cols-1 gap-5`}>
className={`${POST_TWO_COLS && '2xl:grid 2xl:grid-cols-2'} grid-cols-1 gap-5`}>
{' '}
{postsToShow.map(post => (
<BlogPostCard
Expand Down

0 comments on commit dc178eb

Please sign in to comment.