-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathshow.html.erb
76 lines (60 loc) · 2.44 KB
/
show.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
</div>
<% if params[:raw] == 'true' %>
<link href="/lib/woofmark/dist/woofmark.min.css" rel="stylesheet">
<link href="/lib/bootstrap-tokenfield/dist/css/tokenfield-typeahead.min.css" rel="stylesheet">
<link href="/lib/bootstrap-tokenfield/dist/css/bootstrap-tokenfield.min.css" rel="stylesheet">
<link href="/lib/publiclab-editor/dist/PublicLab.Editor.css" rel="stylesheet">
<script src="/lib/publiclab-editor/dist/PublicLab.Editor.js"></script>
<% end %>
<% @presentation = @node.has_tag('style:presentation') %>
<% if @presentation && @node.main_image%>
<div id="main-image-presentation" style="margin-bottom:8px;">
<a href="<%= @node.main_image.path(:original) %>">
<%= image_tag(@node.main_image.path(:original), class:"rounded", style:'width: 100vw;margin: 0 calc((100% / 2) - 50vw);margin-top: -21px;margin-bottom: 12px;') %>
</a>
</div>
<% end %>
<div class="row">
<div class="col-lg-9">
<%= render partial: "wiki/header" %>
<div class="tab-content">
<% if @node.has_power_tag('alert') && feature("alert-#{@node.power_tag('alert')}") != "" %>
<%= feature("alert-#{@node.power_tag('alert')}") %>
<% end %>
<div class="tab-pane active" id="tab-overview">
<% if controller.action_name == 'comments' %>
<%= render partial: "notes/comments", :locals => {:nodes => @nodes} %>
<% else %>
<div <% unless @node.has_tag('style:wide') %>style="max-width:800px;"<% end %> id="content" class="pl-content wiki">
<% if @node.has_tag('format:raw') %>
<%= raw @revision.render_body_raw %>
<% else %>
<%= raw auto_link(insert_extras(@revision.render_body), sanitize: false) %>
<% end %>
</div>
<% if params[:raw] == 'true' %>
<div style="display:none;" id="content-raw-markdown" class="pl-content wiki"><%= raw insert_extras(@revision.body_raw) %></div>
<% end %>
<% end %>
</div>
</div>
<hr />
</div>
<% if @node.has_tag('sidebar:none') %>
<%= render partial: "sidebar/none" %>
<% else %>
<% if @node.has_tag('sidebar:featured') %>
<%= render partial: "sidebar/featured" %>
<% else %>
<%= render partial: "sidebar/related" %>
<% end %>
<% end %>
<script>
(function(){
$("img").lazyload();
<% if @fancy %>
$('#content img').addClass('img-rounded');
<% end %>
setupWiki(<%= @node.id %>, "<%= @node.title %>", <%= params[:raw] == 'true' %>, <%= current_user.nil? != true %>);
})()
</script>