Skip to content

Commit

Permalink
Merge pull request #313 from wri/WRI-302--podcast-template
Browse files Browse the repository at this point in the history
#302: 'Listen on' CKEditor template for podcasts
  • Loading branch information
mariacha authored Sep 17, 2024
2 parents d0a5fbc + 9e51153 commit d894898
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/wri_admin/templates/ckeditor5_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
"icon": "",
"description": "",
"html": "<div class=\"report-teaser gold-borders-medium alignright\"><div class=\"image-wrapper\">Optional Image - set to 'Thumbnail'</div><div class=\"text-wrapper\"><div class=\"h4 topic-tag\">Report/Pub Title</div><p>Teaser text for the report or publication.</p><p><a href=\"/resources\" class=\"button small\">Download</a></p></div></div>"
},
{
"title": "Podcast: Listen On...",
"icon": "",
"description": "",
"html": "<p>&nbsp;</p><p class=\"secondary\" style=\"line-height:0;\"><em>Or listen on:</em></p><div class=\"icons-container\"><div class=\"icons-div apple-podcasts-button\"><a href=\"\"><span class=\"podcast-social-icon secondary\">Apple&nbsp;Podcasts</span></a></div><div class=\"icons-div spotify-podcasts-button\"><a href=\"\"><span class=\"podcast-social-icon secondary\">Spotify</span><strong>&nbsp;</strong></a></div><div class=\"icons-div youtube-podcasts-button\"><a href=\"\"><span class=\"podcast-social-icon secondary\">YouTube</span>&nbsp;</a></div></div>"
}
]
50 changes: 50 additions & 0 deletions themes/custom/ts_wrin/sass/ckeditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,54 @@
-webkit-font-smoothing: antialiased;
color: $black;
}

// Podcast icons.
.icons-container {
display: flex;
flex-wrap: wrap;
}
.icons-container > .icons-div {
margin: 10px;
padding: 12px;
border: 1px solid #000;
width: 155px;
height: 25px;
}
.icons-container > .icons-div:hover {
background-color: #fafafa !important;
}
.icons-container > .icons-div img {
vertical-align: middle;
}
.icons-container a {
text-decoration: none;
align-items: center;
color: #000;
}
.apple-podcasts-button {
background-image: url('https://files.wri.org/d8/s3fs-public/2024-07/apple-podcasts-icon.png');
}
.youtube-podcasts-button {
background-image: url('https://files.wri.org/d8/s3fs-public/2024-07/youtube-icon.png');
}
.spotify-podcasts-button {
background-image: url('https://files.wri.org/d8/s3fs-public/2024-07/spotify-icon.png');
}
.icons-div {
background-position: 10px 50%;
background-repeat: no-repeat;
background-size: 30px auto;
}
.podcast-social-icon {
margin-left: 40px;
font-size: 1rem;
}

.icons-container div a {
text-decoration: none !important;
}

.icons-div a {
display: block;
}
}

0 comments on commit d894898

Please sign in to comment.