Skip to content
Permalink
Browse files

Update to Bootstrap 4.0

  • Loading branch information...
karsasmus committed Mar 30, 2018
1 parent 92fb90c commit e2afeced48fdc842095928188271b86b679d528d
@@ -3,7 +3,7 @@
define('LEAFPUB_VERSION', '{{version}}');
define('LEAFPUB_SCHEME_VERSION', 3);
define('LEAFPUB_DEV', !!preg_match('/\.dev$/', $_SERVER['HTTP_HOST']));
define('LEAFPUB_DEV', !!preg_match('/\.test$/', $_SERVER['HTTP_HOST']));
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING);
ini_set('display_errors', LEAFPUB_DEV ? 1 : 0);
ini_set('log_errors', 1);
@@ -15,8 +15,8 @@
$loader->register();
// Check PHP version
if(version_compare(PHP_VERSION, '5.6.0') < 0) {
exit('Leafpub requires PHP 5.6 or above.');
if(version_compare(PHP_VERSION, '7.1.0') < 0) {
exit('Leafpub requires PHP 7.1 or above.');
}
// Check for curl extension
@@ -2,7 +2,8 @@
// include node_modules/jquery/dist/jquery.min.js
// @include app/source/scripts/modules/jquery-ui.min.js
// @include node_modules/tether/dist/js/tether.min.js
// @include node_modules/bootstrap/dist/js/bootstrap.min.js
// @include node_modules/popper.js/dist/umd/popper.js
// @include node_modules/bootstrap/dist/js/bootstrap.js
// @include node_modules/nanobar/nanobar.min.js
// @include node_modules/selectize/dist/js/standalone/selectize.min.js
// @include node_modules/js-cookie/src/js.cookie.js
@@ -5,10 +5,11 @@
@import "font-awesome/scss/font-awesome";

// Bootstrap
@import "bootstrap/scss/custom";
//@import "bootstrap/scss/custom";
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/normalize";
//@import "bootstrap/scss/normalize";
@import "bootstrap/scss/print";
@import "bootstrap/scss/reboot";
@import "bootstrap/scss/type";
@@ -33,12 +33,12 @@
// Dropdown buttons
.dropdown-btn {
@extend .btn;
@extend .btn-secondary;
@extend .btn-light;
position: relative;
padding: 0;
display: inline-block;
.dropdown-toggle {
@include button-size($btn-padding-y, $btn-padding-x, 1rem, $border-radius);
@include button-size($btn-padding-y, $btn-padding-x, $font-size-root, 1rem, $border-radius);
position: relative;
padding-right: $btn-padding-x * .75;
display: block;
@@ -57,7 +57,7 @@
.dropdown-item {
i {
width: 1.2em;
color: $gray-light;
color: $dark;
margin-right: .5rem;
}
// On state
@@ -150,7 +150,7 @@ body:not(.no-menu) {
.description {
display: block;
@include text-truncate;
color: $gray-light;
color: $gray-100;
transition: color $leafpub-transition-speed;
}
&:hover,
@@ -32,10 +32,10 @@
top: 1rem;
right: 1rem;
font-size: 1.2rem;
color: $gray-light;
color: $gray-100;
transition: color $leafpub-transition-speed;
&:hover {
color: $gray;
color: $dark;
}
}
h3 {
@@ -69,5 +69,6 @@ $tooltip-bg: $leafpub-black;
$tooltip-opacity: 1;

// Bootstrap vars and mixins
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";
@@ -39,7 +39,7 @@ $plugin-list-item-image-size: 8rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $plugin-list-item-image-size;
height: $plugin-list-item-image-size;
line-height: $plugin-list-item-image-size;
@@ -103,7 +103,7 @@ $media-list-item-image-size: 4rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $media-list-item-image-size;
height: $media-list-item-image-size;
line-height: $media-list-item-image-size;
@@ -4,8 +4,8 @@
position: relative;
height: 100%;
border-right: solid 1px #ddd;
margin-left: -$grid-gutter-width-base / 2;
margin-right: -$grid-gutter-width-base / 2;
margin-left: -$grid-gutter-width / 2;
margin-right: -$grid-gutter-width / 2;
user-select: none;
}

@@ -89,8 +89,8 @@

// Post preview
.preview {
margin-left: -$grid-gutter-width-base / 2;
margin-right: -$grid-gutter-width-base / 2;
margin-left: -$grid-gutter-width / 2;
margin-right: -$grid-gutter-width / 2;
user-select: none;
}

@@ -120,7 +120,7 @@ $media-list-item-image-size: 4rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $media-list-item-image-size;
height: $media-list-item-image-size;
line-height: $media-list-item-image-size;
@@ -63,7 +63,7 @@ $media-list-item-image-size: 4rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $media-list-item-image-size;
height: $media-list-item-image-size;
line-height: $media-list-item-image-size;
@@ -40,7 +40,7 @@ $media-list-item-image-size: 8rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $media-list-item-image-size;
height: $media-list-item-image-size;
line-height: $media-list-item-image-size;
@@ -64,7 +64,7 @@ $media-list-item-image-size: 4rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $media-list-item-image-size;
height: $media-list-item-image-size;
line-height: $media-list-item-image-size;
@@ -37,7 +37,7 @@ $user-list-item-image-size: 8rem;
overflow: hidden;
img,
i {
background: $gray-light;
background: $gray-100;
width: $user-list-item-image-size;
height: $user-list-item-image-size;
line-height: $user-list-item-image-size;
@@ -23,13 +23,13 @@
{{!-- Main container --}}
<div class="main-container stretch-down">
<div class="row mt-2">
<div class="col-lg-6 push-lg-3 col-md-8 push-md-2 col-sm-10 push-sm-1">
<div class="col-lg-6 offset-lg-3 col-md-8 offset-md-2 col-sm-10 offset-sm-1">
<h3>{{L 'import_welcome'}}</h3>
</div>
</div>
<form class="import-form" autocomplete="off">
<div class="row mt-10">
<div class="col-lg-6 push-lg-3 col-md-8 push-md-2 col-sm-10 push-sm-1">
<div class="col-lg-6 offset-lg-3 col-md-8 offset-md-2 col-sm-10 offset-sm-1">
<div class="form-group">
<label>{{L 'select_blog_plattform'}}</label>
{{#each dropins}}
@@ -14,7 +14,7 @@
</div>

<div class="row">
<div class="col-sm-6 push-sm-6">
<div class="col-sm-6 offset-sm-6">
<div class="form-group">
<button class="btn btn-primary btn-block" type="submit">
{{L 'continue'}}
@@ -13,7 +13,7 @@
</div>
{{!-- Right side --}}
<div class="top-toolbar-section col-6 text-sm-right">
<button type="button" class="submit btn btn-primary">
<button type="button" class="submit btn btn-outline-primary">
{{L 'save'}}
</button>
</div>
@@ -19,14 +19,14 @@
{{!-- Right side --}}
<div class="top-toolbar-section col-lg-8 col-sm-6 text-sm-right text-left">
<div class="btn-group m-r-1">
<button type="button" class="edit btn btn-secondary" title="{{L 'toggle_plugin_state'}}" disabled>
<button type="button" class="edit btn btn-light" title="{{L 'toggle_plugin_state'}}" disabled>
<i class="fa fa-exchange"></i>
</button>
<button type="button" class="delete btn btn-secondary" title="{{L 'delete_the_selected_plugins'}}" disabled data-confirm="{{L 'delete_the_selected_plugins'}}">
<button type="button" class="delete btn btn-light" title="{{L 'delete_the_selected_plugins'}}" disabled data-confirm="{{L 'delete_the_selected_plugins'}}">
<i class="fa fa-trash-o"></i>
</button>
</div>
<label class="btn btn-success upload-new-plugin" title="{{L 'upload_a_new_plugin'}}">
<label class="btn btn-outline-success upload-new-plugin" title="{{L 'upload_a_new_plugin'}}">
<i class="fa fa-upload"></i>
<input type="file" accept=".zip" style="display: none;">
</label>
@@ -8,14 +8,14 @@
<div class="editor-toolbar" hidden>
{{!-- Undo/redo --}}
<div class="btn-group">
<button type="button" class="btn btn-secondary" data-editor="undo" title="{{L 'undo'}}"><i class="fa fa-undo"></i></button>
<button type="button" class="btn btn-secondary" data-editor="redo" title="{{L 'redo'}}"><i class="fa fa-repeat"></i></button>
<button type="button" class="btn btn-light" data-editor="undo" title="{{L 'undo'}}"><i class="fa fa-undo"></i></button>
<button type="button" class="btn btn-light" data-editor="redo" title="{{L 'redo'}}"><i class="fa fa-repeat"></i></button>
</div>

{{!-- Bold, italic, underline --}}
<div class="btn-group">
<button type="button" class="btn btn-secondary" data-editor="bold" title="{{L 'bold'}}"><i class="fa fa-bold"></i></button>
<button type="button" class="btn btn-secondary" data-editor="italic" title="{{L 'italic'}}"><i class="fa fa-italic"></i></button>
<button type="button" class="btn btn-light" data-editor="bold" title="{{L 'bold'}}"><i class="fa fa-bold"></i></button>
<button type="button" class="btn btn-light" data-editor="italic" title="{{L 'italic'}}"><i class="fa fa-italic"></i></button>
{{!-- Format dropdown --}}
<div class="dropdown-btn">
<span class="dropdown-toggle" data-toggle="dropdown">
@@ -119,22 +119,22 @@

{{!-- Link, image, embed --}}
<div class="btn-group">
<button type="button" class="btn btn-secondary" data-editor="link" title="{{L 'link'}}"><i class="fa fa-link"></i></button>
<button type="button" class="btn btn-secondary" data-editor="image" title="{{L 'image'}}"><i class="fa fa-picture-o"></i></button>
<button type="button" class="btn btn-secondary" data-editor="embed" title="{{L 'embed'}}"><i class="fa fa-cube"></i></button>
<button type="button" class="btn btn-secondary" data-editor="table" title="{{L 'table'}}"><i class="fa fa-table"></i></button>
<button type="button" class="btn btn-light" data-editor="link" title="{{L 'link'}}"><i class="fa fa-link"></i></button>
<button type="button" class="btn btn-light" data-editor="image" title="{{L 'image'}}"><i class="fa fa-picture-o"></i></button>
<button type="button" class="btn btn-light" data-editor="embed" title="{{L 'embed'}}"><i class="fa fa-cube"></i></button>
<button type="button" class="btn btn-light" data-editor="table" title="{{L 'table'}}"><i class="fa fa-table"></i></button>
</div>

{{!-- Zen mode, settings --}}
<div class="btn-group">
<button type="button" class="btn btn-secondary{{#is @cookies.zen 'true'}} active{{/is}}" data-editor="zen" title="{{L 'zen_mode'}}"><i class="fa fa-leaf"></i></button>
<button type="button" class="btn btn-secondary" data-editor="settings" title="{{L 'settings'}}"><i class="fa fa-cog"></i></button>
<button type="button" class="btn btn-light{{#is @cookies.zen 'true'}} active{{/is}}" data-editor="zen" title="{{L 'zen_mode'}}"><i class="fa fa-leaf"></i></button>
<button type="button" class="btn btn-light" data-editor="settings" title="{{L 'settings'}}"><i class="fa fa-cog"></i></button>
</div>

{{!-- Save --}}
<div class="btn-group">
<button type="button" class="btn {{#is post.status 'published'}}btn-success{{else}}btn-warning{{/is}}" data-editor="save">{{L 'save'}}</button>
<button type="button" class="btn {{#is post.status 'published'}}btn-success{{else}}btn-warning{{/is}} dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{L 'options'}}">
<button type="button" class="btn {{#is post.status 'published'}}btn-outline-success{{else}}btn-outline-warning{{/is}}" data-editor="save">{{L 'save'}}</button>
<button type="button" class="btn {{#is post.status 'published'}}btn-outline-success{{else}}btn-outline-warning{{/is}} dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{L 'options'}}">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
@@ -211,9 +211,9 @@
</div>
</div>
<div class="form-group mt-2">
<button class="btn btn-secondary unlink pull-right" type="button"><i class="fa fa-unlink"></i></button>
<button class="btn btn-light unlink pull-right" type="button"><i class="fa fa-unlink"></i></button>
<button class="btn btn-primary" type="submit">{{L 'submit'}}</button>
<button class="btn btn-secondary" type="button" data-panel="hide">{{L 'cancel'}}</button>
<button class="btn btn-light" type="button" data-panel="hide">{{L 'cancel'}}</button>
</div>
</form>
</div>
@@ -236,7 +236,7 @@
<label class="upload-picture btn btn-translucent-dark">
<i class="fa fa-fw fa-camera"></i>
<input type="file" accept="image/*" style="display: none;">
</label>
</label>
</div>
</div>
</div>
@@ -271,19 +271,19 @@
<label>{{L 'alignment'}}</label>
<div class="radio">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-secondary active">
<label class="btn btn-light active">
<input type="radio" class="image-align-none" name="align" value="none">
<i class="fa fa-ban"></i>
</label>
<label class="btn btn-secondary">
<label class="btn btn-light">
<input type="radio" class="image-align-left" name="align" value="left">
<i class="fa fa-align-left"></i>
</label>
<label class="btn btn-secondary">
<label class="btn btn-light">
<input type="radio" class="image-align-center" name="align" value="center">
<i class="fa fa-align-center"></i>
</label>
<label class="btn btn-secondary">
<label class="btn btn-light">
<input type="radio" class="image-align-right" name="align" value="right">
<i class="fa fa-align-right"></i>
</label>
@@ -323,9 +323,9 @@
</div>
</div>
<div class="form-group mt-2">
<button class="btn btn-secondary delete-image pull-right" type="button"><i class="fa fa-trash-o"></i></button>
<button class="btn btn-light delete-image pull-right" type="button"><i class="fa fa-trash-o"></i></button>
<button class="btn btn-primary" type="submit">{{L 'submit'}}</button>
<button class="btn btn-secondary" type="button" data-panel="hide">{{L 'cancel'}}</button>
<button class="btn btn-light" type="button" data-panel="hide">{{L 'cancel'}}</button>
<!--input class="form-control" type="url" name="src" id="image-src" hidden-->
<input class="form-control" type="text" name="sign" id="image-sign" hidden>
</div>
@@ -349,29 +349,29 @@
<label>{{L 'alignment'}}</label>
<div class="radio">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-secondary active">
<label class="btn btn-light active">
<input type="radio" class="embed-align-none" name="align" value="none">
<i class="fa fa-ban"></i>
</label>
<label class="btn btn-secondary">
<label class="btn btn-light">
<input type="radio" class="embed-align-left" name="align" value="left">
<i class="fa fa-align-left"></i>
</label>
<label class="btn btn-secondary">
<label class="btn btn-light">
<input type="radio" class="embed-align-center" name="align" value="center">
<i class="fa fa-align-center"></i>
</label>
<label class="btn btn-secondary">
<label class="btn btn-light">
<input type="radio" class="embed-align-right" name="align" value="right">
<i class="fa fa-align-right"></i>
</label>
</div>
</div>
</div>
<div class="form-group mt-2">
<button class="btn btn-secondary delete-embed pull-right" type="button"><i class="fa fa-trash-o"></i></button>
<button class="btn btn-light delete-embed pull-right" type="button"><i class="fa fa-trash-o"></i></button>
<button class="btn btn-primary" type="submit">{{L 'submit'}}</button>
<button class="btn btn-secondary" type="button" data-panel="hide">{{L 'cancel'}}</button>
<button class="btn btn-light" type="button" data-panel="hide">{{L 'cancel'}}</button>
</div>
</form>
</div>
@@ -406,11 +406,11 @@
{{L 'add_table_header'}}
</label>
</div>
</div>
</div>
<div class="form-group mt-2">
<button class="btn btn-secondary delete-table pull-right" type="button"><i class="fa fa-trash-o"></i></button>
<button class="btn btn-light delete-table pull-right" type="button"><i class="fa fa-trash-o"></i></button>
<button class="btn btn-primary" type="submit">{{L 'submit'}}</button>
<button class="btn btn-secondary" type="button" data-panel="hide">{{L 'cancel'}}</button>
<button class="btn btn-light" type="button" data-panel="hide">{{L 'cancel'}}</button>
</div>
</form>
</div>
Oops, something went wrong.

0 comments on commit e2afece

Please sign in to comment.
You can’t perform that action at this time.