Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tneumann9/UNL_Search
  • erasmussen2/UNL_Search
  • JSTUREK8/UNL_Search
  • rdee2/UNL_Search
  • dxg/UNL_Search
5 results
Show changes
Showing
with 343 additions and 202 deletions
define(["jquery","analytics"],function(a,b){"use strict";var c=null,d=400,e="#search_q",f="#searchform form",g="#search_wrapper",h="ppl_results",i="dept_results";window.pf_getUID=function(){return!0};var j=function(){this.storage={}};j.prototype.get=function(a){return this.storage[a]||void 0},j.prototype.save=function(a,b){return this.storage[a]=b,this};var k=function(b,c,d){this.peopleContainer="#"+c,this.deptContainer="#"+d,this._server=b||"https://directory.unl.edu",this._cache=new j,this._searchCanceled=!1,a(this.peopleContainer).on("click",".fn a",function(){"_blank"!==this.target&&(this.target="_blank")}),a(this.deptContainer).on("click",".fn a",function(){"_blank"!==this.target&&(this.target="_blank")})};k.prototype._render=function(b){this._searchCanceled||(a(this.peopleContainer).html(b),this._renderState("people",this.peopleContainer),a(this.deptContainer).html(b),this._renderState("dept",this.deptContainer))},k.prototype._renderState=function(b,c){var d,e,f=a(".results",a(c)),g=".departments";if(f.length){if("people"===b?(d=f.not(g),e=f.filter(g)):(d=f.filter(g),e=f.not(g)),!d.length&&(a(c).html("Sorry, no results could be found."),"people"===b)){var h=document.getElementsByClassName("dept-results-tab")[0];h&&(h.click(),h.blur())}e.hide()}},k.prototype.cancelSearch=function(){this._searchCanceled=!0,this._xhr&&this._xhr.abort()},k.prototype.execute=function(b){var c=this._cache.get(b),d=this;this._searchCanceled=!1,this._xhr&&this._xhr.abort(),c?this._render(c):this._xhr=a.get(this._server+"/service.php?q="+encodeURIComponent(b),function(a){d._cache.save(b,a),d._render(a)})},k.prototype.clearAllResults=function(){a(this.peopleContainer).empty(),a(this.deptContainer).empty()};var l=function(a,b){this.control=a,this.control.root=b};return l.prototype.setSearchCompleteCallback=function(a){this.complete_callback=a},l.prototype.setSearchStartingCallback=function(a){this.starting_callback=a},l.prototype.execute=function(a){this.starting_callback(this.control,null,a),this.control.execute(a),this.complete_callback(this.control)},{initialize:function(j,m){var n,o,p,q="",r=!1,s=function(a){var c=window.location,d=c.search.replace(/(?:(\?)|&)q=[^&]*(?:&|$)/,"$1"),e=[c.pathname,d||"?",d&&"?"!=d?"&":"","q=",encodeURIComponent(a)].join("");b.callTrackPageview(e),window.history.pushState&&window.history.pushState({query:a},"",e)},t=function(b){var c=a(b.root);a("img.gs-image",c).each(function(){this.alt||(this.alt=a(this).closest(".gsc-table-result").find(".gs-title").first().text())}),a("img.gcsc-branding-img-noclear",c).attr("alt","Google™"),setTimeout(function(){if(0==a(".gsc-table-result",c).length&&0==a(".gs-no-results-result",c).length&&0==a("#recaptcha-wrapper",c).length){var d=new FormData;d.set("error","Failed To Load"),fetch("/failCount.php",{method:"POST",body:d}),a(c).html("<p>We are having issues connecting to Google, please try again later.</p>")}if(a("#recaptcha-wrapper",c).length>0){var d=new FormData;d.set("error","Recaptcha"),fetch("/failCount.php",{method:"POST",body:d})}if(!r&&o&&b==o.control&&a(".gs-no-results-result",c).length){var e=document.getElementsByClassName("all-unl-tab")[0];return void(e&&(e.click(),e.blur()))}},1e3),r=!1},u=function(b,c){!1!==c&&s(b);try{n.execute(b),o.execute(b)}catch(d){t(n.control)}p.execute(b),a(g).fadeIn()},v=function(){n.cancelSearch(),o.cancelSearch(),p.cancelSearch(),a(g).fadeOut(),setTimeout(function(){n.clearAllResults(),o.clearAllResults(),p.clearAllResults()},d)},w=function(a,b,c){c!==q&&(s(c),p.execute(c))};p=new k(c,h,i),a(function(){var b=a(e),c=/^https?:\/\/.*\.google\.com$/,d=function(a){return!c.test(a)&&(a!=location.origin&&!/^chrome:/.test(a))},g=function(a,c){q!==a&&(q=a,b.val(a),a?u(a,c):v())},h={div:"unl_results",tag:"searchresults-only",attributes:{enableImageSearch:!1}};google.search.cse.element.render(h);var i=google.search.cse.element.getAllElements()["searchresults-only0"];if(window.googleSearchElement=i,n=new l(i,a("#unl_results")),n.setSearchStartingCallback(w),n.setSearchCompleteCallback(t),m){var k={div:"local_results",tag:"searchresults-only",attributes:{enableImageSearch:!1,as_sitesearch:m}};google.search.cse.element.render(k);var p=google.search.cse.element.getAllElements()["searchresults-only1"];window.localGoogleSearchElement=i,o=new l(p,a("#local_results")),o.setSearchStartingCallback(w),o.setSearchCompleteCallback(t)}a("form.gsc-search-box").remove(),a(f).submit(function(c){c.preventDefault();var d=a.trim(b.val());g(d)}),j&&g(j,!1),a(window).on("message",function(b){var c,e=b.originalEvent;d(e.origin)&&"string"==typeof e.data&&(c=a.trim(e.data),g(c))}),a(window).on("popstate",function(a){var b=a.originalEvent,c=j||"";b.state&&(c=b.state.query||""),g(c,!1)}),window.parent&&window.self!==window.top&&a(document).on("keydown",function(a){27===a.keyCode&&window.parent.postMessage("wdn.search.close","*")})})}}});
//# sourceMappingURL=search-tabs.min.js.map
\ No newline at end of file
{"version":3,"sources":["search-tabs.js"],"names":["define","$","analytics","directoryServer","transitionDelay","inputSel","formSel","wrapperMain","dirPeopleResults","dirDeptResults","window","pf_getUID","Cache","this","storage","prototype","get","key","undefined","save","value","Directory","server","peopleContainerId","deptContainerId","peopleContainer","deptContainer","_server","_cache","_searchCanceled","on","target","_render","data","html","_renderState","type","container","$showRes","$hideRes","$innerRes","depFilter","length","not","filter","dirTab","document","getElementsByClassName","click","blur","hide","cancelSearch","_xhr","abort","execute","q","cacheData","self","encodeURIComponent","clearAllResults","empty","GoogleSearcher","search_element","root_of_element","control","root","setSearchCompleteCallback","callback","complete_callback","setSearchStartingCallback","starting_callback","query","initialize","firstQ","localContext","unlGoogleSearch","localGoogleSearch","directorySearch","searchToggleLock","trackQuery","loc","location","qs","search","replace","page","pathname","join","callTrackPageview","history","pushState","queryComplete","$root","each","alt","closest","find","first","text","attr","setTimeout","FormData","set","fetch","method","body","allUNLTab","fullQuery","track","e","fadeIn","fullStop","fadeOut","queryStart","searcher","$q","googleOrigin","isValidOrigin","origin","test","passiveQuery","val","render_attrs","div","tag","attributes","enableImageSearch","google","cse","element","render","searchElement","getAllElements","googleSearchElement","render_attrs_local","as_sitesearch","localSearchElement","localGoogleSearchElement","remove","submit","preventDefault","trim","oEvent","originalEvent","state","parent","top","keyCode","postMessage"],"mappings":"AAAAA,QAAQ,SAAU,aAAc,SAAUC,EAAGC,GAC5C,YAGA,IAAIC,GAAkB,KAElBC,EAAkB,IAClBC,EAAW,YACXC,EAAU,mBACVC,EAAc,kBACdC,EAAmB,cACnBC,EAAiB,cAErBC,QAAOC,UAAY,WAClB,OAAO,EAIR,IAAIC,GAAQ,WACXC,KAAKC,WAENF,GAAMG,UAAUC,IAAM,SAASC,GAC9B,MAAOJ,MAAKC,QAAQG,QAAQC,IAE7BN,EAAMG,UAAUI,KAAO,SAASF,EAAKG,GAEpC,MADAP,MAAKC,QAAQG,GAAOG,EACbP,KAIR,IAAIQ,GAAY,SAASC,EAAQC,EAAmBC,GACnDX,KAAKY,gBAAkB,IAAMF,EAC7BV,KAAKa,cAAgB,IAAMF,EAC3BX,KAAKc,QAAUL,GAAU,4BACzBT,KAAKe,OAAS,GAAIhB,GAClBC,KAAKgB,iBAAkB,EAErB5B,EAAEY,KAAKY,iBAAiBK,GAAG,QAAS,QAAS,WACrB,WAAhBjB,KAAKkB,SACLlB,KAAKkB,OAAS,YAItB9B,EAAEY,KAAKa,eAAeI,GAAG,QAAS,QAAS,WACnB,WAAhBjB,KAAKkB,SACLlB,KAAKkB,OAAS,YAIzBV,GAAUN,UAAUiB,QAAU,SAASC,GAClCpB,KAAKgB,kBAIT5B,EAAEY,KAAKY,iBAAiBS,KAAKD,GAC7BpB,KAAKsB,aAAa,SAAUtB,KAAKY,iBAEjCxB,EAAEY,KAAKa,eAAeQ,KAAKD,GAC3BpB,KAAKsB,aAAa,OAAQtB,KAAKa,iBAEhCL,EAAUN,UAAUoB,aAAe,SAASC,EAAMC,GACjD,GACCC,GAAUC,EADPC,EAAY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ACCC,mBAAmB,EACnBS,cAAe7D,GAGjBqD,QAAO5C,OAAO6C,IAAIC,QAAQC,OAAOI,EACjC,IAAIE,GAAqBT,OAAO5C,OAAO6C,IAAIC,QAAQG,iBAAiB,sBACpE1H,QAAO+H,yBAA2BN,EAClCvD,EAAoB,GAAIf,GAAe2E,EAAoBvI,EAAE,mBAC7D2E,EAAkBP,0BAA0B4C,GAC5CrC,EAAkBV,0BAA0ByB,GAI7C1F,EAAE,uBAAuByI,SAGzBzI,EAAEK,GAASqI,OAAO,SAAS9B,GAC1BA,EAAE+B,gBACF,IAAIrF,GAAItD,EAAE4I,KAAK1B,EAAGM,MAClBD,GAAajE,KAIVkB,GACH+C,EAAa/C,GAAQ,GAItBxE,EAAES,QAAQoB,GAAG,UAAW,SAAS+E,GAChC,GAA8BtD,GAA1BuF,EAASjC,EAAEkC,aACV1B,GAAcyB,EAAOxB,SAQC,gBAAhBwB,GAAO7G,OAIlBsB,EAAItD,EAAE4I,KAAKC,EAAO7G,MAClBuF,EAAajE,MAGdtD,EAAES,QAAQoB,GAAG,WAAY,SAAS+E,GACjC,GAAIiC,GAASjC,EAAEkC,cACdxF,EAAIkB,GAAU,EAEXqE,GAAOE,QACVzF,EAAIuF,EAAOE,MAAMzE,OAAS,IAE3BiD,EAAajE,GAAG,KAIb7C,OAAOuI,QAAUvI,OAAO+C,OAAS/C,OAAOwI,KAC3CjJ,EAAE6C,UAAUhB,GAAG,UAAW,SAAS+E,GAChB,KAAdA,EAAEsC,SACLzI,OAAOuI,OAAOG,YAAY,mBAAoB","file":"search-tabs.min.js"}
\ No newline at end of file
...@@ -48,7 +48,15 @@ define(['jquery', 'analytics'], function ($, analytics) { ...@@ -48,7 +48,15 @@ define(['jquery', 'analytics'], function ($, analytics) {
this._viewState = 0; this._viewState = 0;
this._renderTo = cntSel; this._renderTo = cntSel;
}; $(function() {
$(cntSel).on('click', '.fn a', function() {
if (this.target !== '_blank') {
this.target = '_blank';
}
});
});
};
Directory.prototype._render = function(data) { Directory.prototype._render = function(data) {
if (this._searchCanceled) { if (this._searchCanceled) {
return; return;
...@@ -188,6 +196,24 @@ define(['jquery', 'analytics'], function ($, analytics) { ...@@ -188,6 +196,24 @@ define(['jquery', 'analytics'], function ($, analytics) {
$('img.gcsc-branding-img-noclear', $root).attr('alt', 'Google™'); $('img.gcsc-branding-img-noclear', $root).attr('alt', 'Google™');
setTimeout(function() { setTimeout(function() {
if ($('.gsc-result', $root).length == 0) {
var data = new FormData();
data.set("error", "No Results");
fetch("/failCount.php", {
method: "POST",
body: data
});
$($root).html('<p>We are having issues connecting to Google, please try again later.</p>');
}
if ($('#recaptcha-wrapper', $root).length > 0){
var data = new FormData();
data.set("error", "Recaptcha");
fetch("/failCount.php", {
method: "POST",
body: data
});
}
if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) { if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) {
$root.closest('.results-group').find('.result-tab li:last-child').click(); $root.closest('.results-group').find('.result-tab li:last-child').click();
return; return;
......
define(["jquery","analytics"],function(a,b){"use strict";var c=null,d=400,e="#search_q",f="#searchform form",g=".search-results",h=".google-results",i="statechange",j="#search_wrapper",k="#search_results",l="#directory_results",m="ppl_results";window.pf_getUID=function(){return!0};var n=function(){this.storage={}};n.prototype.get=function(a){return this.storage[a]||void 0},n.prototype.save=function(a,b){return this.storage[a]=b,this};var o=function(b,c){var d="#"+c;this._server=b||"https://directory.unl.edu",this._cache=new n,this._searchCanceled=!1,this._viewState=0,this._renderTo=d,a(function(){a(d).on("click",".fn a",function(){"_blank"!==this.target&&(this.target="_blank")})})};o.prototype._render=function(b){this._searchCanceled||(a(this._renderTo).html(b).addClass("active"),this._renderState(0))},o.prototype._renderState=function(b){var c,d,e=a(".results",a(this._renderTo)),f=".departments";if(e.length){if(e.slideUp(b),0===this._viewState?(c=e.not(f),d=1):(c=e.filter(f),d=0),!c.length&&void 0!==b)return void this.changeViewState(d);c.slideDown()}},o.prototype.cancelSearch=function(){this._searchCanceled=!0,this._xhr&&this._xhr.abort()},o.prototype.execute=function(b){var c=this._cache.get(b),d=this;this._searchCanceled=!1,this._xhr&&this._xhr.abort(),c?this._render(c):this._xhr=a.get(this._server+"/service.php?q="+encodeURIComponent(b),function(a){d._cache.save(b,a),d._render(a)})},o.prototype.changeViewState=function(b){if(this._viewState!=b){var c=this._viewState;this._viewState=b,this._renderState(),a(this._renderTo).trigger(i,[b,c])}},o.prototype.clearAllResults=function(){a(this._renderTo).empty()};var p=function(a,b){this.control=a,this.control.root=b};return p.prototype.setSearchCompleteCallback=function(a){this.complete_callback=a},p.prototype.setSearchStartingCallback=function(a){this.starting_callback=a},p.prototype.execute=function(a){this.starting_callback(this.control,null,a),this.control.execute(a),this.complete_callback(this.control)},{initialize:function(n,q){var r,s,t,u,v="",w="active",x=!1,y=function(a){var c=window.location,d=c.search.replace(/(?:(\?)|&)q=[^&]*(?:&|$)/,"$1"),e=[c.pathname,d||"?",d&&"?"!=d?"&":"","q=",encodeURIComponent(a)].join("");b.callTrackPageview(e),window.history.pushState&&window.history.pushState({query:a},"",e)},z=function(b){var c=a(b.root);a("img.gs-image",c).each(function(){this.alt||(this.alt=a(this).closest(".gsc-table-result").find(".gs-title").first().text())}),a("img.gcsc-branding-img-noclear",c).attr("alt","Google™"),setTimeout(function(){if(0==a(".gsc-result",c).length){var d=new FormData;d.set("error","No Results"),fetch("/failCount.php",{method:"POST",body:d}),a(c).html("<p>We are having issues connecting to Google, please try again later.</p>")}if(a("#recaptcha-wrapper",c).length>0){var d=new FormData;d.set("error","Recaptcha"),fetch("/failCount.php",{method:"POST",body:d})}if(!x&&t&&b==t.control&&a(".gs-no-results-result",c).length)return void c.closest(".results-group").find(".result-tab li:last-child").click()},1e3),c.closest(g).addClass(w),c.closest(h).slideDown(),x=!1},A=function(b,c){!1!==c&&y(b);try{r.execute(b)}catch(d){z(r.control)}u.execute(b),a(j).fadeIn()},B=function(){u.cancelSearch(),a(g).removeClass(w),a(j).fadeOut(),setTimeout(function(){r.control.clearAllResults(),u.clearAllResults()},d)},C=function(b,c,d){a(b.root).closest(h).slideUp(0),d!==v&&(y(d),u.execute(d))};u=new o(c,m),a(function(){var b=a(e),c=".results-group",d=".result-tab",g="selected",j="state-",m=a(".result-tab"),o=function(b,c,e){var f=a(this).find(d);b.stopPropagation(),f.removeClass(j+e),f.addClass(j+c),f.children().removeClass(g).eq(c).addClass(g)},w=/^https?:\/\/.*\.google\.com$/,y=function(a){return!w.test(a)&&(a!=location.origin&&!/^chrome:/.test(a))},D=function(a,c){v!==a&&(v=a,b.val(a),a?A(a,c):B())};a("#unl_results").hide();var E={div:"unl_results",tag:"searchresults-only",attributes:{enableImageSearch:!1}};google.search.cse.element.render(E);var F=google.search.cse.element.getAllElements()["searchresults-only0"];if(window.googleSearchElement=F,s=new p(F,a("#unl_results")),s.setSearchStartingCallback(C),s.setSearchCompleteCallback(z),r=s,q){var G={div:"local_results",tag:"searchresults-only",attributes:{enableImageSearch:!1,as_sitesearch:q}};google.search.cse.element.render(G);var H=google.search.cse.element.getAllElements()["searchresults-only1"];window.localGoogleSearchElement=F,t=new p(H,a("#local_results")),t.setSearchStartingCallback(C),t.setSearchCompleteCallback(z),r=t}a("form.gsc-search-box").remove(),a("li:first-child",m).addClass(g),a(m).on("click","li",function(b){if(b.preventDefault(),!a(this).hasClass(g)){var d=a(this).index(),e=a(this).parents(c);e.is(l)?u.changeViewState(d):e.is(k)&&(x=!0,a(r.control.root).closest(h).slideUp().trigger(i,[d,0+!d]),r=0===d?t:s,r.execute(v))}}),a(c).on(i,o),a(f).submit(function(c){c.preventDefault();var d=a.trim(b.val());D(d)}),n&&D(n,!1),a(window).on("message",function(b){var c,d=b.originalEvent;y(d.origin)&&"string"==typeof d.data&&(c=a.trim(d.data),D(c))}),a(window).on("popstate",function(a){var b=a.originalEvent,c=n||"";b.state&&(c=b.state.query||""),D(c,!1)}),window.parent&&a(document).on("keydown",function(a){27===a.keyCode&&window.parent.postMessage("wdn.search.close","*")})})}}});
//# sourceMappingURL=search.min.js.map
\ No newline at end of file
{"version":3,"sources":["search.js"],"names":["define","$","analytics","directoryServer","transitionDelay","inputSel","formSel","resultSel","googleSel","evtStateChange","wrapperMain","wrapperWeb","wrapperDir","dirResults","window","pf_getUID","Cache","this","storage","prototype","get","key","undefined","save","value","Directory","server","containerId","cntSel","_server","_cache","_searchCanceled","_viewState","_renderTo","on","target","_render","data","html","addClass","_renderState","duration","$showRes","failState","$innerRes","depFilter","length","slideUp","not","filter","changeViewState","slideDown","cancelSearch","_xhr","abort","execute","q","cacheData","self","encodeURIComponent","state","prevState","trigger","clearAllResults","empty","GoogleSearcher","search_element","root_of_element","control","root","setSearchCompleteCallback","callback","complete_callback","setSearchStartingCallback","starting_callback","query","initialize","firstQ","localContext","activeSearch","unlGoogleSearch","localGoogleSearch","directorySearch","actCls","searchToggleLock","trackQuery","loc","location","qs","search","replace","page","pathname","join","callTrackPageview","history","pushState","queryComplete","$root","each","alt","closest","find","first","text","attr","setTimeout","FormData","set","fetch","method","body","click","fullQuery","track","e","fadeIn","fullStop","removeClass","fadeOut","queryStart","searcher","$q","resSel","tabsSel","selCls","stateClsPfx","$resTabs","tabStateChange","$tab","stopPropagation","children","eq","googleOrigin","isValidOrigin","origin","test","passiveQuery","val","hide","render_attrs","div","tag","attributes","enableImageSearch","google","cse","element","render","searchElement","getAllElements","googleSearchElement","render_attrs_local","as_sitesearch","localSearchElement","localGoogleSearchElement","remove","preventDefault","hasClass","i","index","$par","parents","is","submit","trim","oEvent","originalEvent","parent","document","keyCode","postMessage"],"mappings":"AAAAA,QAAQ,SAAU,aAAc,SAAUC,EAAGC,GAC5C,YAGA,IAAIC,GAAkB,KAIlBC,EAAkB,IAElBC,EAAW,YACXC,EAAU,mBACVC,EAAY,kBACZC,EAAY,kBAEZC,EAAiB,cACjBC,EAAc,kBACdC,EAAa,kBACbC,EAAa,qBAEbC,EAAa,aAIjBC,QAAOC,U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OAAO0J,QACVvK,EAAEwK,UAAUvI,GAAG,UAAW,SAASiF,GAChB,KAAdA,EAAEuD,SACL5J,OAAO0J,OAAOG,YAAY,mBAAoB","file":"search.min.js"}
\ No newline at end of file
@charset "UTF-8"; @charset "UTF-8";
@import "shared.less";
@import "lib/breakpoints.less"; /* Google Styles */
@import "lib/colors.less";
@import "lib/fonts.less";
// Google Styles
.gsc-control-cse, .gsc-control-cse,
.gsc-control-cse .gsc-table-result { .gsc-control-cse .gsc-table-result {
font-family: inherit; font-family: inherit;
......
@charset "UTF-8"; @charset "UTF-8";
@import "shared.less";
@import "lib/breakpoints.less"; /* Template overrides */
@import "lib/colors.less";
@import "lib/fonts.less";
// Template overrides
.embed #visitorChat, .embed #visitorChat,
#wdn_search { #wdn_search {
display: none !important; display: none !important;
...@@ -20,11 +17,6 @@ ...@@ -20,11 +17,6 @@
text-align: center; text-align: center;
background: #38431b url(../images/050419.jpg) 50% 50% no-repeat; background: #38431b url(../images/050419.jpg) 50% 50% no-repeat;
background-size: cover; background-size: cover;
.wdn-input-group {
margin: 0 auto;
max-width: 30em;
}
} }
#search_wrapper { #search_wrapper {
...@@ -73,7 +65,7 @@ ...@@ -73,7 +65,7 @@
} }
&:before { &:before {
content: '\b7\a0'; // middle-dot + space content: '\b7\a0'; /* middle-dot + space */
} }
&:first-child:before { &:first-child:before {
...@@ -188,7 +180,7 @@ ...@@ -188,7 +180,7 @@
display: none; display: none;
} }
// Directory Styles /* Directory Styles */
#ppl_results { #ppl_results {
h3, h4, .result_head { h3, h4, .result_head {
display: none; display: none;
...@@ -260,7 +252,6 @@ ...@@ -260,7 +252,6 @@
.given-name { .given-name {
margin-left: 1em; margin-left: 1em;
font-size: 1rem; font-size: 1rem;
.sans-serif-font();
text-transform: uppercase; text-transform: uppercase;
color: @ui08; color: @ui08;
} }
......
/* Colors */
/* Scarlet */
@scarlet: #d00000;
@brand: @scarlet;
/* Cream */
@cream: #fefdfa;
@page-background: @cream; // A color to represent the page background, used for WDN colors
/* A few neutral shades, light tan and dark brown */
@neutral: #4a3b13;
@light-neutral: lighten(desaturate(@neutral, 15%), 5%);
/* UI */
/* Light (<50%) */
@ui02: mix(#000, @cream, 4%); /* #f4f3f0 */
@ui03: mix(#000, @cream, 8%); /* #eae9e6 */
@ui04: mix(#000, @cream, 16%); /* #d5d5d2 */
/* Dark (>50%) */
@ui08: mix(#000, @cream, 64%); /* #5b5b5a */
@ui09: mix(#000, @cream, 72%); /* #474746 */
/* Break Points */
/* Standard, width-based media queries */
@bp768: ~" (min-width: 48em)";
/* Deprecated names */
@bp2: @bp768;
/* Fonts */
.sans-serif-font() {
font-family: 'Gotham SSm A', 'Gotham SSm B', Verdana, sans-serif;
font-weight: 400;
font-style: normal;
}
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
// !UNL Google Search Results Overrides // !UNL Google Search Results Overrides
.unl .gcsc-branding,
.unl .gsc-url-bottom,
.unl .gsc-table-cell-snippet-close .gs-title {
display: none;
}
.unl .google-results table, .unl .google-results table,
.unl .google-results tbody th, .unl .google-results tbody th,
.unl .google-results tbody td { .unl .google-results tbody td {
...@@ -15,8 +21,7 @@ ...@@ -15,8 +21,7 @@
.unl .google-results tbody th, .unl .google-results tbody th,
.unl .google-results tbody td { .unl .google-results tbody td {
padding-bottom: 0; padding: 0;
padding-top: 0;
} }
.unl .gsc-control-cse { .unl .gsc-control-cse {
...@@ -36,8 +41,10 @@ ...@@ -36,8 +41,10 @@
} }
.unl .gsc-control-cse .gsc-table-result { .unl .gsc-control-cse .gsc-table-result {
display: flex;
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
padding: 0;
} }
.unl .gsc-above-wrapper-area { .unl .gsc-above-wrapper-area {
...@@ -48,90 +55,64 @@ ...@@ -48,90 +55,64 @@
} }
.unl .gsc-result-info { .unl .gsc-result-info {
// color: $color-body;
// color: ;
font-size: inherit; font-size: inherit;
margin: 0; margin: 0;
padding: 0; padding: 0;
} color: var(--dark-gray);
.unl .gcsc-branding {
display: none;
} }
.unl .gsc-webResult .gsc-result { .unl .gsc-webResult .gsc-result {
border: 0; border: 0;
// @include pb-6; // @include pb-7;
padding-bottom: 2.37em; padding-bottom: 2.37em;
padding-top: 0; padding-top: 0;
} }
.unl .gsc-thumbnail-inside { .unl .gsc-thumbnail-inside {
display: none; padding-left: 0;
} }
.unl .gsc-thumbnail-left { .unl .gs-result .gs-image,
display: block; .unl .gs-result .gs-promotion-image,
// @include mb-1; .unl .gs-web-image-box .gs-image,
margin-bottom: .43em; .unl .gs-promotion-image-box .gs-promotion-image {
} border: 0;
.unl .gs-snippet {
// @include mb-1;
margin-bottom: .43em;
// @include mt-1;
margin-top: .5625em;
}
.unl .gsc-result .gs-title {
height: initial;
}
// TODO: use line-height crop mixin
.unl .gsc-result .gs-title::before {
content: '';
display: block;
height: 0;
margin-top: -.18em;
width: 0;
} }
.unl .gs-result .gs-title, .unl .gsc-thumbnail-inside > .gs-title,
.unl .gs-result .gs-title * { .unl .gsc-thumbnail-inside > .gs-title * {
// color: $scarlet; // color: $scarlet;
color: #d00000; color: var(--link);
height: initial;
text-decoration: none; text-decoration: none;
}
.unl .gsc-control-cse .gs-spelling,
.unl .gsc-control-cse .gs-result .gs-title,
.unl .gsc-control-cse .gs-result .gs-title * {
// @include lh-3; // @include lh-3;
line-height: 1.25em; line-height: 1.25em;
} }
.unl .gsc-control-cse .gs-result .gsc-table-cell-snippet-close > .gs-title { .unl .gsc-thumbnail-inside > .gs-title {
// @include txt-h5; // @include txt-h5;
font-size: 1.5em; font-size: 1.5em;
margin-bottom: .18em; margin-bottom: .18em;
} }
.unl .gsc-control-cse .gs-result .gsc-table-cell-snippet-close > .gs-title * { .unl .gsc-thumbnail-inside > .gs-title * {
// @include txt-base; // @include txt-base;
font-size: 1rem; font-size: 1rem;
} }
.unl .gsc-url-top { .unl .gsc-thumbnail-left {
display: none; display: block;
// @include mb-1;
margin-bottom: .43em;
} }
.unl .gsc-control-cse .gs-snippet { .unl .gs-snippet {
color: inherit; // @include mb-1;
margin-bottom: .43em;
} }
.unl .gsc-thumbnail { .unl .gsc-control-cse .gs-snippet {
// @include pr-5; color: inherit;
padding-right: 1em;
} }
.unl .gs-web-image-box, .unl .gs-web-image-box,
...@@ -141,31 +122,26 @@ ...@@ -141,31 +122,26 @@
.unl .gs-promotion-image-box img.gs-promotion-image, .unl .gs-promotion-image-box img.gs-promotion-image,
.unl .gs-web-image-box img.gs-image { .unl .gs-web-image-box img.gs-image {
max-height: none; height: 4.21em;
max-width: 100%; object-fit: cover;
}
.unl .gs-image-box.gs-web-image-box.gs-web-image-box-landscape,
.unl .gs-image-box.gs-web-image-box.gs-web-image-box-portrait {
// width: #{ms(10)}rem;
width: 4.21em; width: 4.21em;
} }
.unl .gs-image-box.gs-web-image-box.gs-web-image-box-portrait { .unl .gs-promotion-image-box,
height: auto; .unl .gs-image-box.gs-web-image-box.gs-web-image-box-portrait,
.unl .gs-image-box.gs-web-image-box.gs-web-image-box-landscape {
margin-left: 0;
margin-right: 1em;
margin-top: .24em;
} }
// .unl .gs-result img.gs-image,
// .unl .gs-result img.gs-promotion-image {
// border-color: $color-border;
// }
.unl .gsc-result.gsc-webResult:hover { .unl .gsc-result.gsc-webResult:hover {
border: 0; border: 0;
} }
.unl .gsc-url-bottom { .unl .gsc-url-top {
display: block; display: block;
padding: 0 0 1em 0;
// @include txt-xs; // @include txt-xs;
font-size: .75em; font-size: .75em;
} }
...@@ -183,32 +159,17 @@ ...@@ -183,32 +159,17 @@
// } // }
.unl .gsc-results .gsc-cursor-box { .unl .gsc-results .gsc-cursor-box {
// border-color: $color-border; border-bottom: 1px solid var(--b);
// @include bt-1; border-radius: 0;
border-top: 1px solid #ccc; border-top: 1px solid var(--b);
margin: 0; margin: 0 0 .75em 0;
padding: 1em 0 0 0; // TODO: use variable or mixin padding-bottom: .56em;
padding-top: .56em;
} }
.unl .gsc-results .gsc-cursor-box .gsc-cursor-page { .unl .gsc-cursor-container-previous,
// color: $scarlet; .unl .gsc-cursor-container-next {
// color: @scarlet; padding: 1em 0;
display: inline-block;
// @include p-1;
padding: .43em;
text-align: center;
}
.unl .gsc-results .gsc-cursor-box .gsc-cursor-page:not(:last-child) {
// @include mr-4;
margin-right: 1em;
}
.unl .gsc-results .gsc-cursor-box .gsc-cursor-current-page {
// color: $color-body;
font-weight: 400;
text-decoration: none;
} }
.unl .gsc-snippet-metadata, .unl .gsc-snippet-metadata,
...@@ -220,10 +181,44 @@ ...@@ -220,10 +181,44 @@
.unl .gsc-author .unl .gsc-author
.unl .gs-result a.gs-visibleUrl, .unl .gs-result a.gs-visibleUrl,
.unl .gs-result .gs-visibleUrl { .unl .gs-result .gs-visibleUrl {
color: #6d6d6c; // TODO: replace with color variable color: var(--darker-gray); // TODO: replace with color variable
} }
.unl .gs-result a.gs-visibleUrl, .unl .gs-result a.gs-visibleUrl,
.unl .gs-result .gs-visibleUrl { .unl .gs-result .gs-visibleUrl {
padding-bottom: 0; padding-bottom: 0;
} }
.unl .gcsc-find-more-on-google-root {
font-size: .84em;
margin-top: 1em;
text-align: left;
}
.unl .gcsc-more-maybe-branding-box {
border: 0;
margin: 0;
padding: 0;
}
.unl .gsc-cursor,
.unl .gcsc-find-more-on-google-magnifier {
fill: var(--link);
}
.unl .gcsc-find-more-on-google,
.unl .gsc-results .gsc-cursor-box .gsc-cursor-page,
.unl .gs-spelling a {
color: var(--link);
}
.unl .gsc-results .gsc-cursor-box .gsc-cursor-page.gsc-cursor-current-page {
font-weight: bold;
text-decoration: underline;
}
.unl .gs-spelling {
color: var(--body);
font-size: unset;
padding: 0;
}
...@@ -57,77 +57,57 @@ ...@@ -57,77 +57,57 @@
max-width: 30em!important; max-width: 30em!important;
} }
.result-tab li + li::before {
content: '\b7'; // middle-dot + space
padding-left: .43em;
padding-right: .43em;
}
.result-tab li.selected a {
color: #2e2e2d;
}
.search-results {
opacity: 0;
transition: opacity 400ms;
}
.search-results.active {
opacity: 1;
}
.search-results h3, .search-results h3,
.google-search { .google-search {
display: none; display: none;
} }
.search-faux-tab {
border-color: var(--b);
margin-bottom: -1px;
}
// Directory Styles // Directory Styles
// TODO: revisit (and remove?) after Directory has been updated to 5.0 // TODO: revisit (and remove?) after Directory has been updated to 5.0
#ppl_results h3, #directory_results h3,
#ppl_results h4, #directory_results h4,
#ppl_results .result_head, #directory_results .result_head,
#ppl_results .cInfo, #directory_results .cInfo,
#ppl_results .overflow .roles .organization-name, #directory_results .overflow .roles .organization-name,
[data-uid="kfarrell2"] .given-name { [data-uid="kfarrell2"] .given-name {
display: none; display: none;
} }
#ppl_results .ppl_Sresult, #directory_results .ppl_Sresult,
#ppl_results .dep_result { #directory_results .dep_result {
margin-bottom: 1.77em; margin-bottom: 1.77em;
} }
#ppl_results .overflow > .recordDetails { #directory_results .overflow > .recordDetails {
align-self: center; align-self: center;
flex: 1 1 auto; flex: 1 1 auto;
} }
#ppl_results .overflow .roles li { #directory_results .overflow .roles li {
margin-bottom: .32em; margin-bottom: .32em;
} }
#ppl_results .overflow .roles:last-child { #directory_results .overflow .roles:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
#ppl_results .overflow .roles .title, #directory_results .overflow .roles .title,
#ppl_results .overflow .roles .organization-unit { #directory_results .overflow .roles .organization-unit {
display: block; display: block;
} }
#ppl_results .given-name { #directory_results .given-name {
font-size: 1rem; font-size: 1rem;
margin-left: 1em; margin-left: 1em;
text-transform: uppercase; text-transform: uppercase;
......
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js embed" lang="en"> <html class=dcf-no-js dcf-no-webp embed" lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" /> <meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Search | University of Nebraska&ndash;Lincoln</title> <title>Search | University of Nebraska&ndash;Lincoln</title>
<link rel="stylesheet" href="https://cloud.typography.com/7717652/6968572/css/fonts.css" /> <link rel="stylesheet" href="https://cloud.typography.com/7717652/6968572/css/fonts.css" />
<link rel="stylesheet" href="/wdn/templates_5.0/css/core.css" /> <link rel="stylesheet" href="/wdn/templates_5.3/css/main.css" />
<link rel="stylesheet" href="/wdn/templates_5.3/js/js-css/tabs.css" />
<script data-main="js/embed-src/main.js" src="js/embed-src/require.js"></script> <script data-main="js/embed-src/main.js" src="js/embed-src/require.js"></script>
<?php echo $head ?> <?php echo $head ?>
</head> </head>
...@@ -13,5 +14,32 @@ ...@@ -13,5 +14,32 @@
<main> <main>
<?php echo $maincontent ?> <?php echo $maincontent ?>
</main> </main>
<script>
require([
'/wdn/templates_5.3/js/compressed/dcf-utility.js',
'/wdn/templates_5.3/js/compressed/dcf-tabs.js'
], function(DCFUtilityModule, DCFTabsModule) {
try {
// Try DCF ^3.0 format first, then 2.0 format
if (DCFUtilityModule) {
DCFUtilityModule.DCFUtility.flagSupportsWebP();
DCFUtilityModule.DCFUtility.flagSupportsJavaScript();
} else {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
}
} catch(e) {
// do nothing;
}
var tabs = document.querySelectorAll('.dcf-tabs');
// Try DCF ^3.0 format first, then 2.0 format
if (DCFTabsModule) {
var unlTabs = new DCFTabsModule.DCFTabs(tabs);
} else {
var unlTabs = new DCFTabs(tabs);
}
unlTabs.initialize();
});
</body> </body>
</html> </html>
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js embed" lang="en"> <html class="dcf-no-js dcf-no-webp embed" lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" /> <meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Search | University of Nebraska&ndash;Lincoln</title> <title>Search | University of Nebraska&ndash;Lincoln</title>
<link rel="stylesheet" href="https://cloud.typography.com/7717652/6968572/css/fonts.css" /> <link rel="stylesheet" href="https://cloud.typography.com/7717652/6968572/css/fonts.css" />
<link rel="stylesheet" href="https://unlcms.unl.edu/wdn/templates_5.0/css/core.css" /> <link rel="stylesheet" href="https://unlcms.unl.edu/wdn/templates_5.3/css/main.css" />
<script src="js/embed/all.js?v=20170404"></script> <link rel="stylesheet" href="https://unlcms.unl.edu/wdn/templates_5.3/js/js-css/tabs.css" />
<script src="js/embed/all.js?v=<?php echo $cacheVersion; ?>"></script>
<?php echo $head ?> <?php echo $head ?>
</head> </head>
<body class="unl"> <body class="unl">
...@@ -14,4 +15,35 @@ ...@@ -14,4 +15,35 @@
<?php echo $maincontent ?> <?php echo $maincontent ?>
</main> </main>
</body> </body>
<script>
require.config({
paths: { 'unlCMSJs': 'https://unlcms.unl.edu/wdn/templates_5.3/js/compressed' }
});
require([
'unlCMSJs/dcf-utility',
'unlCMSJs/dcf-tabs'
], function(DCFUtilityModule, DCFTabsModule) {
try {
// Try DCF ^3.0 format first, then 2.0 format
if (DCFUtilityModule) {
DCFUtilityModule.DCFUtility.flagSupportsWebP();
DCFUtilityModule.DCFUtility.flagSupportsJavaScript();
} else {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
}
} catch(e) {
// do nothing;
}
var tabs = document.querySelectorAll('.dcf-tabs');
// Try DCF ^3.0 format first, then 2.0 format
if (DCFTabsModule) {
var unlTabs = new DCFTabsModule.DCFTabs(tabs);
} else {
var unlTabs = new DCFTabs(tabs);
}
unlTabs.initialize();
});
</script>
</html> </html>
...@@ -19,7 +19,7 @@ require(['jquery', '<?php echo $localScriptUrl ?>'], function($, UNLSearch) { ...@@ -19,7 +19,7 @@ require(['jquery', '<?php echo $localScriptUrl ?>'], function($, UNLSearch) {
}).appendTo($('body')); }).appendTo($('body'));
var $localCss = $('<link>', { var $localCss = $('<link>', {
'href': './css/search-google-5.0.css?v=20180816' 'href': './css/search-google-5.0.css?v=<?php echo $cacheVersion; ?>'
}); });
gSearchDefer.done(function(google) { gSearchDefer.done(function(google) {
......
<?php if (isset($title)): ?>
<h3><?php echo $title ?> Results</h3>
<?php endif; ?>
<div id="<?php echo isset($id) ? $id : '' ?>" class="google-results"></div> <div id="<?php echo isset($id) ? $id : '' ?>" class="google-results"></div>
<?php if (!$isEmbed): ?><div class="dcf-bleed dcf-mb-0 dcf-overflow-y-auto"><?php endif ?> <?php if (!$isEmbed): ?><div class="dcf-bleed dcf-mb-0 dcf-overflow-y-auto"><?php endif ?>
<section class="dcf-wrapper dcf-grid dcf-col-gap-vw dcf-pt-9 dcf-txt-xs unl-font-sans unl-search-results" id="search_wrapper"> <section class="dcf-wrapper dcf-grid dcf-col-gap-6 dcf-row-gap-9 dcf-pt-9 dcf-pb-9 dcf-txt-xs unl-font-sans unl-search-results" id="search_wrapper">
<div class="dcf-col-100% dcf-col-67%-start@sm dcf-col-50%-start@lg results-group" id="search_results"> <div class="dcf-col-100% dcf-col-67%-start@md dcf-col-50%-start@lg results-group" id="search_results">
<div class="result-head"> <?php if (!empty($local_results)): ?>
<h2>Web Results</h2> <div class="dcf-tabs">
<ul class="dcf-d-flex dcf-list-bare result-tab<?php if (empty($local_results)): ?> no-local<?php endif; ?>"> <h2>Web Results</h2>
<?php if (!empty($local_results)): ?> <ul>
<li><a href="#">This unit</a></li> <li><a class="dcf-txt-md" href="#local-results-container">This Site</a></li>
<?php endif; ?> <li><a class="dcf-txt-md all-unl-tab" href="#unl-results-container">All of UNL</a></li>
<li><a href="#">All of UNL</a></li> </ul>
</ul> <div id="local-results-container">
</div> <?php if (isset($localTitle)): ?>
<div class="search-results"> <h3 class="dcf-sr-only"><?php echo $localTitle ?> Results</h3>
<?php echo $local_results ?> <?php endif; ?>
<?php echo renderTemplate('templates/5.0/google-results.tpl.php', array( <?php echo $local_results ?>
'title' => 'All of UNL', </div>
'id' => 'unl_results', <div id="unl-results-container">
)) ?> <h3 class="dcf-sr-only">All of UNL Results</h3>
</div> <?php echo renderTemplate('templates/5.0/google-results.tpl.php', array(
</div> 'id' => 'unl_results'
)) ?>
</div>
</div>
<?php else: ?>
<h2>Web Results</h2>
<h3 class="dcf-bold dcf-lh-4 dcf-d-inline-block dcf-txt-md dcf-mt-0 dcf-ml-0 dcf-pt-4 dcf-pr-5 dcf-pb-4 dcf-pl-5 dcf-bg-white dcf-b-1 dcf-bb-0 dcf-b-solid unl-b-light-gray unl-ls-0 search-faux-tab">All of UNL</h3>
<div class="dcf-pt-7 dcf-pr-6 dcf-pb-7 dcf-pl-6 dcf-bg-white dcf-b-1 dcf-b-solid unl-b-light-gray" id="unl-results-container">
<?php echo renderTemplate('templates/5.0/google-results.tpl.php', array(
'title' => 'All of UNL',
'id' => 'unl_results'
)) ?>
</div>
<?php endif; ?>
</div>
<div class="dcf-col-100% dcf-col-33%-end@sm dcf-col-50%-end@lg dcf-pb-10 results-group" id="directory_results"> <div class="dcf-col-100% dcf-col-33%-end@md dcf-col-50%-end@lg results-group" id="directory_results">
<div class="result-head"> <div class="dcf-tabs">
<h2>Directory Results</h2> <h2>Directory Results</h2>
<ul class="dcf-d-flex dcf-list-bare result-tab"> <ul>
<li><a href="#">People</a></li> <li><a class="dcf-txt-md" href="#ppl_results">People</a></li>
<li><a href="#">Departments</a></li> <li><a class="dcf-txt-md dept-results-tab" href="#dept_results">Departments</a></li>
</ul> </ul>
</div> <div id="ppl_results"></div>
<div id="ppl_results" class="search-results"></div> <div id="dept_results"></div>
</div> </div>
</div>
</section> </section>
<?php if (!$isEmbed): ?></div><?php endif ?> <?php if (!$isEmbed): ?></div><?php endif ?>
\ No newline at end of file <script>
window.addEventListener('inlineJSReady', function() {
require(['dcf-utility', 'dcf-tabs', 'css!../js-css/tabs'], function(DCFUtilityModule, DCFTabsModule) {
try {
// Try DCF ^3.0 format first, then 2.0 format
if (DCFUtilityModule) {
DCFUtilityModule.DCFUtility.flagSupportsWebP();
DCFUtilityModule.DCFUtility.flagSupportsJavaScript();
} else {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
}
} catch(e) {
// do nothing;
}
var tabs = document.querySelectorAll('.dcf-tabs');
// Try DCF ^3.0 format first, then 2.0 format
if (DCFTabsModule) {
var unlTabs = new DCFTabsModule.DCFTabs(tabs);
} else {
var unlTabs = new DCFTabs(tabs);
}
unlTabs.initialize();
});
});
</script>
\ No newline at end of file
<nav id="dcf-footer-group-1" role="navigation" aria-labelledby="dcf-footer-group-1-heading"> <nav id="dcf-footer-group-1" role="navigation" aria-labelledby="dcf-footer-group-1-heading">
<h3 class="dcf-txt-md dcf-bold dcf-uppercase dcf-lh-3 unl-ls-2 unl-cream" id="dcf-footer-group-1-heading">About UNL Search</h3> <h3 class="dcf-txt-md dcf-bold dcf-uppercase dcf-lh-3 unl-ls-2 unl-cream" id="dcf-footer-group-1-heading">About UNL Search</h3>
<p>This application is a product of the <a href="https://iim.unl.edu/">Internet and Interactive Media group at Nebraska</a>. IIM is a partnership of <a href="https://ucomm.unl.edu/">University Communication</a> and <a href="https://its.unl.edu/">Information Technology Services</a>.</p> <p>This application is a product of the <a href="https://dxg.unl.edu/">Digital Experience Group at Nebraska</a>. DXG is a partnership of <a href="https://ucomm.unl.edu/">University Communication</a> and <a href="https://its.unl.edu/">Information Technology Services</a>.</p>
<?php <?php
// TODO: Verify file will continue to exist and correct
echo file_get_contents('http://www.unl.edu/ucomm/sharedcode/footerContactInfo.html'); echo file_get_contents('http://www.unl.edu/ucomm/sharedcode/footerContactInfo.html');
?> ?>
</nav> </nav>
<?php
$relatedLinks = file_get_contents('http://www.unl.edu/sharedcode/relatedLinks.html');
preg_match_all('|<li>(.*)<\/li>|', $relatedLinks, $matches);
if (is_array($matches[0]) && count($matches[0]) > 0):
?>
<nav id="dcf-footer-group-2" role="navigation" aria-labelledby="dcf-footer-group-2-heading"> <nav id="dcf-footer-group-2" role="navigation" aria-labelledby="dcf-footer-group-2-heading">
<h3 class="dcf-txt-md dcf-bold dcf-uppercase dcf-lh-3 unl-ls-2 unl-cream" id="dcf-footer-group-2-heading">Related Links</h3> <h3 class="dcf-txt-md dcf-bold dcf-uppercase dcf-lh-3 unl-ls-2 unl-cream" id="dcf-footer-group-2-heading">Related Links</h3>
<ul class="dcf-list-bare dcf-mb-0"> <ul class="dcf-list-bare dcf-mb-0">
<?php <?php
//TODO: Verify file will continue to exist and if correct list of links
$relatedLinks = file_get_contents('http://www.unl.edu/sharedcode/relatedLinks.html');
preg_match_all('|<li>(.*)<\/li>|', $relatedLinks, $matches);
if (is_array($matches[0])) { if (is_array($matches[0])) {
foreach($matches[0] as $link) { foreach($matches[0] as $link) {
echo "<li>" . $link . "</li>", PHP_EOL; echo $link, PHP_EOL;
} }
} }
?> ?>
</ul> </ul>
</nav> </nav>
<?php endif; ?>
<div class="dcf-bleed dcf-wrapper dcf-pt-7 dcf-pb-7 dcf-txt-center dcf-bg-center dcf-bg-no-repeat dcf-bg-cover unl-bg-darker-gray search-bg" id="searchform"> <div class="dcf-bleed dcf-wrapper dcf-pt-7 dcf-pb-7 dcf-txt-center dcf-bg-center dcf-bg-no-repeat dcf-bg-cover unl-bg-darker-gray search-bg" id="searchform">
<form action="./" method="get"> <form class="dcf-form" action="./" method="get">
<div class="dcf-input-group"> <div class="dcf-input-group">
<input type="text" name="q" id="search_q" aria-label="Search Query" placeholder="e.g., Herbert Husker, Ph.D." /> <input type="text" name="q" id="search_q" aria-label="Search Query" placeholder="e.g., Herbert Husker, Ph.D." />
<button class="button" type="submit"><span class="wdn-icon-search" aria-hidden="true"></span><span class="dcf-sr-only">Search</span></button> <button class="dcf-btn dcf-btn-primary" type="submit">
</div> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" aria-labelledby="filled-search-content-edition-title" fill="currentColor">
<?php if (!empty($local_results)): ?> <title id="filled-search-content-edition-title">Search</title>
<input type="hidden" name="u" value="<?php echo htmlentities($_GET['u'], ENT_QUOTES) ?>" /> <path d="M9,18c2.131,0,4.089-0.749,5.633-1.992l7.658,7.697c0.389,0.392,1.021,0.393,1.414,0.003 c0.392-0.39,0.393-1.023,0.004-1.414l-7.668-7.706C17.264,13.052,18,11.111,18,9c0-4.963-4.037-9-9-9S0,4.037,0,9 C0,13.962,4.037,18,9,18z M9,2c3.859,0,7,3.14,7,7c0,3.859-3.141,7-7,7c-3.86,0-7-3.141-7-7C2,5.14,5.14,2,9,2z"></path>
<?php endif; ?> <g><path fill="none" d="M0 0H24V24H0z"></path></g>
</form> </svg>
<span class="dcf-sr-only">Search</span>
</button>
</div>
<?php if (!empty($local_results)): ?>
<input type="hidden" name="u" value="<?php echo htmlentities($_GET['u'], ENT_QUOTES) ?>" />
<?php endif; ?>
</form>
</div> </div>