Skip to content

Commit

Permalink
use SVG+CSS for optimised and i18n friendly buton! dwyl/elixir-auth-g…
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Feb 2, 2020
1 parent d1a42e3 commit 90a6fba
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ npm-debug.log
/priv/static/
.env
.elixir_ls
*.iml
.idea
41 changes: 11 additions & 30 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added assets/static/.DS_Store
Binary file not shown.
Binary file added assets/static/images/.DS_Store
Binary file not shown.
Binary file added assets/static/images/favicon.ico
Binary file not shown.
26 changes: 26 additions & 0 deletions lib/app_web/templates/page/index.html.eex
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
<section class="phx-hero">
<h1>Welcome to Awesome App!</h1>
<p>To get started, login to your Google Account: <p>

<a href="<%= @oauth_google_url %>">
<img src="https://i.imgur.com/Kagbzkq.png" alt="Sign in with Google" />
</a>

<div style="display:flex; flex-direction:column; width:368px; margin-left:133px;">
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap">

<a href="<%= @oauth_google_url %>"
style="display:inline-flex; align-items:center; min-height:50px;
background-color:#4285F4; font-family:'Roboto',sans-serif;
font-size:28px; color:white; text-decoration:none;
margin-top: 12px">
<div style="background-color: white; margin:2px; padding-top:18px; padding-bottom:6px; min-height:59px; width:72px">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 533.5 544.3"
width="52px" height="35" style="display:inline-flex; align-items:center;" >
<path d="M533.5 278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1 33.8-25.7 63.7-54.4 82.7v68h87.7c51.5-47.4 81.1-117.4 81.1-200.2z" fill="#4285f4"/>
<path d="M272.1 544.3c73.4 0 135.3-24.1 180.4-65.7l-87.7-68c-24.4 16.6-55.9 26-92.6 26-71 0-131.2-47.9-152.8-112.3H28.9v70.1c46.2 91.9 140.3 149.9 243.2 149.9z" fill="#34a853"/>
<path d="M119.3 324.3c-11.4-33.8-11.4-70.4 0-104.2V150H28.9c-38.6 76.9-38.6 167.5 0 244.4l90.4-70.1z" fill="#fbbc04"/>
<path d="M272.1 107.7c38.8-.6 76.3 14 104.4 40.8l77.7-77.7C405 24.6 339.7-.8 272.1 0 169.2 0 75.1 58 28.9 150l90.4 70.1c21.5-64.5 81.8-112.4 152.8-112.4z" fill="#ea4335"/>
</svg>
</div>
<div style="margin-left: 27px;">
Sign in with Google
</div>
</a>

<div>

</section>

0 comments on commit 90a6fba

Please sign in to comment.