Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Dashboards
Tabler
提交
5356f104
T
Tabler
项目概览
Dashboards
/
Tabler
9 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tabler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5356f104
编写于
7月 30, 2023
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adverts section
上级
fd48cc5c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
75 addition
and
41 deletion
+75
-41
site/app/(marketing)/blog/[slug]/page.tsx
site/app/(marketing)/blog/[slug]/page.tsx
+43
-14
site/app/(marketing)/blog/layout.tsx
site/app/(marketing)/blog/layout.tsx
+0
-26
site/components/Ad.tsx
site/components/Ad.tsx
+21
-0
site/components/layout/Header.tsx
site/components/layout/Header.tsx
+1
-1
site/styles/_config.scss
site/styles/_config.scss
+1
-0
site/styles/_grid.scss
site/styles/_grid.scss
+4
-0
site/styles/_mixins.scss
site/styles/_mixins.scss
+5
-0
未找到文件。
site/app/(marketing)/blog/[slug]/page.tsx
浏览文件 @
5356f104
...
...
@@ -2,11 +2,12 @@ import { notFound } from 'next/navigation';
import
{
allPosts
}
from
'
contentlayer/generated
'
;
import
Mdx
from
'
@/components/MDX
'
;
import
{
Ad
}
from
'
@/components/Ad
'
;
interface
PageProps
{
params
:
{
slug
:
string
}
slug
:
string
;
}
;
}
async
function
getPageFromParams
(
params
)
{
...
...
@@ -35,19 +36,47 @@ export default async function PostPage({ params }: PageProps) {
return
(
<>
{
post
&&
post
.
title
&&
(
<
div
className
=
"hero"
>
<
div
className
=
"container container-narrow"
>
<
div
className
=
"hero-subheader"
>
{
post
.
product
}
</
div
>
<
h1
className
=
"hero-title"
>
{
post
.
title
}
</
h1
>
</
div
>
</
div
>
)
}
<
section
className
=
"section pt-0"
>
<
div
className
=
"container container-narrow"
>
<
div
className
=
"markdown"
>
{
post
.
description
&&
<
p
className
=
"lead"
>
{
post
.
description
}
</
p
>
}
<
Mdx
code
=
{
post
.
body
.
code
}
/>
<
div
className
=
"container"
>
<
div
className
=
"row"
>
<
div
className
=
"col-side"
>
<
div
className
=
"sticky-top"
>
<
div
className
=
"py-7"
>
back
</
div
>
</
div
>
</
div
>
<
div
className
=
"col"
>
<
div
className
=
"row g-6"
>
<
div
className
=
"col-12"
>
<
div
className
=
"row g-6"
>
<
div
className
=
"col"
>
{
post
&&
post
.
title
&&
(
<
div
className
=
"py-7 text-center"
>
{
post
.
product
&&
<
div
className
=
"hero-subheader"
>
{
post
.
product
}
</
div
>
}
<
div
className
=
"text-muted mb-2"
>
July 25, 2023
</
div
>
<
h1
className
=
"hero-title"
>
{
post
.
title
}
</
h1
>
</
div
>
)
}
</
div
>
<
div
className
=
"col-side"
></
div
>
</
div
>
</
div
>
<
div
className
=
"col-12"
>
<
div
className
=
"row g-6"
>
<
div
className
=
"col"
>
<
div
className
=
"markdown"
>
{
post
.
description
&&
<
p
className
=
"lead"
>
{
post
.
description
}
</
p
>
}
<
Mdx
code
=
{
post
.
body
.
code
}
/>
</
div
>
</
div
>
<
div
className
=
"col-side"
>
<
div
className
=
"sticky-top"
>
<
Ad
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
section
>
...
...
site/app/(marketing)/blog/layout.tsx
已删除
100644 → 0
浏览文件 @
fd48cc5c
export
default
function
CoreLayout
({
children
}:
{
children
:
React
.
ReactNode
,
})
{
return
(
<
section
className
=
"section"
>
<
div
className
=
"container"
>
<
div
className
=
"row"
>
<
div
className
=
"col"
>
<
main
className
=
"main"
>
{
children
}
</
main
>
</
div
>
<
div
className
=
"col-3"
>
<
h1
className
=
"section-title section-title-lg"
>
Tabler Blog
</
h1
>
<
p
className
=
"section-description"
>
Stay in the loop with all things Tabler. We provide regular
updates on new features, changelogs, and news, ensuring you never
miss any of our software developments.
</
p
>
</
div
>
</
div
>
</
div
>
</
section
>
);
}
site/components/Ad.tsx
0 → 100644
浏览文件 @
5356f104
'
use client
'
;
import
{
useRef
,
useEffect
}
from
'
react
'
;
export
const
Ad
=
()
=>
{
const
ad
=
useRef
<
any
>
(
null
);
useEffect
(()
=>
{
if
(
ad
.
current
)
{
const
script
=
document
.
createElement
(
'
script
'
);
script
.
async
=
true
;
script
.
src
=
'
//cdn.carbonads.com/carbon.js?serve=CWYDCKQE&placement=tabler-iconsio
'
;
script
.
id
=
'
_carbonads_js
'
;
ad
.
current
.
appendChild
(
script
);
}
},
[]);
return
(
<
div
ref
=
{
ad
}
className
=
"ads"
></
div
>
);
};
site/components/layout/Header.tsx
浏览文件 @
5356f104
...
...
@@ -262,7 +262,7 @@ export default function Header({ headerStatic, className, pageProps, ...props }:
className
,
)
}
>
<
div
className
=
"container"
data
-
aos
=
"fade-down"
>
<
div
className
=
"container"
>
<
nav
className
=
"row items-center"
>
<
div
className
=
"col-auto"
>
<
Link
href
=
"/"
className
=
{
clsx
(
'
logo
'
/*, pageProps.brand ? `logo-${pageProps.brand}` : ''*/
)
}
aria
-
label
=
"Tabler"
/>
...
...
site/styles/_config.scss
浏览文件 @
5356f104
...
...
@@ -166,6 +166,7 @@ $grid-breakpoints: (
$container-max-width
:
px2rem
(
1280px
);
$container-narrow-max-width
:
px2rem
(
990px
);
$container-slim-max-width
:
px2rem
(
768px
);
$zindex-modal
:
100
;
$zindex-gototop
:
90
;
...
...
site/styles/_grid.scss
浏览文件 @
5356f104
...
...
@@ -14,6 +14,10 @@
max-width
:
$container-narrow-max-width
;
}
.container-slim
{
max-width
:
$container-slim-max-width
;
}
.container-fluid
{
max-width
:
100%
;
}
...
...
site/styles/_mixins.scss
浏览文件 @
5356f104
...
...
@@ -255,6 +255,11 @@
@include
make-col-auto
();
}
.
#{
$prefix
}
col-side
{
flex
:
0
0
auto
;
width
:
12rem
;
}
@if
$columns
>
0
{
@for
$i
from
1
through
$columns
{
.
#{
$prefix
}
col-
#{
$i
}
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录