【问题标题】:Styling tumblr reblog comments造型 tumblr 转发评论
【发布时间】:2014-09-09 04:49:33
【问题描述】:

我到处寻找这个,没有运气!我希望你们能帮助我:)

我正在制作一个自定义 tumblr 主题,但我不喜欢 tumblr 以表格方式显示其帖子 cmets。我的意思具体是这样的:

在 tumblr 主题的代码中,实际上并没有具体调用这些 cmets 的渲染,大部分时间它只是帖子正文、图片标题等的一部分。我知道字符串是呈现为块引号,因此通过为此创建自定义 css,我可以稍微改变外观。

但我想要做的主要事情是删除嵌套,以便添加评论的人的姓名始终由评论本身组成,并且从上到下,从最旧到最新。例如,我希望将上述转发列表呈现为:

    unicornhairs: her suit tho omg
    bakinginthebatcave: I love wedding photos of strangers. I don't even know you but I'm so happy that you're happy and you look so lovely and it's so wonderful and affirming somehow. I don't know. Wedding photos make me happy. 
    rainbowrowell: Does her suit have stripes down the inside of the legs? REVERSE HAN SOLO.
    bookoisseur: oh i love this
I frickin love these kinds of weddings <3

这种事情可能吗?我该怎么做?

【问题讨论】:

  • 是的,这是可能的,我在我的博客上做过,但我必须继续添加代码。希望稍后我会发布答案。
  • 如果你在谈论仪表板,你无能为力,但在你自己的 tumblr 上你可以控制它。

标签: css customization tumblr tumblr-themes


【解决方案1】:

为了添加到我的 cmets,前段时间我写了一些 css,它重置了一些默认的 tumblr 样式用于转发。这些通常是缩进的块引用元素。

这是我的 CSS:

#header p, 
.post .sidebar p, 
.post h2, 
.post h3, 
.post strong, 
.post b, 
.post small, 
.post p, 
.post blockquote, 
.post ul, 
.post ol, 
.post .quote, 
.post .quote .quote, 
.post .conversation ul li, 
.description, 
 #footer .footer, 
 #footer .description p, 
 #footer h2 {
    font-size: 12px;
    font-weight: normal;
    line-height: auto;
}

.post p, 
.post blockquote, 
.post ul, 
.post ol {
    border-left: none;
    padding: 0;
    margin: 0;
}

这可能看起来有点矫枉过正(而且可能超出您的需要),但我发现当人们在 tumblr 上回复帖子或转发并添加 cmets 时,可以从另一个应用程序中剪切和粘贴将保留格式和 html 元素,所以我花了一些时间来识别变体然后重置它们,我不得不继续添加到这个 css 列表中。

这应该是一个好的开始。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-19
    • 2019-03-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-10
    • 2012-10-11
    相关资源
    最近更新 更多