Add styles to make login page resemble mastodon's
authorShpuld Shpuldson <shpuld@gmail.com>
Thu, 16 Nov 2017 11:26:56 +0000 (13:26 +0200)
committerShpuld Shpuldson <shpuld@gmail.com>
Thu, 16 Nov 2017 11:26:56 +0000 (13:26 +0200)
lib/pleroma/web/templates/layout/app.html.eex
lib/pleroma/web/templates/mastodon_api/mastodon/login.html.eex

index 6cc3b7ac537846e8f370243945315d094d0a302e..ebb574ad656d9d19947aeb952de1f5a5fc916f84 100644 (file)
@@ -3,9 +3,71 @@
   <head>
     <meta charset=utf-8 />
     <title>Pleroma</title>
+    <style>
+      body {
+        background-color: #282c37;
+        font-family: sans-serif;
+        color:white;
+      }
+
+      .container {
+        margin: 50px auto;
+        max-width: 320px;
+        padding: 0;
+        padding: 40px 40px 40px 40px;
+        background-color: #313543;
+        border-radius: 4px;
+      }
+
+      h1 {
+        margin: 0;
+      }
+
+      h2 {
+        color: #9baec8;
+        font-weight: normal;
+        font-size: 20px;
+        margin-bottom: 40px;
+      }
+
+      form {
+        width: 100%;
+      }
+
+      input {
+        box-sizing: padding-box;
+        width: 100%;
+        padding: 10px;
+        margin-top: 20px;
+        background-color: rgba(0,0,0,.1);
+        color: white;
+        border: 0;
+        border-bottom: 2px solid #9baec8;
+        font-size: 14px;
+      }
+
+      input:focus {
+        border-bottom: 2px solid #4b8ed8;
+      }
+
+      button {
+        width: 100%;
+        color: white;
+        background-color: #419bdd;
+        border-radius: 4px;
+        border: none;
+        padding: 10px;
+        margin-top: 30px;
+        text-transform: uppercase;
+        font-weight: 500;
+        font-size: 16px;
+      }
+    </style>
   </head>
   <body>
-    <h1>Welcome to Pleroma</h1>
-    <%= render @view_module, @view_template, assigns %>
+    <div class="container">
+      <h1>Pleroma</h1>
+      <%= render @view_module, @view_template, assigns %>
+    </div>
   </body>
 </html>
index 6db4b05dc5da3bbba40c5eb37a7375c069f05073..89d97561b109254525e048b59bebdccc1a8fbae3 100644 (file)
@@ -1,10 +1,8 @@
 <h2>Login in to Mastodon Frontend</h2>
 <%= form_for @conn, mastodon_api_path(@conn, :login), [as: "authorization"], fn f -> %>
-<%= label f, :name, "Name" %>
-<%= text_input f, :name %>
+<%= text_input f, :name, placeholder: "Username" %>
 <br>
-<%= label f, :password, "Password" %>
-<%= password_input f, :password %>
+<%= password_input f, :password, placeholder: "Password" %>
 <br>
-<%= submit "Authorize" %>
+<%= submit "Log in" %>
 <% end %>