Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting banner based on feedback #317

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions components/twoColumnAnnouncement.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<section class="py-40 md:py-80"
:class="[backgroundColour]"
:data-header-text="[(backgroundColour === 'bg-purple-dark') ? 'text-white' : (backgroundColour === 'bg-pastel-blue') ? 'text-purple-dark' : 'text-gray-dark']"
>
<div class="md:flex justify-between container inner" :class="[textAlignment != 'textRight' ? 'items-center' : 'items-start']">
<div class="w-full md:w-1/2 step-delay_1 md:mr-80 md:order-1 order-2">
<h1 class="text-24 leading-23 md:leading-32 mb-32" :class="[!bgColour ? 'text-purple-dark' : 'text-purple-dark']">{{header}}</h1>
<div v-if="textAlignment != 'textRight'" :class="[!bgColour ? 'text-purple-dark' : 'text-purple-dark']" class="mt-8 md:block hidden" v-html="$md.render(text)"></div>

Check warning on line 9 in components/twoColumnAnnouncement.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 14)

'v-html' directive can lead to XSS attack
<div v-if="textAlignment != 'textRight'" class="block md:hidden"><a :href="link"><img :alt="`${header} image`" :src="imageAsset" /></a></div>
</div>
<div v-if="!card" class="w-full md:w-1/2 step-delay_2 mt-32 md:mt-0 md:order-2">
<div v-if="textAlignment != 'textRight'" class="md:block hidden"><a :href="link"><img :alt="`${header} image`" :src="imageAsset" /></a></div>
</div>
<div v-else v-html="$md.render(text)"></div>

Check warning on line 15 in components/twoColumnAnnouncement.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 14)

'v-html' directive can lead to XSS attack
<div v-if="textAlignment != 'textRight'" :class="[!bgColour ? 'text-purple-dark' : 'text-white']" class="mt-8 block md:hidden" v-html="$md.render(text)"></div>

Check warning on line 16 in components/twoColumnAnnouncement.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 14)

'v-html' directive can lead to XSS attack
</div>
</div>
</section>
</template>
<script lang="js">
export default {

components: {

},

props: {
header: { type: String, default: null },
text: { type: String, default: null },
imageAsset: { type: String, default: null },
alignment: { type: String, default: null },
bgColour: { type: String, default: null },
card: { type: Object, default: null },
link: { type: String, default: null },
},

data: () => ({
}),

computed: {
backgroundColour(){
return `${this.bgColour}`;
},
textAlignment() {
return this.alignment;
},
},

mounted() {
},

methods: {
}

};
</script>
9 changes: 9 additions & 0 deletions content/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ date: 2021-07-12T15:33:03.264Z
description: Homepage
thumbnail: /img/icon.png
sections:
- type: twoColumnAnnouncement
alignment: imageRight
bgColour: bg-pastel-orange
cardTitle: Join us in Salt Lake City for [SigstoreCon!](https://events.linuxfoundation.org/sigstorecon-supply-chain-day/)
text: Register now for our [Co-located KubeCon event](https://events.linuxfoundation.org/sigstorecon-supply-chain-day/), November 12, 2024
header: Join us in Salt Lake City for SigstoreCon!
imageAsset: /img/sigstorecon2024.svg
isScreenHeight: false
link: https://events.linuxfoundation.org/sigstorecon-supply-chain-day/
- ctaStyle: solidCtaPurple
showSupportedBy: true
text: Making sure your software is what it claims to be.
Expand Down
1 change: 0 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
loading...
</div>
<div v-else>
<a href=https://events.linuxfoundation.org/sigstorecon-supply-chain-day/ ><img src=~/static/img/SigstoreCon2024Banner.svg></img></a>
<Header :navigation="headerNavLinks" :socialLinks="footerSocialLinks" />
<main>
<Nuxt />
Expand Down
Loading
Loading