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

可否增加内容栏自定义宽度功能 #434

Closed
iarchean opened this issue Mar 17, 2019 · 6 comments
Closed

可否增加内容栏自定义宽度功能 #434

iarchean opened this issue Mar 17, 2019 · 6 comments
Labels
feature:core Feature request that affects layout, styles, scripts, etc.

Comments

@iarchean
Copy link

作者你好,我非常喜欢你制作的主题,在使用了一段时间之后,我基本上已经熟练掌握了主题的各项功能,只是个人认为中间内容栏稍微有点窄,在尝试自己修改未果后,想要请你帮忙,不知可否增加自定义宽度功能?非常感谢!

Sent with GitHawk

@ppoffice ppoffice added the feature:core Feature request that affects layout, styles, scripts, etc. label Mar 17, 2019
@lxqxsyu
Copy link

lxqxsyu commented Jun 4, 2019

这个是12格布局,可以修改source/css/style.styl文件中的media样式如下:

@media screen and (min-width: screen-widescreen)
    .is-1-column .container
    .is-2-column .container
        max-width: screen-widescreen - 2 * gap
        width: screen-widescreen - 2 * gap
@media screen and (min-width: screen-fullhd)
    .is-2-column .container
        max-width: screen-fullhd - 2 * gap
        width: screen-fullhd - 2 * gap
    .is-1-column .container
        max-width: screen-desktop - 2 * gap
        width: screen-desktop - 2 * gap

然后如果按照 #379的方式改为两栏后,可以修改一下layout/layout.ejslayout/common/widget.ejs的文件内容如下:

    <% function main_column_class() {
        switch (column_count()) {
            case 1:
                return 'is-12';
            case 2:
                return 'is-8-tablet is-9-desktop is-9-widescreen';
            case 3:
                return 'is-8-tablet is-8-desktop is-6-widescreen'
        }
        return '';
    } %>
<% function side_column_class() {
    switch (column_count()) {
        case 2:
            return 'is-4-tablet is-3-desktop is-3-widescreen';
        case 3:
            return 'is-4-tablet is-4-desktop is-3-widescreen';
    }
    return '';
} %>

要注意的是对应column的数量和是12,如果是三列就是三列的和,如果是两列就是两列的和。

更改后的效果查看:http://dp2px.com

@lxqxsyu
Copy link

lxqxsyu commented Jun 7, 2019

这个是12格布局,可以修改source/css/style.styl文件中的media样式如下:

@media screen and (min-width: screen-widescreen)
    .is-1-column .container
    .is-2-column .container
        max-width: screen-widescreen - 2 * gap
        width: screen-widescreen - 2 * gap
@media screen and (min-width: screen-fullhd)
    .is-2-column .container
        max-width: screen-fullhd - 2 * gap
        width: screen-fullhd - 2 * gap
    .is-1-column .container
        max-width: screen-desktop - 2 * gap
        width: screen-desktop - 2 * gap

然后如果按照 #379的方式改为两栏后,可以修改一下layout/layout.ejslayout/common/widget.ejs的文件内容如下:

    <% function main_column_class() {
        switch (column_count()) {
            case 1:
                return 'is-12';
            case 2:
                return 'is-8-tablet is-9-desktop is-9-widescreen';
            case 3:
                return 'is-8-tablet is-8-desktop is-6-widescreen'
        }
        return '';
    } %>
<% function side_column_class() {
    switch (column_count()) {
        case 2:
            return 'is-4-tablet is-3-desktop is-3-widescreen';
        case 3:
            return 'is-4-tablet is-4-desktop is-3-widescreen';
    }
    return '';
} %>

要注意的是对应column的数量和是12,如果是三列就是三列的和,如果是两列就是两列的和。

更改后的效果查看:http://dp2px.com

主题修改我总结了一篇文章:https://dp2px.com/2019/06/04/icarus-theme/

@molu-ggg
Copy link

不对啊,没有变化

@raighneweng
Copy link

如果缩小内容左右与网页边缘的空白大小。

@JonathanTW1990
Copy link

請問怎麼控制多少文字出現 read more? tks

@removeif
Copy link
Contributor

removeif commented Mar 5, 2020

請問怎麼控制多少文字出現 read more? tks

read more 是自己灵活放置相应的more标签,自己觉得多少字之后合适就放在.md对应位置!

如下显示:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:core Feature request that affects layout, styles, scripts, etc.
Projects
None yet
Development

No branches or pull requests

7 participants