Skip to content

Commit babeb97

Browse files
committed
update zh template
1 parent 0deef40 commit babeb97

File tree

4 files changed

+69
-62
lines changed

4 files changed

+69
-62
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
English | [简体中文](README.zh_cn.md)
44

5-
This project is an easy to use Typst electronic component datasheet template purposed
5+
This project is an easy-to-use Typst electronic component datasheet template purposed
66
for testing and showcasing the potential of using Typst for technical documentation writing.
77

88
![Demo](gallery/demo.png)

demo-ds.pdf

0 Bytes
Binary file not shown.

demo-ds.zh.pdf

562 Bytes
Binary file not shown.

tids.zh.typ

Lines changed: 68 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@
150150
align: horizon,
151151
column-gutter: 3pt,
152152
row-gutter: 0pt,
153-
image(icon, height: 0.3in),
153+
image(icon, height: 6.5mm),
154154
align(left, {
155-
set par(leading: 5pt)
155+
set par(leading: 1mm)
156156
set text(9pt, fill: black)
157157
body
158158
})
@@ -161,7 +161,7 @@
161161
}
162162

163163
let cover_page() = page(
164-
margin: (top: 0.3in),
164+
margin: (top: 16mm, left: 1in, right: 15mm),
165165
header: none,
166166
header-ascent: 0%+0pt,
167167
footer: cover_page_footer
@@ -171,73 +171,80 @@
171171
kind: auto
172172
): set figure.caption(position: top)
173173

174-
#align(center, grid(
175-
columns: (auto, auto, auto, auto, auto, auto),
176-
rows: (auto),
177-
gutter: 15pt,
178-
align: center,
179-
180-
cover_page_icon(icon: "assets/icons/folder.svg", url: "https://github.com/oldrev", body: [产品#linebreak()目录]),
181-
cover_page_icon(icon: "assets/icons/cart.svg", url: "https://github.com/oldrev", body: [样品#linebreak()购买]),
182-
cover_page_icon(icon: "assets/icons/tools.svg", url: "https://github.com/oldrev", body: [工具与#linebreak()软件]),
183-
cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [技术#linebreak()文档]),
184-
cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [支持与#linebreak()社区]),
185-
cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [参考#linebreak()设计]),
186-
))
187-
188-
#v(0.3in)
189-
190-
#grid(
191-
inset: 0pt,
192-
columns: (1fr, 1fr),
193-
rows: (auto),
194-
gutter: 0pt,
195-
[
196-
#set align(left)
197-
#link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
198-
],
199-
[
200-
#set align(right)
201-
#link(ds_metadata.product_url)[#ds_metadata.product]
202-
#linebreak()
203-
#lastest_rev.rev - #lastest_rev.date
204-
],
205-
)
206-
207174
#grid(
208175
columns: 1,
209-
row-gutter: 5pt,
210-
[#line(length: 100%, stroke: 1pt + black)],
211-
[
212-
#set text(18pt, font: fonts.headings, weight: "medium")
213-
#align(center, ds_metadata.title)
214-
],
215-
[#line(length: 100%, stroke: 1pt + black)],
216-
)
217-
218-
#v(0.3em)
176+
rows: (auto, auto, auto, auto, 1fr),
177+
178+
align(center, grid(
179+
columns: (auto, auto, auto, auto, auto, auto),
180+
rows: (auto),
181+
gutter: 15pt,
182+
align: center,
183+
184+
cover_page_icon(icon: "assets/icons/folder.svg", url: "https://github.com/oldrev", body: [产品#linebreak()目录]),
185+
cover_page_icon(icon: "assets/icons/cart.svg", url: "https://github.com/oldrev", body: [样品#linebreak()购买]),
186+
cover_page_icon(icon: "assets/icons/tools.svg", url: "https://github.com/oldrev", body: [工具与#linebreak()软件]),
187+
cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [技术#linebreak()文档]),
188+
cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [支持与#linebreak()社区]),
189+
cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [参考#linebreak()设计]),
190+
)),
191+
192+
v(5mm),
193+
194+
grid(
195+
row-gutter: 3pt,
196+
rows: (auto, auto),
197+
grid(
198+
columns: (1fr, 1fr),
199+
rows: (auto),
200+
gutter: 0pt,
201+
[
202+
#set align(left)
203+
#link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
204+
],
205+
[
206+
#set align(right)
207+
#link(ds_metadata.product_url)[*#ds_metadata.product*]
208+
#linebreak()
209+
#lastest_rev.rev - #lastest_rev.date
210+
],
211+
),
212+
line(length: 100%, stroke: 1pt + black),
213+
),
214+
215+
grid(
216+
columns: 1,
217+
row-gutter: 5pt,
218+
[#line(length: 100%, stroke: 1pt + black)],
219+
[
220+
#set text(18pt, font: fonts.headings, weight: "medium")
221+
#align(center, ds_metadata.title)
222+
],
223+
[#line(length: 100%, stroke: 1pt + black)],
224+
),
219225

220-
#box(height: auto,
221-
columns(2, gutter: 30pt)[
226+
box(height: auto, inset: (x: 0pt, y: 3mm),
227+
columns(2, gutter: 30pt)[
222228

223-
= 特性
224-
<TitlePageFeatures>
229+
= 特性
230+
<TitlePageFeatures>
225231

226-
#features
232+
#features
227233

228-
= 用途
229-
<TitlePageApplications>
234+
= 用途
235+
<TitlePageApplications>
230236

231-
#applications
237+
#applications
232238

233-
#colbreak()
239+
#colbreak()
234240

235-
= 产品简介
236-
<产品简介>
241+
= 产品简介
242+
<产品简介>
237243

238-
#desc
244+
#desc
239245

240-
])
246+
])
247+
)
241248
]
242249

243250
let backcover_page() = [
@@ -307,7 +314,7 @@
307314
],
308315
[
309316
#set align(right)
310-
#link(ds_metadata.product_url)[#ds_metadata.product]
317+
#link(ds_metadata.product_url)[*#ds_metadata.product*]
311318
#linebreak()
312319
#lastest_rev.rev - #lastest_rev.date
313320
],
@@ -319,7 +326,7 @@
319326
gutter: 3pt,
320327
[
321328
#set align(left)
322-
#link(ds_metadata.product_url)[#ds_metadata.product]
329+
#link(ds_metadata.product_url)[*#ds_metadata.product*]
323330
#linebreak()
324331
#lastest_rev.rev - #lastest_rev.date
325332
],

0 commit comments

Comments
 (0)