Jump to content

Вопрос по блоку "Объявления"


vold57
 Share

Recommended Posts

Как выделить визуально блок "Объявления", который показывается на каждой странице над всеми форумами? Речь о цвете и размере шрифта, цвете фона, рамке.

 

scrin-objavlen.jpg

Edited by vold57
Link to comment
Share on other sites

Открыть шаблон core > front > widgets > announcements и заменить весь код на:

<div class='announcementBlock'>
<h3 class='ipsType_reset ipsWidget_title'>{lang="block_announcements"}</h3>
<div class='ipsWidget_inner'>
	{{if !empty( $announcements ) }}
		<ul class='ipsList_reset ipsPad'>
			{{foreach $announcements as $announcement}}
				<li class='ipsPhotoPanel ipsPhotoPanel_tiny cAnnouncement ipsClearfix'>
					{template="userPhoto" group="global" app="core" params="\IPS\Member::load( $announcement->member_id ), 'tiny'"}
					<div>
						{{if $orientation == 'vertical'}}
							<h4 class='ipsType_large ipsType_reset'>
								<span class='ipsType_break ipsContained'>
									<a href='{url="app=core&module=system&controller=announcement&id={$announcement->id}" seoTemplate="announcement" seoTitle="$announcement->seo_title"}' class='ipsTruncate ipsTruncate_line'>{wordbreak="$announcement->title"}</a>
								</span>
							</h4>
							{{if $announcement->start}}<span class='ipsType_light'>{datetime="$announcement->start" dateonly="true"}</span>{{endif}}
							<br><br>
						{{else}}
							<h4 class='ipsType_large ipsType_reset'>
								<a href='{url="app=core&module=system&controller=announcement&id={$announcement->id}" seoTemplate="announcement" seoTitle="$announcement->seo_title"}'>{$announcement->title}</a>{{if $announcement->start}} &nbsp;&nbsp;<span class='ipsType_light ipsType_medium ipsType_unbold'>{datetime="$announcement->start" dateonly="true"}</span>{{endif}}
							</h4>							
						{{endif}}						
						<div class='ipsType_medium ipsType_textBlock ipsType_richText ipsContained' data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='{{if $orientation == 'vertical'}}6 lines{{else}}2 lines{{endif}}' data-ipsTruncate-watch='false'>
							{$announcement->truncated( true )|raw}
						</div>
					</div>
				</li>
			{{endforeach}}
		</ul>
	{{else}}
		<div class='ipsPad'>
			<p class='ipsType_reset'>{lang="no_announcements"}</p>
		</div>
	{{endif}}
</div>
</div>

Теперь в custom.css можно стилизовать блок как угодно, например:

.announcementBlock > h3 {color:blue}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using our site you agree to our Privacy Policy