Sharepoint Foundation 2010: hide ribbon completely - sharepoint

I am trying to style the master page in Sharepoint Foundation 2010. I"m using the nightandday master and styles.
The design has no ribbon and I just need to turn it off. Just plain old off. When I set the ribbon div to display: none, the entire top banner disappears.
I'm not a sharepoint dev and am lost in general. Is there an easy way to just hide/get rid of the ribbon? Nothing fancy about permissions required--just needs to be always gone.

The CSS classes you want to look at are;
<style type="text/css">
div#s4-ribbonrow.s4-pr.s4-ribbonrowhidetitle { height:43px !important }
/*.ms-cui-ribbon { display:none; }*/
.s4-ribbonrowhidetitle s4-notdlg noindex { height: 43px !important; }
.s4-title h1 a,.s4-title h2 a,.s4-title h2 { font-size: small; }
.ms-pagetitleareaframe table { background: none; }
#s4-leftpanel-content { display:none !important; }
#s4-titlerowhidetitle { display:none !important; }
.s4-ca { margin-left:0px !important; margin-right:0px !important; }
</style>

You should be able to use the information in this article to get you started.
http://www.endusersharepoint.com/2010/11/09/hiding-the-sharepoint-2010-ribbon-from-anonymous-users/

In case someone has been struggling with this issue. Hiding the Ribbon may cause some further issues (http://social.msdn.microsoft.com/Forums/en-US/9422aa0f-5010-4691-a0ab-25e7aca6b478/issue-with-div-s4workspace-and-scroll-bar)
Especially if you will include your own header and hide the Ribbon.
A quick workaround is using css. #s4-workspace will still receive the correct height & scrollbar won't be an issue as well as the ribbon will be hidden.:
body #s4-ribbonrow {
height: 0px !important;
min-height: 0px !important;
}

As documented in the linked page of knight0323's answer, the ribbon can be hidden by editing v4.master and wrapping the ribbon div with <SharePoint:SPSecurityTrimmedControl/>:
<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
<!-- Ribbon code appears here... -->
</div>
</SharePoint:SPSecurityTrimmedControl>
Unfortunately on my system this has a side-effect where the page's scroll-bar starts misbehaving. This appears to be a result of a dependency between the ribbon and the s4-workspace div. So to resolve this I moved <SharePoint:SPSecurityTrimmedControl/> in from the ribbon div to wrap the <div id="s4-ribboncont"> and added the following markup near the top of v4.master:
<style type="text/css">
#s4-ribbonrow { display: none; }
</style>
<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
<style type="text/css">
#s4-ribbonrow { display: block; }
</style>
</SharePoint:SPSecurityTrimmedControl>
The effect of this is that the ribbon is hidden by default but sufficient markup remains in the DOM so the page continues to behave correctly. For administrators, the ribbon is displayed normally.

In case anybody else is struggling with this, here are full instructions to do this without breaking the scroll bar or losing the title bar area, or any other oddities:
Hiding a Sharepoint 2010 ribbon that does not lose the titlebar area

Related

How to modify font-size for docsify prismjs code blocks?

Docsify uses prismjs to syntax highlighting. I have tried to insert styles in the index.html but nothing is taking effect (I can modify the font-size with effect in chrome dev tools)
Have tried something like this.
<style>
code[class="lang-python"] {
font-size: 0.5rem;
}
</style>
</head>
See here for the docsify doc of syntax highlighting. I think this should just be direct itnerfacing with prismjs unless docsify is doing something else there.
https://docsify.js.org/#/language-highlight?id=language-highlighting
you can use
<style>
code[class="lang-python"] {
font-size: 0.5rem !important;
}
</style>

Azure B2C Page Customization - Use hypertext links instead of buttons for ClaimsProviderSelection

I will like to replace ClaimProviderSelection buttons with just hypertext links. How can I go about this? I have taken a look a sample css (I am not a content developer) but it seems the part I am interested in is what B2C merges with between the <div id="api"></div> elements.
Please help.
B2C injects its HTML into the <div id="api"></div> element on the page layout template. Those buttons will all have the accountButton class so can be identified with the CSS selector #api button.accountButton.
If you're already using custom page templates then you should just be able to update your CSS to target those button elements and remove all of the default button styling, similar to this:
#api button.accountButton
{
background: none;
color: black;
border: none;
display: inline-block;
padding: 0;
margin: 0;
text-decoration: underline;
}
If you're not already using custom page layout templates then that should be your first step. There's guidance in the Microsoft Docs about how to do that both if you're using user flows and custom policies.

Editable spreadsheet control in a webpage

I am trying to place an editable spreadsheet control in a webpage without the menus and toolbars. I saw the postings about this and the last one said to use Google Docs spreadsheet and then choose Publish. If you use "?widget=true&headers=false" then the menus and toolbars will be removed.
This works great. The only problem is the data is not editable! It's a static spreadsheet. Is there a way to get the google spreadsheet control in a web page without menus and toolbars but make it editable?
I simply put the spreadsheet control inside a div and used the div to cover up the tool bars and scroll bars, etc. Worked great.
Here is the html:
<div id='spreadsheet' style="position:absolute; top: 900px; left: 3px; width: 1058px; height: 350px;overflow: hidden">
<iframe style="position:relative; top: -143px; left: -48px; width: 1140px; height: 650px;" src="https://docs.google.com/spreadsheets/d/1zt7JNkuqYKGKxRXSTtgjWeUFnCxRjSLB0UKs1oJk6PY/edit#gid=1047354991?widget=true&headers=false" width="600" height="600"></iframe>
</div>

How to use a different jQuery theme for a particular area?

I am currently doing the menu of a web application and I would like to use a different theme for that menu from the theme I use for the rest of the application.
I use PrimeFaces' default theme, though it could change later, and a custom theme for the menu, that I made with the jQuery theme roller (http://jqueryui.com/themeroller)
I would like to apply this theme on the main menu only, which is defined in a CSS file :
#top {
position: relative;
background-color: #333367;
color: white;
padding: 2px;
margin: 0px 0px 2px 0px;
max-height: 60px;}
I can apply the custom theme to the entire application using
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>custom-theme</param-value>
</context-param>
But it isn't applied to a particular area
The menu is defined here in my template :
<div id="top">
<ui:insert name="menu">
<ui:include src="../snippets/menu.xhtml"/>
</ui:insert>
</div>
Does anyone has a suggestion to use the custom theme only for the menu?
Thanks
You're really looking to combine two themes into one (or to partially combine two themes). You can't do this just with the themeroller, but you could extract the relevant parts of your custom theme and add #top to the selectors. So where the generated theme might have
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
...
You'd edit it to be
#top .ui-state-default a, #top .ui-state-default a:link, #top .ui-state-default a:visited {
...
Potentially a lot of work and not very efficient, but the way jQuery UI themes are set up, they apply the same styling to all the elements

Best practices when building JSF applications that produce elegant user experiences

I'm using PrimaFaces with Mojarra implementation for my JSF applications. When I put together the application I use company/app logos and the primefaces widgets (the widgets themselves look great!) which have the jQuery look and feel. The issue is that the applications end up looking very similar with a somewhat box type appearance - text boxes, datatables etc., The look and feel is nowhere compared to a handcoded by a html/css designer/developer.
When you develop enterprise JSF applications what are some of the best practices you use to ensure a user-friendly good looking ui?
I'm not exactly sure what you are looking for but there is a tradeoff between speed of development and appearance. That said, in our shop we use PrimeFaces and have developers who make the page "work". They are then followed on by xhtml/css designers who clean up the appearance of the page and controls. If you haven't already, check out the styling section. There is quite a bit of flexibility in changing the appearance of controls. Of course they are still layered, pre-defined controls.
Edit: You can style individual parts of your controls using css. So for example here we change the appearance of the title bar:
.bottomViewItem .ui-panel-titlebar{
background: none;
border: none;
box-shadow: none;
padding: 5px;
margin: 0.1em 16px 0.2em 0;
}
And here we change the title appearance:
.bottomViewItem .ui-panel-titlebar span.ui-panel-title{
color: #E27C4C !important;
font-family: Rockwell, Georgia, Arial !important;
font-size: 18px !important;
margin: 0.1em 16px 0.2em 0;
text-shadow: none;
}

Resources