{"version":3,"file":"4.CiRHdPop.mjs","sources":["../../../../../../src/routes/+page.ts","../../../../../../src/routes/+page.svelte"],"sourcesContent":["import { api } from '$lib/api'\nimport type { PageLoad } from './$types'\n\nexport const csr = true\n\ninterface NewsItem {\n  title: string\n  link: string\n  pubDate: string\n  description: string\n  image?: string\n}\n\nconst FALLBACK_IMAGES = [\n  'https://docs.gato.txst.edu/20810/w/1000/class-outside-of-old-main.jpg',\n  'https://docs.gato.txst.edu/20770/w/1000/steps-to-old-main.jpg',\n  'https://docs.gato.txst.edu/20767/w/1000/student-walking-through-mall.jpg'\n]\n\nexport const load: PageLoad = async ({ fetch }) => {\n  const collegesData = await api.getColleges()\n\n  let news: NewsItem[] = []\n  try {\n    const newsResponse = await fetch('/api/news')\n    const allNews: NewsItem[] = await newsResponse.json()\n    news = allNews.slice(0, 3).map((item, i) => ({\n      ...item,\n      image: item.image ?? FALLBACK_IMAGES[i % FALLBACK_IMAGES.length]\n    }))\n  } catch (error) {\n    console.error('Failed to fetch news:', error)\n  }\n\n  return {\n    colleges: collegesData.colleges,\n    news\n  }\n}\n","<script lang=\"ts\">\n    import Header from '$lib/components/Header.svelte'\n    import SearchFilter from '$lib/components/SearchFilter.svelte'\n    import type { College } from '$lib/queries/college'\n    import type { PageData } from './$types'\n\n    export let data: PageData\n\n    $: colleges = (data as { colleges: College[] }).colleges\n    $: news = data.news\n\n    const filters = {\n      query: '',\n      college: '',\n      department: '',\n      page: 1,\n      perPage: 10,\n      tab: 'faculty'\n    }\n\n</script>\n\n<div class=\"home gradient-wrap [ bg-red-200 py-xl mb-2xl ] \">\n    <Header dark />\n    <main id=\"main-content\">\n    <section class=\"intro wrapper \">\n      <div class=\"intro-main intro-main--home  [ xp-xs-l pb-2 text-white relative lg:min-h-[600px] ]\">\n       <div class=\"home-intro flow flex flex-col xmd:flex-row gap-x-10 xmd:items-center max-w-xl \">\n            <h2 class=\"basis-1/4 text-step-8 font-black leading-[73px] tracking-[2.46px] flex flex-wrap lg:flex-col\">\n                <span class=\"whitespace-nowrap\">Faculty&nbsp;</span>\n                <span class=\"whitespace-nowrap\">Profiles</span></h2>\n            <p class=\"basis-3/4 text-xl max-w-screen-md \">Learn more about our award-winning faculty at Texas State University with a detailed look into each faculty member's expertise, showcasing their research, education, publications, teaching interests, and grant successes. </p>\n       </div>\n       <div class=\"home-search md:pr-10 pt-6 max-w-5xl\">\n\n        <SearchFilter\n              {colleges}\n              {filters}\n              actionUrl=\"/search\"\n              className=\"home-search-filter\"\n              showTabs={false}\n              showPagination={false}\n              totalResults={0}\n              stacked\n            />\n\n       </div>\n    </div>\n  </section>\n\n  </main>\n  </div>\n\n  <div class=\"wrapper\" style=\"--wrapper-max-width: 1440px;\">\n\n    <section class=\"news bg-white p-s-3xl flow\">\n        <h4 id=\"featured-awards-title\" class=\"section-title\" data-subtitle style=\"--font-size: var(--step-5); --font-weight: 800;\" >Featured Faculty</h4>\n        <a href=\"https://news.txst.edu/\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-maroon-500 font-ex\">From the TXST Newsroom <span class=\"sr-only\">(opens in new window)</span> </a>\n        <div class=\"\">\n            <ol class=\"news-card-list grid\" style=\"--grid-placement: auto-fit;\">\n                {#each news as item}\n                <li class=\"news-card flow\">\n                  <a href={item.link} class=\"flow\">\n                    <div class=\"news-card__img\">\n                        <img src=\"{item.image}\" alt=\"\">\n                    </div>\n                    <div class=\"news-card__text flow\">\n                        <span class=\"uppercase text-maroon-500 font-extrabold text-sm\">\n                          {new Date(item.pubDate).toLocaleDateString('en-US', { month: 'long', year: 'numeric' })}\n                        </span>\n                        <p>{item.title}</p>\n                    </div>\n                    </a>\n                </li>\n                {/each}\n            </ol>\n        </div>\n    </section>\n    <section aria-labelledby=\"featured-awards-title\" class=\"featured-grants prose flow section-card section-card--reverse bg-white\" data-layout=\"50-50\" >\n      <div class=\"card-text prose section-card__text flow \" >\n          <h3 id=\"featured-awards-title\" class=\"section-title\" style=\"--font-size: var(--step-6-5); --font-weight: 800;\" >What is a faculty profile?</h3>\n          <p style=\"--flow-space: var(--space-l);\">Faculty Profiles is an information resource at Texas State University that helps connect faculty members with each other and allows people from outside the university to find out more about faculty research, awards, scholarly/creative work, teaching, grants, and more.</p>\n          <p>Faculty Profiles creates a profile by syncing with the Faculty Qualifications system to create an accurate snapshot of each faculty member's work.</p>\n          <a href=\"/departments\" class=\"btn\">Explore colleges and departments</a>\n      </div>\n      <div class=\"section-card__img\">\n          <img src=\"https://docs.gato.txst.edu/723197/w/1190/faculty-profile-home-1.jpg\" alt=\"\">\n      </div>\n    </section>\n    <section aria-labelledby=\"featured-awards-title\" class=\"featured-grants prose flow section-card  bg-white\" data-layout=\"50-50\" >\n        <div class=\"card-text prose section-card__text flow \" >\n            <h3 id=\"featured-awards-title\" class=\"section-title\" style=\"--font-size: var(--step-6-5); --font-weight: 800;\" >Get in touch</h3>\n            <dl class=\"contact-info \">\n                <dt class=\"text-maroon-500 font-extrabold mt-l\">Mailing Address</dt>\n                <dd class=\"m-0\">\n                  <address class=\"not-italic\">\n                    601 University Drive<br>\n                    San Marcos, Texas 78666-4684\n                  </address>\n                </dd>\n\n                <dt class=\"text-maroon-500 font-extrabold mt-l\">Phone Number</dt>\n                <dd class=\"m-0\">\n                  <address>\n                    <a class=\"not-italic\" href=\"tel:5122452111\">512-245-2111</a>\n                  </address>\n                </dd>\n\n              </dl>\n              <a href=\"https://itac.txst.edu/support/faculty-profiles.html\" class=\"btn\">Get help</a>\n        </div>\n        <div class=\"section-card__img\">\n            <img src=\"https://docs.gato.txst.edu/723177/w/1000/faculty-profile-home-2.jpg\" alt=\"\">\n        </div>\n    </section>\n  </div>\n"],"names":["csr","FALLBACK_IMAGES","load","fetch","collegesData","api","news","item","i","error","t1_value","ctx","t3_value","src_url_equal","img","img_src_value","attr","a","a_href_value","insert_hydration","target","li","anchor","append_hydration","div0","div1","span","p","dirty","set_data","t1","t3","div3","main","section0","div2","div9","section1","h4","a0","div4","ol","section2","section3","data","$$props","filters","$$invalidate","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