Skip to content

Commit

Permalink
facebook share button
Browse files Browse the repository at this point in the history
  • Loading branch information
safrannn committed Jan 21, 2021
1 parent cd9dd5c commit 534ca4a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
3 changes: 3 additions & 0 deletions server/templates/home.j2
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@

{% block footer %}
<div class="mt-16 flex flex-col items-center">
<div class="text-center py-6">
<hr>
<div>
<div class="text-center py-6">
<p class="text-sm mb-2">
2021 RUST GYM
Expand Down
32 changes: 22 additions & 10 deletions server/templates/leetcode-detail.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,27 @@
{% for solution in solutions %}
<pre><code class="rust">{{solution.source}}</code></pre>
{% endfor %}
<div class="bg-white px-6 py-4 my-3 mx-auto shadow rounded-md flex items-center">
<a target="_blank" href="https://leetcode.com/problems/{{question.slug}}/">
<button type="button" class="border border-indigo-500 bg-indigo-500 text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none hover:bg-indigo-600 focus:outline-none focus:shadow-outline">Practice</button>
</a>
<a target="_blank" href="https://github.com/warycat/rustgym/issues/new?title=Leetcode {{question.id}} {{question.title}}">
<button type="button" class="border border-green-500 bg-green-500 text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none hover:bg-green-600 focus:outline-none focus:shadow-outline">New issue</button>
</a>
<a target="_blank" href="http://twitter.com/share?text={{app.title}} Leetcode {{question.id}} {{question.title}} Rust Solution&url=https://rustgym.com/leetcode/{{question.id}}&hashtags=rustgym,leetcode,rust">
<button type="button" class="border border-blue-500 bg-blue-500 text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none hover:bg-blue-600 focus:outline-none focus:shadow-outline">Tweet</button>
</a>

<div class="grid grid-cols-2 flex justify-between">
<div class="flex">
<a target="_blank" href="https://leetcode.com/problems/{{question.slug}}/">
<button type="button" class="border border-yellow-400 bg-yellow-400 text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none hover:bg-yellow-500 focus:outline-none focus:shadow-outline">Practice</button>
</a>
</div>

<div class="flex justify-end">
<a target="_blank" href="http://twitter.com/share?text={{app.title}} Leetcode {{question.id}} {{question.title}} Rust Solution&url=https://rustgym.com/leetcode/{{question.id}}&hashtags=rustgym,leetcode,rust">
<button type="button" class="border border-blue-400 bg-blue-400 text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none hover:bg-blue-500 focus:outline-none focus:shadow-outline">Tweet</button>
</a>
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=rustgym.com/leetcode/{{question.id}}" >
<button type="button" class="border border-blue-600 bg-blue-600 text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none hover:bg-blue-700 focus:outline-none focus:shadow-outline">Facebook</button>
</a>
</div>
</div>

<div>
<p>Having problems with this solution? <a href="https://github.com/warycat/rustgym/issues/new?title=Leetcode {{question.id}} {{question.title}}">Click here</a> to submit an issue on github.</p>
</div>


{% endblock %}

0 comments on commit 534ca4a

Please sign in to comment.