forked from wallabag/wallabag
Move assets to assets/ root folder "as is"
This commit is contained in:
275
assets/material/css/article.scss
Normal file
275
assets/material/css/article.scss
Normal file
@ -0,0 +1,275 @@
|
||||
/* ==========================================================================
|
||||
Article
|
||||
========================================================================== */
|
||||
|
||||
#article, #preview-article {
|
||||
font-size: 20px;
|
||||
margin: 0 auto;
|
||||
max-width: 45em;
|
||||
padding: 5px 20px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 10px #ccc;
|
||||
|
||||
article {
|
||||
color: #424242;
|
||||
font-size: 18px;
|
||||
line-height: 1.7em;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #212121;
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.9rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.7rem;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 1px dotted $blue-accent-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
ul,
|
||||
ul li {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
img,
|
||||
figure {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
pre {
|
||||
box-sizing: border-box;
|
||||
margin: 0 0 1.75em;
|
||||
border: #e3f2fd 1px solid;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
font-family: monospace;
|
||||
font-size: 0.8em;
|
||||
white-space: pre;
|
||||
overflow: auto;
|
||||
background: #f5f5f5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
> header > h1 {
|
||||
font-size: 2em;
|
||||
margin: 2.1rem 0 0.68rem;
|
||||
}
|
||||
|
||||
.entry-info {
|
||||
.tools {
|
||||
display: flex;
|
||||
margin: 8px 5px 5px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.stats {
|
||||
margin: 0;
|
||||
font-size: 0.7em;
|
||||
|
||||
li {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin: 3px 5px;
|
||||
|
||||
i.material-icons {
|
||||
color: #3e3e3e;
|
||||
margin-right: 3px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.chip {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
align-items: center;
|
||||
background-color: transparent;
|
||||
|
||||
a,
|
||||
i {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
i.material-icons {
|
||||
font-size: 16px;
|
||||
vertical-align: sub;
|
||||
}
|
||||
}
|
||||
|
||||
.chip-label {
|
||||
padding-left: 10px;
|
||||
padding-right: 5px;
|
||||
background-color: #9e9e9e;
|
||||
border-radius: 6px 0 0 6px;
|
||||
}
|
||||
|
||||
.chip-action {
|
||||
padding: 0 5px;
|
||||
background-color: #868686;
|
||||
border-radius: 0 6px 6px 0;
|
||||
}
|
||||
|
||||
.chip-label,
|
||||
.chip-action {
|
||||
min-width: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chip-label:hover,
|
||||
.chip-label:active,
|
||||
.chip-label:focus,
|
||||
.chip-action:hover,
|
||||
.chip-action:active,
|
||||
.chip-action:focus {
|
||||
background-color: #5e5e5e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.entry-info {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.reader-mode {
|
||||
width: 70px !important;
|
||||
transition: width 0.2s ease;
|
||||
|
||||
.collapsible-body {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
span {
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
width: 260px !important;
|
||||
|
||||
span {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.collapsible-body {
|
||||
height: auto;
|
||||
|
||||
li a i.material-icons {
|
||||
margin: auto 5px auto -8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
margin: 0;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.tags-add-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 640px) {
|
||||
.entry-info {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#article .entry-info .tools {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#article .entry-info .tools .tags {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#article .entry-info .chip {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
#article .entry-info .chip-label,
|
||||
#article .entry-info .chip-action {
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
.tags-add-form {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tags-add-form-submit {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
351
assets/material/css/cards.scss
Normal file
351
assets/material/css/cards.scss
Normal file
@ -0,0 +1,351 @@
|
||||
/* ==========================================================================
|
||||
Cards
|
||||
========================================================================== */
|
||||
|
||||
main {
|
||||
div#content {
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin mixin-reading-time {
|
||||
.reading-time {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
|
||||
.card-reading-time,
|
||||
.card-created-at {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
.card-content {
|
||||
padding-bottom: 12px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.card-content .card-title,
|
||||
.card-reveal .card-title {
|
||||
line-height: 22.8px;
|
||||
max-height: 80px;
|
||||
font-size: 19px;
|
||||
font-family: roberto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.card-stacked .card-content .card-title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.card-content .activator,
|
||||
.card-reveal .activator {
|
||||
cursor: pointer;
|
||||
font-family: "Material Icons";
|
||||
}
|
||||
|
||||
.card-content i.right,
|
||||
.card-reveal i.right {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card-content .original {
|
||||
line-height: 24px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.card-entry-labels {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
z-index: 90;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.card-entry-labels-hidden {
|
||||
margin: 2.5px auto;
|
||||
}
|
||||
|
||||
.card-entry-labels-hidden li {
|
||||
display: inline-block;
|
||||
background-color: $blue-accent-color;
|
||||
margin: 0 5px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
max-height: 2em;
|
||||
max-width: calc(100% - 15px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.card-action {
|
||||
padding: 10px 10px 10px 15px;
|
||||
|
||||
ul.links {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tool {
|
||||
display: flex;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
@include mixin-reading-time;
|
||||
}
|
||||
|
||||
.card-image {
|
||||
height: 10em;
|
||||
}
|
||||
|
||||
.card-fullimage {
|
||||
height: 13.5em;
|
||||
}
|
||||
|
||||
&.sw {
|
||||
max-width: 370px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
a.original:not(.waves-effect) {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card .card-image .preview,
|
||||
.card .card-fullimage .preview,
|
||||
.card-stacked .preview {
|
||||
height: 100%;
|
||||
background: no-repeat 50%/cover;
|
||||
background-color: #efefef;
|
||||
display: block;
|
||||
|
||||
&--default {
|
||||
background-size: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.card-entry-labels li,
|
||||
.card-tag-labels li {
|
||||
margin: 10px 10px 10px auto;
|
||||
padding: 5px 12px 5px 16px !important;
|
||||
background-color: $blue-accent-color;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.card-entry-labels li {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
border-radius: 0 3px 3px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-tag-labels li {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.card-entry-tags a,
|
||||
.card-entry-labels a,
|
||||
.card-tag-labels a,
|
||||
.card-entry-labels-hidden a,
|
||||
#list .chip a {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.card-tag-link {
|
||||
width: calc(100% - 24px);
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-tag-form {
|
||||
display: flex;
|
||||
min-width: 100px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.card-tag-form input {
|
||||
margin-bottom: 0;
|
||||
height: 1.8rem;
|
||||
}
|
||||
|
||||
.card-tag-icon {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.card-tag-delete {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.card-tag-labels {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
}
|
||||
|
||||
.card-tag-labels li {
|
||||
margin: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-stacked {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
|
||||
&:hover ul.tools-list {
|
||||
display: inline;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-preview {
|
||||
max-width: 100px;
|
||||
max-height: 50px;
|
||||
margin-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
div.metadata {
|
||||
overflow: hidden;
|
||||
height: 1.5em;
|
||||
display: flex;
|
||||
|
||||
ul.tags {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.chip {
|
||||
background-color: $blue-accent-color;
|
||||
padding: 0 7px;
|
||||
margin: auto 1px;
|
||||
border-radius: 6px;
|
||||
line-height: 22px;
|
||||
height: 22px;
|
||||
|
||||
a,
|
||||
i {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
i.material-icons {
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@include mixin-reading-time {
|
||||
padding: 0 5px;
|
||||
flex-wrap: wrap;
|
||||
margin-left: auto;
|
||||
|
||||
i.material-icons {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.card-content {
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
ul.tools-list {
|
||||
flex: 1;
|
||||
display: none;
|
||||
flex-basis: 5em;
|
||||
align-self: flex-end;
|
||||
float: right;
|
||||
max-width: 8em;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.card.archived,
|
||||
.card-stacked.archived {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#content .collection .collection-item {
|
||||
min-height: 65px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.quickstart .card .card-action a,
|
||||
.quickstart .card .card-action a:hover {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.settings .tabs-container {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.settings .settings-checkbox-col {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.settings .settings-checkbox-label {
|
||||
margin-bottom: 20px;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.settings .settings-range-label {
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.entries-row {
|
||||
display: grid;
|
||||
margin: 0.4rem 0 0;
|
||||
padding: 0 0.75rem;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.entry-card {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
||||
.tools {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
149
assets/material/css/dark_theme.scss
Normal file
149
assets/material/css/dark_theme.scss
Normal file
@ -0,0 +1,149 @@
|
||||
.dark-theme {
|
||||
body {
|
||||
background-color: #101010;
|
||||
}
|
||||
|
||||
#article,
|
||||
.card,
|
||||
.card-panel,
|
||||
.card .card-reveal,
|
||||
.card-stacked .preview:not(.preview--default),
|
||||
.card .preview:not(.preview--default),
|
||||
.collapsible-header,
|
||||
.collection,
|
||||
.dropdown-content,
|
||||
.side-nav,
|
||||
.side-nav .collapsible-body,
|
||||
.side-nav.fixed .collapsible-body,
|
||||
.tabs {
|
||||
background-color: #131716;
|
||||
}
|
||||
|
||||
table.striped > tbody > tr:nth-child(2n+1),
|
||||
.dropdown-content li {
|
||||
background-color: #232323;
|
||||
}
|
||||
|
||||
.dropdown-content li:hover,
|
||||
.dropdown-content li.active,
|
||||
.dropdown-content li.selected,
|
||||
.pagination li:not(.active) a:hover,
|
||||
.pagination li:not(.active) a:active,
|
||||
.pagination li:not(.active) a:focus {
|
||||
background-color: #2c2c2c;
|
||||
}
|
||||
|
||||
.dropdown-content .divider {
|
||||
background-color: #383838;
|
||||
}
|
||||
|
||||
.collection {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.collection .collection-item {
|
||||
border-color: #121212;
|
||||
}
|
||||
|
||||
.card:hover,
|
||||
.collection .collection-item:hover {
|
||||
background-color: #272727;
|
||||
}
|
||||
|
||||
#content,
|
||||
#article article,
|
||||
#article article h1,
|
||||
#article article h2,
|
||||
#article article h3,
|
||||
#article article h4,
|
||||
#article article h5,
|
||||
#article article h6,
|
||||
.dropdown-content li > a,
|
||||
.nav-panels .input-field input:focus,
|
||||
.results-item,
|
||||
.side-nav li > a,
|
||||
.side-nav li > a > i.material-icons {
|
||||
color: #dfdfdf;
|
||||
}
|
||||
|
||||
.cyan,
|
||||
.cyan.darken-1,
|
||||
.cyan.darken-2,
|
||||
.nav-panel-add,
|
||||
.nav-panel-search {
|
||||
background-color: #1d1d1d !important;
|
||||
}
|
||||
|
||||
.grey-text.text-darken-4,
|
||||
.nav-panel-item .add,
|
||||
.nav-panel-item .search,
|
||||
.nav-panels .close {
|
||||
color: #dfdfdf !important;
|
||||
}
|
||||
|
||||
.side-nav li.active {
|
||||
background-color: #2f2f2f;
|
||||
}
|
||||
|
||||
.mass-action-tags .mass-action-tags-input.mass-action-tags-input,
|
||||
.side-nav li:not(.logo) > a:hover,
|
||||
.side-nav .collapsible-header:hover,
|
||||
.side-nav.fixed .collapsible-header:hover {
|
||||
background-color: #1d1d1d;
|
||||
}
|
||||
|
||||
#article {
|
||||
box-shadow: 0 0 10px #1d1d1d;
|
||||
}
|
||||
|
||||
.card,
|
||||
.collection .collection-item {
|
||||
background-color: #1d1d1d;
|
||||
}
|
||||
|
||||
.card-action {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.logo img,
|
||||
.preview.preview--default,
|
||||
.typo-logo {
|
||||
filter: invert(100%);
|
||||
}
|
||||
|
||||
.border-bottom,
|
||||
.collapsible,
|
||||
.collapsible-body,
|
||||
.collapsible-header {
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
.pagination li.active {
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
#article pre {
|
||||
color: #abb2bf;
|
||||
background-color: #282c34;
|
||||
}
|
||||
|
||||
nav input {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
input[type="url"]:not(.browser-default):disabled {
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
||||
.input-field.nav-panel-add.disabled,
|
||||
.input-field.nav-panel-add.disabled input {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
#article {
|
||||
background-color: #101010;
|
||||
}
|
||||
}
|
||||
}
|
||||
230
assets/material/css/entries.scss
Normal file
230
assets/material/css/entries.scss
Normal file
@ -0,0 +1,230 @@
|
||||
/* ==========================================================================
|
||||
* Entries
|
||||
* ========================================================================== */
|
||||
|
||||
.mass-action-toggle {
|
||||
display: inline-flex;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:focus {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.mass-action {
|
||||
margin: 20px 5px 10px 20px;
|
||||
}
|
||||
|
||||
.mass-action-group {
|
||||
display: flex;
|
||||
padding: 3px;
|
||||
align-items: center;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.mass-action-button {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 0 0.7rem;
|
||||
|
||||
i {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mass-action-button--tags {
|
||||
border-radius: 2px 0 0 2px;
|
||||
}
|
||||
|
||||
.card-stacked .entry-checkbox {
|
||||
margin: 10px 15px 10px 5px;
|
||||
}
|
||||
|
||||
.card .entry-checkbox {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
inset: 0;
|
||||
justify-content: flex-end;
|
||||
align-items: start;
|
||||
background-color: rgb(0 172 193 / 20%);
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.entries .entry-checkbox-input,
|
||||
.mass-action .entry-checkbox-input {
|
||||
position: relative;
|
||||
width: 20px;
|
||||
min-height: 25px;
|
||||
opacity: initial;
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.toggle-checkbox:not(:checked) + .mass-action,
|
||||
.toggle-checkbox:not(:checked) + .mass-action-tags,
|
||||
.toggle-checkbox:not(:checked) ~ .entries .entry-checkbox,
|
||||
.toggle-checkbox:checked ~ .entries .card-preview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mass-action-tags {
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
|
||||
.mass-action-tags-input.mass-action-tags-input {
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
height: 34px;
|
||||
background: white;
|
||||
border-bottom: 3px solid #c5ebef;
|
||||
}
|
||||
|
||||
.mass-action-tags-input.mass-action-tags-input.mass-action-tags-input:focus {
|
||||
border-bottom: 3px solid $blue-accent-color;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.entries {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.collection {
|
||||
margin: 5px 15px 0;
|
||||
padding: 0;
|
||||
|
||||
.collection-item {
|
||||
padding: 7px;
|
||||
height: 65px;
|
||||
}
|
||||
}
|
||||
|
||||
.results {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
padding: 1rem 1rem 0;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.nb-results {
|
||||
display: inline-flex;
|
||||
margin-bottom: 20px;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.results-item {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
ul {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
|
||||
.prev.disabled,
|
||||
.next.disabled {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 0;
|
||||
|
||||
&:not(.active) a:hover,
|
||||
&:not(.active) a:active,
|
||||
&:not(.active) a:focus {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
span,
|
||||
a {
|
||||
padding: 0 10px;
|
||||
height: 30px;
|
||||
display: block;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
li.active span {
|
||||
padding: 0 10px;
|
||||
height: 30px;
|
||||
display: block;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
margin: 0.7rem 0.5rem;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.picker__date-display {
|
||||
display: none;
|
||||
}
|
||||
|
||||
footer {
|
||||
&.page-footer {
|
||||
margin-top: 10px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 993px) {
|
||||
.results {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.nb-results {
|
||||
margin-bottom: 0;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.mass-action-button {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
|
||||
.mass-action-group {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.mass-action-tags {
|
||||
margin-top: 0;
|
||||
margin-left: 7px;
|
||||
flex-wrap: initial;
|
||||
}
|
||||
|
||||
.mass-action {
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
align-items: center;
|
||||
|
||||
.mass-action-tags-input.mass-action-tags-input {
|
||||
height: 21px;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
assets/material/css/filters.scss
Normal file
15
assets/material/css/filters.scss
Normal file
@ -0,0 +1,15 @@
|
||||
/* ==========================================================================
|
||||
* Filters slider
|
||||
* ========================================================================== */
|
||||
|
||||
#filters {
|
||||
button {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.with-checkbox {
|
||||
height: 3rem;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
13
assets/material/css/fonts.scss
Normal file
13
assets/material/css/fonts.scss
Normal file
@ -0,0 +1,13 @@
|
||||
/* ==========================================================================
|
||||
* Fonts
|
||||
* ========================================================================== */
|
||||
|
||||
/**
|
||||
* Icomoon
|
||||
*/
|
||||
@font-face {
|
||||
font-family: icomoon;
|
||||
src: url("~icomoon-free-npm/Font/IcoMoon-Free.ttf");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
186
assets/material/css/icons.scss
Normal file
186
assets/material/css/icons.scss
Normal file
@ -0,0 +1,186 @@
|
||||
/* ==========================================================================
|
||||
* Icons
|
||||
* ========================================================================== */
|
||||
|
||||
/**
|
||||
*
|
||||
* Material icons
|
||||
*
|
||||
*/
|
||||
.material-icons {
|
||||
font-family: "Material Icons";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
user-select: none;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizelegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: "liga";
|
||||
|
||||
.md-18 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.md-24 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.md-36 {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.md-48 {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.md-dark {
|
||||
color: rgb(0 0 0 / 54%);
|
||||
|
||||
.md-inactive {
|
||||
color: rgb(0 0 0 / 26%);
|
||||
}
|
||||
}
|
||||
|
||||
.md-light {
|
||||
color: rgb(255 255 255 / 100%);
|
||||
|
||||
.md-inactive {
|
||||
color: rgb(255 255 255 / 30%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Icomoon icons
|
||||
*
|
||||
*/
|
||||
[class^="icon-"]::before,
|
||||
[class*=" icon-"]::before {
|
||||
font-family: icomoon;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
background-size: 24px;
|
||||
|
||||
/* Enable Ligatures ================ */
|
||||
letter-spacing: 0;
|
||||
font-feature-settings: "liga";
|
||||
}
|
||||
|
||||
.icon-eye::before {
|
||||
content: "\e9ce";
|
||||
}
|
||||
|
||||
.icon-no-eye::before {
|
||||
content: "\e9d1";
|
||||
}
|
||||
|
||||
.icon-calendar::before {
|
||||
content: "\e953";
|
||||
}
|
||||
|
||||
.icon-mail::before {
|
||||
content: "\ea86";
|
||||
}
|
||||
|
||||
.icon-time::before {
|
||||
content: "\e952";
|
||||
}
|
||||
|
||||
a.icon-image {
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 0.4em !important;
|
||||
padding-left: 0 !important;
|
||||
margin-left: 25px;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
float: left;
|
||||
margin: 7px 1.5px 0 0;
|
||||
}
|
||||
|
||||
&.diaspora::before {
|
||||
background: url("../../_global/img/icons/diaspora-icon--black.png") no-repeat center/80%;
|
||||
}
|
||||
|
||||
&.unmark::before {
|
||||
background: url("../../_global/img/icons/unmark-icon--black.png") no-repeat center/80%;
|
||||
}
|
||||
|
||||
&.shaarli::before {
|
||||
background: url("../../_global/img/icons/shaarli.png") no-repeat center/80%;
|
||||
}
|
||||
|
||||
&.scuttle::before {
|
||||
background: url("../../_global/img/icons/scuttle.png") no-repeat center/80%;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-google-plus2::before {
|
||||
content: "\ea89";
|
||||
}
|
||||
|
||||
.icon-facebook2::before {
|
||||
content: "\ea8d";
|
||||
}
|
||||
|
||||
.icon-twitter::before {
|
||||
content: "\ea96";
|
||||
}
|
||||
|
||||
.icon-apple::before {
|
||||
content: "\eabf";
|
||||
}
|
||||
|
||||
.icon-android::before {
|
||||
content: "\eac1";
|
||||
}
|
||||
|
||||
.icon-chrome::before {
|
||||
content: "\eae5";
|
||||
}
|
||||
|
||||
.icon-firefox::before {
|
||||
content: "\eae6";
|
||||
}
|
||||
|
||||
.icon-link::before {
|
||||
content: "\e9cb";
|
||||
}
|
||||
|
||||
footer [class^="icon-"],
|
||||
footer [class*=" icon-"] {
|
||||
font-size: 2em;
|
||||
transition: text-shadow 0.2s ease;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
footer [class^="icon-"]:hover,
|
||||
footer [class*=" icon-"]:hover {
|
||||
text-shadow: 0 0 10px rgb(0 0 0 / 30%);
|
||||
}
|
||||
18
assets/material/css/index.scss
Normal file
18
assets/material/css/index.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@import "variables";
|
||||
|
||||
/* Style */
|
||||
@import "article";
|
||||
@import "cards";
|
||||
@import "entries";
|
||||
@import "filters";
|
||||
@import "layout";
|
||||
@import "nav";
|
||||
@import "sidenav";
|
||||
@import "various";
|
||||
@import "dark_theme";
|
||||
|
||||
/* Tools */
|
||||
@import "fonts";
|
||||
@import "icons";
|
||||
@import "print";
|
||||
@import "media_queries";
|
||||
52
assets/material/css/layout.scss
Executable file
52
assets/material/css/layout.scss
Executable file
@ -0,0 +1,52 @@
|
||||
/* ==========================================================================
|
||||
Layout
|
||||
========================================================================== */
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
background: #fafafa;
|
||||
|
||||
&.login main {
|
||||
padding: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $blue-accent-color;
|
||||
}
|
||||
|
||||
main,
|
||||
#content,
|
||||
.valign-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.typo-logo {
|
||||
max-width: 150px;
|
||||
}
|
||||
|
||||
#main {
|
||||
flex: 1 0 auto;
|
||||
|
||||
.logo {
|
||||
a {
|
||||
height: 100pt;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 100pt;
|
||||
width: 100pt;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
193
assets/material/css/media_queries.scss
Normal file
193
assets/material/css/media_queries.scss
Normal file
@ -0,0 +1,193 @@
|
||||
/* ==========================================================================
|
||||
Media queries
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (min-width: 450px) {
|
||||
.entries-row {
|
||||
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
nav,
|
||||
.index main,
|
||||
footer {
|
||||
padding-left: 240px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 993px) {
|
||||
.entry main div#content {
|
||||
padding-left: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
header,
|
||||
main,
|
||||
footer,
|
||||
nav {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.nav-panels .action {
|
||||
padding-right: 0.75rem;
|
||||
}
|
||||
|
||||
.nav-panel-top {
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.nav-panel-buttom {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#article {
|
||||
max-width: 35em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-bottom: 100px;
|
||||
font-size: 18px;
|
||||
|
||||
> header > h1 {
|
||||
font-size: 1.33em;
|
||||
}
|
||||
}
|
||||
|
||||
.reader-mode {
|
||||
width: 240px !important;
|
||||
|
||||
span {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.tab {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagination li {
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&.prev,
|
||||
&.next {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.drag-target + .drag-target {
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.drag-target + .drag-target + .drag-target {
|
||||
top: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1200px) and (max-width: 1650px) {
|
||||
.row .col.l3 {
|
||||
width: 33.3333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 993px) and (max-width: 1200px) {
|
||||
.row {
|
||||
.col.l1 {
|
||||
width: 25%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l2 {
|
||||
width: 33.3333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l3 {
|
||||
width: 41.6667%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l4 {
|
||||
width: 50%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l5 {
|
||||
width: 58.333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l6 {
|
||||
width: 66.6667%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l7 {
|
||||
width: 75%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l8 {
|
||||
width: 83.3333%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l9 {
|
||||
width: 91.6667%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.col.l10 {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 350px) {
|
||||
.nb-results {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main ul.row {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.row .col {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.card-stacked div.metadata .reading-time {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media only print {
|
||||
body {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
194
assets/material/css/nav.scss
Normal file
194
assets/material/css/nav.scss
Normal file
@ -0,0 +1,194 @@
|
||||
/* ==========================================================================
|
||||
Nav
|
||||
========================================================================== */
|
||||
nav {
|
||||
height: auto;
|
||||
line-height: initial;
|
||||
}
|
||||
|
||||
nav {
|
||||
input {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
ul a:hover {
|
||||
background-color: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-panel-item .button-collapse {
|
||||
margin-left: 0;
|
||||
margin-right: 0.5rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.nav-panel-item {
|
||||
display: flex;
|
||||
padding: 0.6rem 0.4rem 0.6rem 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
a {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-panel-item .material-icons {
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.nav-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-panel-buttom {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.nav-panel-item .add,
|
||||
.nav-panel-item .search,
|
||||
.nav-panels .close {
|
||||
color: #444 !important;
|
||||
}
|
||||
|
||||
.nav-panels {
|
||||
transition: background 0.2s ease;
|
||||
|
||||
.action {
|
||||
margin: 0;
|
||||
font-size: 2.1rem;
|
||||
}
|
||||
|
||||
.input-field input {
|
||||
display: block;
|
||||
font-size: 1.2rem;
|
||||
line-height: inherit;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.input-field input:focus {
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* materializecss override */
|
||||
.input-field.input-field input {
|
||||
margin-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.input-field.input-field input:focus {
|
||||
border-bottom: none;
|
||||
box-shadow: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-panel-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-field {
|
||||
&.nav-panel-item label {
|
||||
left: 1rem;
|
||||
}
|
||||
|
||||
&.nav-panel-item .close {
|
||||
color: transparent;
|
||||
cursor: pointer;
|
||||
font-size: 2rem;
|
||||
transition: 0.3s color;
|
||||
}
|
||||
|
||||
&.nav-panel-item {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&.nav-panel-add.disabled,
|
||||
&.nav-panel-add.disabled input {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-panel-add,
|
||||
.nav-panel-search {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.nav-form-button {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
|
||||
&:focus {
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-form-button,
|
||||
.nav-panel-item .close {
|
||||
margin: 0 1%;
|
||||
}
|
||||
|
||||
.button-filters {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.button-export {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.entry-nav-top--sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
width: 100%;
|
||||
|
||||
li {
|
||||
min-height: auto;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
li > a {
|
||||
display: flex;
|
||||
padding: 14px 10px;
|
||||
align-items: center;
|
||||
white-space: initial;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 993px) {
|
||||
.toggle-add-url-container {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.toggle-add-url {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.button-collapse {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
min-width: 300px;
|
||||
width: initial;
|
||||
}
|
||||
}
|
||||
70
assets/material/css/print.scss
Executable file
70
assets/material/css/print.scss
Executable file
@ -0,0 +1,70 @@
|
||||
@media print {
|
||||
/* ### Layout ### */
|
||||
|
||||
body {
|
||||
font-family: serif;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
/* ### Content ### */
|
||||
|
||||
/* Hide useless blocks */
|
||||
body > header,
|
||||
body > footer,
|
||||
.entry-tools,
|
||||
header div,
|
||||
.messages,
|
||||
.entry + .results,
|
||||
.left-bar,
|
||||
.progress,
|
||||
.hide-on-large-only,
|
||||
.entry-info,
|
||||
.title-edit {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
main {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.article {
|
||||
margin: inherit !important;
|
||||
}
|
||||
|
||||
article {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* Add URL after links */
|
||||
.vieworiginal a::after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
|
||||
/* Add explanation after abbr */
|
||||
abbr[title]::after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
/* Change border on current pager item */
|
||||
.pagination span.current {
|
||||
border-style: dashed;
|
||||
}
|
||||
|
||||
#main {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#article {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
50
assets/material/css/sidenav.scss
Normal file
50
assets/material/css/sidenav.scss
Normal file
@ -0,0 +1,50 @@
|
||||
/* ==========================================================================
|
||||
Side-nav
|
||||
========================================================================== */
|
||||
|
||||
.side-nav {
|
||||
width: 240px;
|
||||
|
||||
li {
|
||||
padding: 0;
|
||||
|
||||
&.logo > a:hover {
|
||||
background: initial;
|
||||
}
|
||||
|
||||
& > a > i.material-icons.theme-toggle-icon {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&.fixed a {
|
||||
font-size: 13px;
|
||||
line-height: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.collapsible-header,
|
||||
&.fixed .collapsible-header {
|
||||
height: 45px;
|
||||
line-height: 44px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
> li.logo {
|
||||
line-height: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bold > a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.items-number {
|
||||
float: right;
|
||||
}
|
||||
5
assets/material/css/variables.scss
Normal file
5
assets/material/css/variables.scss
Normal file
@ -0,0 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Variables
|
||||
========================================================================== */
|
||||
|
||||
$blue-accent-color: #00acc1;
|
||||
40
assets/material/css/various.scss
Normal file
40
assets/material/css/various.scss
Normal file
@ -0,0 +1,40 @@
|
||||
/* ==========================================================================
|
||||
* Various
|
||||
* ========================================================================== */
|
||||
|
||||
div.settings div.file-field {
|
||||
/* force height on non-input field in the settings page */
|
||||
div,
|
||||
ul {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
/* but avoid to kill all file input */
|
||||
div {
|
||||
margin-top: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
/* override materializecss pointer-event disabled on checkboxes */
|
||||
[type="checkbox"]:not(:checked),
|
||||
[type="checkbox"]:checked,
|
||||
.input-field label {
|
||||
pointer-events: initial;
|
||||
}
|
||||
|
||||
.input-field label.active {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
nav .input-field input {
|
||||
margin: 0;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tab {
|
||||
flex: 1;
|
||||
}
|
||||
263
assets/material/index.js
Executable file
263
assets/material/index.js
Executable file
@ -0,0 +1,263 @@
|
||||
import $ from 'jquery';
|
||||
|
||||
/* Materialize imports */
|
||||
import 'materialize-css/dist/css/materialize.css';
|
||||
import 'materialize-css/dist/js/materialize';
|
||||
|
||||
/* Global imports */
|
||||
import '../_global/index';
|
||||
|
||||
/* Tools */
|
||||
import {
|
||||
initExport, initFilters, initRandom, initPreviewText,
|
||||
} from './js/tools';
|
||||
|
||||
/* Import shortcuts */
|
||||
import './js/shortcuts/main';
|
||||
import './js/shortcuts/entry';
|
||||
|
||||
/* Theme style */
|
||||
import './css/index.scss';
|
||||
|
||||
const mobileMaxWidth = 993;
|
||||
|
||||
(function darkTheme() {
|
||||
const rootEl = document.querySelector('html');
|
||||
const themeDom = {
|
||||
darkClass: 'dark-theme',
|
||||
|
||||
toggleClass(el) {
|
||||
return el.classList.toggle(this.darkClass);
|
||||
},
|
||||
|
||||
addClass(el) {
|
||||
return el.classList.add(this.darkClass);
|
||||
},
|
||||
|
||||
removeClass(el) {
|
||||
return el.classList.remove(this.darkClass);
|
||||
},
|
||||
};
|
||||
const themeCookie = {
|
||||
values: {
|
||||
light: 'light',
|
||||
dark: 'dark',
|
||||
},
|
||||
|
||||
name: 'theme',
|
||||
|
||||
getValue(isDarkTheme) {
|
||||
return isDarkTheme ? this.values.dark : this.values.light;
|
||||
},
|
||||
|
||||
setCookie(isDarkTheme) {
|
||||
const value = this.getValue(isDarkTheme);
|
||||
document.cookie = `${this.name}=${value};samesite=Lax;path=/;max-age=31536000`;
|
||||
},
|
||||
|
||||
removeCookie() {
|
||||
document.cookie = `${this.name}=auto;samesite=Lax;path=/;max-age=0`;
|
||||
},
|
||||
|
||||
exists() {
|
||||
return document.cookie.split(';').some((cookie) => cookie.trim().startsWith(`${this.name}=`));
|
||||
},
|
||||
};
|
||||
const preferedColorScheme = {
|
||||
choose() {
|
||||
const themeCookieExists = themeCookie.exists();
|
||||
if (this.isAvailable() && !themeCookieExists) {
|
||||
const isPreferedColorSchemeDark = window.matchMedia('(prefers-color-scheme: dark)').matches === true;
|
||||
if (!themeCookieExists) {
|
||||
themeDom[isPreferedColorSchemeDark ? 'addClass' : 'removeClass'](rootEl);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
isAvailable() {
|
||||
return typeof window.matchMedia === 'function';
|
||||
},
|
||||
|
||||
init() {
|
||||
if (!this.isAvailable()) {
|
||||
return false;
|
||||
}
|
||||
this.choose();
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(() => {
|
||||
this.choose();
|
||||
});
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
||||
const addDarkThemeListeners = () => {
|
||||
$(document).ready(() => {
|
||||
const lightThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="light"]');
|
||||
[...lightThemeButtons].map((lightThemeButton) => {
|
||||
lightThemeButton.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
themeDom.removeClass(rootEl);
|
||||
themeCookie.setCookie(false);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
const darkThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="dark"]');
|
||||
[...darkThemeButtons].map((darkThemeButton) => {
|
||||
darkThemeButton.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
themeDom.addClass(rootEl);
|
||||
themeCookie.setCookie(true);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
const autoThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="auto"]');
|
||||
[...autoThemeButtons].map((autoThemeButton) => {
|
||||
autoThemeButton.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
themeCookie.removeCookie();
|
||||
preferedColorScheme.choose();
|
||||
});
|
||||
return true;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
preferedColorScheme.init();
|
||||
addDarkThemeListeners();
|
||||
}());
|
||||
|
||||
const stickyNav = () => {
|
||||
const nav = $('.js-entry-nav-top');
|
||||
$('[data-toggle="actions"]').click(() => {
|
||||
nav.toggleClass('entry-nav-top--sticky');
|
||||
});
|
||||
};
|
||||
|
||||
const articleScroll = () => {
|
||||
const articleEl = $('#article');
|
||||
if (articleEl.length > 0) {
|
||||
$(window).scroll(() => {
|
||||
const s = $(window).scrollTop();
|
||||
const d = $(document).height();
|
||||
const c = $(window).height();
|
||||
const articleElBottom = articleEl.offset().top + articleEl.height();
|
||||
const scrollPercent = (s / (d - c)) * 100;
|
||||
$('.progress .determinate').css('width', `${scrollPercent}%`);
|
||||
const fixedActionBtn = $('.js-fixed-action-btn');
|
||||
const toggleScrollDataName = 'toggle-auto';
|
||||
if ((s + c) > articleElBottom) {
|
||||
fixedActionBtn.data(toggleScrollDataName, true);
|
||||
fixedActionBtn.openFAB();
|
||||
} else if (fixedActionBtn.data(toggleScrollDataName) === true) {
|
||||
fixedActionBtn.data(toggleScrollDataName, false);
|
||||
fixedActionBtn.closeFAB();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(() => {
|
||||
// sideNav
|
||||
$('.button-collapse').sideNav();
|
||||
$('select').material_select();
|
||||
$('.collapsible').collapsible({
|
||||
accordion: false,
|
||||
});
|
||||
$('.datepicker').pickadate({
|
||||
selectMonths: true,
|
||||
selectYears: 15,
|
||||
formatSubmit: 'yyyy-mm-dd',
|
||||
hiddenName: false,
|
||||
format: 'yyyy-mm-dd',
|
||||
container: 'body',
|
||||
});
|
||||
|
||||
$('.dropdown-trigger').dropdown({ hover: false });
|
||||
|
||||
initFilters();
|
||||
initExport();
|
||||
initRandom();
|
||||
stickyNav();
|
||||
articleScroll();
|
||||
initPreviewText();
|
||||
|
||||
const toggleNav = (toShow, toFocus) => {
|
||||
$('.nav-panel-actions').hide(100);
|
||||
$(toShow).show(100);
|
||||
$(toFocus).focus();
|
||||
};
|
||||
|
||||
$('#nav-btn-add-tag').on('click', () => {
|
||||
$('.nav-panel-add-tag').toggle(100);
|
||||
$('.nav-panel-menu').addClass('hidden');
|
||||
if (window.innerWidth < mobileMaxWidth) {
|
||||
$('.side-nav').sideNav('hide');
|
||||
}
|
||||
$('#tag_label').focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav-btn-add').on('click', () => {
|
||||
toggleNav('.nav-panel-add', '#entry_url');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#config_fontsize').on('input', () => {
|
||||
const value = $('#config_fontsize').val();
|
||||
const css = `${value}em`;
|
||||
$('#preview-content').css('font-size', css);
|
||||
});
|
||||
|
||||
$('#config_font').on('change', () => {
|
||||
const value = $('#config_font').val();
|
||||
$('#preview-content').css('font-family', value);
|
||||
});
|
||||
|
||||
$('#config_lineHeight').on('input', () => {
|
||||
const value = $('#config_lineHeight').val();
|
||||
const css = `${value}em`;
|
||||
$('#preview-content').css('line-height', css);
|
||||
});
|
||||
|
||||
$('#config_maxWidth').on('input', () => {
|
||||
const value = $('#config_maxWidth').val();
|
||||
const css = `${value}em`;
|
||||
$('#preview-article').css('max-width', css);
|
||||
});
|
||||
|
||||
const materialAddForm = $('.nav-panel-add');
|
||||
materialAddForm.on('submit', () => {
|
||||
materialAddForm.addClass('disabled');
|
||||
$('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
|
||||
});
|
||||
|
||||
$('#nav-btn-search').on('click', () => {
|
||||
toggleNav('.nav-panel-search', '#search_entry_term');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', (e) => {
|
||||
$(e.target).parent('.nav-panel-item').hide(100);
|
||||
$('.nav-panel-actions').show(100);
|
||||
return false;
|
||||
});
|
||||
|
||||
const mainCheckboxes = document.querySelectorAll('[data-js="checkboxes-toggle"]');
|
||||
if (mainCheckboxes.length) {
|
||||
[...mainCheckboxes].forEach((el) => {
|
||||
el.addEventListener('click', () => {
|
||||
const checkboxes = document.querySelectorAll(el.dataset.toggle);
|
||||
[...checkboxes].forEach((checkbox) => {
|
||||
const checkboxClone = checkbox;
|
||||
checkboxClone.checked = el.checked;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
$('form[name="form_mass_action"] input[name="tags"]').on('keydown', (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
$('form[name="form_mass_action"] button[name="tag"]').trigger('click');
|
||||
}
|
||||
});
|
||||
});
|
||||
26
assets/material/js/shortcuts/entry.js
Normal file
26
assets/material/js/shortcuts/entry.js
Normal file
@ -0,0 +1,26 @@
|
||||
import Mousetrap from 'mousetrap';
|
||||
import $ from 'jquery';
|
||||
|
||||
$(document).ready(() => {
|
||||
if ($('#article').length > 0) {
|
||||
/* open original article */
|
||||
Mousetrap.bind('o', () => {
|
||||
$('ul.side-nav a.original i')[0].click();
|
||||
});
|
||||
|
||||
/* mark as favorite */
|
||||
Mousetrap.bind('f', () => {
|
||||
$('ul.side-nav a.favorite i')[0].click();
|
||||
});
|
||||
|
||||
/* mark as read */
|
||||
Mousetrap.bind('a', () => {
|
||||
$('ul.side-nav a.markasread i')[0].click();
|
||||
});
|
||||
|
||||
/* delete */
|
||||
Mousetrap.bind('del', () => {
|
||||
$('ul.side-nav a.delete i')[0].click();
|
||||
});
|
||||
}
|
||||
});
|
||||
92
assets/material/js/shortcuts/main.js
Normal file
92
assets/material/js/shortcuts/main.js
Normal file
@ -0,0 +1,92 @@
|
||||
import Mousetrap from 'mousetrap';
|
||||
import $ from 'jquery';
|
||||
|
||||
function toggleFocus(cardToToogleFocus) {
|
||||
if (cardToToogleFocus) {
|
||||
$(cardToToogleFocus).toggleClass('z-depth-4');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
const cards = $('#content').find('.card');
|
||||
const cardNumber = cards.length;
|
||||
let cardIndex = 0;
|
||||
/* If we come from next page */
|
||||
if (window.location.hash === '#prev') {
|
||||
cardIndex = cardNumber - 1;
|
||||
}
|
||||
let card = cards[cardIndex];
|
||||
const pagination = $('.pagination');
|
||||
|
||||
/* Show nothing on quickstart */
|
||||
if ($('#content > div.quickstart').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Show nothing on login/register page */
|
||||
if ($('#username').length > 0 || $('#fos_user_registration_form_username').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Show nothing on login/register page */
|
||||
if ($('#username').length > 0 || $('#fos_user_registration_form_username').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Focus current card */
|
||||
toggleFocus(card);
|
||||
|
||||
/* Actions */
|
||||
Mousetrap.bind('g n', () => {
|
||||
$('#nav-btn-add').trigger('click');
|
||||
return false;
|
||||
});
|
||||
|
||||
Mousetrap.bind('s', () => {
|
||||
$('#nav-btn-search').trigger('click');
|
||||
return false;
|
||||
});
|
||||
|
||||
Mousetrap.bind('esc', () => {
|
||||
$('.close').trigger('click');
|
||||
});
|
||||
|
||||
/* Select right card. If there's a next page, go to next page */
|
||||
Mousetrap.bind('right', () => {
|
||||
if (cardIndex >= 0 && cardIndex < cardNumber - 1) {
|
||||
toggleFocus(card);
|
||||
cardIndex += 1;
|
||||
card = cards[cardIndex];
|
||||
toggleFocus(card);
|
||||
return;
|
||||
}
|
||||
if (pagination.length > 0 && pagination.find('li.next:not(.disabled)').length > 0 && cardIndex === cardNumber - 1) {
|
||||
window.location.href = window.location.origin + $(pagination).find('li.next a').attr('href');
|
||||
}
|
||||
});
|
||||
|
||||
/* Select previous card. If there's a previous page, go to next page */
|
||||
Mousetrap.bind('left', () => {
|
||||
if (cardIndex > 0 && cardIndex < cardNumber) {
|
||||
toggleFocus(card);
|
||||
cardIndex -= 1;
|
||||
card = cards[cardIndex];
|
||||
toggleFocus(card);
|
||||
return;
|
||||
}
|
||||
if (pagination.length > 0 && $(pagination).find('li.prev:not(.disabled)').length > 0 && cardIndex === 0) {
|
||||
window.location.href = `${window.location.origin + $(pagination).find('li.prev a').attr('href')}#prev`;
|
||||
}
|
||||
});
|
||||
|
||||
Mousetrap.bind('enter', () => {
|
||||
if (typeof card !== 'object') {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = $(card).find('.card-title a').attr('href');
|
||||
if (typeof url === 'string' && url.length > 0) {
|
||||
window.location.href = window.location.origin + url;
|
||||
}
|
||||
});
|
||||
});
|
||||
53
assets/material/js/tools.js
Normal file
53
assets/material/js/tools.js
Normal file
@ -0,0 +1,53 @@
|
||||
import $ from 'jquery';
|
||||
|
||||
function initFilters() {
|
||||
// no display if filters not available
|
||||
if ($('div').is('#filters')) {
|
||||
$('#button_filters').show();
|
||||
$('.js-filters-action').sideNav({ edge: 'right' });
|
||||
$('#clear_form_filters').on('click', () => {
|
||||
$('#filters input').val('');
|
||||
$('#filters :checked').removeAttr('checked');
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initExport() {
|
||||
// no display if export not available
|
||||
if ($('div').is('#export')) {
|
||||
$('#button_export').show();
|
||||
$('.js-export-action').sideNav({ edge: 'right' });
|
||||
}
|
||||
}
|
||||
|
||||
function initRandom() {
|
||||
// no display if export (ie: entries) not available
|
||||
if ($('div').is('#export')) {
|
||||
$('#button_random').show();
|
||||
}
|
||||
}
|
||||
|
||||
function initPreviewText() {
|
||||
// no display if preview_text not available
|
||||
if ($('div').is('#preview-article')) {
|
||||
const defaultFontFamily = $('#config_font').val();
|
||||
const defaultFontSize = $('#config_fontsize').val();
|
||||
const defaultLineHeight = $('#config_lineHeight').val();
|
||||
const defaultMaxWidth = $('#config_maxWidth').val();
|
||||
const previewContent = $('#preview-content');
|
||||
|
||||
previewContent.css('font-family', defaultFontFamily);
|
||||
previewContent.css('font-size', `${defaultFontSize}em`);
|
||||
previewContent.css('line-height', `${defaultLineHeight}em`);
|
||||
$('#preview-article').css('max-width', `${defaultMaxWidth}em`);
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
initExport,
|
||||
initFilters,
|
||||
initRandom,
|
||||
initPreviewText,
|
||||
};
|
||||
Reference in New Issue
Block a user