To implement the header and footer branding assets on your site, you will need to do two things:
- Point to the brand.css stylesheet
- Include the header-*.html and footer.html markup elements on your site's pages
You may not include tools, social media icons, other links, or anything else in the header, footer and search branding assets.
Making alterations to the brand assets
The header, footer, and search brand assets must be implemented as is unless search is a primary function of your site.
If that is the case on your site, you may make limited alterations. No other alterations are allowed.
Search
The search in the branding bar is optional. For example, if your site doesn't need search, or if your site includes the Google Programmable Search function within the primary content area of your site, you can remove the search functionality by simply not including the search asset and associated script.
How to implement Google Programmable Search on your site
To implement the Google Programmable Search assets on your site, you must include a placeholder for rendering the search form in the site header section and initialization for Google Programmable Search.
The elements needed for search implementation are:
- search.css
- search.js
- search.html
Search initialization
The search module can be initialized using following code.
This code can be included in a local file, inline inside the $(document).ready
block, or as a standalone script inside the document without being wrapped inside the $(document).ready
block.
var IUSearch = window.IUSearch || {};
var searchOptions = {
CX: {
site: 'xxxx:xxxx',
all: 'xxxx:xxxx'
},
wrapClass: 'row pad',
searchBoxIDs: ['search', 'off-canvas-search']
}
IUSearch.init && IUSearch.init( searchOptions );
The search.js file should be included in the document prior to initialization of search code shown above.
Search functions in the search.js file implement the Google Programmable Search Engine functions.
As shown below, CX values for both the site and campus can be passed during the search initialization. If your site doesn't have a CX ID, refer to the Google search engine documentation to find out how to create one.
Google Search CX values for a few of IU’s campusesCampus name | CX |
---|
IU | 016278320858612601979:ddl1l9og1w8 |
IU Bloomington | 016278320858612601979:w_w23ggyftu |
IU Indianapolis | 016278320858612601979:pwcza8pis6k |
IU Fort Wayne | 014162612540646926707:vjfmkkqguyo |
Search results page
Create a search results page and include the following markup. Remember to replace * with your campus name.
Please note that this will allow you to toggle between search results for your site and your campus.