Use server side comments for templates (#4123)

This commit is contained in:
rhymes 2019-09-27 17:10:30 +03:00 committed by Ben Halpern
parent 427a8dd45e
commit 8a5fb23335
14 changed files with 21 additions and 31 deletions

View file

@ -119,10 +119,10 @@
</div>
<% else %>
<div id="card-element">
<!-- A Stripe Element will be inserted here. -->
<%# A Stripe Element will be inserted here. %>
</div>
<% end %>
<!-- Used to display form errors. -->
<%# Used to display form errors. %>
<div id="card-errors" role="alert"></div>
</div>
<button id="add-credit-card-button" class="credit-card-button">Complete Purchase</button>

View file

@ -2,10 +2,11 @@
<% menu_items[:listings] = "classified_listings" %>
<% menu_items[:pod] = "podcasts" %>
<% menu_items[:hooks] = "webhook_endpoints" %>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav" style="font-size: 0.97em;">
<% menu_items.each do |name, controller| %>
<li class="<%= "active" if controller_name == controller %>"><a href="/internal/<%= controller %>"><%= name %></a></li>
<% end %>
</ul>
</div><!--/.nav-collapse -->
</div>

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<%# The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags %>
<meta name="description" content="">
<meta name="author" content="">
<%= csrf_meta_tags %>
@ -13,13 +13,13 @@
<title><%= controller_name %></title>
<!-- Latest compiled and minified CSS -->
<%# Latest compiled and minified CSS %>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<%# Optional theme %>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<%# Latest compiled and minified JavaScript %>
<%= javascript_include_tag "internal" %>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
@ -164,7 +164,7 @@
<%= yield %>
</div>
</div><!-- /.container -->
</div>
</body>
</html>

View file

@ -6,7 +6,8 @@
</div>
</a>
<% end %>
<!-- below links to comment thread -->
<%# below links to comment thread %>
<div class="content notification-content comment-content">
<a href="<%= json_data["user"]["path"] %>"><%= json_data["user"]["name"] %></a> mentioned you in a comment
<%= render "notifications/shared/comment_box", json_data: json_data, notification: notification, context: "default" %>

View file

@ -1,4 +1,5 @@
<% title "The Practical Dev Code of Conduct" %>
<%= content_for :page_meta do %>
<link rel="canonical" href="https://dev.to/code-of-conduct" />
<meta name="description" content="The Practical Dev Code of Conduct">
@ -6,14 +7,14 @@
<meta property="og:type" content="article" />
<meta property="og:url" content="https://dev.to/code-of-conduct" />
<meta property="og:title" content="The Practical Dev Code of Conduct" />
<!-- <meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" /> -->
<!-- <meta property="og:description" content="The Practical Dev is great!" /> -->
<%# <meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" /> %>
<%# <meta property="og:description" content="The Practical Dev is great!" /> %>
<meta property="og:site_name" content="The Practical Dev" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %>">
<meta name="twitter:title" content="The Practical Dev Code of Conduct">
<!-- <meta name="twitter:description" content="The Practical Dev is great!"> -->
<!-- <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> -->
<%# <meta name="twitter:description" content="The Practical Dev is great!"> %>
<%# <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> %>
<% end %>
<div class="blank-space"></div>

View file

@ -19,8 +19,6 @@
<meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png">
<% end %>
<!-- <p id="notice"><%#= notice %></p> -->
<div class="blank-space"></div>
<div class="container article">
<div class="title">

View file

@ -33,7 +33,7 @@
<div class="loved">
Loved by thousands of Slack teams!
<br />
<!-- Broken Deviant Art image -->
<%# Broken Deviant Art image %>
<img src="http://orig14.deviantart.net/587e/f/2016/074/a/5/heart_pulse_by_lalovelycake-d9v9nml.gif" alt="Broken Deviant Art image" hidden>
</div>
<div class="thanks">

View file

@ -28,7 +28,7 @@
text-align: center;
padding: 40px 0px;
filter: invert(0);
filter: var(--theme-social-icon-invert, invert(0));
filter: var(--theme-social-icon-invert, invert(0));
}
.social-links img {
@ -38,7 +38,6 @@
}
</style>
<!-- <p id="notice"><%#= notice %></p> -->
<div class="blank-space"></div>
<div class="container article">
<div class="title">

View file

@ -19,8 +19,6 @@
<meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png">
<% end %>
<!-- <p id="notice"><%#= notice %></p> -->
<div class="blank-space"></div>
<div class="container article">
<div class="title">

View file

@ -18,8 +18,6 @@
<meta name="twitter:image:src" content="<%= @page.social_image_url || "https://thepracticaldev.s3.amazonaws.com/i/g355ol6qsrg0j2mhngz9.png" %>">
<% end %>
<!-- <p id="notice"><%#= notice %></p> -->
<% if @page.template == "contained" %>
<div class="blank-space"></div>
<div class="container article">
@ -35,4 +33,4 @@
<% else %>
<%= @page.processed_html.html_safe %>
<% end %>
<div id="IS_CENTERED_PAGE"></div>
<div id="IS_CENTERED_PAGE"></div>

View file

@ -5,12 +5,9 @@
<meta name="description" content="dev.to | Swagnets Information page">
<meta name="keywords" content="software development,engineering,rails,javascript,ruby">
<!-- Currently no OG / social cards, which I think is okay -->
<%# Currently no OG / social cards, which I think is okay %>
<% end %>
<!-- <p id="notice"><%#= notice %></p> -->
<div class="blank-space"></div>
<div class="container article">

View file

@ -19,8 +19,6 @@
<meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png">
<% end %>
<!-- <p id="notice"><%#= notice %></p> -->
<div class="blank-space"></div>
<div class="container article">
<div class="title">

View file

@ -1,4 +1,3 @@
<!-- cached at: <%= Time.current %> -->
<h3>Billing Details</h3>
<% if current_user.stripe_id_code.blank? %>
<%= form_tag "/stripe_active_cards", id: "credit-card-form", method: :post do %>

View file

@ -14,7 +14,7 @@
<meta property="og:url" content="https://docs.dev.to/api" />
<meta property="og:title" content="DEV API (beta)" />
<!-- needed for adaptive design -->
{{! needed for adaptive design }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {