Vorlage:Tweet: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
(Wikipedia is not Twitter. We are not supposed to be re-creating their whole UI to clash with Wikipedia's existing default styling for quotes and other templates, especially for font family which is purposely left unspecified; see MOS:FONTFAMILY and the talk page)
(please utilize spaces; it improves readability immensly)
Zeile 1: Zeile 1:
<includeonly><blockquote class="{{#if:{{{left|}}}|floatleft|floatright}}" style="transform: rotate(0deg); max-width: 100%; width: 500px; min-width: 220px;background-color:#F9F9F9; padding:10px;border-radius:4px; border: 1px solid #dbdbdb;font-size: .9375rem;line-height:1.3333;
<includeonly><blockquote class="{{#if:{{{left|}}}|floatleft|floatright}}" style="transform: rotate(0deg); max-width: 100%; width: 500px; min-width: 220px; background-color: #F9F9F9; padding: 10px; border-radius: 4px; border: 1px solid #dbdbdb; font-size: .9375rem; line-height: 1.3333;
     {{#if: {{{block|}}}
     {{#if: {{{block|}}}
         |display:block; margin:12.25px 40px; max-width: {{{width|500px}}};
         |display: block; margin: 12.25px 40px; max-width: {{{width|500px}}};
         |{{#if: {{{left|}}}
         |{{#if: {{{left|}}}
             |clear:left; float:left; margin:0.5em 1.4em 0.8em 0;
             |clear: left; float: left; margin: 0.5em 1.4em 0.8em 0;
             |clear:right; float:right; margin:0.5em 0 0.8em 1.4em;
             |clear: right; float: right; margin: 0.5em 0 0.8em 1.4em;
         }} max-width: {{{width|220px}}};
         }} max-width: {{{width|220px}}};
     }}">
     }}">
Zeile 19: Zeile 19:
         ||{{Formatting error|<u>reference</u> or <u>ID</u> parameter required.<br>|nocategory={{{nocategory|}}}}}
         ||{{Formatting error|<u>reference</u> or <u>ID</u> parameter required.<br>|nocategory={{{nocategory|}}}}}
     }}
     }}
     <table style="line-height:1em; width:100%; font-size:90%;">
     <table style="line-height: 1em; width: 100%; font-size: 90%;">
         <tr>
         <tr>
             {{#if: {{{image|}}}
             {{#if: {{{image|}}}
                 |<td rowspan=2 style="padding-right:5px; width:28px;">
                 |<td rowspan=2 style="padding-right: 5px; width: 28px;">
                     <div style="height: 28px; width: 28px; padding: 0; border-radius: 50%; overflow: hidden;">
                     <div style="height: 28px; width: 28px; padding: 0; border-radius: 50%; overflow: hidden;">
                         [[File:{{{image|}}}|left|28px]]
                         [[File:{{{image|}}}|left|28px]]
Zeile 28: Zeile 28:
                 </td>
                 </td>
             |}}
             |}}
             <th style="text-align:left; white-space:nowrap;">{{{name|}}}</th>       
             <th style="text-align: left; white-space: nowrap;">{{{name|}}}</th>       
             <td style="text-align:right; color:#4C545C;">[[Twitter]]</td>
             <td style="text-align: right; color: #4C545C;">[[Twitter]]</td>
         </tr>
         </tr>
         <tr>
         <tr>
             <td style="color:#4C545C; white-space:nowrap;font-size: .0.822rem;">@{{{username|}}}</td>
             <td style="color: #4C545C; white-space: nowrap; font-size: .0.822rem;">@{{{username|}}}</td>
         </tr>
         </tr>
     </table>
     </table>
     {{#if: {{{replyto|}}}|
     {{#if: {{{replyto|}}}|
         <p style="color:#4C545C; font-size:85%;">
         <p style="color: #4C545C; font-size: 85%;">
             Replying to @{{{replyto|}}}
             Replying to @{{{replyto|}}}
         </p>
         </p>
     |}}
     |}}
     {{#if: {{{lang|{{{language|}}}}}}
     {{#if: {{{lang|{{{language|}}}}}}
         |<p style='font-size:90%;color:#1c2022;text-align:left'>
         |<p style='font-size: 90%; color: #1c2022; text-align: left'>
             {{lang-{{{lang|{{{language|}}}}}}|{{{text|}}}}}
             {{lang-{{{lang|{{{language|}}}}}}|{{{text|}}}}}
         </p>
         </p>
         |<p style='font-size:90%;color:#1c2022;text-align:left'>
         |<p style='font-size: 90%; color: #1c2022; text-align: left'>
             {{{text|}}}
             {{{text|}}}
         </p>
         </p>
     }}
     }}
     {{#if: {{{translation|}}}|
     {{#if: {{{translation|}}}|
         <hr style="height:0; border:0; border-top:1px solid #aaa; margin: 10px 0 10px 0;">
         <hr style="height: 0; border: 0; border-top: 1px solid #aaa; margin: 10px 0 10px 0;">
         <p style="font-size:90%;" lang="en">
         <p style="font-size: 90%;" lang="en">
             {{{translation|}}}
             {{{translation|}}}
         </p>
         </p>
     |}}
     |}}
     <p style="color:#4C545C; font-size:90%;">
     <p style="color: #4C545C; font-size: 90%;">
         {{{date|}}}<!--
         {{{date|}}}<!--
     -->{{{reference|{{{ref
     -->{{{reference|{{{ref

Version vom 7. August 2020, 22:47 Uhr

Template-info.png Dokumentation für die Vorlage {{Tweet}}[Ansicht] [Bearbeiten] [Versionsgeschichte] [Aktualisieren]
Example Twitter
@example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dignissim, dolor vitae ullamcorper aliquet, velit mi sagittis metus.

12 Jul 2017[1]

This template allows relevant tweets to be easily quoted within articles with a citation automatically generated, using {{cite tweet}}.

Using this template is better than a screen-shot of a tweet because the text is accessible to screen readers.

It is an alternative to standard quotation templates because it displays all relevant information about the tweet (date of posting, user's name, user's handle, etc). For quote tweets, use {{quote tweet}}; alternatively, simply pass the quoted tweet, as a second Tweet template, to the |reference= parameter in this template.

Usage

Full blank syntax

{{Tweet
| name = 
| username = 
| replyto = 
| lang = 
| text = 
| translation = 
| date = 
| ID = 
| reference = 
| archive-url = 
| archive-date = 
| url-status = 
| image = 
| block = 
| left = 
| width = 
}}

Parameters

  • |name= user's name as it appears at the top of the tweet
  • |username= user's @ handle (without the @)
  • |replyto= optional: username tweet is replying to
  • |lang= optional: language code of the tweet if non-English
  • |text= content of the tweet
  • |translation= optional: English translation of tweet if original tweet non-English
  • |date= date of the tweet formatted according to MOS:DATE, should be used with tweets posted before November 4, 2010
  • |ID= number at the end of the tweet URL
  • |reference= optional: the template automatically creates a reference, but one can be provided to use instead. See 2nd example.
  • |archive-url= optional: URL of an archived copy of the tweet. Ignored if |reference= is used.
  • |archive-date= optional: date of the archived copy. Ignored if |reference= is used.
  • |url-status= optional: if set to 'live', the title displays as the live link; if set to 'dead', the title displays as the archive link. Ignored if |reference= is used.
  • |image= optional: image or logo associated with Twitter account
  • |block= optional: any value displays tweet as block with 500px width as default (text above and below, doesn't flow around).
  • |left= optional: any value makes tweet aligned left
  • |width= optional: custom tweet width, default is 220px

Examples

Tweets in english

{{Tweet}}

Missing name parameter.
Missing username parameter.
Missing date parameter.
Missing text parameter.
date parameter should be reformatted to look like:
1 Jan 1970 or Jan 1, 1970.
reference or ID parameter required.

Twitter
@

[1]

{{Tweet/sandbox}}

[2]

{{Tweet}}

Missing name parameter.
Missing username parameter.
Missing date parameter.
Missing text parameter.
date parameter should be reformatted to look like:
1 Jan 1970 or Jan 1, 1970.
reference or ID parameter required.

Twitter
@

[3]

{{Tweet/sandbox}}

[4]

Tweets in another language

It is possible to include tweets written in another language other than English by adding the language parameter and including the List of ISO 639-1 codes of the language.

{{Tweet}}

Missing name parameter.
Missing username parameter.
Missing date parameter.
Missing text parameter.
date parameter should be reformatted to look like:
1 Jan 1970 or Jan 1, 1970.
reference or ID parameter required.

Twitter
@

[5]

{{Tweet/sandbox}}

[6]

It's also possible to translate the tweet.

{{Tweet}}

Missing name parameter.
Missing username parameter.
Missing date parameter.
Missing text parameter.
date parameter should be reformatted to look like:
1 Jan 1970 or Jan 1, 1970.
reference or ID parameter required.

Twitter
@

[7]

{{Tweet/sandbox}}

[8]

TemplateData

This template allows relevant tweets to be easily quoted within articles, with a citation automatically generated using the template, "cite tweet". Using this template is better than a screen-shot of a tweet because the text is accessible to screen readers. It is an alternative to standard quotation templates because it displays all relevant information about the tweet (date of posting, user's name, user's handle, etc) in a way that reflects Twitter's design language. For quote tweets use Template:Quote tweet.

Vorlagenparameter

Diese Vorlage bevorzugt Blockformatierung von Parametern.

ParameterBeschreibungTypStatus
blockblock

Any value displays tweet as block (text above and below, doesn't flow around). Overrides left parameter

Zeichenfolgeoptional
widthwidth

Custom tweet width

Beispiel
300px
Zeichenfolgeoptional
leftleft

Any value makes tweet aligned left

Zeichenfolgeoptional
namename

User's name as it appears at the top of the tweet

Zeichenfolgeerforderlich
usernameusername

User's Twitter handle. Do not include the @ symbol.

Unbekannterforderlich
datedate

Date of the tweet formatted according to MOS:DATE

Datumerforderlich
texttext

Content of the tweet

Zeichenfolgeerforderlich
IDID id

The number at the end of the tweet URL

Nummervorgeschlagen
referencereference ref

A custom reference can be provided to use instead of the automatically generated one

Beispiel
<ref>custom reference</ref>
Zeichenfolgeoptional
imageimage

Image or logo associated with twitter account

Dateioptional
replytoreplyto

Username the tweet is replying to

Zeichenfolgeoptional
langlang language

language code of original tweet

Beispiel
de
Zeichenfolgeoptional
translationtranslation

english translation of the tweet

Unbekanntoptional
nocategorynocategory

keine Beschreibung

Unbekanntoptional
archive-urlarchive-url

keine Beschreibung

Unbekanntoptional
archive-datearchive-date

keine Beschreibung

Unbekanntoptional
url-statusurl-status

keine Beschreibung

Unbekanntoptional

See also

References

  1. @{{{username}}} ({{{date}}}). "{{{text}}}" (Tweet) – via Twitter. {{cite web}}: Check date values in: |date= (help) Missing or empty |number= (help)
  2. @{{{username}}}. "{{{text}}}" (Tweet) – via Twitter. Missing or empty |number= (help)
  3. @{{{username}}} ({{{date}}}). "{{{text}}}" (Tweet) – via Twitter. {{cite web}}: Check date values in: |date= (help) Missing or empty |number= (help)
  4. @{{{username}}}. "{{{text}}}" (Tweet) – via Twitter. Missing or empty |number= (help)
  5. @{{{username}}} ({{{date}}}). "{{{text}}}" (Tweet) – via Twitter. {{cite web}}: Check date values in: |date= (help) Missing or empty |number= (help)
  6. @{{{username}}}. "{{{text}}}" (Tweet) – via Twitter. Missing or empty |number= (help)
  7. @{{{username}}} ({{{date}}}). "{{{text}}}" (Tweet) – via Twitter. {{cite web}}: Check date values in: |date= (help) Missing or empty |number= (help)
  8. @{{{username}}}. "{{{text}}}" (Tweet) – via Twitter. Missing or empty |number= (help)
Hinweise