On peut maintenant intégrer l'adl dans une iframe
This commit is contained in:
parent
144737b54d
commit
275da73e92
@ -12,14 +12,22 @@
|
|||||||
|
|
||||||
html
|
html
|
||||||
color: black
|
color: black
|
||||||
|
height: 100%
|
||||||
line-height: 1.3em
|
line-height: 1.3em
|
||||||
font-family: georgia, serif
|
font-family: georgia, serif
|
||||||
padding-bottom: 6px
|
|
||||||
background-color: #9CC5EE
|
background-color: #9CC5EE
|
||||||
|
// Integrating adl in another website
|
||||||
|
&.iframe
|
||||||
|
background-color: transparent
|
||||||
|
body
|
||||||
|
border: none
|
||||||
|
background-color: transparent
|
||||||
|
.region_selector, .lug_search, .formats, #banner
|
||||||
|
display: none
|
||||||
|
|
||||||
body
|
body
|
||||||
border: 1px solid #68A6E5
|
border: 1px solid #68A6E5
|
||||||
margin: 5px 5px 0
|
margin: 0.3em
|
||||||
padding: 0 10px 10px 10px
|
padding: 0 10px 10px 10px
|
||||||
text-align: center
|
text-align: center
|
||||||
border-bottom: 0px
|
border-bottom: 0px
|
||||||
|
@ -10,10 +10,8 @@ class EventsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html { render layout: 'iframe' if params[:iframe] }
|
||||||
format.rss do
|
format.rss { @events = @events.future_in params[:daylimit] }
|
||||||
@events = @events.future_in params[:daylimit]
|
|
||||||
end
|
|
||||||
format.ics { @events = @events.last_year.order :id }
|
format.ics { @events = @events.last_year.order :id }
|
||||||
format.xml { @events = @events.includes(:related_region).order :id }
|
format.xml { @events = @events.includes(:related_region).order :id }
|
||||||
end
|
end
|
||||||
|
23
app/views/layouts/iframe.html.haml
Normal file
23
app/views/layouts/iframe.html.haml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
!!! 5
|
||||||
|
/[if IE]
|
||||||
|
%html.iframe.no-js(lang="#{I18n.locale}")
|
||||||
|
%head
|
||||||
|
= display_meta_tags site: t('.title')
|
||||||
|
|
||||||
|
%meta(http-equiv='Content-Type' content='text/html; charset=utf-8')
|
||||||
|
%meta(name='viewport' content='width=device-width, initial-scale=1.0')
|
||||||
|
%meta(name='robots' content='index, follow')
|
||||||
|
|
||||||
|
= favicon_link_tag '/favicon.ico'
|
||||||
|
= auto_discovery_link_tag :rss, { controller: '/events', format: :rss }
|
||||||
|
|
||||||
|
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
|
||||||
|
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||||
|
= csrf_meta_tags
|
||||||
|
|
||||||
|
%body(class="#{controller.controller_name} #{controller.action_name}")
|
||||||
|
= render 'layouts/flash', flash: flash if flash.present?
|
||||||
|
|
||||||
|
%main= yield
|
||||||
|
|
||||||
|
%em#loading.fa.fa-spin.fa-circle-o-notch
|
16
public/iframeSample.html
Normal file
16
public/iframeSample.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<style type="text/css">
|
||||||
|
html, body, iframe {
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #dfd;
|
||||||
|
}
|
||||||
|
iframe { height: 99%; }
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<iframe src='http://localhost:3000?iframe=true'></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user