Skip to content

Commit

Permalink
add: Added DevFestAhm24 badge assets
Browse files Browse the repository at this point in the history
- Updated assets and output file name as generic
  • Loading branch information
JaldeepAsodariya committed Nov 21, 2024
1 parent 1953c3c commit cf78a2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Binary file added public/images/badge-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/badge-ticket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/pages/badge-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class BadgePage extends PolymerElement {
height: 450px;
border: 1px solid #ccc;
position: relative;
background-image: url('/images/ticket-badge-23.png');
background-image: url('/images/badge-ticket.png');
/* Updated background image */
background-size: cover;
background-position: center;
Expand All @@ -218,11 +218,11 @@ export class BadgePage extends PolymerElement {
font-color="[[heroSettings.fontColor]]"
>
<div class="hero-title">[[heroSettings.title]]</div>
<h2 class="name">[[tbd.unveilSoon]]</h2>
<p class="hero-description">[[tbd.announcedSoon]]</p>
<!-- <h2 class="name">[[tbd.unveilSoon]]</h2>
<p class="hero-description">[[tbd.announcedSoon]]</p> -->
</hero-block>
<!-- <div class="container" layout vertical justified wrap center>
<div class="container" layout vertical justified wrap center>
<div class="input-panel">
<p>
Now that you are here, how about personalising your profile? Upload an image and generate a
Expand Down Expand Up @@ -326,7 +326,7 @@ export class BadgePage extends PolymerElement {
<mwc-button slot="primaryAction" on-click="cropImage">Done</mwc-button>
</mwc-dialog>
</div> -->
</div>
<footer-block></footer-block>
`;
Expand Down Expand Up @@ -357,7 +357,7 @@ export class BadgePage extends PolymerElement {
this.canvas = this.shadowRoot?.querySelector('#profile-canvas');
this.ctx = this.canvas.getContext("2d");
this.banner.setAttribute('crossOrigin', 'anonymous')
this.banner.src = '/images/devfestahm23-badge-frame.png';
this.banner.src = '/images/badge-profile.png';
this.banner.onload = () => {
this.ctx.imageSmoothingEnabled = false;
this.draw();
Expand Down Expand Up @@ -493,7 +493,7 @@ export class BadgePage extends PolymerElement {
download = () => {
const a = document.createElement("a");
const url = this.canvas.toDataURL("image/png;base64");
a.download = "devfestahm23-profile-badge.png";
a.download = "devfestahm-profile-badge.png";
a.href = url;
a.click();
};
Expand All @@ -512,7 +512,7 @@ export class BadgePage extends PolymerElement {
const backgroundImage = new Image();
const ticketImage = this.shadowRoot?.querySelector('#ticket-image');

backgroundImage.src = '/images/ticket-badge-23.png';
backgroundImage.src = '/images/badge-ticket.png';
backgroundImage.onload = function () {
context.drawImage(backgroundImage, 0, 0, canvas.width, canvas.height);

Expand Down Expand Up @@ -550,7 +550,7 @@ export class BadgePage extends PolymerElement {

const link = document.createElement('a');
link.href = canvas.toDataURL('image/png');
link.download = 'devfestahm23-ticket-badge.png';
link.download = 'devfestahm-ticket-badge.png';
link.click();
};
}
Expand Down

0 comments on commit cf78a2e

Please sign in to comment.