From cc2fae5ae8be566132b73d9b407568f28750be2f Mon Sep 17 00:00:00 2001 From: Hedgehog Date: Fri, 4 Apr 2014 12:03:27 +0400 Subject: [PATCH] added youtube and vimeo links preview added youtube and vimeo links preview with the ability to turn it off on Options page --- css/style.css | 94 ++++++++++++++++++++++++++-------- home.html | 11 ++++ js/calm.js | 50 ++++++++++++++++-- js/options.js | 23 +++++---- js/twister_formatpost.js | 106 +++++++++++++++++++++++++++++++-------- options.html | 17 +++++-- 6 files changed, 244 insertions(+), 57 deletions(-) diff --git a/css/style.css b/css/style.css index dd99ddc..8b9f17a 100644 --- a/css/style.css +++ b/css/style.css @@ -1139,6 +1139,80 @@ input.userMenu-search-field:focus::-ms-input-placeholder { color: #5e8da4; text-decoration: none; } +/* Inpost previw */ +.preview-container +{ + height: 100px; + width: 95%; + margin: 0 auto; + overflow: hidden; + display: none; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + /*line-height: 0;*/ + margin-bottom: 3px; + position: relative; +} +.image-preview +{ + max-height: 500px; + max-width: 100%; + margin: 0 auto; + display: block; +} +/* video preview */ + +.vimeo #imgOverlay { + border-left: 10px solid #0f5fb6; +} +.youtube #imgOverlay { + border-left: 10px solid #d8121e; +} + +#ytPreviewTmpl { + position: relative; + height: 100%; + width: 100%; +} + +#vidPreviewTmpl img { + max-height: 500px; + width: 100%; + margin: 0 auto; + display: block; +} +#imgOverlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #000; + opacity: .6; +} +#descWrap { + position: absolute; + top: 5px; + left: 50%; + width: 450px; + margin-left: -225px; + +} +#descWrap a, #descWrap p { + position: relative; +} +#descWrap a { + color: #fff; + font: 22px "Open Sans Condensed", sans-serif; +} +#descWrap p { + color: #d3d3d3; + font: 14px "Open Sans Condensed", sans-serif; + margin-top: 5px; +} + + .mini-screen-name { font-size: 13px; @@ -1256,26 +1330,6 @@ input.userMenu-search-field:focus::-ms-input-placeholder { display: none; padding: 5px 5px 0 5px; } -.image-preview -{ - max-height: 500px; - max-width: 100%; - margin: 0 auto; - display: block; -} -.preview-container -{ - height: 100px; - width: 95%; - margin: 0 auto; - overflow: hidden; - display: none; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - line-height: 0; - margin-bottom: 3px; -} .post-stats { margin: 0 10px 0 55px; diff --git a/home.html b/home.html index c26b8a0..3393060 100644 --- a/home.html +++ b/home.html @@ -292,6 +292,17 @@

+ + + +
-

Inline image preview

- + + + + +

Youtube links preview

+ +

Vimeo links preview

+ -