design refresh

This commit is contained in:
Benjamin Gamard 2017-11-03 00:10:17 +01:00
parent a980930e69
commit 14b4e5aeec
13 changed files with 30 additions and 28 deletions

View File

@ -58,7 +58,7 @@ public class ThemeResource extends BaseResource {
// Build the stylesheet // Build the stylesheet
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(new Selector(".navbar") sb.append(new Selector(".navbar")
.rule("background-color", themeConfig.getString("color", "#263238"))); .rule("background-color", themeConfig.getString("color", "#24292e")));
sb.append(themeConfig.getString("css", "")); sb.append(themeConfig.getString("css", ""));
return Response.ok().entity(sb.toString()).build(); return Response.ok().entity(sb.toString()).build();
@ -83,7 +83,7 @@ public class ThemeResource extends BaseResource {
JsonObject themeConfig = getThemeConfig(); JsonObject themeConfig = getThemeConfig();
JsonObjectBuilder json = Json.createObjectBuilder(); JsonObjectBuilder json = Json.createObjectBuilder();
json.add("name", themeConfig.getString("name", "Sismics Docs")); json.add("name", themeConfig.getString("name", "Sismics Docs"));
json.add("color", themeConfig.getString("color", "#263238")); json.add("color", themeConfig.getString("color", "#24292e"));
json.add("css", themeConfig.getString("css", "")); json.add("css", themeConfig.getString("css", ""));
return Response.ok().entity(json.build()).build(); return Response.ok().entity(json.build()).build();
} }

View File

@ -114,7 +114,7 @@
<li ng-class="{active: $uiRoute}" ui-route="/tag.*"> <li ng-class="{active: $uiRoute}" ui-route="/tag.*">
<a href="#/tag"><span class="glyphicon glyphicon-tags"></span> {{ 'index.nav_tags' | translate }}</a> <a href="#/tag"><span class="glyphicon glyphicon-tags"></span> {{ 'index.nav_tags' | translate }}</a>
</li> </li>
<li ng-class="{active: $uiRoute}" ui-route="/user.*"> <li ng-class="{active: $uiRoute}" ui-route="/user.*|/group.*">
<a href="#/user"><span class="glyphicon glyphicon-user"></span> {{ 'index.nav_users_groups' | translate }}</a> <a href="#/user"><span class="glyphicon glyphicon-user"></span> {{ 'index.nav_users_groups' | translate }}</a>
</li> </li>
</ul> </ul>

View File

@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<table class="row table table-striped table-hover table-documents"> <table class="row table table-hover table-documents">
<thead> <thead>
<tr> <tr>
<th class="col-xs-6" ng-click="sortDocuments(1)"><span class="glyphicon glyphicon-chevron-{{ sortColumn == 1 ? (asc ? 'down' : 'up') : '' }}"></span> {{ 'document.title' | translate }}</th> <th class="col-xs-6" ng-click="sortDocuments(1)"><span class="glyphicon glyphicon-chevron-{{ sortColumn == 1 ? (asc ? 'down' : 'up') : '' }}"></span> {{ 'document.title' | translate }}</th>

View File

@ -5,7 +5,7 @@
<div class="row"> <div class="row">
<div class="col-md-4 well"> <div class="col-md-4 well">
<table class="table table-striped table-hover table-users"> <table class="table table-hover table-users">
<thead> <thead>
<tr> <tr>
<th>{{ 'settings.group.name' | translate }}</th> <th>{{ 'settings.group.name' | translate }}</th>

View File

@ -1,5 +1,5 @@
<h1 translate="settings.log.title"></h1> <h1 translate="settings.log.title"></h1>
<table class="table table-striped table-hover table-logs"> <table class="table table-hover table-logs">
<thead> <thead>
<tr> <tr>
<th>{{ 'settings.log.date' | translate }}</th> <th>{{ 'settings.log.date' | translate }}</th>

View File

@ -1,5 +1,5 @@
<h1 translate="settings.session.title"></h1> <h1 translate="settings.session.title"></h1>
<table class="table table-striped table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th>{{ 'settings.session.created_date' | translate }}</th> <th>{{ 'settings.session.created_date' | translate }}</th>

View File

@ -5,7 +5,7 @@
<div class="row"> <div class="row">
<div class="col-md-4 well"> <div class="col-md-4 well">
<table class="table table-striped table-hover table-users"> <table class="table table-hover table-users">
<thead> <thead>
<tr> <tr>
<th>{{ 'settings.user.username' | translate }}</th> <th>{{ 'settings.user.username' | translate }}</th>

View File

@ -12,7 +12,7 @@
</div> </div>
</form> </form>
<table class="table table-striped" ng-show="entries"> <table class="table" ng-show="entries">
<thead> <thead>
<tr> <tr>
<th width="70%">{{ 'settings.vocabulary.value' | translate }}</th> <th width="70%">{{ 'settings.vocabulary.value' | translate }}</th>

View File

@ -16,7 +16,7 @@
<input type="search" class="form-control" placeholder="{{ 'tag.search' | translate }}" ng-model="search.name"> <input type="search" class="form-control" placeholder="{{ 'tag.search' | translate }}" ng-model="search.name">
</p> </p>
<table class="row table table-striped table-hover table-tags"> <table class="row table table-hover table-tags">
<tbody> <tbody>
<tr ng-repeat="tag in tags | filter:search" class="pointer" <tr ng-repeat="tag in tags | filter:search" class="pointer"
ng-class="{ active: $stateParams.id == tag.id }" ng-click="viewTag(tag.id)"> ng-class="{ active: $stateParams.id == tag.id }" ng-click="viewTag(tag.id)">

View File

@ -6,7 +6,7 @@
<input type="search" class="form-control" placeholder="{{ 'usergroup.search_groups' | translate }}" ng-model="searchGroup"> <input type="search" class="form-control" placeholder="{{ 'usergroup.search_groups' | translate }}" ng-model="searchGroup">
</p> </p>
<table class="row table table-striped table-hover"> <table class="row table table-hover">
<tbody> <tbody>
<tr class="pointer" ng-repeat="group in groups | filter: searchGroup" <tr class="pointer" ng-repeat="group in groups | filter: searchGroup"
ng-click="openGroup(group)" ng-class="{ active: $stateParams.name == group.name }"> ng-click="openGroup(group)" ng-class="{ active: $stateParams.name == group.name }">
@ -24,7 +24,7 @@
<input type="search" class="form-control" placeholder="{{ 'usergroup.search_users' | translate }}" ng-model="searchUser"> <input type="search" class="form-control" placeholder="{{ 'usergroup.search_users' | translate }}" ng-model="searchUser">
</p> </p>
<table class="row table table-striped table-hover"> <table class="row table table-hover">
<tbody> <tbody>
<tr class="pointer" ng-repeat="user in users | filter: searchUser" <tr class="pointer" ng-repeat="user in users | filter: searchUser"
ng-click="openUser(user)" ng-class="{ active: $stateParams.username == user.username }"> ng-click="openUser(user)" ng-class="{ active: $stateParams.username == user.username }">

View File

@ -1082,7 +1082,7 @@ html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
body { body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 14px; font-size: 14px;
line-height: 1.42857143; line-height: 1.42857143;
color: #333; color: #333;
@ -1181,7 +1181,7 @@ h6,
.h5, .h5,
.h6 { .h6 {
font-family: inherit; font-family: inherit;
font-weight: 500; font-weight: normal;
line-height: 1.1; line-height: 1.1;
color: inherit; color: inherit;
} }
@ -1209,9 +1209,9 @@ h6 .small,
.h4 .small, .h4 .small,
.h5 .small, .h5 .small,
.h6 .small { .h6 .small {
font-weight: normal; font-weight: 300;
line-height: 1; line-height: 1;
color: #777; color: #a3aab1;
} }
h1, h1,
.h1, .h1,
@ -2558,6 +2558,7 @@ output {
.form-control:focus { .form-control:focus {
border-color: #66afe9; border-color: #66afe9;
outline: 0; outline: 0;
box-shadow: inset 0 1px 2px rgba(27,31,35,0.075), 0 0 0 0.2em rgba(3,102,214,0.3);
} }
.form-control::-moz-placeholder { .form-control::-moz-placeholder {
color: #999; color: #999;
@ -2874,8 +2875,7 @@ select[multiple].input-lg {
} }
.has-error .form-control:focus { .has-error .form-control:focus {
border-color: #843534; border-color: #843534;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; box-shadow: inset 0 1px 2px rgba(27,31,35,0.075), 0 0 0 0.2em #ce8483;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
} }
.has-error .input-group-addon { .has-error .input-group-addon {
color: #a94442; color: #a94442;
@ -3946,7 +3946,6 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
.nav > li > a:hover, .nav > li > a:hover,
.nav > li > a:focus { .nav > li > a:focus {
text-decoration: none; text-decoration: none;
background-color: #eee;
} }
.nav > li.disabled > a { .nav > li.disabled > a {
color: #777; color: #777;
@ -3984,18 +3983,20 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
margin-right: 2px; margin-right: 2px;
line-height: 1.42857143; line-height: 1.42857143;
border: 1px solid transparent; border: 1px solid transparent;
color: #586069;
} }
.nav-tabs > li > a:hover { .nav-tabs > li > a:hover {
border-color: #eee #eee #ddd; color: #24292e;
} }
.nav-tabs > li.active > a, .nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus { .nav-tabs > li.active > a:focus {
color: #555; color: #24292e;
cursor: default; cursor: default;
background-color: #fff; background-color: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
border-bottom-color: transparent; border-bottom-color: transparent;
border-top: 3px solid #e36209;
} }
.nav-tabs.nav-justified { .nav-tabs.nav-justified {
width: 100%; width: 100%;
@ -4535,7 +4536,8 @@ fieldset[disabled] .navbar-default .btn-link:focus {
color: #9d9d9d; color: #9d9d9d;
} }
.navbar-inverse .navbar-nav > li > a { .navbar-inverse .navbar-nav > li > a {
color: #9d9d9d; color: rgba(255,255,255,0.75);
font-weight: bold;
} }
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus { .navbar-inverse .navbar-nav > li > a:focus {
@ -4546,7 +4548,6 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus { .navbar-inverse .navbar-nav > .active > a:focus {
color: #fff; color: #fff;
background-color: #080808;
} }
.navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a,
.navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:hover,
@ -5897,7 +5898,7 @@ button.close {
position: absolute; position: absolute;
z-index: 1070; z-index: 1070;
display: block; display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: inherit;
font-size: 12px; font-size: 12px;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
@ -6015,7 +6016,7 @@ button.close {
display: none; display: none;
max-width: 276px; max-width: 276px;
padding: 1px; padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: inherit;
font-size: 14px; font-size: 14px;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;

View File

@ -9,7 +9,7 @@
// Navbar color // Navbar color
.navbar { .navbar {
background-color: #263238; background-color: #24292e;
} }
// Selected table line // Selected table line
@ -309,3 +309,4 @@ input[readonly].share-link {
right: 0; right: 0;
z-index: 99999; z-index: 99999;
} }

View File

@ -32,13 +32,13 @@ public class TestThemeResource extends BaseJerseyTest {
// Get the stylesheet anonymously // Get the stylesheet anonymously
String stylesheet = target().path("/theme/stylesheet").request() String stylesheet = target().path("/theme/stylesheet").request()
.get(String.class); .get(String.class);
Assert.assertTrue(stylesheet.contains("background-color: #263238;")); Assert.assertTrue(stylesheet.contains("background-color: #24292e;"));
// Get the theme configuration anonymously // Get the theme configuration anonymously
JsonObject json = target().path("/theme").request() JsonObject json = target().path("/theme").request()
.get(JsonObject.class); .get(JsonObject.class);
Assert.assertEquals("Sismics Docs", json.getString("name")); Assert.assertEquals("Sismics Docs", json.getString("name"));
Assert.assertEquals("#263238", json.getString("color")); Assert.assertEquals("#24292e", json.getString("color"));
Assert.assertEquals("", json.getString("css")); Assert.assertEquals("", json.getString("css"));
// Update the main color as admin // Update the main color as admin