From 12c8c6588678da10fefe6eb645de47b814d0bf96 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Thu, 6 Nov 2014 20:08:15 +0100 Subject: [PATCH] =?UTF-8?q?pr=C3=A9paration=20pour=20iframe=20youtube?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/public.js.coffee | 5 +++++ app/assets/stylesheets/public.scss | 8 +++++++- app/views/portlet/html_contents/_form.html.haml | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index 83f28a9..7131599 100644 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -211,6 +211,11 @@ $("document").ready -> offset= 0 resize = -> + + $("iframe").each -> + $(this).css + "height" : Math.round($(this).width()/ 1.77)+"px" + if $(window).width() > 1250 $(".infos .main").css "position" : "static" diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index c2c58a2..cd83f0e 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -2,6 +2,12 @@ @import "superslides"; @import "fontawesome/font-awesome"; + +iframe{ + margin:auto; + width:100%; + +} .slider{ overflow:hidden; @@ -345,7 +351,7 @@ h4{ line-height:1.7em; padding: 25px 10px; padding-bottom:20px; -margin-right:10px; +margin-right:5px; border-bottom:5px solid transparent; &:hover, &.active{ diff --git a/app/views/portlet/html_contents/_form.html.haml b/app/views/portlet/html_contents/_form.html.haml index 21e681e..5b68841 100644 --- a/app/views/portlet/html_contents/_form.html.haml +++ b/app/views/portlet/html_contents/_form.html.haml @@ -1,12 +1,12 @@ .html_content_form =semantic_form_for( [:portlet, @html_content], :remote => true) do |f| - + =f.text_area :content, :style => "width:98%;height:400px;", :class => "inputText", :id => "ace_editor_textarea" %pre#ace_editor_pre{:style => "margin:0px;"} - + =raw "" %table.form_table %tr %td Style :