Browse Source

update HTML for semantic-ui

pull/5/head
Aaron Parecki 9 years ago
parent
commit
f1d8785881
5 changed files with 51 additions and 32 deletions
  1. +3
    -3
      compass/public/assets/map.css
  2. +7
    -2
      compass/public/assets/styles.css
  3. +2
    -2
      compass/resources/views/layouts/map.blade.php
  4. +2
    -2
      compass/resources/views/layouts/master.blade.php
  5. +37
    -23
      compass/resources/views/settings.blade.php

+ 3
- 3
compass/public/assets/map.css View File

@ -15,8 +15,8 @@ html, body {
right: 10px; right: 10px;
border: 3px #888 solid; border: 3px #888 solid;
background: white; background: white;
font-size: 14px;
line-height: 20px;
font-size: 12px;
line-height: 18px;
} }
#calendar #controls { #calendar #controls {
position: absolute; position: absolute;
@ -25,7 +25,7 @@ html, body {
background: white; background: white;
} }
#calendar .scroll { #calendar .scroll {
overflow: scroll;
overflow: scroll;
height: 100%; height: 100%;
} }

+ 7
- 2
compass/public/assets/styles.css View File

@ -43,6 +43,9 @@
margin: 60px auto 0 auto; margin: 60px auto 0 auto;
padding: 0 10px; padding: 0 10px;
} }
.dashboard .show-api-endpoint {
font-weight: normal;
}
.databases { .databases {
list-style-type: none; list-style-type: none;
@ -70,7 +73,6 @@
margin-bottom: 4px; margin-bottom: 4px;
} }
.users { .users {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
@ -84,9 +86,12 @@
} }
.users .remove-user { .users .remove-user {
left: -18px; left: -18px;
margin-top: -6px;
text-decoration: none; text-decoration: none;
font-size: 22px; font-size: 22px;
position: absolute; position: absolute;
padding-right: 12px; padding-right: 12px;
} }
.hidden {
display: none;
}

+ 2
- 2
compass/resources/views/layouts/map.blade.php View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Compass</title> <title>Compass</title>
<link rel="stylesheet" href="/assets/pure-min.css">
<link rel="stylesheet" href="/assets/semantic/semantic.min.css">
<link rel="stylesheet" href="/assets/font-awesome-4.4.0/css/font-awesome.min.css"> <link rel="stylesheet" href="/assets/font-awesome-4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/assets/styles.css"> <link rel="stylesheet" href="/assets/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -24,4 +24,4 @@
<script src="/assets/battery.js"></script> <script src="/assets/battery.js"></script>
<script src="/assets/map.js"></script> <script src="/assets/map.js"></script>
</body> </body>
</html>
</html>

+ 2
- 2
compass/resources/views/layouts/master.blade.php View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Compass</title> <title>Compass</title>
<link rel="stylesheet" href="/assets/pure-min.css">
<link rel="stylesheet" href="/assets/semantic/semantic.min.css">
<link rel="stylesheet" href="/assets/font-awesome-4.4.0/css/font-awesome.min.css"> <link rel="stylesheet" href="/assets/font-awesome-4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/assets/styles.css"> <link rel="stylesheet" href="/assets/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -14,4 +14,4 @@
@yield('content') @yield('content')
</body> </body>
</html>
</html>

+ 37
- 23
compass/resources/views/settings.blade.php View File

@ -6,21 +6,28 @@
<div class="dashboard"> <div class="dashboard">
<h2>Database</h2>
<div class="panel">
<h3>Read Token</h3>
<div class="token"><code>{{ $database->read_token }}</code></div>
</div>
@if ($database->created_by == session('user_id'))
<div class="panel">
<h3>Write Token</h3>
<div class="token"><code>{{ $database->write_token }}</code></div>
</div>
@endif
<div class="panel">
<h2>Database: {{ $database->name }}</h2>
<form class="ui form">
<div class="field">
<label>Read Token</label>
<input readonly="" value="{{ $database->read_token }}">
</div>
@if ($database->created_by == session('user_id'))
<div class="field">
<label>Write Token <a href="#" class="show-api-endpoint">(show API endpoint)</a></label>
<input readonly="" value="{{ $database->write_token }}">
</div>
<div class="api-endpoint field hidden">
<label>API Endpoint</label>
<input type="text" readonly value="{{ env('BASE_URL') }}api/input?token={{ $database->write_token }}">
</div>
@endif
</form>
<div style="margin-top: 20px;">
<h3>Users with Access</h3> <h3>Users with Access</h3>
<ul class="users"> <ul class="users">
@ -38,9 +45,11 @@
<div class="error">{{ session('create-error') }}</div> <div class="error">{{ session('create-error') }}</div>
@endif @endif
<span class="create {{ session('create-error') ? '' : 'hidden' }}"> <span class="create {{ session('create-error') ? '' : 'hidden' }}">
<form action="/settings/{{ $database->name }}" method="post" class="pure-form">
<input type="url" name="add_user" value="{{ session('add-user-url') }}" placeholder="github or indieauth url">
<button type="submit" class="pure-button pure-button-primary">Add User</button>
<form action="/settings/{{ $database->name }}" method="post">
<div class="ui action input">
<input type="url" name="add_user" value="{{ session('add-user-url') }}" placeholder="github or indieauth url">
<button type="submit" class="ui button primary">Add User</button>
</div>
</form> </form>
</span> </span>
</li> </li>
@ -50,21 +59,23 @@
<br><br> <br><br>
<h2>Micropub Export</h2>
<h2>Realtime Micropub Export</h2>
<p>Enter a Micropub endpoint and token below and any trips that are written to this database will be sent to the endpoint as well.</p> <p>Enter a Micropub endpoint and token below and any trips that are written to this database will be sent to the endpoint as well.</p>
<div class="panel"> <div class="panel">
<form action="/settings/{{ $database->name }}" method="post" class="pure-form pure-form-stacked">
<fieldset>
<form action="/settings/{{ $database->name }}" method="post" class="ui form">
<div class="field">
<label for="micropub_endpoint">Micropub Endpoint</label> <label for="micropub_endpoint">Micropub Endpoint</label>
<input name="micropub_endpoint" type="url" placeholder="http://example.com/micropub" class="pure-input-1" value="{{ $database->micropub_endpoint }}"> <input name="micropub_endpoint" type="url" placeholder="http://example.com/micropub" class="pure-input-1" value="{{ $database->micropub_endpoint }}">
</div>
<div class="field">
<label for="micropub_token">Access Token</label> <label for="micropub_token">Access Token</label>
<input name="micropub_token" type="text" placeholder="" class="pure-input-1" value="{{ $database->micropub_token }}"> <input name="micropub_token" type="text" placeholder="" class="pure-input-1" value="{{ $database->micropub_token }}">
</div>
<button type="submit" class="pure-button pure-button-primary">Save</button>
</fieldset>
<button type="submit" class="ui button primary">Save</button>
</form> </form>
</div> </div>
@ -85,6 +96,9 @@ jQuery(function($){
}); });
return false; return false;
}); });
$(".show-api-endpoint").click(function(){
$(".api-endpoint").removeClass("hidden");
});
}); });
</script> </script>
@endsection @endsection

Loading…
Cancel
Save