Шаблён:Слухаць

Зьвесткі зь Вікіпэдыі — вольнай энцыкляпэдыі
 

{{Слухаць}} дазваляе дадаваць у артыкулы аўдыёфайлы. Ён прызначаны для выкарыстаньня аўдыёфайлаў, не зьвязаных з тэкстам, напрыклад, музычных урыўкаў або гукавых запісаў.

Простае выкарыстаньне

{{Слухаць
| файл         = 
| назва        = 
| апісаньне    = 
}}
  • файл (абавязковы): назва старонкі аўдыёфайла, без прасторы назваў Файл: (былая Выява:).
  • назва (абавязковы): назва адыёфайла, якая будзе адлюстраваная
  • апісаньне: апісаньне адыёфайла

Некалькі файлаў

Дадатковыя файлы могуць быць дададзеныя ў артыкул пры дапамозе аднаго шаблёну шляхам дадаваньня нумару да назваў парамэтраў. Могуць быць дададзеныя да дзесяці файлаў у межах аднаго шаблёну.

{{Слухаць
| файл         = 
| назва        = 
| падказка     =
| апісаньне    = 
| файл2        = 
| назва2       = 
| падказка2    =
| апісаньне2   = 
| файл3        = 
| назва3       = 
| падказка3    =
| апісаньне3   = 
}}
  • файл (абавязковы): назва старонкі аўдыёфайла, без прасторы назваў Файл: (былая Выява:).
  • назва (абавязковы): назва адыёфайла, якая будзе адлюстраваная
  • падказка: альтэрнатыўны тэкст над выявай, адлюстраванай для файла, для візуальнага ўзаемнага атаесамленьня для чытачоў. Гэта патрабуецца для такіх фарматаў як фармату Ogg .ogv, які ўключае відэа нароўні з гукам. Альтэрнатыўны тэкст мусіць апісваць толькі пачатковы статычны кадар, але ня ўсё відэа цалкам або ягоную агучку.
  • апісаньне: апісаньне адыёфайла

Парамэтры стылю

The template also takes a number of style parameters to control its appearance:

  • тып: can be used to alter the image displayed at the left depending on the type of audio content being embedded. Acceptable values are гук, мовы and музыка (default)
  • загаловак: can be used to add a header to the box.
  • дапамога: if set не, suppresses the help text that normally appears at the bottom of the box. Only do this if there are other audio files on the page which do have the help link; it must be provided on at least the first file on the article.
  • пазыцыя: by default the box floats to the right side of the screen. Setting this to зьлева will cause the box to instead float on the left-hand side.
  • выява: define a different image. Eg выява=[[Файл:Example.jps|20пкс]]. You can set выява=няма to disable the image entirely.
  • стыль: can be used to pass specific style instructions to the box. Setting this to float:none will anchor the box when this is convenient. Setting this to float:none; clear:none will enable the anchored box to co-exist gracefully beside another floating box.
  • прайграваць#: some media files cannot be displayed inline; if this is the case set не to prevent the broken inline link from displaying.
  • просты: if set так, removes most of the ornamentation (table border, image, and help links) to give a minimalist version. This also removes the left/right float and positioning, to allow the box to be manually positioned as desired using the стыль (e.g. стыль=float:right) parameter and surrounding markup.

Прыклады

Просты прыклад
{{Слухаць
| файл         = Accordion chords-01.ogg
| назва        = Accordion chords
| апісаньне    = Chords being played on an accordion
}}


Прыклад зь відэа
{{Слухаць
| загаловак    = Inaugural Address
| файл         = Barack Obama inaugural address.ogv
| назва        = Inaugural address of Barack Obama
| падказка     = A black man in a black coat gestures and talks at a lecturn surrounded by teleprompters. Behind him, in the background, are about a dozen warmly-dressed onlookers.
| апісаньне    = Barack Obama delivers his [[inaugural address]] on January 20, 2009.<br>(Duration: 21 minutes, 21 seconds)
| дапамога     = не
| тып          = гук
}}


Прыклад з загалоўкам
{{Слухаць
| файл         = Phrase de Neil Armstrong.oga
| назва        = "One small step for a man..."
| апісаньне    = First words spoken on the [[moon]].
| тып          = мова
| пазыцыя      = зьлева
| загаловак    = Recordings of this phrase:
}}


Прыклад простага выгляду
{{Слухаць
| файл         = Accordion chords-01.ogg
| назва        = Accordion chords
| просты       = так
| стыль        = float:left
}}


Некалькі файлаў
{{Слухаць
| файл         = Accordion chords-01.ogg
| назва        = Accordion chords
| апісаньне    = First words spoken on the [[moon]].
| тып          = музыка
| файл2        = Moonlight.ogg
| назва2       = ''Moonlight Sonata''
| апісаньне2   = [[Beethoven]]'s "Sonata in C-sharp minor"
| файл3        = Au_clair_de_la_lune_mode_do.mid
| назва3       = Au Clair de la Lune
| апісаньне3   = The traditional French children's song
| прайграваць3 = не
}}
Праблема з разьмяшчэньнем з правага боку

Разьмяшчэньня шаблёну з правага боку мае ня вельмі зручную асабліваць пры спробе прайграць файл для карыстальнікаў браўзэраў Firefox, Google Chrome і Opera (bugzilla:22538). Для вырашэньня праблемы замест шаблёну {{Слухаць}} выкарыстоўвайце шаблён {{Слухаць300}} Прыклад агульнага выкарыстаньня:

{{ Слухаць300
| файл         = Accordion chords-01.ogg
| назва        = Accordion chords
| апісаньне    = Chords being played on an accordion
}}



Глядзіце таксама