Skip to content

Commit aebffc2

Browse files
committed
Added better pictures. improved the default color system and more
1 parent 457c7a3 commit aebffc2

23 files changed

+684
-1326
lines changed

docs/screenshot-3.png

453 KB
Loading

docs/screenshot-4.png

377 KB
Loading

docs/screenshot-5.png

729 KB
Loading

javascript/web/src/App.vue

+12-1,029
Large diffs are not rendered by default.

javascript/web/src/classes/Commands.js

+24-4
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class Commands {
340340
return `<div class="flex" >
341341
<img src="${ilse.require(command.icon)}" style="width: 20px;" />
342342
<p data-command-id="${command.id}" > ${command.name} </p>
343-
<p style="position: absolute; right: 0px; color: var( --background-color ); background: var( --text-color ); padding: 3px; border-radius: 4px; min-width: 30px; min-height: 30px; "> ${get_command_by_keyboard_shortcut(command.id)} </p>
343+
<p style="position: absolute; right: 0px; color: var( --primary ); background: var( --secondary ); padding: 3px; border-radius: 4px; min-width: 30px; min-height: 30px; "> ${get_command_by_keyboard_shortcut(command.id)} </p>
344344
</div>`
345345
}
346346

@@ -713,13 +713,32 @@ class Commands {
713713
icon: "dice-3.svg",
714714
fn: async function() {
715715

716-
let list = ilse.notes.query_regexp( /(\.png|\.jpg|\.gif)/ )
717-
let random_list = get_random_array_elements( list, 10 )
718-
let normalized_list = random_list.map( item => { return `<div @click="navigator.clipboard.writeText('${item}'); api.notify('Copied!', 'Copied: ' + '${item}' + ' To your clipboard' ); " >
716+
// let list = ilse.notes.query_regexp( /(\.png|\.jpg|\.gif)/ ) // query imgs
717+
// let random_list = get_random_array_elements( list, 5 ) // get random set of them
718+
719+
/* let normalized_list = random_list.map( item => { return `<div @click="navigator.clipboard.writeText('${item}'); api.notify('Copied!', 'Copied: ' + '${item}' + ' To your clipboard' ); " >
719720
<span x-html="api.markdown(api.notes.list['${item}'].content)" > </span>
720721
</div>`
722+
}) */
723+
724+
let html = `<div x-data="{ pointer: 0 }" style="width: 80vw !important; height: 80vh !important; overflow: hidden; " >
725+
726+
<div style="display: flex;" style="width: 100px; margin: 0 auto;" >
727+
<img :src="api.require('arrow-narrow-left.svg')" style="width: 40px;" @click="pointer -= 1" />
728+
<img :src="api.require('arrow-narrow-right.svg')" style="width: 40px;" @click="pointer += 1" />
729+
</div>
730+
731+
<template x-for="(item, index) in api.utils.get_random_array_elements(api.notes.query_regexp( /(\.png|\.jpg|\.gif)/ ), 10 )" :key="index" >
732+
<span x-show="pointer === index" x-html="api.markdown(api.notes.list[item].content)" > </span>
733+
</template>
734+
735+
</div>`
736+
737+
await ilse.commands.run("box", {
738+
html: html,
721739
})
722740

741+
/*
723742
await ilse.commands.run( "html-list", {
724743
search: "",
725744
list: normalized_list,
@@ -739,6 +758,7 @@ class Commands {
739758
740759
},
741760
})
761+
*/
742762

743763

744764
},

javascript/web/src/constants/DEFAULT_THEME.js

-66
This file was deleted.

javascript/web/src/constants/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import APP_TEMPLATE from "@/constants/APP_TEMPLATE.js"
33
import CONFIG_TEMPLATE from "@/constants/CONFIG_TEMPLATE.js"
44
import CORE_PLUGINS from "@/constants/CORE_PLUGINS.js"
55
import DEFAULT_COMMANDS from "@/constants/DEFAULT_COMMANDS.js"
6-
import DEFAULT_THEME from "@/constants/DEFAULT_THEME.js"
76
import DEMO_NOTES from "@/constants/DEMO_NOTES.js"
87
import LOGIC_TAGS from "@/constants/LOGIC_TAGS.js"
98
import PERMISSIONS from "@/constants/PERMISSIONS.js"
@@ -19,7 +18,6 @@ export default {
1918
CONFIG_TEMPLATE,
2019
CORE_PLUGINS,
2120
DEFAULT_COMMANDS,
22-
DEFAULT_THEME,
2321
DEMO_NOTES,
2422
LOGIC_TAGS,
2523
PERMISSIONS,

javascript/web/src/functions/get_default_components.js

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import make_plugin from "@/html/make-plugin.html"
1212
import marketplace from "@/html/marketplace.html"
1313
import new_tab from "@/html/new-tab.html"
1414
import notification from "@/html/notification.html"
15-
import outline_search from "@/html/outline-search.html"
1615
import outline from "@/html/outline.html"
1716
import references from "@/html/references.html"
1817
import setup from "@/html/setup.html"
@@ -35,7 +34,6 @@ export default function get_default_components() {
3534
"marketplace.html": marketplace,
3635
"new-tab.html": new_tab,
3736
"notification.html": notification,
38-
"outline-search.html":outline_search,
3937
"outline.html": outline,
4038
"references.html": references,
4139
"setup.html": setup,

javascript/web/src/functions/markdown_it_plugin_blockquote.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export default {
88
regexp: /(^> ?.+?)((\r?\n\r?\n\w)|\Z)/,
99
fn: function( match, utils ) {
1010
let content = match[0]
11-
return markdown.render(content)
11+
return markdown.render( "&nbsp;" + content )
1212
}
1313
}

javascript/web/src/functions/markdown_it_plugin_embed.js

+5
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,14 @@ export default {
5454
return ` <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJpY29uIGljb24tdGFibGVyIGljb24tdGFibGVyLWxpbmsiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBzdHJva2Utd2lkdGg9IjEiIHN0cm9rZT0iIzQ4NTM2MSIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KICA8cGF0aCBkPSJNMTAgMTRhMy41IDMuNSAwIDAgMCA1IDBsNCAtNGEzLjUgMy41IDAgMCAwIC01IC01bC0uNSAuNSIgLz4KICA8cGF0aCBkPSJNMTQgMTBhMy41IDMuNSAwIDAgMCAtNSAwbC00IDRhMy41IDMuNSAwIDAgMCA1IDVsLjUgLS41IiAvPgo8L3N2Zz4KCgo="/> <iframe class="url" src="${url}" frameBorder="0" style="width: 100%;" > </iframe> `
5555

5656
} else if( is_pdf ) {
57+
58+
return ` <span class="pdf" > ${url} </span> <img style="width: 15px; display: inline !important;" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0cm9rZT0iIzQ4NTM2MSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMzg0IDUxMiIgPjxwYXRoIGQ9Ik0xODEuOSAyNTYuMWMtNS0xNi00LjktNDYuOS0yLTQ2LjkgOC40IDAgNy42IDM2LjkgMiA0Ni45em0tMS43IDQ3LjJjLTcuNyAyMC4yLTE3LjMgNDMuMy0yOC40IDYyLjcgMTguMy03IDM5LTE3LjIgNjIuOS0yMS45LTEyLjctOS42LTI0LjktMjMuNC0zNC41LTQwLjh6TTg2LjEgNDI4LjFjMCAuOCAxMy4yLTUuNCAzNC45LTQwLjItNi43IDYuMy0yOS4xIDI0LjUtMzQuOSA0MC4yek0yNDggMTYwaDEzNnYzMjhjMCAxMy4zLTEwLjcgMjQtMjQgMjRIMjRjLTEzLjMgMC0yNC0xMC43LTI0LTI0VjI0QzAgMTAuNyAxMC43IDAgMjQgMGgyMDB2MTM2YzAgMTMuMiAxMC44IDI0IDI0IDI0em0tOCAxNzEuOGMtMjAtMTIuMi0zMy4zLTI5LTQyLjctNTMuOCA0LjUtMTguNSAxMS42LTQ2LjYgNi4yLTY0LjItNC43LTI5LjQtNDIuNC0yNi41LTQ3LjgtNi44LTUgMTguMy0uNCA0NC4xIDguMSA3Ny0xMS42IDI3LjYtMjguNyA2NC42LTQwLjggODUuOC0uMSAwLS4xLjEtLjIuMS0yNy4xIDEzLjktNzMuNiA0NC41LTU0LjUgNjggNS42IDYuOSAxNiAxMCAyMS41IDEwIDE3LjkgMCAzNS43LTE4IDYxLjEtNjEuOCAyNS44LTguNSA1NC4xLTE5LjEgNzktMjMuMiAyMS43IDExLjggNDcuMSAxOS41IDY0IDE5LjUgMjkuMiAwIDMxLjItMzIgMTkuNy00My40LTEzLjktMTMuNi01NC4zLTkuNy03My42LTcuMnpNMzc3IDEwNUwyNzkgN2MtNC41LTQuNS0xMC42LTctMTctN2gtNnYxMjhoMTI4di02LjFjMC02LjMtMi41LTEyLjQtNy0xNi45em0tNzQuMSAyNTUuM2M0LjEtMi43LTIuNS0xMS45LTQyLjgtOSAzNy4xIDE1LjggNDIuOCA5IDQyLjggOXoiLz48L3N2Zz4=" /> `
59+
60+
/*
5761
return `
5862
<img style="width: 15px; display: inline !important;" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJpY29uIGljb24tdGFibGVyIGljb24tdGFibGVyLWJvb2siIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBzdHJva2Utd2lkdGg9IjEiIHN0cm9rZT0iIzQ4NTM2MSIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KICA8cGF0aCBkPSJNMyAxOWE5IDkgMCAwIDEgOSAwYTkgOSAwIDAgMSA5IDAiIC8+CiAgPHBhdGggZD0iTTMgNmE5IDkgMCAwIDEgOSAwYTkgOSAwIDAgMSA5IDAiIC8+CiAgPGxpbmUgeDE9IjMiIHkxPSI2IiB4Mj0iMyIgeTI9IjE5IiAvPgogIDxsaW5lIHgxPSIxMiIgeTE9IjYiIHgyPSIxMiIgeTI9IjE5IiAvPgogIDxsaW5lIHgxPSIyMSIgeTE9IjYiIHgyPSIyMSIgeTI9IjE5IiAvPgo8L3N2Zz4KCgo=" />
5963
<span class="pdf" > ${url} </span>`
64+
*/
6065

6166
} else if( is_html ) {
6267

javascript/web/src/functions/markdown_it_plugin_link.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
} else if( $event.ctrlKey ) {
3333
3434
} else if( !$event.ctrlKey && !$event.shiftKey ){
35-
} " > [[${alias}]] </a>`
35+
} " > <!-- [[${alias}]] --> ${alias} </a>`
3636

3737
} else {
3838

@@ -48,7 +48,7 @@ export default {
4848
4949
} else if( !$event.ctrlKey && !$event.shiftKey ) {
5050
51-
}" > [[${link}]] </a>`
51+
}" > <!-- [[${link}]] --> ${link} </a>`
5252

5353
}
5454

javascript/web/src/functions/modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function modal( content, styles = {} ) {
1414
html: `
1515
<div style="width: 100vw; height: 100vh; background: rgba( 255, 255, 255, 0.3 ); z-index: 3; width: 100%; height: 100%; position: fixed; transform: translate( -50%, -50% ); left: 50%; top: 50%; " >
1616
17-
<div id="${id}" style="z-index: 5; opacity: 1; position: fixed; left: 50%; top: 50%; transform: translate( -50%, -50% ); width: ${ styles.width || '90%' }; height: ${ styles.height || 'fit-content' }; max-height: 80%; overflow: auto; border-radius: var( --border-radius ); color: var( --text-color ); background: var( --background-color ); padding: 5px; text-align: center; box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px !important; " >
17+
<div id="${id}" style="z-index: 5; opacity: 1; position: fixed; left: 50%; top: 50%; transform: translate( -50%, -50% ); width: ${ styles.width || '90%' }; height: ${ styles.height || 'fit-content' }; max-height: 80%; overflow: auto; border-radius: var( --border-radius ); color: var( --secondary ); background: var( --primary ); padding: 5px; text-align: center; box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px !important; " >
1818
${content}
1919
</div>
2020

javascript/web/src/functions/set_fixed_window_on_document.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function modal( content, x, y, options = { width: "400px", height
7575
<img class="is-pulled-right" style="width: 20px; cursor: pointer;" @click="api.stack.pop(); console.log('api.stack -> ', api.stack);" :src="api.require('x.svg')" />
7676
<hr/>
7777
78-
<div id="${id}" style="z-index: 5; opacity: 1; position: fixed; left: 50%; top: 50%; transform: translate( -50%, -50% ); width: ${ options.width || '90%' }; height: ${ options.height || 'fit-content' }; max-height: 80%; overflow: auto; border-radius: var( --border-radius ); color: var( --text-color ); background: var( --background-color ); padding: 5px; text-align: center; box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px !important; " >
78+
<div id="${id}" style="z-index: 5; opacity: 1; position: fixed; left: 50%; top: 50%; transform: translate( -50%, -50% ); width: ${ options.width || '90%' }; height: ${ options.height || 'fit-content' }; max-height: 80%; overflow: auto; border-radius: var( --border-radius ); color: var( --secondary ); background: var( --primary ); padding: 5px; text-align: center; box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px !important; " >
7979
${content}
8080
</div>
8181

javascript/web/src/html/daily-notes.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<!-- <div style="padding: 10px; " x-data="{ list: api.notes.query( item ) }" > -->
1212
<!-- Date + Delete -->
1313
<div style="display: flex;">
14-
<h1 style="center !important; color: var( --text-color );" x-text=" '&bull; &nbsp; ' + api.utils.yyyymmddhhss_to_pretty(item)" > </h1>
14+
<h1 style="center !important; color: var( --secondary );" x-text=" '&bull; &nbsp; ' + api.utils.yyyymmddhhss_to_pretty(item)" > </h1>
1515
<img x-show="index !== 0" :src="api.require('x.svg')" style="width: 20px;margin-left:20px;cursor:pointer;" alt="" title="Delete" @click="list.splice( index, 1 )" >
1616
</div>
1717
<br>
@@ -39,10 +39,10 @@ <h1 style="center !important; color: var( --text-color );" x-text=" '&bull; &nbs
3939
.load-more {
4040

4141
background-color: #000;
42-
background-color: var( --text-color );
42+
background-color: var( --secondary );
4343

4444
color: #fff;
45-
color: var( --background-color );
45+
color: var( --primary );
4646

4747
padding: 10px;
4848

@@ -75,8 +75,8 @@ <h1 style="center !important; color: var( --text-color );" x-text=" '&bull; &nbs
7575
/*
7676
#daily-notes .load-more {
7777
display: block;
78-
color: var( --text-color );
79-
background: var( --background-color );
78+
color: var( --secondary );
79+
background: var( --primary );
8080
padding: 7px;
8181
border-radius: var( --border-radius );
8282
margin: 0 auto;

javascript/web/src/html/file.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
border: 1px solid #b7b0b0;
2727
border-radius: 10px;
2828
border: 1px solid #454545;
29-
background: var( --background-color );
29+
background: var( --primary );
3030
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
3131
border: 1.8px solid #b7b0b0;
3232
margin-top: 5px;
@@ -42,11 +42,11 @@
4242
height: 30px;
4343
margin: 3px;
4444
border-radius: var( --border-radius );
45-
border: 1px solid var( --text-color );
45+
border: 1px solid var( --secondary );
4646
border: 1px solid transparent;
4747
padding: 3px;
48-
color: var( --text-color );
49-
background: var( --background-color );
48+
color: var( --secondary );
49+
background: var( --primary );
5050
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
5151
border: 1px solid #b7b0b0;
5252
width: 90%;

javascript/web/src/html/html-list.html

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
:placeholder="props.placeholder ? props.placeholder : 'Search for Something ...' "
2020
title="[[Ilse]] [[Programming]] - [[Ilse]] AND [[Programming]] - [[Ilse]] NOT [[Programming]] - #ilse - #math/topology"
2121
x-init="document.getElementById('search-input') ? document.getElementById('search-input').focus() : null; setTimeout( () => { search = '' }, 100 ) "
22-
style="color: var( --text-color ); background: var( --background-color ); border-radius: var( --border-radius ); width: 90%; margin-top: 10px; margin-bottom: 10px;"/>
22+
style="color: var( --secondary ); background: var( --primary ); border-radius: var( --border-radius ); width: 90%; margin-top: 10px; margin-bottom: 10px;"/>
2323

2424
<img :src="api.require('x.svg')" style="width: 20px; margin-right: 10px; cursor: pointer; " @click="api.get('stack').pop()" >
2525

@@ -58,7 +58,7 @@
5858
text-align: center;
5959
cursor: pointer;
6060
color: #a3a3a3;
61-
color: var( --text-color );
61+
color: var( --secondary );
6262
/* font-size: 1.5em; */
6363
width: 20px;
6464
cursor: pointer;
@@ -80,7 +80,6 @@
8080
}
8181

8282
#search input:focus {
83-
/*box-shadow: 0 0 0 3px hsla(var(--input-focus-h), var(--input-focus-s), calc(var(--input-focus-l) + 40%), 0.8);*/
8483
outline: 3px solid transparent;
8584
border-color: hsl(var(--input-focus-h), var(--input-focus-s), var(--input-focus-l));
8685
border: 2px solid rgb(124, 138, 255);
@@ -104,8 +103,8 @@
104103
#search .render {
105104
cursor: pointer;
106105
margin-bottom: 5px;
107-
color: var( --text-color );
108-
background: var( --background-color );
106+
color: var( --secondary );
107+
background: var( --primary );
109108
text-align: left;
110109
padding: 3px;
111110
}

0 commit comments

Comments
 (0)