Template:ContributeButton: Difference between revisions

From WikiPhone
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
<includeonly>
<!-- ContributeButton: single-file, responsive button -->
{{TemplateStyles|Template:ContributeButton/styles.css}}
<!-- Params:
<div class="wp-contrib-cta">
    |link=  page to open (default: Help:Contributing)
  <a class="wp-contrib-cta__btn"
    |text=   button label (default: Learn how to contribute)
    href="{{fullurl:{{{link|Help:Contributing}}}}}"
-->
    title="{{{text|Learn how to contribute}}}"
 
    aria-label="{{{text|Learn how to contribute}}}"
<a
    target="{{{target|_self}}}"
  href="{{fullurl:{{{link|Help:Contributing}}}}}"
    rel="{{#ifeq:{{{target|_self}}}|_blank|noopener noreferrer|}}">
  title="{{{text|Learn how to contribute}}}"
    <span class="wp-contrib-cta__icon" aria-hidden="true">📝</span>
  role="button"
    <span class="wp-contrib-cta__text">{{{text|Learn how to contribute}}}</span>
  style="
    <span class="wp-contrib-cta__arrow" aria-hidden="true">→</span>
    /* layout */
  </a>
    display: grid;
</div>
    grid-template-columns: auto 1fr auto;
</includeonly>
    align-items: center;
<noinclude>
    gap: .75rem;
Use with:
 
<code><nowiki>{{ContributeButton}}</nowiki></code> or
    /* sizing & spacing */
<code><nowiki>{{ContributeButton|link=Help:Contributing|text=Start contributing}}</nowiki></code>
    width: 100%;
</noinclude>
    max-width: 640px;
    margin: .25rem auto;
    padding: .95rem 1.15rem;
 
    /* visuals */
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid #d0d7e2;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
 
    /* text */
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: clamp(16px, 2.8vw, 18px);
    line-height: 1.2;
    color: #1f2937;
 
    /* tap target */
    -webkit-tap-highlight-color: transparent;
  "
>
  <!-- left icon (pencil on paper) -->
  <span aria-hidden="true" style="font-size: 1.25em; line-height: 1">📝</span>
 
  <!-- centered label -->
  <span style="
    text-align: center;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: normal;
  ">
    {{{text|Learn how to contribute}}}
  </span>
 
  <!-- right arrow -->
  <span aria-hidden="true" style="font-size: 1.25em; line-height: 1">→</span>
</a>

Latest revision as of 05:45, 19 August 2025


<a

 href="http://telephones.wiki/Help:Contributing"
 title="Learn how to contribute"
 role="button"
 style="
   /* layout */
   display: grid;
   grid-template-columns: auto 1fr auto;
   align-items: center;
   gap: .75rem;
   /* sizing & spacing */
   width: 100%;
   max-width: 640px;
   margin: .25rem auto;
   padding: .95rem 1.15rem;
   /* visuals */
   text-decoration: none;
   border-radius: 14px;
   border: 1px solid #d0d7e2;
   background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
   box-shadow: 0 2px 6px rgba(0,0,0,.06);
   /* text */
   font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
   font-size: clamp(16px, 2.8vw, 18px);
   line-height: 1.2;
   color: #1f2937;
   /* tap target */
   -webkit-tap-highlight-color: transparent;
 "

>

 
 
   Learn how to contribute
 
 

</a>