Uninote
Uninote
用户根目录
每日点滴

<!DOCTYPE html> <html><head><meta http-equiv='Content-Type' content='text/html; charset=utf8'><title>book article 文章</title> <script> var g_resRoot = '../../__res/'; var g_json_outline = '{"children":[{"children":[],"level":1,"lvNumber":"1","text":"book article sum"},{"children":[],"level":1,"lvNumber":"2","text":"文章表"},{"children":[{"children":[{"children":[{"children":[],"level":4,"lvNumber":"3.1.1.1","text":"自动保存"},{"children":[],"level":4,"lvNumber":"3.1.1.2","text":"手动保存"},{"children":[],"level":4,"lvNumber":"3.1.1.3","text":"手动tag"}],"level":3,"lvNumber":"3.1.1","text":"编辑"},{"children":[],"level":3,"lvNumber":"3.1.2","text":"历史版本查看"},{"children":[],"level":3,"lvNumber":"3.1.3","text":"操作菜单"}],"level":2,"lvNumber":"3.1","text":"应用内操作"},{"children":[],"level":2,"lvNumber":"3.2","text":"应用外操作"}],"level":1,"lvNumber":"3","text":"文章操作"},{"children":[],"level":1,"lvNumber":"4","text":"git文章管理"},{"children":[{"children":[],"level":2,"lvNumber":"5.1","text":"更新"}],"level":1,"lvNumber":"5","text":"文章信息索引"},{"children":[{"children":[{"children":[],"level":3,"lvNumber":"6.1.1","text":"article logs"}],"level":2,"lvNumber":"6.1","text":"update.sh(核心为update.php)"}],"level":1,"lvNumber":"6","text":"workman 定时器 timer;应用外更新同步"},{"children":[{"children":[],"level":2,"lvNumber":"7.1","text":"加锁"},{"children":[],"level":2,"lvNumber":"7.2","text":"编辑"},{"children":[],"level":2,"lvNumber":"7.3","text":"图片上传"}],"level":1,"lvNumber":"7","text":"文件格式一:markdown"},{"children":[],"level":1,"lvNumber":"8","text":"文件格式二:zrtf html;客户端"},{"children":[{"children":[],"level":2,"lvNumber":"9.1","text":"中文路径"},{"children":[{"children":[],"level":3,"lvNumber":"9.2.1","text":"使用iframe的原因"},{"children":[],"level":3,"lvNumber":"9.2.2","text":"链接跳转"},{"children":[],"level":3,"lvNumber":"9.2.3","text":"上一篇 下一篇"}],"level":2,"lvNumber":"9.2","text":"用户文章浏览"},{"children":[],"level":2,"lvNumber":"9.3","text":"浏览方式"},{"children":[],"level":2,"lvNumber":"9.4","text":"点击标题自动切换url 修改url"},{"children":[],"level":2,"lvNumber":"9.5","text":"大纲自动折叠、定位,并且带高亮"},{"children":[],"level":2,"lvNumber":"9.6","text":"查看选定文章"},{"children":[],"level":2,"lvNumber":"9.7","text":"路径排序"},{"children":[],"level":2,"lvNumber":"9.8","text":"文章可见性"}],"level":1,"lvNumber":"9","text":"文章查看 & 目录结构"},{"children":[],"level":1,"lvNumber":"10","text":"评论"},{"children":[],"level":1,"lvNumber":"11","text":"es 搜索"}],"level":0,"lvNumber":"","text":"book article 文章"}'; </script> <link rel='stylesheet' type='text/css' href='../../__res/common.css'><style>.s0{color:#000000;} .s1{color:#000000;} .s2{color:#000000;} .s3{color:#0000ff;} .s4{color:#000000;} .s5{color:#000000;} .s6{color:#0000ff;} .s7{color:#c80000;} .s8{color:#000080;} .s9{color:#000000;} .s10{color:#660000;} .s11{color:#008000;} .s12{color:#000000;} .s13{color:#000000;} .s14{color:#000000;} .s15{color:#000000;} .s16{color:#000000;} .s17{color:#000000;} .s18{color:#0000ff;} .s19{color:#7f01f5;} .s20{color:#000000;} .s21{color:#000000;} </style> </head><body> <script src='../../__res/util.js'></script><div id='outline'> <li><a href='#ol_0' style='font-weight:bold; font-size:22px'>book article 文章</a></li> <li> <a href='#ol_1' >book article sum</a></li> <li> <a href='#ol_2' >文章表</a></li> <li> <a href='#ol_3' >文章操作</a></li> <li> <a href='#ol_4' >应用内操作</a></li> <li> <a href='#ol_5' >编辑</a></li> <li> <a href='#ol_6' >自动保存</a></li> <li> <a href='#ol_7' >手动保存</a></li> <li> <a href='#ol_8' >手动tag</a></li> <li> <a href='#ol_9' >历史版本查看</a></li> <li> <a href='#ol_10' >操作菜单</a></li> <li> <a href='#ol_11' >应用外操作</a></li> <li> <a href='#ol_12' >git文章管理</a></li> <li> <a href='#ol_13' >文章信息索引</a></li> <li> <a href='#ol_14' >更新</a></li> <li> <a href='#ol_15' >workman 定时器 timer;应用外更新同步</a></li> <li> <a href='#ol_16' >update.sh(核心为update.php)</a></li> <li> <a href='#ol_17' >article logs</a></li> <li> <a href='#ol_18' >文件格式一:markdown</a></li> <li> <a href='#ol_19' >加锁</a></li> <li> <a href='#ol_20' >编辑</a></li> <li> <a href='#ol_21' >图片上传</a></li> <li> <a href='#ol_22' >文件格式二:zrtf html;客户端</a></li> <li> <a href='#ol_23' >文章查看 & 目录结构</a></li> <li> <a href='#ol_24' >中文路径</a></li> <li> <a href='#ol_25' >用户文章浏览</a></li> <li> <a href='#ol_26' >使用iframe的原因</a></li> <li> <a href='#ol_27' >链接跳转</a></li> <li> <a href='#ol_28' >上一篇 下一篇</a></li> <li> <a href='#ol_29' >浏览方式</a></li> <li> <a href='#ol_30' >点击标题自动切换url 修改url</a></li> <li> <a href='#ol_31' >大纲自动折叠、定位,并且带高亮</a></li> <li> <a href='#ol_32' >查看选定文章</a></li> <li> <a href='#ol_33' >路径排序</a></li> <li> <a href='#ol_34' >文章可见性</a></li> <li> <a href='#ol_35' >评论</a></li> <li> <a href='#ol_36' >es 搜索</a></li> </div>

<pre id='ol_0' class='title'>book article 文章</pre> <pre><d class='s0'></d></pre> <h1 id='ol_1'>book article sum</h1> <pre><d class='s1'>mynote核心。</d></pre> <pre><d class='s1'>目前支持两种格式:</d></pre> <pre><d class='s1'>1 <a href='mynote_mod_article.html#bb428ceb-e9b5-43b7-b056-f7c6c34fee67'>文件格式二:zrtf html;客户端 </a></d><d class='s1'>格式</d><d class='s0'></d></pre> <pre><d class='s1'>2 <a href='mynote_mod_article.html#3050a2a9-173e-474a-8510-03c0b83ffb24'>文件格式一:markdown </a></d><d class='s1'>格式,此格式支持在页面上编辑。</d></pre> <pre><d class='s1'></d></pre> <t id='8caa43e6-af66-48fe-965a-719dcef0e3cf'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>book页面需要展示的元素:</d></pre> <pre><d class='s2'> 1 作者、头像</d></pre> <pre><d class='s2'> 2 创建时间、更新时间</d></pre> <pre><d class='s2'> 3 上一篇、下一篇(同时显示标题)</d></pre> <pre><d class='s2'>现在是每次读取所有的文章,动态计算next、previous</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'><img src='..\pic\648ef6a684c059e16995eb53dbe7db57.jpg' /></d><d class='s2'></d></pre> </t> <pre><d class='s0'></d></pre> <h1 id='ol_2'>文章表</h1> <t id='3f80e795-b713-4fe5-95e4-95803a8a7381'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>article 表新增title字段,E:\uninote\mynote\basic\models\api\Userinfo.php all_recommend 等地方不再返回 article_id</d></pre> <pre><d class='s0'>article_id 规范为path</d></pre> <pre><d class='s0'>item规范为aid</d></pre> </t> <pre><d class='s3'></d></pre> <h1 id='ol_3'>文章操作</h1> <pre><d class='s3'></d></pre> <h2 id='ol_4'>应用内操作</h2> <pre><d class='s1'>指使用包括网站、app、小程序等一切mynote提供的应用进行的操作。</d><d class='s3'></d></pre> <pre><d class='s1'>目前,在页面上仅支持markdown格式的操作,其他格式的文件,请在外部操作:</d></pre> <pre><d class='s1'>支持的操作</d><d class='s4'>:新建、save、rename、mv、del、新建文件夹等;</d></pre> <pre><d class='s4'>所有的操作都放在锁中_git_op_lock</d><d class='s3'></d></pre> <pre><d class='s3'></d></pre> <t id='fea0b872-f1fc-4576-a8a1-0e05b6f22ca1'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s4'>冲突的报错不明确,以及所有的errno</d></pre> </t> <t id='a7b8d332-cf3b-4b6e-a195-71e97aacd352'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>前端翻译错误代码</d></pre> </t> <pre><d class='s3'></d></pre> <h3 id='ol_5'>编辑</h3> <t id='7e0593a9-51f2-4c23-9355-0fd059a36306'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>异步保存,不要卡死</d></pre> <pre><d class='s2'>避免多个请求乱序返回:返回值还需要带上old version,和当前version比较,相同才更新,不同不更新。??</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s5'>一个version还需要带上minor version,从1开始计数。以version#min_version表示。</d></pre> <pre><d class='s5'>比如第一次保存时,传参为123a#1,第二次则为123a#2,一次类推。当server保存了#2时,则不应该保存之前的版本。</d></pre> <pre><d class='s5'>保存成功返回给前端,更新version。minor version重置。</d></pre> <pre><d class='s5'></d></pre> <pre><d class='s5'>每次加载编辑页面时,后台分配一个唯一id,在save时保存此id对应的version#min_version。如果version匹配,则校验min。每十分钟清理一次,超过10分钟的。</d></pre> <pre><d class='s5'>or 用redis ttl来解决</d><d class='s6'></d></pre> </t> <t id='0266fbf9-5db1-4e5d-b3d7-50f6c899c5d1'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>当前文章没有修改时,disable保存按钮</d></pre> <pre><d class='s0'>如何判断没有修改?记录下原始的内容?</d></pre> <pre><d class='s0'>enable条件:有修改&上次保存已经完成</d></pre> </t> <pre><d class='s4'></d></pre> <pre><d class='s7'>所有内容原样保存,eg:</d></pre> <pre><d class='s7'>%<>.,+=_-/[]{}~!@#$%^&()</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>保存时检测到服务器端有更新,提示:是否合并并刷新?注意刷新后之前的修改无法撤销(ctrl+z失效)</d></pre> <pre><d class='s3'></d></pre> <h4 id='ol_6'>自动保存</h4> <pre><d class='s2'>自动保存冲突时:警告冲突</d></pre> <pre><d class='s2'>通过客户端拉取并解决冲突。</d></pre> <pre><d class='s3'></d></pre> <h4 id='ol_7'>手动保存</h4> <pre><d class='s2'>自动保存、手动保存差异?</d></pre> <pre><d class='s3'></d></pre> <h4 id='ol_8'>手动tag</h4> <pre><d class='s1'>手动指定tag,用户可以只查看tag,非tag可能会被清理以节省空间</d><d class='s3'></d></pre> <pre><d class='s3'></d></pre> <h3 id='ol_9'>历史版本查看</h3> <pre><d class='s3'></d></pre> <t id='eea2fb32-6b60-42bf-aa0a-a232d6eedbc8'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h3 id='ol_10'>操作菜单</h3> <pre><d class='s3'><img src='..\pic\d5ad96315277cbd0b1b9b4ea6c023aeb.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'>hover时显示toolbar</d></pre> </t> <pre><d class='s1'></d></pre> <t id='e35e1029-d835-4ea5-90d3-b4babd4bf30c'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <pre><d class='s2'>复制链接、新窗口中打开链接</d></pre> <pre><d class='s2'>这个非当前用户都可以看到</d><d class='s6'></d></pre> </t> <pre><d class='s3'></d></pre> <h2 id='ol_11'>应用外操作</h2> <pre><d class='s1'>指任何mynote以外第三方提供的操作方式。完成后再通过git上传到服务器。见<a href='mynote_mod_article.html#3d95dd5f-579c-463a-8b95-1576c5847f92'>git文章管理 </a></d><d class='s1'>。</d></pre> <pre><d class='s3'></d></pre> <t id='3d95dd5f-579c-463a-8b95-1576c5847f92'> <pre class='tnd_head'>lv1=mynote lv2= type=</pre> <h1 id='ol_12'>git文章管理</h1> <pre><d class='s1'>无论用户是在内、外部操作,最终都是通过git来存储的。如果存在并发修改,也是通过git来自动合并的。</d></pre> <pre><d class='s1'>如需应用外管理,参见<a href='mynote_mod.html#e786f01f-e2d6-4161-b18d-9e83ca500bb3'>git remote url & git ssh key </a></d><d class='s0'>。</d></pre> </t> <pre><d class='s3'></d></pre> <t id='3d0fc37f-0d46-4512-8ec8-a6b3e8f897fa'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_13'>文章信息索引</h1> <pre><d class='s1'>除了在git中存储了文章的完整信息,还在数据库中维护了一张文章的索引表(article),包含以下信息:</d></pre> <pre><d class='s1'><img src='..\pic\1c831c0db04e71a655779da0c0d7d7d8.jpg' /></d><d class='s0'></d></pre> <pre><d class='s3'></d></pre> <t id='b1735e97-1097-4001-9e13-2201874bef62'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s4'>获取文章内容时,需要传入version,与当前version不一致时,需要动态的从git中获取。git show</d></pre> </t> <pre><d class='s4'></d></pre> <h2 id='ol_14'>更新</h2> <t id='489e11a9-296a-4275-9c9e-722fc1b42aab'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s1'>1 用户在应用内操作时,同时更新索引</d></pre> </t> <pre><d class='s2'>2 <a href='mynote_mod_article.html#7662cf21-317e-484c-9601-7d78b06ab914'>workman 定时器 timer </a></d><d class='s1'></d></pre> <t id='6ab304ba-ec76-4b20-80ba-3d5024d9a75b'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>git server 交互放timer中?</d></pre> </t> <pre><d class='s1'></d></pre> <t id='5f077712-d5fb-4c2f-8edd-b41a60e4303e'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s4'>数据库和文件系统一致性检查</d></pre> <pre><d class='s4'>不一致怎么处理?</d></pre> </t> </t> <pre><d class='s3'></d></pre> <t id='7662cf21-317e-484c-9601-7d78b06ab914'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_15'>workman 定时器 timer;应用外更新同步</h1> <pre><d class='s2'>old way, <a href='..\linux/linux_cmds.html#fd3c096b-76a9-45d9-b622-0b0969235435'>crontab </a></d><d class='s2'>:</d></pre> <pre><d class='s2'>cd /home/www/mynote/basic/web/docs && ./test.sh >> /tmp/cron_test.txt 2>&1</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>new way:</d></pre> <pre><d class='s0'><a href='doc/workman-win.html'>workman for windows </a></d></pre> <pre><d class='s2'>全部重新索引(无任何git操作):E:\uninote\mynote\basic\web\docs\init.sh</d></pre> <t id='1813261f-e6c5-4596-b2a5-1a416f91ab00'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>init.sh:先删除,再插入,这种方式会导致文章id全部改变,并且个人动态全部更新。</d></pre> </t> <pre><d class='s6'></d></pre> <t id='8d71657c-511a-4a1b-9ef9-731f41f8b8a7'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>标记用户有合并失败,提示用户处理</d></pre> </t> <t id='fc5f4981-613e-4060-9f7b-584d9081a0a4'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>workman 优化:</d></pre> <pre><d class='s2'>8080端口,不要workman来监听</d></pre> <pre><d class='s2'>去掉不需要的周转,比如用户保存文件,直接更新相关信息,不要再走老流程</d></pre> </t> <pre><d class='s3'></d></pre> <h2 id='ol_16'>update.sh(核心为update.php)</h2> <pre><d class='s3'>- ikb:\Application\Shell::index</d></pre> <pre><d class='s1'>- 对于新注册的用户,初始化用户git仓库</d></pre> <pre><d class='s1'>- 从git server上拉取用户新的更新,如果有,合并、推送之,并更新索引(<a href='mynote_mod_article.html#3d0fc37f-0d46-4512-8ec8-a6b3e8f897fa'>文章信息索引 </a>)。</d></pre> <pre><d class='s1'>如果合并失败,则将master分支推送到git server的online_master。</d></pre> <pre><d class='s3'></d></pre> <pre><d class='s0'>注意,需要www用户执行./update.sh(<a href='..\linux/linux_cmds.html#0421a970-7376-44bf-8c1c-d33b587d2a91'>Linux 下以其他用户身份运行程序-- su、sudo、runuser </a>)</d></pre> <pre><d class='s1'>另外,大部分操作都是在锁中进行的,见<a href='mynote_mod_article.html#9989aefb-9620-4b99-b916-39bbbacd58a3'>加锁 </a></d><d class='s1'></d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>test case:</d></pre> <pre><d class='s2'>init clone & update</d></pre> <pre><d class='s6'></d></pre> <t id='8f8bb91d-3a1c-4368-9a32-33d3e87362f0'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>优化:用户表新增字段记录上次同步的version v1。</d></pre> <pre><d class='s0'>update时使用当前version v2,计算v2、v1 diff;如果成功,更新v1;</d></pre> <pre><d class='s0'>使用事务</d></pre> </t> </t> <pre><d class='s3'></d></pre> <t id='e6359b61-cc6c-4b13-98d8-5795715d1a83'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h3 id='ol_17'>article logs</h3> <pre><d class='s4'>\Application\Shell</d></pre> <pre><d class='s8'>self</d><d class='s9'>::log(</d><d class='s10'>$info</d><d class='s9'>, </d><d class='s11'>"./logs/update_docs.log"</d><d class='s9'>);</d></pre> <pre><d class='s4'></d></pre> <pre><d class='s4'>update.php ct_log: /root/mynote/basic/web/docs/logs/logs.txt</d></pre> </t> <pre><d class='s3'></d></pre> <t id='3050a2a9-173e-474a-8510-03c0b83ffb24'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_18'>文件格式一:markdown</h1> <pre><d class='s2'>toc、标题集成</d></pre> <pre><d class='s3'></d></pre> <t id='4d3dac35-9450-4aa1-9311-13c4dbbbd0f1'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s4'>没有变化要尝试合并</d></pre> </t> <t id='e0f157e2-d56b-4639-9e9b-6f59a615222f'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>安全:</d><d class='s6'></d></pre> <pre><d class='s4'>禁止rename 可以任意移动文件</d></pre> <pre><d class='s4'>禁用docs下的php文件执行</d></pre> <pre><d class='s4'>给docs目录增加白名单,只有白名单中的文件类型允许访问</d></pre> <pre><d class='s0'>彻底禁用用户脚本?</d></pre> </t> <t id='c6a84e1f-d540-4257-8c9d-17ff151ab167'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s12'></d><d class='s9'>get_aid</d><d class='s13'> 直接拿到aid,需要workman重构</d></pre> </t> <pre><d class='s13'></d></pre> <t id='93b8966c-317c-4d22-856a-bfd1e80a340e'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>del:</d></pre> <pre><d class='s2'>E:\uninote\mynote\basic\web\link\take\lib\graphics</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>Md.php 提取到class level var:</d></pre> <pre><d class='s9'>{</d><d class='s10'>$_SESSION</d><d class='s9'>[</d><d class='s11'>'user_info'</d><d class='s9'>][</d><d class='s11'>'username'</d><d class='s9'>]}</d></pre> </t> <pre><d class='s2'></d></pre> <t id='9404a777-1b51-4cee-b1c4-894ea394b2b2'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s2'>markdown也需要唯一id(分析得出,但可能丢失)</d></pre> </t> <pre><d class='s3'></d></pre> <t id='9989aefb-9620-4b99-b916-39bbbacd58a3'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_19'>加锁</h2> <pre><d class='s1'>所有操作都需要加锁</d></pre> <t id='75301fff-1cee-4074-95bf-92c3719b1c05'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s0'>所有操作都需要带version,并在服务器上进行合并</d></pre> </t> <pre><d class='s1'>编辑-rename测试</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>通过<a href='..\php/php.html#1bb5012c-50c6-429a-bee6-581dcdec6ca8'>php file </a></d><d class='s0'>加锁、加锁</d></pre> <pre><d class='s9'>fopen(</d><d class='s10'>$path</d><d class='s9'>, </d><d class='s11'>"x"</d><d class='s9'>);</d></pre> <pre><d class='s2'>fopen 什么时候异常?在linux服务器上,如果文件存在抛出异常,但其他平台,直接输出警告。</d></pre> <pre><d class='s8'>function </d><d class='s9'>create_file_lock(</d><d class='s10'>$path</d><d class='s9'>, &</d><d class='s10'>$output </d><d class='s9'>= </d><d class='s8'>null</d><d class='s9'>)</d></pre> <pre><d class='s8'>function </d><d class='s9'>release_file_lock(</d><d class='s10'>$f</d><d class='s9'>, </d><d class='s10'>$path</d><d class='s9'>)</d></pre> </t> <pre><d class='s1'></d></pre> <h2 id='ol_20'>编辑</h2> <pre><d class='s1'>关闭时需要确认保存</d></pre> <pre><d class='s0'></d></pre> <t id='57e5c245-c3d5-42fa-aa92-deb3305d27eb'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s6'><img src='..\pic\7ac8bbb097eb056f6a8d7664603d33e0.jpg' /></d><d class='s0'> 全屏加快捷键</d></pre> </t> <t id='6a41cc81-6499-4d8c-af72-8f574b040a8e'> <pre class='tnd_head'>lv1=mynote lv2= type=todo</pre> <pre><d class='s6'><img src='..\pic\9d287fdc59f2b484a3c9eea9491b8a19.jpg' /></d><d class='s0'>添加保存并退出功能(发布),跳转到当前编辑页面,进行查看</d></pre> </t> <pre><d class='s1'></d></pre> <h2 id='ol_21'>图片上传</h2> <pre><d class='s1'>选择图片</d></pre> <pre><d class='s1'>剪贴板:ctrl c(从浏览器、微信、word等)、截图、本地文件(暂不支持)</d></pre> </t> <pre><d class='s3'></d></pre> <t id='bb428ceb-e9b5-43b7-b056-f7c6c34fee67'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_22'>文件格式二:zrtf html;客户端</h1> <t id='7d214c7e-9f58-44be-a511-eaf9b22d3d81'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <pre><d class='s2'>fh client文章间跳转问题</d></pre> <pre><d class='s2'>windows server,fh html生成</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s14'>SHA-1: 1c8a63e21a32abb41dede9911f347f8ed1a98e85</d></pre> <pre><d class='s14'> mynote client <a></d><d class='s15'>标签处理:查询</d><d class='s16'>href</d><d class='s15'>引用路径,如果在数据库中,则转为</d><d class='s16'>id</d><d class='s15'>形式</d></pre> <pre><d class='s2'></d></pre> </t> </t> <pre><d class='s6'></d></pre> <t id='3a2779c1-b452-44ea-9c9e-1ed17624ef46'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_23'>文章查看 & 目录结构</h1> <pre><d class='s16'>SHA-1: dcb27f36d27dd01162395fa59ebb8f4d026c3354</d></pre> <pre><d class='s16'>* </d><d class='s17'>使用phpQuery对资源进行处理:img、css转为的绝对路径;移除script</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>使用phpQuery处理为绝对路径</d></pre> <pre><d class='s2'>util.js中动态加载pi.js等,这个现在无法处理,因此彻底禁用(移除)了js,只保留了大纲的json数据。</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s4'>tree.js</d></pre> <pre><d class='s4'>/**</d></pre> <pre><d class='s4'> * 导航信息的全局变量</d></pre> <pre><d class='s4'> */</d></pre> <pre><d class='s4'>var main_src;</d></pre> <pre><d class='s4'>var iframe_src;</d></pre> <pre><d class='s4'>var cur_aid = null; // 当前浏览的article id</d></pre> <pre><d class='s4'>var outline_num; // 当前浏览的大纲</d></pre> <pre><d class='s2'></d></pre> <t id='4aea6cd7-adfe-476f-99a9-5b04c94c82d0'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_24'>中文路径</h2> <pre><d class='s2'>使用git在服务器上会自动转为utf8编码,直接使用工具上传,会保持原始的编码。</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>apache url编码 似乎windows下没有解决方案</d></pre> <pre><d class='s0'></d></pre> </t> <pre><d class='s1'></d></pre> <h2 id='ol_25'>用户文章浏览</h2> <pre><d class='s3'></d></pre> <t id='b865d096-a661-459b-be38-6dd7dbff9bb7'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h3 id='ol_26'>使用iframe的原因</h3> <pre><d class='s1'>必须用iframe,不然相对路径无法控制</d></pre> <pre><d class='s1'>无法回退</d></pre> <pre><d class='s1'>css相互影响(content影响framework)</d></pre> <pre><d class='s1'>无法open in new tab</d></pre> <pre><d class='s6'></d></pre> <pre><d class='s4'>用户选择某一篇文章时,主frame的url也跟着改变,这样刷新时能知道上次浏览的iframe地址。iframe也跟着load</d></pre> <pre><d class='s4'>刷新后,目录结构、文章标题都会定位到上次浏览位置;同时图标也会变化</d></pre> <pre><d class='s4'><img src='..\pic\44851fe9c23049638f4376572ffcf61e.jpg' /></d><d class='s0'></d></pre> </t> <pre><d class='s4'></d></pre> <t id='7207a8b4-b148-40e9-bf86-ffd9b887509c'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h3 id='ol_27'>链接跳转</h3> <pre><d class='s4'>文章链接:如果是链接当本作者,则页面跳转;如果是其他作者或者站外链接,则新窗口打开。</d></pre> <pre><d class='s4'>两种链接,以不同颜色显示(区分样式)。</d></pre> </t> <pre><d class='s4'></d></pre> <h3 id='ol_28'>上一篇 下一篇</h3> <pre><d class='s4'>同上,也要本页面打开</d><d class='s18'></d></pre> <pre><d class='s0'><a href='eson_todo.html#0fcd0d05-c8a5-4c2f-8531-726916f2b3bf'>上一篇、下一篇的链接形式,要从 </a></d></pre> <pre><d class='s4'></d></pre> <t id='b98d9afa-57bd-49fb-849b-ee44040727cd'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h2 id='ol_29'>浏览方式</h2> <pre><d class='s1'></d></pre> <pre><d class='s1'>排序,默认tree,还可以时间排序。。</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'></d></pre> </t> <pre><d class='s4'></d></pre> <t id='6d7e9f72-39eb-468c-ac36-435001a08ce7'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h2 id='ol_30'>点击标题自动切换url 修改url</h2> <pre><d class='s4'>这样方便复制给别人。</d></pre> <pre><d class='s4'><a href='https://demo.fastadmin.net/docs/command#一键生成菜单-2'>https://demo.fastadmin.net/docs/command#一键生成菜单-2</a></d><d class='s0'></d></pre> <pre><d class='s0'><a href='..\js/js.html#16382b99-71c5-4c41-9d71-c5272b7447b3'>利用JS实现前端路由 </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'><a href='http://doc.scrapy.org/en/latest/intro/overview.html#what-s-next'>http://doc.scrapy.org/en/latest/intro/overview.html#what-s-next</a></d></pre> <pre><d class='s0'>链接图标放前面</d></pre> <pre><d class='s0'><img src='..\pic\e38ca5ff2825a8165f693c060acfc9ab.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'><a href='https://github.com/coolwanglu/pdf2htmlEX'>https://github.com/coolwanglu/pdf2htmlEX</a></d></pre> <pre><d class='s6'></d></pre> </t> <pre><d class='s1'></d></pre> <h2 id='ol_31'>大纲自动折叠、定位,并且带高亮</h2> <pre><d class='s1'>参考掘金</d></pre> <pre><d class='s1'><img src='..\pic\e30f3b06cbe7080e69ed10c53837fd45.jpg' /></d><d class='s1'></d></pre> <pre><d class='s6'></d></pre> <t id='533d0600-7943-4ca2-abc7-235782091172'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_32'>查看选定文章</h2> <pre><d class='s4'>1、</d><d class='s7'>要保证在加载的过程中,可读。随着文章加载的内容增加,要调整文章高度</d><d class='s4'>。</d></pre> <pre><d class='s4'>2、</d><d class='s7'>加载完成后需要滚动到顶部</d><d class='s4'>。TODO:这里是onload滚动还是documentReady时滚动??</d><d class='s7'>目前,还没法保证绝对滚动到top</d><d class='s4'>,cyb/help这篇文章就不行</d></pre> <pre><d class='s4'> </d><d class='s19'>如果带小标题锚点,则不要滚动</d><d class='s4'></d></pre> <pre><d class='s4'>这里面涉及到太多异步的问题(加断点调试和正常运行看到的结果不一样)</d></pre> </t> <t id='a207a3e9-74b9-4bdc-93cf-8a18e05df26c'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <pre><d class='s0'>鼠标hover图片上时改为放大镜,并显示图片边框。</d></pre> <pre><d class='s0'></d></pre> </t> <pre><d class='s0'></d></pre> <h2 id='ol_33'>路径排序</h2> <pre><d class='s0'>同windows排序结果</d></pre> <pre><d class='s0'></d></pre> </t> <pre><d class='s1'></d></pre> <t id='028228ff-ab4e-4c58-b4e4-5d7002fcc7c4'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h2 id='ol_34'>文章可见性</h2> <pre><d class='s20'>public、private、private-local(不上传到server)</d><d class='s21'></d></pre> <pre><d class='s1'>分组:支持不同的组,有不同的可见性</d></pre> </t> <pre><d class='s6'></d></pre> <h1 id='ol_35'>评论</h1> <pre><d class='s0'><a href='mynote_mod.html#7c7d703c-a1ba-4130-8b05-de11729c6286'>点击头像到作者首页 </a></d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_36'>es 搜索</h1> <pre><d class='s0'><a href='mynote_es.html'>mynote es </a></d></pre> <pre><d class='s3'></d></pre> </body></html>

mynote_mod

mynote_release

点赞(0) 阅读(53) 举报
目录
标题