forked from wallabag/wallabag
@ -19,12 +19,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: icomoon;
|
||||
src: url("../fonts/icomoon.eot");
|
||||
src:
|
||||
url("../fonts/icomoon.eot#iefix") format("embedded-opentype"),
|
||||
url("../fonts/icomoon.ttf") format("truetype"),
|
||||
url("../fonts/icomoon.woff") format("woff"),
|
||||
url("../fonts/icomoon.svg#icomoon") format("svg");
|
||||
src: url("../fonts/IcoMoon-Free.ttf");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -174,7 +169,7 @@ div.pagination ul .next.disabled {
|
||||
|
||||
footer.page-footer {
|
||||
margin-top: 10px;
|
||||
padding-top: 0px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
footer .row {
|
||||
@ -257,8 +252,9 @@ nav input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-field.nav-panel-add, .input-field.nav-panel-add form {
|
||||
height: 100%;
|
||||
.input-field.nav-panel-add,
|
||||
.input-field.nav-panel-add form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
@ -354,8 +350,9 @@ main ul.row {
|
||||
max-height: 64px;
|
||||
}
|
||||
|
||||
.card .card-content i.right, .card .card-reveal i.right {
|
||||
margin-left: 0;
|
||||
.card .card-content i.right,
|
||||
.card .card-reveal i.right {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card .card-entry-labels {
|
||||
@ -527,30 +524,38 @@ main ul.row {
|
||||
footer {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
nav,
|
||||
main,
|
||||
footer {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.reader-mode {
|
||||
width: 240px !important;
|
||||
}
|
||||
|
||||
.reader-mode span {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.tab {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagination li.prev,
|
||||
.pagination li.next {
|
||||
width: auto;
|
||||
@ -568,38 +573,47 @@ main ul.row {
|
||||
width: 25%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l2 {
|
||||
width: 33.33333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l3 {
|
||||
width: 41.66667%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l4 {
|
||||
width: 50%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l5 {
|
||||
width: 58.33333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l6 {
|
||||
width: 66.66667%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l7 {
|
||||
width: 75%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l8 {
|
||||
width: 83.33333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l9 {
|
||||
width: 91.66667%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.row .col.l10 {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
@ -645,7 +659,7 @@ main ul.row {
|
||||
}
|
||||
|
||||
.icon-link::before {
|
||||
content: "\e9cb";
|
||||
content: "\e9cb";
|
||||
}
|
||||
|
||||
footer [class^="icon-"],
|
||||
@ -676,5 +690,5 @@ div.settings div.file-field div {
|
||||
}
|
||||
|
||||
.input-field label.active {
|
||||
font-size: 1rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
@ -28,10 +28,10 @@
|
||||
.messages,
|
||||
.entry + .results,
|
||||
#slide-out,
|
||||
.progress, .hide-on-large-only,
|
||||
.progress,
|
||||
.hide-on-large-only,
|
||||
#article > aside,
|
||||
#article .mbm a
|
||||
{
|
||||
#article .mbm a {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
@ -1,29 +1,10 @@
|
||||
var $ = require('jquery');
|
||||
require('materialize');
|
||||
var annotator = require('annotator');
|
||||
const $ = require('jquery');
|
||||
global.jQuery = $;
|
||||
require('materialize'); // eslint-disable-line
|
||||
const annotator = require('annotator');
|
||||
import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools.js';
|
||||
|
||||
function initFilters() {
|
||||
// no display if filters not aviable
|
||||
if ($('div').is('#filters')) {
|
||||
$('#button_filters').show();
|
||||
$('.button-collapse-right').sideNav({ edge: 'right' });
|
||||
$('#clear_form_filters').on('click', function () {
|
||||
$('#filters input').val('');
|
||||
$('#filters :checked').removeAttr('checked');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initExport() {
|
||||
// no display if export not aviable
|
||||
if ($('div').is('#export')) {
|
||||
$('#button_export').show();
|
||||
$('.button-collapse-right').sideNav({ edge: 'right' });
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready(() => {
|
||||
// sideNav
|
||||
$('.button-collapse').sideNav();
|
||||
$('select').material_select();
|
||||
@ -40,13 +21,13 @@ $(document).ready(function () {
|
||||
initFilters();
|
||||
initExport();
|
||||
|
||||
$('#nav-btn-add-tag').on('click', function () {
|
||||
$('#nav-btn-add-tag').on('click', () => {
|
||||
$('.nav-panel-add-tag').toggle(100);
|
||||
$('.nav-panel-menu').addClass('hidden');
|
||||
$('#tag_label').focus();
|
||||
return false;
|
||||
});
|
||||
$('#nav-btn-add').on('click', function () {
|
||||
$('#nav-btn-add').on('click', () => {
|
||||
$('.nav-panel-buttom').hide(100);
|
||||
$('.nav-panel-add').show(100);
|
||||
$('.nav-panels .action').hide(100);
|
||||
@ -55,7 +36,7 @@ $(document).ready(function () {
|
||||
$('#entry_url').focus();
|
||||
return false;
|
||||
});
|
||||
$('#nav-btn-search').on('click', function () {
|
||||
$('#nav-btn-search').on('click', () => {
|
||||
$('.nav-panel-buttom').hide(100);
|
||||
$('.nav-panel-search').show(100);
|
||||
$('.nav-panels .action').hide(100);
|
||||
@ -64,7 +45,7 @@ $(document).ready(function () {
|
||||
$('#searchfield').focus();
|
||||
return false;
|
||||
});
|
||||
$('.close').on('click', function () {
|
||||
$('.close').on('click', () => {
|
||||
$('.nav-panel-add').hide(100);
|
||||
$('.nav-panel-search').hide(100);
|
||||
$('.nav-panel-buttom').show(100);
|
||||
@ -73,12 +54,12 @@ $(document).ready(function () {
|
||||
$('.nav-panels').css('background', 'transparent');
|
||||
return false;
|
||||
});
|
||||
$(window).scroll(function () {
|
||||
var s = $(window).scrollTop();
|
||||
var d = $(document).height();
|
||||
var c = $(window).height();
|
||||
var scrollPercent = (s / (d - c)) * 100;
|
||||
$('.progress .determinate').css('width', scrollPercent + '%');
|
||||
$(window).scroll(() => {
|
||||
const s = $(window).scrollTop();
|
||||
const d = $(document).height();
|
||||
const c = $(window).height();
|
||||
const scrollPercent = (s / (d - c)) * 100;
|
||||
$('.progress .determinate').css('width', `${scrollPercent}%`);
|
||||
});
|
||||
|
||||
/* ==========================================================================
|
||||
@ -86,9 +67,8 @@ $(document).ready(function () {
|
||||
========================================================================== */
|
||||
|
||||
if ($('article').length) {
|
||||
var app = new annotator.App();
|
||||
var x = JSON.parse($('#annotationroutes').html());
|
||||
|
||||
const app = new annotator.App();
|
||||
const x = JSON.parse($('#annotationroutes').html());
|
||||
|
||||
app.include(annotator.ui.main, {
|
||||
element: document.querySelector('article'),
|
||||
@ -96,21 +76,21 @@ $(document).ready(function () {
|
||||
|
||||
app.include(annotator.storage.http, x);
|
||||
|
||||
app.start().then(function () {
|
||||
app.start().then(() => {
|
||||
app.annotations.load({ entry: x.entryId });
|
||||
});
|
||||
|
||||
$(window).scroll(function (e) {
|
||||
var scrollTop = $(window).scrollTop();
|
||||
var docHeight = $(document).height();
|
||||
var scrollPercent = (scrollTop) / (docHeight);
|
||||
var scrollPercentRounded = Math.round(scrollPercent * 100) / 100;
|
||||
$(window).scroll(() => {
|
||||
const scrollTop = $(window).scrollTop();
|
||||
const docHeight = $(document).height();
|
||||
const scrollPercent = (scrollTop) / (docHeight);
|
||||
const scrollPercentRounded = Math.round(scrollPercent * 100) / 100;
|
||||
savePercent(x.entryId, scrollPercentRounded);
|
||||
});
|
||||
|
||||
retrievePercent(x.entryId);
|
||||
|
||||
$(window).resize(function () {
|
||||
$(window).resize(() => {
|
||||
retrievePercent(x.entryId);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user