Skip to content

Commit

Permalink
Addition of a twitter link for sponsor and speaker for each language …
Browse files Browse the repository at this point in the history
…english/french.

Addition of a message in twitter after clicking the link.
  • Loading branch information
bastaille committed Jun 27, 2024
1 parent 3e60c93 commit 17a1fb1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/model/Speaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,11 @@ public String toString() {
public int compareTo(Speaker o) {
return toString().compareTo(o.toString());
}
public String getTalksForTwitter() {
StringBuilder talksTwitter= new StringBuilder();
for(Talk talk : talks){
talksTwitter.append("🎙️«").append(talk.getTitle()).append(\n");
}
return talksTwitter.toString();
}
}
5 changes: 5 additions & 0 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ views.application.speakers.unavailable=The speaker list is not available yet.
views.application.speakers.subscribe=Subscribe to the newsletter to be notified when the speaker list is published.

views.application.speaker.title=Speaker
views.application.speaker.linkTitle= Tweet about it !
views.application.speaker.tweet=We'll have the chance to have %s %s with us at RivieraDEV form the 8 to the 10 of July🌴😎⛱️\n\nCheck it out :\n%s\n\n@%s\n#SophiaAntipolis ☀️🌴\n\n


views.application.schools.title=Riviera DEV action for schools
views.application.schools.subtitle=Riviera DEV helps schools teach computer science
Expand Down Expand Up @@ -240,6 +243,8 @@ views.application.sponsors.level.party=Party
views.application.sponsors.level.partner=Partners
views.application.sponsors.level.schools=Schools
views.application.sponsors.title.platinum=Platinum sponsor
views.application.sponsors.linkTweetTitle= Tweet about it!
views.application.sponsors.tweet=A big thanks to our %s @%s for their sponsorship! 🙏\nCome and meet them at #RivieraDev from the 8th to the 10th of July and discover their activities! 😎⛱️🌴\nGet your tickets at➡️ %s\n\n

views.application.becomeSponsor.title=Become sponsor
views.application.becomeSponsor.why=Why sponsor Riviera DEV ?
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ views.application.speakers.unavailable=La liste des orateurs n'est pas encore di
views.application.speakers.subscribe=Abonnez-vous à la newsletter pour être prévenu dès que les orateurs sont connus.

views.application.speaker.title=Orateur
views.application.speaker.linkTitle= Tweetez-le !
views.application.speaker.tweet=Nous aurons la chance d'avoir %s %s avec nous à RivieraDEV du 8 au 10 Juillet🌴😎⛱️\n\nVenez y assister :\n%s\n\n@%s\n#SophiaAntipolis ☀️🌴\n\n

views.application.schools.title=Actions de Riviera DEV pour les écoles
views.application.schools.subtitle=Riviera DEV aide les écoles à enseigner l'informatique
Expand Down Expand Up @@ -242,6 +244,8 @@ views.application.sponsors.level.party=Soirée
views.application.sponsors.level.partner=Partenaires
views.application.sponsors.level.schools=Écoles
views.application.sponsors.title.platinum=Partenaire Platinum
views.application.sponsors.linkTweetTitle= Tweetez-le !
views.application.sponsors.tweet= Un grand merci à notre sponsor %s @%s pour leur soutien !\nVenez les rencontrer à RivieraDEV du 8 au 10 Juillet! 😎⛱️🌴\nReservez vite vos tickets➡️%s\n\n

views.application.becomeSponsor.title=Devenez sponsor
views.application.becomeSponsor.why=Pourquoi sponsoriser Riviera DEV ?
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/templates/Application/speaker.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ <h1 class="page__mainTitle">{m:views.application.speaker.title}</h1>
<figcaption class="personDetails__desc">
<div class="personDetails__name">{speaker}</div>
<div class="personDetails__title">{speaker.company}</div>
<div class="personDetails_link">
<a href="https://twitter.com/intent/tweet/?text={m:views.application.speaker.tweet(speaker.firstName,speaker.lastName,speaker.talksForTwitter,speaker.twitterAccount).urlEncode()}&url={uriabs:Application.speakerBannerImage(speaker.id,'en').toString().urlEncode()}">{m:views.application.speaker.linkTitle}
</a>
</div>
<div class="personDetails__network">
{#if speaker.twitterAccount}
<div class="personDetails__twitter">
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/templates/Application/sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ <h1 class="page__mainTitle">{m:views.application.sponsor.title}</h1>
<div class="partenaireDetails__header">
<h2 class="partenaireDetails__name">{sponsor.company}</h2>
<div class="partenaireDetails__network">
<div class="partenaireDetails_linkTweet">
<a href="https://twitter.com/intent/tweet/?text={m:views.application.sponsors.tweet(sponsor.level,sponsor.twitterAccount,uriabs:Application.subscribe).urlEncode()}&url={uriabs:Application.sponsorBannerImage(sponsor.id,'en').toString().urlEncode()}"> {m:views.application.sponsors.linkTweetTitle}
</a>
</div>
{#if sponsor.companyURL}
<div class="partenaireDetails__website">
<a href="{sponsor.companyURL}" target="_blank">{sponsor.companyURL}</a>
Expand Down

0 comments on commit 17a1fb1

Please sign in to comment.