Skip to content

Instantly share code, notes, and snippets.

Field R360 tiers-and-benefit response field Logic
list benefits N/A
cardLabel label N/A
@benjclark
benjclark / eds-picture-element.hbs
Created July 11, 2024 15:47
Journal Cover Picture Element EDS Handlebars
{{#if picture}}
<div class="eds-c-card-composable__picture"{{#if picture.aspectRatio}} style="--eds-c-card-composable--image-aspect-ratio: {{picture.aspectRatio}}"{{/if}}>
<picture>
{{#each picture.source}}
<source
media="{{media}}"
{{#if dimensions}}
width="{{dimensions.width}}"
height="{{dimensions.height}}"
{{/if}}
@benjclark
benjclark / journal-cover-picture-element.html
Last active July 11, 2024 15:40
Journal Cover Picture Element HTML
<picture>
<source media="(min-width: 480px)"
width="115"
height="175"
srcset="https://media.springernature.com/w115/springer-static/cover-hires/journal/266?as=webp, https://media.springernature.com/w230/springer-static/cover-hires/journal/266?as=webp 2x">
<img width="60"
height="91"
src="https://media.springernature.com/w60/springer-static/cover-hires/journal/266?as=webp"
srcset="https://media.springernature.com/w120/springer-static/cover-hires/journal/266?as=webp 2x"
alt="">
@benjclark
benjclark / card-open.hbs
Last active May 22, 2024 15:05
thoughts on using eds-c-composable-card to implement the card open design
what we have now:
<article class="app-card-open{{#if pictures}} app-card-open--has-image{{/if}}{{#if fullWidth}} app-card-open--full-width{{/if}}{{#if compact}} app-card-open--compact{{/if}}">
<div class="app-card-open__main">
<h3></h3>
{{> author-list}} {{!-- from EDS --}}
{{> meta}} {{!-- from EDS --}}
{{> collection-list}} {{!-- from Oscar --}}
</div>
{{#if pictures}}
@benjclark
benjclark / gist:3e91c6110a5df674892cbc7cdbb9fbb8
Created January 17, 2023 15:31
Elements deps for various Oscar frontends
SpringerLink article page
brand-context (settings, base styles, utilities)
global-ad
global-author-list
global-card
global-banner
global-lists
global-meta
global-popup

Oscar very much relies on its automated test suite, and we've developed a number of test types as part of our approach.

Given the breadth of the project these are broadly true, but there may be small deviations in individual projects (which we're trying to iron out).

The tests are classified via package rather than filename, with the un-prefixed package tending to be used for shared test code. Some projects do have tests in the un-prefixed package, however, and as such the generic test task runs everything that's not in a known prefix.

Dictionary to help us talk about the stuff below

  • Dependencies : apps which the app-in-question is dependent on
  • Dependents : apps which depend on the app-in-question
@benjclark
benjclark / global-forms-data.json
Created October 18, 2022 11:07
Global Ratings Survey data needed for Global Forms partials
{
"globalFormData": {
"fields": [
{
"template": "globalFormRadios",
"error": "Please select one rating",
"label": "Rating",
"groupDescription": "A scale of 5 feelings conveyed using images that range from awful to great. The feelings represent how you feel about your experience today.",
"id": "ratings-survey-radios1",
"name": "ratings-survey-radios",
@benjclark
benjclark / example.html
Created October 12, 2022 08:43
Example of our HTML used for Global Popup
<div data-test="collection-editors">
<h2 class="app-section__heading u-mb-16">Editors</h2>
<ul class="c-collection-editors">
<li class="c-collection-editors__item">
<div class="c-collection-editors__name-container">
<span class="c-collection-editors__name">
<a data-test="author-name" data-track="click" data-track-action="open collection editor bio"
data-track-label="link"
href="#collection-editor-0" data-popup data-popup-min-width="300px"
data-popup-max-width="650px" data-popup-target="collection-editor-0">Stefanie Reichert
@benjclark
benjclark / surveymonkeycsat.html
Created August 10, 2022 14:04
Survey Monkey Customer Satisfaction Survey Form
<form name="surveyForm" action="" method="post" enctype="multipart/form-data" novalidate="" data-survey-page-form="">
<div class="questions clearfix">
<div class="question-click-shield" tabindex="-1" style="height: 161px; width: 600px; display: none;"></div>
<div class="question-row clearfix" tabindex="-1">
<div data-question-type="matrix_rating" data-rq-question-type="net_promoter_score"
class="question-container ">
<div id="question-field-658323000" data-qnumber="1" data-qdispnumber="1" data-question-id="658323000"
class=" question-matrix-nps-table qn question rating"><h3 class="screenreader-only">Question
Title</h3>
<div class=" question-fieldset question-legend"><h4 id="question-title-658323000"
<nav class="c-pagination">
<ul class="c-pagination__container">
<li class="c-pagination__item">
<a href="" class="c-pagination__link"><svg class="c-pagination__icon" aria-hidden="true" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4.46975946 3.28337502-4.17620792 4.03074001c-.39120768.37758093-.39160691.98937525.0000316 1.367372l4.1763942 4.03091977c.39122514.3775978 1.01908149.3838182 1.40017357.0160006.39113012-.3775061.3930364-.9877245-.00310603-1.3700683l-2.48183446-2.39538585h11.61478958l.1166211-.00649339c.4973387-.055753.8833789-.46370161.8833789-.95867408 0-.49497246-.3860402-.90292107-.8833789-.95867408l-.1166211-.00649338h-11.61478958l2.4816273-2.39518594c.39282216-.37913917.40056173-.98637524.01946965-1.35419292-.39113012-.37750607-1.02492687-.37784433-1.41654791.00013556z" fill-rule="evenodd"></path></svg> Prev</a>
</li>
<li class="c-pagination__item">
<a href="" class="c-pagination__link">