parent
9c617d051e
commit
d7d3be1130
|
@ -299,6 +299,9 @@
|
|||
webkit-border-radius: 4px;
|
||||
ms-border-radius: 4px;
|
||||
}
|
||||
audio {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
#wmd-preview {
|
||||
border: 1px dashed $gray;
|
||||
|
|
|
@ -515,6 +515,9 @@
|
|||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
audio {
|
||||
max-width: 100%;
|
||||
}
|
||||
.topic-body {
|
||||
position: relative;
|
||||
.contents {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
require_dependency 'oneboxer/base_onebox'
|
||||
|
||||
module Oneboxer
|
||||
class AudioOnebox < BaseOnebox
|
||||
|
||||
matcher /^https?:\/\/.*\.mp3$/
|
||||
|
||||
def onebox
|
||||
"<audio controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></audio>"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -3,7 +3,7 @@ require_dependency 'oneboxer/base_onebox'
|
|||
module Oneboxer
|
||||
class VideoOnebox < BaseOnebox
|
||||
|
||||
matcher /^https?:\/\/.*\.(mov|mp4|ogg)$/
|
||||
matcher /^https?:\/\/.*\.(mov|mp4)$/
|
||||
|
||||
def onebox
|
||||
"<video width='100%' height='100%' controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></video>"
|
||||
|
|
Loading…
Reference in New Issue