Mobile version v1

This commit is contained in:
2020-03-22 21:19:11 +01:00
parent 3072ae4387
commit 8e1ebdbd6c
9 changed files with 67 additions and 46 deletions

View File

@@ -3,6 +3,7 @@
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="author" content="Franzz" /> <meta name="author" content="Franzz" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style/mythoughts.css" rel="stylesheet" type="text/css" /> <link href="style/mythoughts.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="scripts/jquery.min.js"></script> <script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/bootstrap.bundle.min.js"></script> <script type="text/javascript" src="scripts/bootstrap.bundle.min.js"></script>

View File

@@ -1,6 +1,6 @@
<div id="feedback"></div> <div id="feedback"></div>
<div id="header"></div> <div id="header"></div>
<div id="menu"> <div id="menu" class="desktop">
<ul> <ul>
<li><a href="#settings" class="button fal fa-settings"></a></li> <li><a href="#settings" class="button fal fa-settings"></a></li>
<li><a href="#logoff" class="button fal fa-logoff"></a></li> <li><a href="#logoff" class="button fal fa-logoff"></a></li>
@@ -12,6 +12,6 @@
</div> </div>
<footer> <footer>
<span>Designed and powered by Franzz &amp; Clarita. </span> <span>Designed and powered by Franzz &amp; Clarita. </span>
<span>My Thoughts Project under <a href="http://www.gnu.org/licenses/gpl.html" target="_blank">GPLv3</a> License.</span> <span class="desktop">My Thoughts Project under <a href="http://www.gnu.org/licenses/gpl.html" target="_blank">GPLv3</a> License.</span>
</footer> </footer>
#errors# #errors#

View File

@@ -404,14 +404,16 @@ class Editor {
this.nextId = asData.next_id; this.nextId = asData.next_id;
this.thoughts[asData.id] = asData; this.thoughts[asData.id] = asData;
asData.ops.unshift({
'attributes': {'thought_time': true},
'insert': asData.created_h+"\n"
});
if(this.prevId==0 || asData.created_d != this.thoughts[this.prevId].created_d) { if(this.prevId==0 || asData.created_d != this.thoughts[this.prevId].created_d) {
asData.ops.unshift({ asData.ops.unshift({
'attributes': {'thought_date': true}, 'attributes': {'thought_date': true},
'insert': 'Thoughts on '+asData.created_d 'insert': 'Thoughts on '+asData.created_d+"\n"
});
}
else {
asData.ops.unshift({
'attributes': {'thought_time': true},
'insert': asData.created_h+"\n"
}); });
} }
if(!this.isEmpty()) asData.ops = this.getContent().concat(asData.ops); if(!this.isEmpty()) asData.ops = this.getContent().concat(asData.ops);

31
style/_mobile.scss Normal file
View File

@@ -0,0 +1,31 @@
@media only screen and (max-width: 800px) {
.desktop {
display: none !important;
}
#container {
left: 1em;
width: calc(100% - 1em - 82px);
margin: 0;
#header {
margin-left: 0;
height: 15%;
background-size: contain;
}
#main, #side {
top: 15%;
}
.ql-container {
}
}
}
@media only screen and (min-width: 801px) {
.mobile {
display: none !important;
}
}

View File

@@ -35,29 +35,16 @@
div { div {
margin: 0; margin: 0;
&.edi_thought_date {
width: calc(50% - 1.5em);
}
&.edi_thought_date, &.edi_thought_time { &.edi_thought_date, &.edi_thought_time {
color: $gray-500; color: $gray-500;
font-style: italic; font-style: italic;
line-height: 3em; line-height: 3em;
display: inline-block; display: block;
text-indent: 0;
& + .edi_thought_date {
text-align: right;
margin-right: 2px;
padding-top: 0;
width: calc(50% - 2px);
}
} }
&.edi_thought_time { &.edi_thought_time {
text-align: right; text-align: right;
margin-right: 2px; margin-right: 2px;
width: 100%;
} }
} }

View File

@@ -1,7 +1,6 @@
/* Containers */ /* Containers */
body { body {
min-width: 700px;
font-family: $font_para, sans-serif; font-family: $font_para, sans-serif;
font-size:1em; font-size:1em;
background-color: $gray-200; background-color: $gray-200;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,23 +1,24 @@
/* Variables */ /* Variables */
@import 'variables'; @import 'variables';
/* Fonts */ /* Fonts */
@import 'font-awesome'; @import 'font-awesome';
@import 'fonts'; @import 'fonts';
/* Plugins */ /* Plugins */
@import 'bootstrap'; @import 'bootstrap';
@import 'quill'; @import 'quill';
/* Template (theme) */ /* Template (theme) */
@import 'template'; @import 'template';
@import 'mobile';
/* Pages */
/* Pages */
@import 'logon';
@import 'write'; @import 'logon';
@import 'write';
@import 'read'; @import 'read';