mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-04 00:44:41 +08:00
Started reworking of page-show design
- Updated core toolbar & breadcrumb design
This commit is contained in:
1
resources/assets/icons/chevron-right.svg
Normal file
1
resources/assets/icons/chevron-right.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
After Width: | Height: | Size: 161 B |
@ -136,7 +136,7 @@ class PageDisplay {
|
||||
|
||||
// Fix the tree as a sidebar
|
||||
function stickTree() {
|
||||
$sidebar.width($bookTreeParent.width() + 15);
|
||||
$sidebar.width($bookTreeParent.width() - 32);
|
||||
$sidebar.addClass("fixed");
|
||||
isFixed = true;
|
||||
}
|
||||
|
@ -1,29 +1,9 @@
|
||||
|
||||
/*
|
||||
* This file container all block styling including background shading,
|
||||
* margins, paddings & borders.
|
||||
* This file container all block styling including margins, paddings & borders.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Background Shading
|
||||
*/
|
||||
.shaded {
|
||||
background-color: #f1f1f1;
|
||||
&.pos {
|
||||
background-color: lighten($positive, 40%);
|
||||
}
|
||||
&.neg {
|
||||
background-color: lighten($negative, 20%);
|
||||
}
|
||||
&.primary {
|
||||
background-color: lighten($primary, 40%);
|
||||
}
|
||||
&.secondary {
|
||||
background-color: lighten($secondary, 30%);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Padding
|
||||
* TODO - Remove these older styles
|
||||
@ -193,7 +173,7 @@
|
||||
|
||||
.card {
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 1px 6px -1px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: $bs-card;
|
||||
border-radius: 3px;
|
||||
padding-bottom: $-xs;
|
||||
h3 {
|
||||
@ -218,9 +198,12 @@
|
||||
}
|
||||
|
||||
.sidebar .card {
|
||||
h3, .body, .empty-text {
|
||||
.body, .empty-text {
|
||||
padding: $-s $-m;
|
||||
}
|
||||
h3 + .body {
|
||||
padding-top: $-xs;
|
||||
}
|
||||
}
|
||||
|
||||
.card.drag-card {
|
||||
|
@ -63,7 +63,8 @@ body.flexbox {
|
||||
flex: 3;
|
||||
background-color: #FFFFFF;
|
||||
padding: 0 $-l;
|
||||
border-left: 1px solid #DDD;
|
||||
box-shadow: $bs-card;
|
||||
border-radius: 4px;
|
||||
max-width: 100%;
|
||||
}
|
||||
.flex.sidebar .sidebar-toggle {
|
||||
@ -135,6 +136,7 @@ body.flexbox {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
padding-right: $-m;
|
||||
padding-top: $-m;
|
||||
width: 30%;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
@ -958,6 +960,7 @@ div[class^="col-"] img {
|
||||
}
|
||||
|
||||
@include grid-layout('thirds', 3)
|
||||
@include grid-layout('halves', 2)
|
||||
|
||||
@each $sizeLetter, $size in $screen-sizes {
|
||||
@include smaller-than($size) {
|
||||
|
@ -15,6 +15,8 @@ header {
|
||||
color: #fff;
|
||||
fill: #fff;
|
||||
border-bottom: 1px solid #DDD;
|
||||
box-shadow: $bs-card;
|
||||
padding: $-xxs 0;
|
||||
.links {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
@ -74,13 +76,16 @@ header .search-box {
|
||||
margin-top: 10px;
|
||||
input {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 40px;
|
||||
color: #EEE;
|
||||
z-index: 2;
|
||||
padding-left: 40px;
|
||||
}
|
||||
button {
|
||||
fill: #EEE;
|
||||
z-index: 1;
|
||||
left: 16px;
|
||||
svg {
|
||||
margin-right: 0;
|
||||
}
|
||||
@ -191,10 +196,20 @@ header .search-box {
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumbs span.sep {
|
||||
color: #aaa;
|
||||
padding: 0 $-xs;
|
||||
.breadcrumbs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.breadcrumbs .separator {
|
||||
fill: #aaa;
|
||||
font-size: 1.6em;
|
||||
line-height: 0.8;
|
||||
margin: 0 $-xs;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.faded {
|
||||
a, button, span, span > div {
|
||||
color: #666;
|
||||
@ -222,13 +237,24 @@ header .search-box {
|
||||
background-color: $primary-faded;
|
||||
}
|
||||
|
||||
.toolbar-container {
|
||||
background-color: #FFF;
|
||||
.toolbar {
|
||||
position: relative;
|
||||
> .grid > div {
|
||||
opacity: 0.8;
|
||||
transition: opacity ease-in-out 120ms;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.text-button {
|
||||
color: #666;
|
||||
fill: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumbs .text-button, .action-buttons .text-button {
|
||||
.action-buttons .text-button {
|
||||
display: inline-block;
|
||||
padding: $-s;
|
||||
padding: $-xs $-s;
|
||||
&:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
@ -257,25 +283,12 @@ header .search-box {
|
||||
}
|
||||
|
||||
@include smaller-than($m) {
|
||||
.breadcrumbs .text-button, .action-buttons .text-button {
|
||||
.action-buttons .text-button {
|
||||
padding: $-xs $-xs;
|
||||
}
|
||||
.action-buttons .dropdown-container:last-child a {
|
||||
padding-left: $-xs;
|
||||
}
|
||||
.breadcrumbs .text-button {
|
||||
font-size: 0;
|
||||
}
|
||||
.breadcrumbs .text-button svg {
|
||||
font-size: $fs-m;
|
||||
}
|
||||
.breadcrumbs a i {
|
||||
font-size: $fs-m;
|
||||
padding-right: 0;
|
||||
}
|
||||
.breadcrumbs span.sep {
|
||||
padding: 0 $-xxs;
|
||||
}
|
||||
.toolbar .col-xs-1:first-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
@ -3,15 +3,12 @@
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: #FFFFFF;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
background-color: #F2F2F2;
|
||||
&.flexbox {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
&.shaded {
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
@ -19,9 +16,7 @@ body {
|
||||
line-height: 1.6;
|
||||
color: #616161;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
&.shaded {
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
|
||||
button {
|
||||
|
@ -41,7 +41,7 @@
|
||||
margin-top: $-xxl;
|
||||
overflow-wrap: break-word;
|
||||
&.flex {
|
||||
margin-top: $-m;
|
||||
margin-top: $-xl;
|
||||
}
|
||||
.align-left {
|
||||
text-align: left;
|
||||
@ -390,4 +390,26 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.entity-chip {
|
||||
display: inline-block;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
font-size: 0.9em;
|
||||
border-radius: 2em;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: $-xs $-m;
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
background-color: currentColor;
|
||||
opacity: 0.2;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
@ -53,7 +53,7 @@ $primary-faded: rgba(21, 101, 192, 0.15);
|
||||
// Item Colors
|
||||
$color-bookshelf: #af5a5a;
|
||||
$color-book: #009688;
|
||||
$color-chapter: #ef7c3c;
|
||||
$color-chapter: #e56236;
|
||||
$color-page: $primary;
|
||||
$color-page-draft: #9A60DA;
|
||||
|
||||
@ -64,5 +64,5 @@ $text-light: #EEE;
|
||||
// Shadows
|
||||
$bs-light: 0 0 4px 1px #CCC;
|
||||
$bs-med: 0 1px 3px 1px rgba(76, 76, 76, 0.26);
|
||||
$bs-card: 0 1px 3px 1px rgba(76, 76, 76, 0.26), 0 1px 12px 0px rgba(76, 76, 76, 0.2);
|
||||
$bs-card: 0 1px 6px -1px rgba(0, 0, 0, 0.1);
|
||||
$bs-hover: 0 2px 2px 1px rgba(0,0,0,.13);
|
@ -1,14 +1,14 @@
|
||||
<div class="breadcrumbs">
|
||||
@if (userCan('view', $page->book))
|
||||
<a href="{{ $page->book->getUrl() }}" class="text-book text-button">@icon('book'){{ $page->book->getShortName() }}</a>
|
||||
<span class="sep">»</span>
|
||||
<a href="{{ $page->book->getUrl() }}" class="entity-chip text-book">@icon('book'){{ $page->book->getShortName() }}</a>
|
||||
<div class="separator">@icon('chevron-right')</div>
|
||||
@endif
|
||||
@if($page->hasChapter() && userCan('view', $page->chapter))
|
||||
<a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button">
|
||||
<a href="{{ $page->chapter->getUrl() }}" class="entity-chip text-chapter">
|
||||
@icon('chapter')
|
||||
{{ $page->chapter->getShortName() }}
|
||||
</a>
|
||||
<span class="sep">»</span>
|
||||
<div class="separator">@icon('chevron-right')</div>
|
||||
@endif
|
||||
<a href="{{ $page->getUrl() }}" class="text-page text-button">@icon('page'){{ $page->getShortName() }}</a>
|
||||
<a href="{{ $page->getUrl() }}" class="entity-chip text-page">@icon('page'){{ $page->getShortName() }}</a>
|
||||
</div>
|
@ -1,10 +1,10 @@
|
||||
@extends('sidebar-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-sm-8 col-xs-5 faded">
|
||||
@include('pages._breadcrumbs', ['page' => $page])
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-7 faded">
|
||||
<div class="grid halves">
|
||||
<div>
|
||||
@include('pages._breadcrumbs', ['page' => $page])
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<span dropdown class="dropdown-container">
|
||||
<div dropdown-toggle class="text-button text-primary">@icon('export'){{ trans('entities.export') }}</div>
|
||||
@ -49,7 +49,7 @@
|
||||
@endif
|
||||
|
||||
@if ($page->attachments->count() > 0)
|
||||
<div class="card">
|
||||
<div id="page-attachments" class="card mb-m">
|
||||
<h3>@icon('attach') {{ trans('entities.pages_attachments') }}</h3>
|
||||
<div class="body">
|
||||
@foreach($page->attachments as $attachment)
|
||||
@ -62,7 +62,7 @@
|
||||
@endif
|
||||
|
||||
@if (isset($pageNav) && count($pageNav))
|
||||
<div class="card">
|
||||
<div id="page-navigation" class="card mb-m">
|
||||
<h3>@icon('open-book') {{ trans('entities.pages_navigation') }}</h3>
|
||||
<div class="body">
|
||||
<div class="sidebar-page-nav menu">
|
||||
@ -76,7 +76,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card entity-details">
|
||||
<div id="page-details" class="card entity-details mb-m">
|
||||
<h3>@icon('info') {{ trans('common.details') }}</h3>
|
||||
<div class="body text-muted text-small blended-links">
|
||||
@include('partials.entity-meta', ['entity' => $page])
|
||||
@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
||||
@include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
||||
|
||||
@stop
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="card book-tree" v-pre>
|
||||
<div id="book-tree" class="card book-tree mb-m" v-pre>
|
||||
<h3>@icon('book') {{ trans('entities.books_navigation') }}</h3>
|
||||
<div class="body">
|
||||
<ul class="sidebar-page-list menu">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="shaded">
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ setting('app-name') }}</title>
|
||||
|
||||
|
@ -4,14 +4,8 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="toolbar-container">
|
||||
<div class="faded-small toolbar">
|
||||
<div class="container fluid">
|
||||
<div class="row">
|
||||
@yield('toolbar')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbar px-l py-m">
|
||||
@yield('toolbar')
|
||||
</div>
|
||||
|
||||
|
||||
@ -20,12 +14,12 @@
|
||||
<div sidebar class="sidebar flex print-hidden" id="sidebar">
|
||||
<div class="sidebar-toggle primary-background-light">@icon('caret-right-circle')
|
||||
</div>
|
||||
<div class="scroll-body">
|
||||
<div class="scroll-body px-m">
|
||||
@yield('sidebar')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content flex @yield('body-wrap-classes')">
|
||||
<div class="content mr-m flex @yield('body-wrap-classes')">
|
||||
@yield('body')
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user