Skip to content

Commit ad3ddea

Browse files
committed
Use new layout based on bootstrap for RC elastic
1 parent 6c4ec0a commit ad3ddea

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

js/render_structured_data.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ rcmail.render_structured_data = function() {
116116

117117
// If we had no special cases yet, we use ld2h
118118
if(didRender === false){
119+
Jsonld2html.setTemplateOfType("https://ld2h/Default",Jsonld2html.allTemplates.cardDefaultBootstrap);
120+
Jsonld2html.setSubtemplateOfType("https://ld2h/Default",Jsonld2html.allSubtemplates.subDefaultBootstrap);
119121
const card = Jsonld2html.render(jsonLd);
120122
structuredHtml = $('<div id="structured-data-content">').html(card);
121123
}
@@ -125,7 +127,7 @@ rcmail.render_structured_data = function() {
125127
messageObjects = $('div#message-objects');
126128
var intervalId;
127129
if (messageObjects !== null && structuredHtml !== null && structuredHtml !== '') {
128-
var structuredDataContainer = $('<div class="info structured-data-container" style="background-color:#f1f1f1;width:100%;display:flex;flex-direction:column;">');
130+
var structuredDataContainer = $('<div class="info structured-data-container" style="width:100%;display:flex;flex-direction:column;">');
129131

130132
// Add button and toggle switch for "Live Location" if necessary
131133
if (jsonLd['@type'] === 'Place' && 'liveUrl' in jsonLd) {
@@ -154,7 +156,7 @@ rcmail.render_structured_data = function() {
154156
checkboxLabel.append(autoRefreshLocationToggle);
155157
checkboxLabel.append($('span.roundbutton'));
156158

157-
var refreshLocationDiv = $('<div class="info refresh-location-div" style="background-color:#f1f1f1;width:100%;display:flex;flex-direction:row;padding:10px;margin-bottom:10px;">');
159+
var refreshLocationDiv = $('<div class="info refresh-location-div" style="width:100%;display:flex;flex-direction:row;padding:10px;margin-bottom:10px;">');
158160
refreshLocationDiv.append(refreshLocationButton);
159161
refreshLocationDiv.append(checkboxLabel);
160162

roundcube_structured_email.css

+1-6
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ button.btn.actionButton {
1717
opacity:0.5;
1818
}
1919

20-
div.structured-data-container img {
21-
height: 128px;
22-
width: 128px;
23-
}
24-
2520
/* geolocation button in taskbar */
2621
#taskbar a.button-geolocation span.button-inner {
2722
height: 14px;
@@ -48,4 +43,4 @@ a.button-compose-form::before {
4843
#taskbar a.button-compose-form:hover span.button-inner,
4944
#taskbar a.button-compose-form.button-selected span.button-inner {
5045
height: 14px;
51-
}
46+
}

roundcube_structured_email.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ function init()
8080

8181
// include l2dh
8282
$this->include_script("node_modules/ld2h/jsonld2html-bundle.js");
83-
84-
$this->include_stylesheet("node_modules/ld2h/style/default_card.css");
85-
83+
$this->include_stylesheet("node_modules/ld2h/style/default_card_bootstrap.css");
8684
}
8785

8886
/**

0 commit comments

Comments
 (0)