サイドバーに「Similar Content」ブロックを持つIPSuite 4.1.11があります。 herePHPコード内のテキストのスタイルと色を変更する方法
を見つけることができますChameleonテーマを使用して イムは、私はCSSでそれをスタイルしたかったが、私は著者名のスタイルを変更傾けるstuck-ました。そして、私は意味する - 作者の名前。 私はスタイル名やその他のテキストに成功しましたが、著者名だけを色付けしたいと思います。ここで
は、ブロックの画像である:ここで
は私が変更したいものです。
は今ここにその著者名の関連コードがあります:
{{endif}}
<a href="{$topic->url()->setQueryString('do', 'getNewComment')}" title='{lang="view_this_topic" sprintf="$topic->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$topic->title"}</a>
<br>
<p class='ipsType_reset ipsType_medium ipsType_blendLinks'>
<span>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"}</span>
<span class='ipsType_light'>{lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts($topic->mapped('date'))->html()"}</span>
</p>
</div>
</li>
{{endforeach}}
ここでは、全 "TopicFeedブロック" のコードです:
.ipstlight_auther {font-weight: bold; color:red;}
をしてから変更:
<span>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"}</span>
に私が言うipsuiteにCSSの用語を挿入
{{if !empty($topics) }}
<h3 class='ipsWidget_title ipsType_reset'>{$title}</h3>
{{if $orientation == 'vertical'}}
<div class='ipsPad_half ipsWidget_inner'>
<ul class='ipsDataList ipsDataList_reducedSpacing'>
{{foreach $topics as $topic}}
<li class='ipsDataItem{{if $topic->unread()}} ipsDataItem_unread{{endif}}{{if $topic->hidden()}} ipsModerated{{endif}}'>
<div class='ipsDataItem_icon ipsPos_top'>
{template="userPhoto" group="global" app="core" params="$topic->author(), 'tiny'"}
</div>
<div class='ipsDataItem_main'>
<div class="ipsCommentCount ipsPos_right {{if ($topic->posts - 1) === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="replies_number" pluralize="$topic->posts - 1"}'>{expression="$topic->posts - 1"}</div>
{{if $topic->mapped('featured') || $topic->hidden() === -1 || $topic->hidden() === 1}}
<span>
{{if $topic->hidden() === -1}}
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$topic->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
{{elseif $topic->hidden() === 1}}
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
{{endif}}
{{if $topic->mapped('featured')}}
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
{{endif}}
</span>
{{endif}}
<a href="{$topic->url()->setQueryString('do', 'getNewComment')}" title='{lang="view_this_topic" sprintf="$topic->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$topic->title"}</a>
<br>
<p class='ipsType_reset ipsType_medium ipsType_blendLinks'>
<span>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"}</span>
<span class='ipsType_light'>{lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts($topic->mapped('date'))->html()"}</span>
</p>
</div>
</li>
{{endforeach}}
</ul>
</div>
{{else}}
<div class='ipsWidget_inner'>
<ul class='ipsDataList'>
{{foreach $topics as $topic}}
{template="row" group="global" app="forums" location="front" params="NULL, NULL, $topic, FALSE"}
{{endforeach}}
</ul>
</div>
{{endif}}
{{endif}}
:
<span class='ipstlight_auther'>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"}</span>
かへ:
<span>{lang="byline_nodate" <span class='ipstlight_auther'>htmlsprintf="$topic->author()->link()"}</span></span>
しかし、成功しませんでした。
何が欠けていますか?
EDIT:
私はこの得た "spencerlarry" 最初のCSSの回答を使用してみてください!
とするとき、私はを追加する重要。は、それぞれの値の後に私が得たもの:
なぜそのようなその演技?あなたのCSSに以下を追加
Dosentの仕事。下の主な質問の上の詳細(編集中)を参照してください。 – StackBuck
これはおそらく今働くでしょう。私の最初の答えは両方の 'span'要素を選択します。この方法では最初のものだけが選択されます。 –