Move image style into css class

pull/1018/head
Aaron Ogle 11 years ago
parent c11deab369
commit 86b532da1b
  1. 16
      .meteor/versions
  2. 7
      client/stylesheets/base.less
  3. 4
      packages/rocketchat-markdown/markdown.coffee
  4. 2
      packages/rocketchat-oembed/client/oembedImageWidget.html

@ -8,7 +8,6 @@ accounts-password@1.1.3
accounts-twitter@1.0.6
alanning:roles@1.2.13
aldeed:simple-schema@1.3.3
amplify@1.0.0
arunoda:streams@0.1.17
autoupdate@1.2.3
babel-compiler@5.8.24_1
@ -102,14 +101,11 @@ oauth1@1.1.5
oauth2@1.1.5
observe-sequence@1.0.7
ordered-dict@1.0.4
package-version-parser@3.0.4
pauli:accounts-linkedin@1.1.2
pauli:linkedin@1.1.2
perak:codemirror@1.2.7
percolate:migrations@0.9.6
percolate:synced-cron@1.3.0
practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2
promise@0.5.0
qnub:emojione@0.0.3
raix:eventemitter@0.1.3
@ -150,11 +146,6 @@ rocketchat:statistics@0.0.1
rocketchat:webrtc@0.0.1
rocketchat:wordpress@0.0.1
routepolicy@1.0.6
sanjo:jasmine@0.20.2
sanjo:karma@3.0.2
sanjo:long-running-child-process@1.1.3
sanjo:meteor-files-helpers@1.2.0_1
sanjo:meteor-version@1.0.0
service-configuration@1.0.5
session@1.1.1
sha@1.0.4
@ -178,13 +169,6 @@ ui@1.0.8
underscore@1.0.4
underscorestring:underscore.string@3.2.2
url@1.0.5
velocity:chokidar@1.2.0_1
velocity:core@0.10.4
velocity:html-reporter@0.9.0
velocity:meteor-internals@1.1.0_7
velocity:meteor-stubs@1.1.0
velocity:shim@0.1.0
velocity:source-map-support@0.3.2_1
webapp@1.2.2
webapp-hashing@1.0.5
yasaricli:slugify@0.0.7

@ -2561,6 +2561,13 @@ a.github-fork {
.body {
opacity: 1;
.transition(opacity 1s linear);
.inline-image {
background-size: contain;
background-repeat: no-repeat;
background-position: center left;
height: 200px;
}
}
&.temp .body {
opacity: .5;

@ -13,9 +13,7 @@ class Markdown
msg = message.html
# Support ![alt text](http://image url)
msg = msg.replace(/!\[(.*)\]\((https?:\/\/([\da-z\.-]+)([\/\w \.-]*)*\/?)\)/gm, '<a href="$2" title="$1" class="swipebox" target="_blank">
<div style="background-image: url($2); background-size: contain; background-repeat: no-repeat; background-position: center left; max-height: 200px;"></div>
</a>')
msg = msg.replace(/!\[(.*)\]\((https?:\/\/([\da-z\.-]+)([\/\w \.-]*)*\/?)\)/gm, '<a href="$2" title="$1" class="swipebox" target="_blank"><div class="inline-image" style="background-image: url($2);"></div></a>')
# Support [Text](http://link)
msg = msg.replace(/\[(([\d\w\.-_] ?)+)\]\((https?:\/\/([\da-z\.-]+)([\/\w \.-]*)*\/?)\)/gm, '<a href="$3">$1</a>')

@ -2,7 +2,7 @@
{{#if showImage}}
<a href="{{url}}" class="swipebox" target="_blank">
{{#if parsedUrl}}
<div style="background-image: url({{url}}); background-size: contain; background-repeat: no-repeat; background-position: center left; height: 200px;"></div>
<div class="inline-image" style="background-image: url({{url}});"></div>
{{/if}}
</a>
{{else}}

Loading…
Cancel
Save