Showing posts with label Css. Show all posts
Showing posts with label Css. Show all posts

Friday, 13 November 2015

CSS to hide Social Controls

CSS to hide Social Controls

The Problem

The SharePoint Farm is not setup to serve Social content and either the links do not work or are simply not desired but removal permanently is not desired as there may be a time and place for these components in the future.

The Approach

Use CSS to hide the elements without blowing up the page layout. Maintain the possibility to integrate in isolated sites or for isolated users. Use the custom CSS file in site Assets (or where ever it has been added to the sites in general)

The Result

.ms-core-suiteLinkList {display: none} 
// hides all three elements

#ctl00_ctl55_ShellNewsfeed {display:none}
// hides the Newsfeed link
#ctl00_ctl55_ShellDocuments {display:none}
// hides the OneDrive link
#ctl00_ctl55_ShellSites {display:none}
// hides the Sites link

#site_follow_button {display:none}
// hides the follow button and star icon

Going Forward

Could use a JavaScript routine to check group membership of the current user and if in a specific group (or groups) to toggle element visibility.

Thursday, 12 November 2015

CSS to change SharePoint top left branding

CSS to change SharePoint top left branding

The Problem

OOTB sites have 'SharePoint' in the top left. This replaces it when used on a given site's custom css.

The Approach

Create or edit a file to use as the site css (in Site Assets or Scripts or something). Add the following and change the term. Save. Copy the document path.


Edit the site master settings to use the css file. 



View.

The Code

.ms-core-brandingText:after{
  content:"Baer's Shared Points";
}
.ms-core-brandingText{
  margin-left: -96px;
}

The Result


Going Forward

Maybe use javascript to automatically pull the site title into the text. Possibly replace the contents with traditional hyperlinked breadcrumbing.