Skip to content

Instantly share code, notes, and snippets.

View jamesnotjim's full-sized avatar

James Martin jamesnotjim

View GitHub Profile
@jamesnotjim
jamesnotjim / hidequicklaunch.css
Last active December 1, 2016 22:20
Hides the Quick Launch on a SharePoint 2013 or O365 Team Site or Blog site
<style type="text/css">
#sideNavBox {
display: none;
}
#contentBox {
margin-left: 36px;
margin-right: 36px;
}
.ms-fullscreenmode #contentBox
{
@jamesnotjim
jamesnotjim / maxwidth.css
Created August 19, 2016 15:58
SharePoint Max-Width
<style type="text/css">
#contentRow {
max-width: 1400px !important;
}
</style>
@jamesnotjim
jamesnotjim / VimeoFashionVictim.css
Last active August 22, 2016 15:46
Some CSS to improve the look of the Vimeo Fashion Victim portfolio template
@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 August 30, 2016 20:28
In SharePoint 2013, replace a generic page title with the the document.title, which includes the view name
<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 September 6, 2016 17:01
Ye Olde Meta Refresh Forwarder
<meta http-equiv="refresh" content="3;url=http://example.com">
@jamesnotjim
jamesnotjim / hideByLine.css
Last active April 18, 2017 20:38
Hide the by-line on SharePoint blog sites
<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 December 2, 2016 16:05
A simple image opacity effect for use on images as links.
<!-- 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 February 27, 2017 20:34
Persist colors for Calendars in View
<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 February 28, 2017 21:31
Hide SharePoint QuickLaunch when below 1024px
<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 April 12, 2017 19:23
Keep responsive images from scaling up beyond a reasonable limit.
<style type="text/css">
.img-responsive {
max-width: 800px;
};
</style>