Skip to content
Extraits de code Groupes Projets
Valider 275da73e rédigé par echarp's avatar echarp
Parcourir les fichiers

On peut maintenant intégrer l'adl dans une iframe

parent 144737b5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -12,14 +12,22 @@ ...@@ -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 ...@@ -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
......
!!! 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
<!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>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter