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

Add folding tag #1489

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add folding tag #1489

wants to merge 6 commits into from

Conversation

XuxuGood
Copy link

@XuxuGood XuxuGood commented May 6, 2020

中文说明:

语法格式:
{% folding 参数(可选), 标题 %}

{% endfolding %}

参数列表:
参数位置可以填写颜色和状态,多个参数用空格隔开。
颜色:blue, cyan, green, yellow, red
状态:状态填写 open 代表默认打开。

示例写法:
{% folding 查看图片测试 %}

{% endfolding %}

{% folding cyan open, 查看默认打开的折叠框 %}

这是一个默认打开的折叠框。

{% endfolding %}

{% folding green, 查看代码测试 %}

{% endfolding %}

{% folding yellow, 查看列表测试 %}

  • haha
  • hehe

{% endfolding %}

{% folding red, 查看嵌套测试 %}

{% folding blue, 查看嵌套测试2 %}

{% folding 查看嵌套测试3 %}

hahaha

{% endfolding %}

{% endfolding %}

{% endfolding %}


English description:

Grammatical format:
{% folding Parameters (optional), title %}

{% endfolding %}

Parameter list:
The parameter position can be filled with color and status, and multiple parameters are separated by spaces.
Color:blue, cyan, green, yellow, red
State:Fill in "open" to indicate that it is opened by default.

Example writing:
{% folding View picture test %}

{% endfolding %}

{% folding cyan open, View the default open fold box %}

This is a default open fold box.

{% endfolding %}

{% folding green, View code test %}

{% endfolding %}

{% folding yellow, View list test %}

  • haha
  • hehe

{% endfolding %}

{% folding red, View nested test %}

{% folding blue, View nested test2 %}

{% folding View nested test3 %}

hahaha

{% endfolding %}

{% endfolding %}

{% endfolding %}

@welcome
Copy link

welcome bot commented May 6, 2020

Thanks so much for opening your first PR here!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -0,0 +1,170 @@
// gap
$gap = 16px // base gap
$gap-h2 = 48px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The font size is recommended to use rem

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

px与rem的区别在于,当父级的字体大小改变时,是否发生改变(简单的理解为是否需要随文章字体大小而改变)

你这里用px,确定h2~h4这些标题,不需要随文章字体大小而改变么?

@jiangtj
Copy link
Member

jiangtj commented May 11, 2020

你能修改你的PR名称与描述为英文么,为了能让更多的人能看懂
Can you change your PR name and description to English so that more people can understand it

@XuxuGood
Copy link
Author

我已经提交新的styl代码,并且将pr改为中英文说明了,有翻译不对的地方请谅解。
I have submitted the new styl code and changed PR to Chinese and English. Please understand if there is any translation error.

@XuxuGood
Copy link
Author

我已提交最新代码希望可以采纳谢谢啦

Comment on lines 3 to 17
// Usage:
// {% folding 参数(可选), 标题 %}
//
// ![](https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg)
//
// {% endfolding %}
// 颜色: blue, cyan, green, yellow, red
// 状态: 状态填写 open 代表默认打开。

// 举例:
// {% folding cyan open, 查看默认打开的折叠框 %}
//
// 这是一个默认打开的折叠框。
//
// {% endfolding %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Usage:
// {% folding 参数(可选), 标题 %}
//
// ![](https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg)
//
// {% endfolding %}
// 颜色: blue, cyan, green, yellow, red
// 状态: 状态填写 open 代表默认打开。
// 举例:
// {% folding cyan open, 查看默认打开的折叠框 %}
//
// 这是一个默认打开的折叠框。
//
// {% endfolding %}
/**
* Usage:
* {% folding [args], title %}
* content
* {% endfolding %}
*
* args:
* - color: blue, cyan, green, yellow, red
* - status: open # means open by default
*
* example:
* {% folding cyan open, view the default folding box %}
* This is a folding box that opens by default
* {% endfolding %}
*/

Comment on lines 6 to 7
$fd-gap-paragraph = 1rem // 区块间距
$fd-gap-row = .5rem // 行间距
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$fd-gap-paragraph = 1rem // 区块间距
$fd-gap-row = .5rem // 行间距
$fd-gap-paragraph = 1rem // block spacing
$fd-gap-row = .5rem // line spacing

@jiangtj jiangtj changed the title 折叠式容器 Add folding tag May 12, 2020
@XuxuGood
Copy link
Author

$fd-gap 这个padding我觉得使用px即可,无需使用rem,h2~h4那个我删掉了,没用上。新的代码我已经按照您的意见修改提交。谢谢。

@XuxuGood
Copy link
Author

是否采纳还希望您能给个回复谢谢

@maihm6
Copy link

maihm6 commented Mar 2, 2023

中文说明:

语法格式: {% folding 参数(可选), 标题 %}

{% endfolding %}

参数列表: 参数位置可以填写颜色和状态,多个参数用空格隔开。 颜色:blue, cyan, green, yellow, red 状态:状态填写 open 代表默认打开。

示例写法: {% folding 查看图片测试 %}

{% endfolding %}

{% folding cyan open, 查看默认打开的折叠框 %}

这是一个默认打开的折叠框。

{% endfolding %}

{% folding green, 查看代码测试 %}

{% endfolding %}

{% folding yellow, 查看列表测试 %}

  • haha
  • hehe

{% endfolding %}

{% folding red, 查看嵌套测试 %}

{% folding blue, 查看嵌套测试2 %}

{% folding 查看嵌套测试3 %}

hahaha

{% endfolding %}

{% endfolding %}

{% endfolding %}

English description:

Grammatical format: {% folding Parameters (optional), title %}

{% endfolding %}

Parameter list: The parameter position can be filled with color and status, and multiple parameters are separated by spaces. Color:blue, cyan, green, yellow, red State:Fill in "open" to indicate that it is opened by default.

Example writing: {% folding View picture test %}

{% endfolding %}

{% folding cyan open, View the default open fold box %}

This is a default open fold box.

{% endfolding %}

{% folding green, View code test %}

{% endfolding %}

{% folding yellow, View list test %}

  • haha
  • hehe

{% endfolding %}

{% folding red, View nested test %}

{% folding blue, View nested test2 %}

{% folding View nested test3 %}

hahaha

{% endfolding %}

{% endfolding %}

{% endfolding %}

为什么我的路径source/css/_common/scaffolding/tags/下没有tags.styl文件呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants