Skip to content

Commit

Permalink
2024-6-7
Browse files Browse the repository at this point in the history
NoteBook 1.0-SNAPSHOT-4
  • Loading branch information
KevinLikesCodingMC committed Jun 7, 2024
1 parent 3049a19 commit 92eff63
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 50 deletions.
Binary file modified NoteBook/__pycache__/info.cpython-310.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion NoteBook/info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data = {
'version': '1.0-SNAPSHOT-3',
'version': '1.0-SNAPSHOT-4',
}
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# NoteBook

NoteBook can help you take notes with markdown.
A viewer and editor of markdown on local web pages.

Run the ```start.py``` to start.
## Features

- Based on [Python3](https://www.python.org/), [Django](http://www.djangoproject.com/) and [editor.md](https://github.com/pandao/editor.md).
- Support Standard Markdown;
- Support real-time preview, image upload.
- Support [KaTeX](https://katex.org).

Please download the Python3
and run the ```start.py``` to start.

NoteBook runs at `127.0.0.1:8014`.

The all notebooks are storaged in ```/notebooks/```

and all images are storaged in ```/image/```.

The host name cannot contain Chinese characters.
43 changes: 0 additions & 43 deletions notebooks/demo.md

This file was deleted.

39 changes: 39 additions & 0 deletions notebooks/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Welcome

You need to use Markdown to read your notebooks.

[Here is a Markdown guide](https://www.markdownguide.org/)

NoteBook also support HTML editing.

The all notebooks are storaged in ```/notebooks/```

## TOC

You can use `[TOC]` to show the directory.

[TOC]

## Image upload and display

You can upload the image by clicking the **picture icon** in the top tool bar.

If you want to zoom a picture, you can use the HTML like this.

```html
<img src="/image/89L2009.png" style="zoom:5%;">
<img src="/image/89L2009.png" style="width:50px;">
```

<img src="/image/89L2009.png" style="zoom:5%;">
<img src="/image/89L2009.png" style="width:50px;">

The all images are storaged in ```/image/```.

## KaTeX render bug

There are some problem of the KaTeX.

You can visit [Latexlive](https://www.latexlive.com/) to download the svg image and upload it.


2 changes: 1 addition & 1 deletion resource/notebook/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $(function() {
]
},
imageUpload : true,
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "svg"],
imageUploadURL : "/upload/image/",
});
});
4 changes: 2 additions & 2 deletions resource/notebook/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h1, h2, h3, h4, h5, h6 {
h1, h2, h3, h4, h5, h6, a, p {
font-family: Arial, Helvetica, sans-serif;
}
.main-content-left {
Expand All @@ -7,7 +7,7 @@ h1, h2, h3, h4, h5, h6 {
}
.main-content-left-card {
padding: 0 30px;
}
}
.main-content-right {
float: left;
width: 25%;
Expand Down
2 changes: 2 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ <h2>NoteBook v{{ version }}</h2>
<p>{{ name }}</p>
<h3>Menu</h3>
<a class = "blue-link" href="/edit/new/">create new notebook</a>
<h3>Useful links</h3>
<a class = "blue-link" target="_blank" href="https://www.latexlive.com/">latexlive</a>
</div>
</div>
</body>
Expand Down
5 changes: 4 additions & 1 deletion templates/modify.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ <h2>Edit the notebook</h2>
<h2>NoteBook v{{ version }}</h2>
<p>Notebook: {{ title }}</p>
<h3>Menu</h3>
<a class="blue-link" onclick="upload_edit();">save this notebook</a>
<a class="blue-link" onclick="upload_edit();">save this notebook</a><br><br>
<a class="blue-link" href="/" target="_blank">return to index</a>
<h3>Useful links</h3>
<a class = "blue-link" target="_blank" href="https://www.latexlive.com/">latexlive</a>
</div>
</div>
<script src="/resource/notebook/editor.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions templates/notebook.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ <h3>Menu</h3>
<a class="blue-link" href="/edit/{{ title }}">edit this notebook</a> <br><br>
<a class="blue-link" onclick="upload_del('{{ title }}');">delete this notebook</a> <br><br>
<a class = "blue-link" href="/edit/new/">create new notebook</a>
<h3>Useful links</h3>
<a class = "blue-link" target="_blank" href="https://www.latexlive.com/">latexlive</a>
</div>
</div>
<script src="/resource/notebook/editor-html-view.js"></script>
Expand Down

0 comments on commit 92eff63

Please sign in to comment.