* Move remove_nested_linebreak_in_list to service * Move prefex_all_images to service * Major refactor :) - Move MarkdownParser to /services - Move CodeBlockParser to HtmlParser in /services - Update specs * Fix MarkdownParser * Fix parser again * Rename HtmlParser to Html::Parser - Fix Rubocop violations :/ - Fix conflict * Make html writer private * Fix codeclimate * Fix parser
37 lines
1.3 KiB
Text
37 lines
1.3 KiB
Text
<% if repositories.present? %>
|
|
<div class="crayons-card crayons-card--secondary">
|
|
<header class="crayons-card__header">
|
|
<h3 class="crayons-subtitle-3 flex items-center">GitHub Repositories</h3>
|
|
</header>
|
|
|
|
<div>
|
|
<% repositories.each do |repo| %>
|
|
<a href="<%= repo.url %>" target="_blank" rel="noopener" class="crayons-link crayons-link--contentful">
|
|
<p class="fw-bold flex items-center">
|
|
<%= repo.name %>
|
|
</p>
|
|
<% if repo.description.present? %>
|
|
<p class="fs-s color-base-80 mb-1"><%= Html::Parser.new(repo.description).parse_emojis.html %></p>
|
|
<% end %>
|
|
<p class="fs-s color-base-60 flex items-center">
|
|
<% if repo.fork %>
|
|
<span class="crayons-indicator mr-3">Fork</span>
|
|
<% end %>
|
|
|
|
<% if repo.language %>
|
|
<%= repo.language %>
|
|
<% end %>
|
|
|
|
<% if repo.language && repo.stargazers_count.to_i > 0 %>
|
|
<span class="opacity-50 inline-block px-1">•</span>
|
|
<% end %>
|
|
|
|
<% if repo.stargazers_count.to_i > 0 %>
|
|
<%= pluralize repo.stargazers_count, "star" %>
|
|
<% end %>
|
|
</p>
|
|
</a>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|