swissjobra

DSF: Shopify Payment-Icons

Mar 6th, 2021 (edited)
6,408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.41 KB | None | 0 0
  1. <style>
  2. #payment-methodes-custom {
  3.   /* -- Abstand zum Inhalt davor/danach -- */
  4.   margin-top: 10px;
  5.   margin-bottom: 10px;
  6.  
  7.   /* -- Rechts, Zentriert oder Linksbündig (Icons/Text) -- */
  8.   text-align: center;
  9. }
  10.  
  11. #payment-methodes-custom .payment_methodes_custom_title {
  12.   /* -- Schriftgrösse/Typ/Farbe -- */
  13.   font-size: 1.2em;
  14.   font-weight: 600;
  15.   color: #000;
  16. }
  17.  
  18. .payment-icons .icon {
  19.     /* -- Grösse der Icons -- */
  20.     width: 45px;
  21.     height: 28px;
  22.  
  23.     /* -- Abstand zum Titel -- */
  24.     margin-top: 5px;
  25.  
  26.     /* -- Die nächsten zwei Linien ändern die Icons auf Grau, kann entfernt werden -- */
  27.     filter: grayscale(100%);
  28.     -webkit-filter: grayscale(100%);
  29. }
  30.  
  31. /* -- Definitionen für die Auflistung, kann bei den Shopify-Standad Themes entfernt werden (da schon vorhanden im Theme) -- */
  32. .list--inline {
  33.   padding: 0;
  34.   margin: 0;
  35. }
  36.  
  37. .list--inline li {
  38.     display: inline-block;
  39.     margin-bottom: 0;
  40.     vertical-align: middle;
  41. }
  42. </style>
  43.  
  44. <div id="payment-methodes-custom">
  45.       <span class="payment_methodes_custom_title">Sicher bezahlen mit:</span>
  46.       <ul class="payment-icons list--inline">
  47.         {% assign enabled_payment_types = 'paypal,visa,master,klarna,google_pay' | remove: ' ' | split: ',' %}
  48.         {% for type in enabled_payment_types %}
  49.           <li>
  50.             {{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
  51.           </li>
  52.         {%- endfor -%}
  53.       </ul>
  54. </div>
Advertisement
Add Comment
Please, Sign In to add comment