Skip to content

Commit

Permalink
formatted time. removed fb icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Rydeståhl committed Oct 1, 2024
1 parent e3db4da commit b1c1cc8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const data = json.data.social
<BtnSecondary text="Bli medlem" link="/bli-medlem"/>
<div class="container mx-auto flex justify-center items-center">
<div class="flex items-center space-x-4 m-8">
<a href={data.facebook} target="_blank" rel="noopener" rel="noreferrer" class="text-gray-300 hover:text-white">
<!-- <a href={data.facebook} target="_blank" rel="noopener" rel="noreferrer" class="text-gray-300 hover:text-white"> -->
<!-- Replace the placeholder with your Facebook SVG icon -->
<svg xmlns="http://www.w3.org/2000/svg" width={heightAndWidth} height={heightAndWidth} viewBox="0 0 126.865 126.865">
<path id="Icon_-_Facebook" data-name="Icon - Facebook" d="M63.19,126.865h0Zm.447,0h0Zm-.641,0h0Zm.846,0h0Zm-1.033,0h0Zm1.238,0h0Zm.2,0h0Zm-1.68,0h0Zm1.884,0h0Zm-2.082,0h0Zm2.287,0h0Zm-2.474,0h0Zm-.232,0h0Zm2.91,0h0Zm-3.114-.006.077,0h-.077Zm3.318,0h-.031l.077,0Zm.2-.005h-.05l.078,0h-.028Zm-3.709,0,.078,0h-.078Zm-.178-.005.056,0-.053,0h0Zm4.091,0-.053,0,.056,0h0Zm.2-.007h-.028l.085,0Zm-4.552,0,.085,0h-.028Zm-.186-.007.09,0-.05,0Zm4.941,0-.05,0,.09,0Zm-5.123-.009.088,0-.069,0H60.76Zm5.326,0-.069,0,.088,0h-.019ZM60.5,126.8l.094,0h-.023Zm5.785,0h-.023l.094,0-.071,0Zm-5.968-.012.1,0-.046,0Zm6.17,0-.046,0,.1,0Zm-6.351-.012.1,0-.069,0Zm6.553,0-.069,0,.1,0Zm.2-.011-.09,0,.08,0,.094-.005-.084,0Zm-6.919,0,.08,0-.09,0-.083,0,.094.005Zm7.122-.012-.04,0,.1-.006Zm-7.395,0,.1.006-.04,0Zm-.179-.011.1.006-.063,0-.038,0Zm7.776,0-.063,0,.1-.006-.038,0Zm-7.947-.013.09.006-.084-.005-.085-.005Zm8.149,0-.084.005.09-.006.079,0-.085.005Zm.2-.013-.03,0,.1-.006-.066,0Zm-8.612,0,.1.006-.03,0Zm-.179-.012.094.007-.052,0-.043,0Zm8.992,0-.052,0,.094-.007Zm-9.17-.016.086.006-.067,0h-.019Zm9.372,0-.067,0,.086-.006Zm-9.611-.02.076.006h-.018Zm9.813,0h-.018l.076-.006Zm.2-.016-.036,0,.077-.006Zm-10.2,0,.077.006-.036,0-.041,0Zm-.18-.015.065.005-.046,0Zm10.579,0-.046,0,.065-.005Zm-10.777-.018.02,0h-.02Zm10.977,0h0l.02,0h-.016Zm.2-.018H69.1l.045,0-.027,0Zm-11.389,0,.045,0h-.018l-.027,0Zm-.186-.017.033,0-.021,0Zm11.775,0-.021,0,.033,0Zm-15.793-.5a63.433,63.433,0,1,1,19.823,0V81.769h14.78l2.812-18.336H73.344v-11.9c0-5.016,2.458-9.906,10.337-9.906h8V26.017a97.544,97.544,0,0,0-14.2-1.239c-14.489,0-23.959,8.781-23.959,24.679V63.433H37.415V81.769H53.521Z" fill="#fff" fill-rule="evenodd"/>
</svg>
</a>
<!-- <svg xmlns="http://www.w3.org/2000/svg" width={heightAndWidth} height={heightAndWidth} viewBox="0 0 126.865 126.865"> -->
<!-- <path id="Icon_-_Facebook" data-name="Icon - Facebook" d="M63.19,126.865h0Zm.447,0h0Zm-.641,0h0Zm.846,0h0Zm-1.033,0h0Zm1.238,0h0Zm.2,0h0Zm-1.68,0h0Zm1.884,0h0Zm-2.082,0h0Zm2.287,0h0Zm-2.474,0h0Zm-.232,0h0Zm2.91,0h0Zm-3.114-.006.077,0h-.077Zm3.318,0h-.031l.077,0Zm.2-.005h-.05l.078,0h-.028Zm-3.709,0,.078,0h-.078Zm-.178-.005.056,0-.053,0h0Zm4.091,0-.053,0,.056,0h0Zm.2-.007h-.028l.085,0Zm-4.552,0,.085,0h-.028Zm-.186-.007.09,0-.05,0Zm4.941,0-.05,0,.09,0Zm-5.123-.009.088,0-.069,0H60.76Zm5.326,0-.069,0,.088,0h-.019ZM60.5,126.8l.094,0h-.023Zm5.785,0h-.023l.094,0-.071,0Zm-5.968-.012.1,0-.046,0Zm6.17,0-.046,0,.1,0Zm-6.351-.012.1,0-.069,0Zm6.553,0-.069,0,.1,0Zm.2-.011-.09,0,.08,0,.094-.005-.084,0Zm-6.919,0,.08,0-.09,0-.083,0,.094.005Zm7.122-.012-.04,0,.1-.006Zm-7.395,0,.1.006-.04,0Zm-.179-.011.1.006-.063,0-.038,0Zm7.776,0-.063,0,.1-.006-.038,0Zm-7.947-.013.09.006-.084-.005-.085-.005Zm8.149,0-.084.005.09-.006.079,0-.085.005Zm.2-.013-.03,0,.1-.006-.066,0Zm-8.612,0,.1.006-.03,0Zm-.179-.012.094.007-.052,0-.043,0Zm8.992,0-.052,0,.094-.007Zm-9.17-.016.086.006-.067,0h-.019Zm9.372,0-.067,0,.086-.006Zm-9.611-.02.076.006h-.018Zm9.813,0h-.018l.076-.006Zm.2-.016-.036,0,.077-.006Zm-10.2,0,.077.006-.036,0-.041,0Zm-.18-.015.065.005-.046,0Zm10.579,0-.046,0,.065-.005Zm-10.777-.018.02,0h-.02Zm10.977,0h0l.02,0h-.016Zm.2-.018H69.1l.045,0-.027,0Zm-11.389,0,.045,0h-.018l-.027,0Zm-.186-.017.033,0-.021,0Zm11.775,0-.021,0,.033,0Zm-15.793-.5a63.433,63.433,0,1,1,19.823,0V81.769h14.78l2.812-18.336H73.344v-11.9c0-5.016,2.458-9.906,10.337-9.906h8V26.017a97.544,97.544,0,0,0-14.2-1.239c-14.489,0-23.959,8.781-23.959,24.679V63.433H37.415V81.769H53.521Z" fill="#fff" fill-rule="evenodd"/> -->
<!-- </svg> -->
<!-- </a> -->
<a href={data.linkedin} target="_blank" rel="noopener" rel="noreferrer" class="text-gray-300 hover:text-white">
<!-- Replace the placeholder with your LinkedIn SVG icon -->
<svg xmlns="http://www.w3.org/2000/svg" width={heightAndWidth} height={heightAndWidth} viewBox="0 0 126.865 126.865">
Expand Down
24 changes: 23 additions & 1 deletion src/pages/event/[post].astro
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ export async function getStaticPaths() {
})
}
function formatTime(isoTid) {
// Konvertera ISO-tid till ett Date-objekt
const datum = new Date(isoTid);
// Skapa en options-objekt för att anpassa formateringen
const options = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
hour12: false, // Använd 24-timmarsformat
};
// Använd Intl.DateTimeFormat för att formatera enligt önskemål
const formateradTid = datum.toLocaleString('sv-SE', options);
return formateradTid;
}
export const prerender = true
const { post } = Astro.props
Expand All @@ -66,7 +86,7 @@ const { post } = Astro.props
<section class="my-12 ">
<div class="container">
<h2>{post.title}</h1><br />
<p>Evenemanget startar: {post.eventStartDate}</p><br />
<p>Evenemanget startar: {formatTime(post.eventStartDate)}</p><br />
<div set:html={post.body} />
</div>
</section>
Expand All @@ -75,10 +95,12 @@ const { post } = Astro.props
</DefaultLayout>
s
<style lang="scss">

.container {
margin: 1rem auto;
padding-bottom: 1rem;
}

ul {
display: grid;
grid-template-columns: 1fr;
Expand Down

0 comments on commit b1c1cc8

Please sign in to comment.