Skip to content

Commit

Permalink
Notices: notices/site-notice -> components/notice
Browse files Browse the repository at this point in the history
Notices: notices/site-notice->components/notice in current-site

Notices: fix bottom margin in notices displayed in sidebar

So it matches previous design of site-notice class.

Notices: Remove unused css of site-notice

The component is no longer uses and will be removed shortly

Notices: Remove unused site-notice component
  • Loading branch information
artpi committed Dec 11, 2015
1 parent 733f1f3 commit 8c34746
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 60 deletions.
5 changes: 5 additions & 0 deletions client/components/notice/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,8 @@
background: rgba( 255, 255, 255, 0.2 );
}
}

// For site notices
.current-site.card .notice.is-compact {
margin-bottom: 0px
}
18 changes: 12 additions & 6 deletions client/my-sites/current-site/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ var React = require( 'react/addons' ),
var AllSites = require( 'my-sites/all-sites' ),
AddNewButton = require( 'components/add-new-button' ),
Card = require( 'components/card' ),
SiteNotice = require( 'notices/site-notice' ),
Notice = require( 'components/notice' ),
NoticeAction = require( 'components/notice/notice-action' ),
layoutFocus = require( 'lib/layout-focus' ),
Site = require( 'my-sites/site' ),
Gridicon = require( 'components/gridicon' ),
Expand Down Expand Up @@ -98,12 +99,17 @@ module.exports = React.createClass( {
}

return (
<SiteNotice status="is-info">
{ this.translate( 'The site redirects to {{a}}%(url)s{{/a}}', {
<Notice
showDismiss={ false }
isCompact={ true }
text={ this.translate( 'The site redirects to {{a}}%(url)s{{/a}}', {
args: { url: hostname },
components: { a: <a href={ href }/> }
} ) }
</SiteNotice>
components: { a: <a href={ site.URL }/> }
} ) }>
<NoticeAction href={ href }>
{ this.translate( 'Edit' ) }
</NoticeAction>
</Notice>
);
},

Expand Down
27 changes: 0 additions & 27 deletions client/notices/site-notice.jsx

This file was deleted.

27 changes: 0 additions & 27 deletions client/notices/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,3 @@
width: 100%;
display: block;
}

.site-notice {
display: block;
line-height: 1.8;
overflow: hidden;
padding: 8px 18px 8px 18px;
text-overflow: ellipsis;
color: $white;

a {
color: rgba( $white, 0.85 );
text-decoration: underline;
font-weight: 600;
}

&.is-info {
background-color: $blue-wordpress;
}

&.is-warning {
background-color: $alert-yellow;
}

&.is-error {
background-color: $alert-red;
}
}

0 comments on commit 8c34746

Please sign in to comment.