Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议 #15

Open
AntonyRen opened this issue Feb 14, 2021 · 23 comments
Open

建议 #15

AntonyRen opened this issue Feb 14, 2021 · 23 comments
Labels
discuss discussion about memory methods, etc.

Comments

@AntonyRen
Copy link

例如:define property

definexxx

我觉得可以删掉

直接property的音标和释义给出来就好

最好能突出一下

@AntonyRen
Copy link
Author

image

@Benature
Copy link
Owner

Benature commented May 3, 2021

谢谢建议,这里是插件抓取其他网站的内容,有空会考虑对其文本再做一层处理。

@AntonyRen
Copy link
Author

大佬能加个联系方式不

@Benature
Copy link
Owner

Benature commented May 3, 2021

我假期比较有空,会关注邮件及时回复的,在这里交流就好了,也能帮到有潜在类似问题的其他同学。

@AntonyRen
Copy link
Author

AntonyRen commented May 3, 2021 via email

@Benature
Copy link
Owner

Benature commented May 3, 2021

文章系统是什么意思呢?比如是文献管理还是微信推送那些?

@AntonyRen
Copy link
Author

AntonyRen commented May 3, 2021 via email

@Benature
Copy link
Owner

Benature commented May 3, 2021

(这是考研政治吗)这种场景好像挺多人会使用anki,好像还可以自定义挖好几个空🤔

当然,如果说要在这个系统用的话,你可以考虑把问题/考点写在单词那列,答案写在释义那列 来导入数据😂

@AntonyRen
Copy link
Author

AntonyRen commented May 3, 2021 via email

@Benature
Copy link
Owner

Benature commented May 3, 2021

哦对😂,你可以改下数据库的配置: https://github.com/Benature/WordReview/blob/ben/WordReview/apps/review/models.py#L86-L87

word = models.CharField('英文单词', max_length=50, unique=True)
mean = models.CharField('中文释义', max_length=500, default='')

比如中文释义长度改成 3000 左右(之类)?

@AntonyRen
Copy link
Author

AntonyRen commented May 3, 2021 via email

@Benature Benature added the discuss discussion about memory methods, etc. label May 3, 2021
@AntonyRen
Copy link
Author

AntonyRen commented May 3, 2021 via email

@xunxiangke
Copy link

提个小建议:如果能适配黑暗模式就更好了

@Benature
Copy link
Owner

Benature commented Apr 5, 2022

提个小建议:如果能适配黑暗模式就更好了

可以安装 Dark Reader 浏览器插件

@xunxiangke
Copy link

提个小建议:如果能适配黑暗模式就更好了

可以安装 Dark Reader 浏览器插件

因为平常我用移动端背单词,我打算插入darkmodejs一段js,但是不知道怎样添加

@Benature
Copy link
Owner

Benature commented Apr 5, 2022

因为平常我用移动端背单词,我打算插入darkmodejs一段js,但是不知道怎样添加

你是部署到自己服务器,然后用手机背嘛?黑暗模式的代码我没有研究过诶

@xunxiangke
Copy link

xunxiangke commented Apr 5, 2022

因为平常我用移动端背单词,我打算插入darkmodejs一段js,但是不知道怎样添加

你是部署到自己服务器,然后用手机背嘛?黑暗模式的代码我没有研究过诶

我把它放在服务器上面运行,因为晚上背得比较多就想引入一个夜间模式,但是不熟悉Django的结构,在html下面插入下面的js就可以实现了,不知道该怎么改代码
https://darkmodejs.learn.uno/

<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js"></script>
<script>
  function addDarkmodeWidget() {
    new Darkmode().showWidget();
  }
  window.addEventListener('load', addDarkmodeWidget);
</script>

image
image

@Benature
Copy link
Owner

Benature commented Apr 5, 2022

好久没碰过Django了,我凭记忆回复一下吧

应该是在 https://github.com/Benature/WordReview/blob/ben/WordReview/templates/base.pug 加入

script(src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js")

剩下的js加到 /static/js/util.js 吧,不是很记得pug怎么直接加script了

  function addDarkmodeWidget() {
    new Darkmode().showWidget();
  }
  window.addEventListener('load', addDarkmodeWidget);

@xunxiangke
Copy link

好久没碰过Django了,我凭记忆回复一下吧

应该是在 https://github.com/Benature/WordReview/blob/ben/WordReview/templates/base.pug 加入

script(src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js")

剩下的js加到 /static/js/util.js 吧,不是很记得pug怎么直接加script了

  function addDarkmodeWidget() {
    new Darkmode().showWidget();
  }
  window.addEventListener('load', addDarkmodeWidget);

这样只是引入这段js,可是没有效果
image

@Benature
Copy link
Owner

Benature commented Apr 5, 2022

在html下面插入下面的js就可以实现了

你说引入了就可以实现的呀

@xunxiangke
Copy link

image
可能没有调用😅,我也不是很清楚,上面的是我在本地修改html实现的。

@Benature
Copy link
Owner

Benature commented Apr 5, 2022

不是很记得pug怎么直接加script了

查了一下,这是我最后能想到的法子了

还是在 base.pug

script(src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js")
script.
    function addDarkmodeWidget() {
        new Darkmode().showWidget();
    }
    window.addEventListener('load', addDarkmodeWidget);

ref from https://stackoverflow.com/questions/5858218/how-can-i-render-inline-javascript-with-jade-pug

至少渲染出来的html应该是跟你截图一样的🤔

@xunxiangke
Copy link

成功解决~下面是解决的方法
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss discussion about memory methods, etc.
Projects
None yet
Development

No branches or pull requests

3 participants