PageSourceSearch

https://webeco.nait.ca/_nuxt/CMSDsfsq.js

js nait.ca collected 2026-10-02 04:13:54 UTC 18,741 bytes, 43 lines download raw bytes

1import{_ as H,o,f as v,b,h as f,d as i,a8 as D,C as I,c as h,F as S,D as k,t as L,a as u,s as T,Z as M,v as _,k as q,i as z}from"./-1zjGLeH.js";import{u as j}from"./1WFP_eP6.js";import{u as X}from"./CWEtnKaA.js";import{S as O}from"./CIRx1xN5.js";import{P as K}from"./qVsTELv-.js";import{a as J}from"./-ct8vmJR.js";import{I as Y,S as U}from"./7JICTxpt.js";import{I as W}from"./DeC6fnQj.js";import{M as Z}from"./FqFeEh1p.js";import{a as Q,C as $,r as ee}from"./DY0JdvRW.js";import{F as te}from"./BpnBxItb.js";import{C as ie}from"./Bkw3kgpN.js";import"./CDFOVAVM.js";import"./0femyjSb.js";import"./CRFg-YkS.js";import"./BhOmvyS8.js";import"./akrcbl44.js";import"./3ePl0tU_.js";import"./DjLPlln0.js";import"./D36Sy10y.js";const C=400,ne={name:"ContentCarousel",components:{Chip:J,SimpleButton:U,Image:W,Section:O,Icon:Y},props:{slides:{type:Array,default:()=>[]}},data(){return{current:0,isSliding:!1,isAnimating:!1,swapped:!1,sliding:!1,outImg:this.slides?.[0]?.img||"",outAlt:this.slides?.[0]?.imgAlt||"",outTitle:this.slides?.[0]?.imgTitle||"",inImg:"",inAlt:"",inTitle:""}},computed:{currentSlide(){return this.slides[this.current]||{}},truncatedTeaser(){const t=this.currentSlide.teaser||"";return t.length<=250?t:t.slice(0,250).trim()+"..."},outStyle(){return this.sliding?`transition: transform ${C}ms ease, opacity ${C}ms ease; transform: translateX(-100%); opacity: 0;`:"transition: none; transform: translateX(0); opacity: 1;"},inStyle(){return this.sliding?`transition: transform ${C}ms ease, opacity ${C}ms ease; transform: translateX(0); opacity: 1;`:"transition: none; transform: translateX(100%); opacity: 0; pointer-events: none;"}},methods:{prev(){const t=(this.current-1+this.slides.length)%this.slides.length;this.goTo(t)},next(){const t=(this.current+1)%this.slides.length;this.goTo(t)},goTo(t){if(this.isSliding||t===this.current)return;this.isSliding=!0;const e=this.slides[t];this.inImg=e.img||"",this.inAlt=e.imgAlt||"",this.inTitle=e.imgTitle||"",this.$nextTick(()=>{this.sliding=!0,this.swapped=!this.swapped,this.isAnimating=!0,setTimeout(()=>{this.current=t},C/2),setTimeout(()=>{this.outImg=e.img||"",this.outAlt=e.imgAlt||"",this.outTitle=e.imgTitle||"",this.sliding=!1,this.isAnimating=!1,this.isSliding=!1},C+20)})}}},se={class:"w-full md:w-1/2 flex flex-col"},le={class:"flex flex-col gap-2 md:gap-3"},ae={class:"flex flex-wrap gap-2",role:"list","aria-label":"Article categories"},oe={class:"text-dark-blue-600 xl:text-5xl lg:text-4xl text-3xl font-semibold",style:{"text-shadow":"rgba(0, 92, 185, 0.5) 0px 1px 2px"}},re={class:"flex items-center gap-2"},de={class:"prose prose-nait-default","aria-label":"Published Date"},ce={class:"prose prose-nait-default flex-1"},ue={key:0,class:"flex gap-3 items-center pt-8 md:pt-11"},me=["aria-disabled"],pe=["aria-disabled"],ge={class:"w-full md:w-1/2 flex flex-col m-auto"},fe={class:"relative w-full pb-[56.25%]"},he={class:"absolute inset-0 z-[2] rounded-lg overflow-hidden bg-slate-300"},_e=["aria-hidden"],ye=["aria-hidden"],we={key:0,class:"flex justify-center gap-1.5 pt-6",role:"group","aria-label":"Slide indicators"},be=["aria-label","aria-pressed","onClick"];function ve(t,e,a,r,l,n){const p=f("Chip"),y=f("Icon"),d=f("SimpleButton"),c=f("Image"),w=f("Section");return o(),v(w,null,{default:b(()=>[i("div",{class:"flex flex-col-reverse md:flex-row gap-5 lg:gap-10",role:"region","aria-label":"Featured articles and news carousel",onKeydown:[e[0]||(e[0]=D((...m)=>n.prev&&n.prev(...m),["left"])),e[1]||(e[1]=D((...m)=>n.next&&n.next(...m),["right"]))],tabindex:"0","aria-description":"Use left and right arrow keys to navigate slides"},[i("div",se,[i("div",{class:I(["text-transition flex flex-col gap-5 lg:gap-6 flex-1",{animating:l.isAnimating}])},[i("div",le,[i("div",ae,[(o(!0),h(S,null,k(n.currentSlide.chips,(m,g)=>(o(),v(p,{key:g,text:m.label,colour:"light gold",role:"listitem"},null,8,["text"]))),128))]),i("h2",oe,L(n.currentSlide.title),1),i("div",re,[u(y,{"icon-name":"fa-regular fa-calendar-days",class:"text-base text-dark-blue-600"}),i("p",de,L(n.currentSlide.publishedDate),1)])]),i("p",ce,L(n.truncatedTeaser),1),i("div",null,[u(d,{type:"link",text:"Read this article","aria-label":`Read this article: ${n.currentSlide.title}`,colour:"primaryBlue",link:n.currentSlide.linkURL},null,8,["aria-label","link"])])],2),a.slides.length>1?(o(),h("div",ue,[i("span",{"aria-disabled":l.isSliding},[u(d,{type:"action",design:"iconOnly",colour:"grey",iconClass:"fa-solid fa-caret-left text-lg md:text-xl m-auto",text:"Previous slide",extraClass:"flex w-[40px] h-[40p
1x] md:w-[48px] md:h-[48px]",onClick:n.prev},null,8,["onClick"])],8,me),i("span",{"aria-disabled":l.isSliding},[u(d,{type:"action",design:"iconOnly",colour:"grey",iconClass:"fa-solid fa-caret-right text-lg md:text-xl m-auto",text:"Next slide",extraClass:"flex w-[40px] h-[40px] md:w-[48px] md:h-[48px]",onClick:n.next},null,8,["onClick"])],8,pe)])):T("",!0)]),i("div",ge,[i("div",fe,[i("div",{"aria-hidden":"true",class:I(["absolute inset-0 rounded-lg rotate-[5.864deg] transition-colors duration-500 ease-linear",l.swapped?"bg-medium-blue-600":"bg-light-blue-250"])},null,2),i("div",{"aria-hidden":"true",class:I(["absolute inset-0 rounded-lg rotate-[3.064deg] transition-colors duration-500 ease-linear",l.swapped?"bg-light-blue-250":"bg-medium-blue-600"])},null,2),i("div",he,[i("div",{class:"absolute inset-0 rounded-lg overflow-hidden","aria-hidden":l.sliding?"true":void 0,style:M(n.outStyle)},[u(c,{"img-src":l.outImg,"img-alt":l.outAlt,"img-title":l.outTitle,radius:"rounded",width:"w-auto",aspectRatio:"16/9"},null,8,["img-src","img-alt","img-title"])],12,_e),i("div",{class:"absolute inset-0 rounded-lg overflow-hidden","aria-hidden":l.sliding?void 0:"true",style:M(n.inStyle)},[u(c,{"img-src":l.inImg,"img-alt":l.inAlt,"img-title":l.inTitle,radius:"rounded",width:"w-auto",aspectRatio:"16/9"},null,8,["img-src","img-alt","img-title"])],12,ye)])]),a.slides.length>1?(o(),h("div",we,[(o(!0),h(S,null,k(a.slides,(m,g)=>(o(),h("button",{type:"button",key:g,"aria-label":`Go to slide ${g+1} of ${a.slides.length}`,"aria-pressed":g===l.current?"true":"false",onClick:A=>n.goTo(g),class:I(["w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-300",g===l.current?"bg-slate-600 scale-125":"bg-slate-300"])},null,10,be))),128))])):T("",!0)])],32)]),_:1})}const xe=H(ne,[["render",ve],["__scopeId","data-v-8e6a50b3"]]),G=["default_fields_video__display_title","default_fields_video__teaser","default_fields_video__featured_image","url","article_type","editorial_fields__publication_date"],Se=G.join(","),ke=["hero","internal_link","external_link_url","call_to_action_text","heading","items",...G],Ae=[...new Set(ke)].join(","),Ce=[Ae,"seo__seo_title","seo__seo_teaser","default_fields__display_title","default_fields__teaser"].filter(Boolean).join(","),F=["Academics & Learning Support","Alumni","Facilities & Transportation","Campaigns","Community & Culture","DIY & How-to","Environment","Food","Finance","Health & Well-being","Industry & Skilled Trades","Recreation & Athletics","Safety & Security","Shopping","Students","Technology and Science","Business","General"],Te=["Staff News","Executive Announcements","Employee Relations","Pay & Benefits","Projects & Initiatives","Training & Professional Development","In memoriam"],Ie=["Student News","Student Clubs and Groups","Jobs & Careers"];function B(t){return t?typeof t=="string"?t:t.codename:null}function Ne(t){const e=t?.item||t?.items?.[0],a=t?.linkedItemMap||{},r=e?.elements?.hero?.value?.[0],l=B(r),n=l?a[l]:null;if(!e||!l||!n)return{type:null,item:null,items:[],debug:{hasPageItem:!!e,heroCodename:l,linkedItemMapKeys:Object.keys(a),landingPageShape:{hasItem:!!t?.item,itemsLength:t?.items?.length||0,hasLinkedItemMap:!!t?.linkedItemMap}}};const p=n?.system?.type;if(p==="promo"){const y=n?.elements?.internal_link?.value?.[0],d=B(y),c=d?a[d]:null;return{type:"promo",item:c,items:c?[c]:[],debug:{heroCodename:l,heroType:p,articleCodename:d,hasArticle:!!c}}}if(p==="content_cluster"){const y=n?.elements?.items?.value||[],d=y.map(c=>{const w=B(c);return w?a[w]:null}).filter(Boolean);return{type:"content_cluster",item:null,items:d,debug:{heroCodename:l,heroType:p,articleCodenames:y,resolvedCount:d.length}}}return{type:p,item:n,items:[],debug:{heroCodename:l,heroType:p,fallback:!0}}}async function P(t){if(!t)return null;const e=t.elements||{},a=e.default_fields_video__display_title?.value||"",r=e.default_fields_video__teaser?.value||"",l=e.default_fields_video__featured_image?.value?.[0]||null,n=e.editorial_fields__publication_date?.value,p=(e.article_type?.value||[]).map(c=>({label:c.name})),y=n?new Date(n).toLocaleDateString("en-CA",{year:"numeric",month:"long",day:"numeric"}):"",d=await ee({itemJson:JSON.stringify(t),contentType:t?.system?.type});return{title:a,teaser:r,chips:p,publishedDate:y,img:l?.url||"",imgAlt:l?.description||a,imgTitle:a,linkURL:d||""}}async function Ee(t){if(!t?.type)return[];if(t.type==="content_cluster")return(await Promise.all(t.items.map(P))).filter(
1Boolean);if(t.type==="promotion"){const e=t.item?.elements?.internal_link?.linkedItems?.[0]??null,a=await P(e);return a?[a]:[]}if(t.type==="article"){const e=t.item??null,a=await P(e);return a?[a]:[]}return[]}const Le={components:{PageHeader:K,ContentCarousel:xe,MediaSlider:Z,ContentTypeView:$,Section:O,SimpleButton:U,FlexboxGrid:te,CalloutTile:Q,Container:ie},async setup(){const t=q(),e=z(),a=_(()=>["true","1","yes"].includes(String(t.query.preview||"").toLowerCase())),r=s=>$fetch("/api/kontent/delivery",{query:{preview:a.value,depth:1,limit:5,cacheTtl:300,"system.type":"article","elements.article_type[any]":s,elements:Se,order:"elements.editorial_fields__publication_date[desc]",shallow:!0},headers:{...a.value?{"x-bypass-cache":"1"}:{}}}),l=()=>$fetch("/api/kontent/delivery",{query:{preview:a.value,depth:2,cacheTtl:300,"system.codename":"news_stories_landing_page",elements:Ce,shallow:!0},headers:{...a.value?{"x-bypass-cache":"1"}:{}}}),{data:n,pending:p,error:y}=await X(()=>`news-stories-landing-page-${a.value?"preview":"live"}`,async()=>{const[s,x,E]=await Promise.all([l(),r("editorial"),r("news")]),R=Ne(s),V=await Ee(R);return{isPreview:a.value,landingPage:s,heroContent:R,carouselSlides:V,editorialArticles:x?.items||[],newsArticles:E?.items||[]}},{server:!0}),d=_(()=>n.value?.landingPage?.items?.[0]??null),c=_(()=>{const s=d.value?.elements||{};return s.seo__seo_title?.value||s.default_fields__display_title?.value||""}),w=_(()=>{const s=d.value?.elements||{};return s.seo__seo_teaser?.value||s.default_fields__teaser?.value||""}),m=_(()=>c.value?{title:c.value,description:w.value}:null);j({title:_(()=>m.value?.title||"News and Stories | NAIT"),meta:_(()=>{const s=m.value?.description;return s?[{name:"description",content:s},{property:"og:title",content:m.value?.title||"News and Stories"},{property:"og:description",content:s}]:[{property:"og:title",content:m.value?.title||"News and Stories"}]}),link:[{rel:"canonical",href:"https://www.nait.ca/news-stories"}]});const g=s=>[...s].sort((x,E)=>x.localeCompare(E)),A=_(()=>{const s=t.query.status;return g(s==="studentStatus"?[...F,...Ie]:s==="staffStatus"?Te:F)}),N=_(()=>String(e.public.techlifeBaseUrl||"").replace(/\/$/,""));return{data:n,pending:p,error:y,seo:m,isPreview:a,carouselSlides:_(()=>n.value?.carouselSlides||[]),editorialArticles:_(()=>n.value?.editorialArticles||[]),newsArticles:_(()=>n.value?.newsArticles||[]),userStatus:_(()=>t.query.status||null),activeTopic:A,techlifeBaseUrl:N}},methods:{ctaClick(t){t==="techlifetoday"?this.$formDialog.open("techlifetoday_sign_up_form"):this.$formDialog.open({codename:"media_newsroom_newsletter_sign_up",templateProps:{displayInFrame:!1}})},slugify(t){return String(t||"").toLowerCase().trim().replace(/&/g,"and").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}},data(){return{socialContent:`
2    <ul class='prose prose-nait-default'>
3        <li class='p-0 mt-1'>
4            <a href='https://www.instagram.com/nait/' target='_blank' class='no-underline hover:underline'>
5                <span class='fa-brands fa-instagram'>&nbsp;</span>
6                Follow @NAIT on Instagram
7            </a>
8        </li>
9        <li class='p-0 mt-1'>
10            <a href='https://www.facebook.com/NAIT/' target='_blank' class='no-underline hover:underline'>
11                <span class='fa-brands fa-square-facebook'>&nbsp;</span>
12                Like our Facebook
13            </a>
14        </li>
15        <li class='p-0 mt-1'>
16            <a href='https://x.com/NAIT' target='_blank' class='no-underline hover:underline'>
17                <span class='fa-brands fa-x-twitter'>&nbsp;</span>
18                Follow @NAIT on X
19            </a>
20        </li>
21        <li class='p-0 mt-1'>
22            <a href='https://www.youtube.com/user/naitvideos' target='_blank' class='no-underline hover:underline'>
23                <span class='fa-brands fa-youtube'>&nbsp;</span>
24                Subscribe to our YouTube Channel
25            </a>
26        </li>
27        <li class='p-0 mt-1'>
28            <a href='https://www.linkedin.com/school/nait/' target='_blank' class='no-underline hover:underline'>
29                <span class='fa-brands fa-linkedin'>&nbsp;</span>
30                Connect on LinkedIn
31            </a>
32        </li>
33    </ul>
34    <p class='mt-3'>
35        <a href='https://www.nait.ca/socialNAIT' id='Social-NAIT'>
36            <img
37                alt='SocialNAIT'
38                src='https://www.nait.ca/NAIT/media/nait-ca-templates/socialnait-logo.png'
39                style='width:160px;height:auto;'
40            />
41        </a>
42    </p>
43`}}},Be={class:"news-stories-page"},Pe={key:1,class:"container py-10"},Re={class:"bg-yellow-500"},De={key:1,class:"container py-12"},Me={class:"grid grid-cols-1 md:grid-cols-3 gap-6"},Fe={key:1,class:"container py-12"},He={class:"grid grid-cols-1 md:grid-cols-3 gap-6"},Oe={class:"p-6 bg-white flex flex-wrap gap-4 rounded-lg border border-1 border-dark-blue-50"};function Ue(t,e,a,r,l,n){const p=f("PageHeader"),y=f("ContentCarousel"),d=f("ContentTypeView"),c=f("MediaSlider"),w=f("SimpleButton"),m=f("Container"),g=f("Section"),A=f("CalloutTile"),N=f("FlexboxGrid");return o(),h("main",Be,[u(p,{title:"News and Stories",hierarchy:"L4",breadcrumbs:[{label:"Home",path:"https://www.nait.ca"},{label:"News and Stories"}],teaser:"Discover the latest stories, updates and perspectives from across NAIT."}),r.carouselSlides.length?(o(),v(y,{key:0,slides:r.carouselSlides},null,8,["slides"])):r.pending?(o(),h("div",Pe,[...e[2]||(e[2]=[i("div",{class:"h-80 rounded-lg bg-grey-100 animate-pulse"},null,-1)])])):T("",!0),i("section",Re,[r.editorialArticles.length?(o(),v(c,{key:0,heading:"Stories from techlifetoday",description:"Explore the inspiring stories of the NAIT community, including student success, alumni impact, innovation, industry insights, and life at the polytechnic. ",descriptionClass:"prose prose-nait-default max-w-[80%] -mb-8",backgroundColor:"yellow"},{default:b(()=>[(o(!0),h(S,null,k(r.editorialArticles,(s,x)=>(o(),v(d,{key:x,"provided-data":s,variant:"mediaSlider"},null,8,["provided-data"]))),128))]),_:1})):r.pending?(o(),h("div",De,[e[3]||(e[3]=i("h2",{class:"heading-two mb-6"},"Stories from techlifetoday",-1)),e[4]||(e[4]=i("div",{class:"prose prose-nait-default"},[i("p",null," Explore the inspiring stories of the NAIT community, including student success, alumni impact, innovation, industry insights, and life at the polytechnic. ")],-1)),i("div",Me,[(o(),h(S,null,k(3,s=>i("div",{key:s,class:"h-72 rounded-lg bg-white/70 animate-pulse"})),64))])])):T("",!0),u(m,{class:"pb-8 md:pb-10 lg:pb-14"},{default:b(()=>[u(w,{type:"link",colour:"secondaryBlue",text:"Explore more on techlifetoday",link:r.techlifeBaseUrl},null,8,["link"])]),_:1})]),i("section",null,[r.newsArticles.length?(o(),v(c,{key:0,heading:"News, Statements, and Announcements",description:"Stay informed with official news and institutional announcements from NAIT.",descriptionClass:"prose prose-nait-default max-w-[80%] -mb-8"},{default:b(()=>[(o(!0),h(S,null,k(r.newsArticles,(s,x)=>(o(),v(d,{key:x,"provided-data":s,variant:"mediaSlider"},null,8,["provided-data"]))),128))]),_:1})):r.pending?(o(),h("div",Fe,[e[5]||(e[5]=i("h2",{class:"heading-two mb-6"}," News, Statements, and Announcements ",-1)),e[6]||(e[6]=i("div",{class:"prose prose-nait-default"},[i("p",null," Stay informed with official news and institutional announcements from NAIT. ")],-1)),i("div",He,[(o(),h(S,null,k(3,s=>i("div",{key:s,class:"h-72 rounded-lg bg-grey-100 animate-pulse"})),64))])])):T("",!0),u(m,{class:"pb-8 md:pb-10 lg:pb-14"},{default:b(()=>[u(w,{type:"link",colour:"alternatePurple",text:"Read more news from NAIT",link:"/news-stories/newsroom"})]),_:1})]),u(g,{backgroundColor:"grey"},{default:b(()=>[e[7]||(e[7]=i("h2",{class:"heading-two text-center"},"Explore by topic",-1)),e[8]||(e[8]=i("div",{class:"prose prose-nait-default text-center mb-6"},[i("p",null," Browse news and stories by topic to quickly find content that interests you. ")],-1)),i("div",Oe,[(o(!0),h(S,null,k(r.activeTopic,s=>(o(),v(w,{key:s,type:"link",colour:"grey",text:s,link:`/news-stories/${n.slugify(s)}`},null,8,["text","link"]))),128))])]),_:1}),u(g,null,{default:b(()=>[e[9]||(e[9]=i("h2",{class:"heading-two text-center"},"Stay connected",-1)),u(N,{"layout-type":"auto-height",mdColumnCount:"2",lgColumnCount:"3",xlColumnCount:"3",class:"mt-7"},{default:b(()=>[u(A,{"media-type":"icon","icon-class":"fa-solid fa-envelope text-purple-500 text-4xl","padding-size":"large","heading-text":"techlifetoday",contentAlignment:"left",content:"<p>Find out more news about NAIT, stories about our alumni and their impact on their communities, and useful how-to content featuring our experts. Subscribe to re
43ceive more great stories every month.</p>",button:{text:"Subscribe to techlifetoday",type:"action",colour:"secondaryBlue"},onButtonClick:e[0]||(e[0]=s=>n.ctaClick("techlifetoday"))}),u(A,{"media-type":"icon","icon-class":"fa-solid fa-message text-purple-500 text-4xl","padding-size":"large","heading-text":"Media releases",contentAlignment:"left",content:"<p>Stay up-to-date with the latest news and developments at NAIT. By subscribing to news releases, you'll receive updates on important announcements, campus events, and success stories.</p>",button:{text:"Sign up for NAIT media releases",type:"action",colour:"secondaryBlue"},onButtonClick:e[1]||(e[1]=s=>n.ctaClick("media"))}),u(A,{"media-type":"icon","icon-class":"fa-solid fa-bell text-purple-500 text-4xl","padding-size":"large","heading-text":"Social channels",contentAlignment:"left",content:l.socialContent},null,8,["content"])]),_:1})]),_:1})])}const ot=H(Le,[["render",Ue]]);export{ot as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.