Instantly share code, notes, and snippets.

James Martin jamesnotjim

View GitHub Profile
@jamesnotjim
jamesnotjim / hidequicklaunch.css
Last active Dec 1, 2016
Hides the Quick Launch on a SharePoint 2013 or O365 Team Site or Blog site
View hidequicklaunch.css
<style type="text/css">
#sideNavBox {
display: none;
}
#contentBox {
margin-left: 36px;
margin-right: 36px;
}
.ms-fullscreenmode #contentBox
{
@jamesnotjim
jamesnotjim / maxwidth.css
Created Aug 19, 2016
SharePoint Max-Width
View maxwidth.css
<style type="text/css">
#contentRow {
max-width: 1400px !important;
}
</style>
@jamesnotjim
jamesnotjim / VimeoFashionVictim.css
Last active Aug 22, 2016
Some CSS to improve the look of the Vimeo Fashion Victim portfolio template
View VimeoFashionVictim.css
@import 'https://fonts.googleapis.com/css?family=Open+Sans';
h1 a, h2.video_title, p.first {
font-family: 'Open Sans', sans-serif;
text-transform: capitalize;
font-style: normal;
}
@jamesnotjim
jamesnotjim / viewTitle.html
Created Aug 30, 2016
In SharePoint 2013, replace a generic page title with the the document.title, which includes the view name
View viewTitle.html
<script type="text/javascript">
// Replace default page title with document.title, which is based on view name
document.getElementById("DeltaPlaceHolderPageTitleInTitleArea").innerHTML = document.title;
</script>
@jamesnotjim
jamesnotjim / forwarder.html
Created Sep 6, 2016
Ye Olde Meta Refresh Forwarder
View forwarder.html
<meta http-equiv="refresh" content="3;url=http://example.com">
@jamesnotjim
jamesnotjim / hideByLine.css
Last active Apr 18, 2017
Hide the by-line on SharePoint blog sites
View hideByLine.css
<style type="text/css">
/* Hide by-line author and time */
ul li div div span span .ms-subtleLink {
visibility: hidden;
display: none;
}
/* Uncomment to Hide entire by-line
ul li .ms-textSmall span {
visibility: hidden;
display: none;
@jamesnotjim
jamesnotjim / highlightImageOnHover.html
Created Dec 2, 2016
A simple image opacity effect for use on images as links.
View highlightImageOnHover.html
<!-- Wrap image in a div with class="brightness" -->
<div class="brightness">
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png">
</div>
<!-- Add CSS to create the opacity effect -->
<style type="text/css">
.brightness {
background-color: white;
display: inline-block;
@jamesnotjim
jamesnotjim / persistSharePointOverlayCalendarColor.css
Last active Feb 27, 2017
Persist colors for Calendars in View
View persistSharePointOverlayCalendarColor.css
<style type="text/css">
/* Persist the calendar item color for .ms-acal.color1 (dark teal) */
.ms-acal-item {
background-color: #00485B;
}
</style>
<style type="text/css">
/* Persist the calendar item color for .ms-acal.color2 (blue) */
.ms-acal-item {
@jamesnotjim
jamesnotjim / hideQuickLaunchBelow1024px.css
Last active Feb 28, 2017
Hide SharePoint QuickLaunch when below 1024px
View hideQuickLaunchBelow1024px.css
<style type="text/css">
@media screen and (max-width: 1024px){
#sideNavBox {
display: none;
}
#contentBox {
margin-left: 36px;
margin-right: 36px;
}
.ms-fullscreenmode #contentBox
@jamesnotjim
jamesnotjim / maxWidthForResponsiveImages.css
Created Apr 12, 2017
Keep responsive images from scaling up beyond a reasonable limit.
View maxWidthForResponsiveImages.css
<style type="text/css">
.img-responsive {
max-width: 800px;
};
</style>