miscellaneous
- changed docker build - light themes showing vertical lines - resizable panels when in split view mode - added funding yaml :-)
This commit is contained in:
parent
6d7beef1b1
commit
1b4f3263f3
|
|
@ -0,0 +1,7 @@
|
||||||
|
# GitHub Sponsors configuration
|
||||||
|
# This adds a "Sponsor" button to your repository
|
||||||
|
|
||||||
|
# PayPal donation link (can add up to 4 custom links)
|
||||||
|
custom:
|
||||||
|
- 'https://paypal.me/gamosoft'
|
||||||
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
name: Build and Push Docker Image to GHCR
|
name: Build and Push Docker Image to GHCR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
- master
|
||||||
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
@ -15,6 +18,11 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
|
# Only run if PR was merged (not just closed) or if triggered by tag/manual
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
|
||||||
|
github.event_name == 'push' ||
|
||||||
|
github.event_name == 'workflow_dispatch'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -40,11 +48,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable=true
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
id: build-push
|
id: build-push
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -45,6 +45,8 @@ NoteDiscovery is a **lightweight, self-hosted note-taking application** that put
|
||||||
|
|
||||||
Use the pre-built image directly from GHCR - no building required!
|
Use the pre-built image directly from GHCR - no building required!
|
||||||
|
|
||||||
|
> **💡 Tip**: Always use `ghcr.io/gamosoft/notediscovery:latest` to get the newest features and fixes. Images are automatically built when PRs are merged to main.
|
||||||
|
|
||||||
> **📁 Important - Volume Mapping**: The container needs local folders/files to work:
|
> **📁 Important - Volume Mapping**: The container needs local folders/files to work:
|
||||||
> - **Required**: `data` folder (your notes will be stored here)
|
> - **Required**: `data` folder (your notes will be stored here)
|
||||||
> - **Required**: `themes` folder with theme `.css` files (at least light.css and dark.css)
|
> - **Required**: `themes` folder with theme `.css` files (at least light.css and dark.css)
|
||||||
|
|
@ -200,6 +202,10 @@ Once you've started NoteDiscovery, you'll find comprehensive guides on:
|
||||||
|
|
||||||
💡 **Tip:** These documentation files are regular markdown notes—edit them, add your own notes, or use them as templates. It's your knowledge base!
|
💡 **Tip:** These documentation files are regular markdown notes—edit them, add your own notes, or use them as templates. It's your knowledge base!
|
||||||
|
|
||||||
|
## 💖 Support Development
|
||||||
|
|
||||||
|
If you find NoteDiscovery useful, consider [☕ buying me a coffee](https://paypal.me/gamosoft) to help keep the project going. Every bit helps with new features, bug fixes, and improvements. Thank you!
|
||||||
|
|
||||||
## 🔒 Security Considerations
|
## 🔒 Security Considerations
|
||||||
|
|
||||||
NoteDiscovery is designed for **self-hosted, private use**. Please keep these security considerations in mind:
|
NoteDiscovery is designed for **self-hosted, private use**. Please keep these security considerations in mind:
|
||||||
|
|
@ -230,18 +236,6 @@ NoteDiscovery is designed for **self-hosted, private use**. Please keep these se
|
||||||
|
|
||||||
**TL;DR**: Perfect for personal use on your local machine or home network. Add a reverse proxy with authentication if exposing to wider networks.
|
**TL;DR**: Perfect for personal use on your local machine or home network. Add a reverse proxy with authentication if exposing to wider networks.
|
||||||
|
|
||||||
## 💖 Support Development
|
|
||||||
|
|
||||||
If NoteDiscovery makes your life easier, consider buying me a coffee! Your support helps keep this project alive and growing.
|
|
||||||
|
|
||||||
**[☕ Buy Me a Coffee](https://paypal.me/gamosoft)**
|
|
||||||
|
|
||||||
Every contribution, no matter how small, is deeply appreciated and helps fund:
|
|
||||||
- 🛠️ New features and improvements
|
|
||||||
- 🐛 Bug fixes and maintenance
|
|
||||||
- 📚 Documentation and tutorials
|
|
||||||
- 🎨 Design enhancements
|
|
||||||
|
|
||||||
## 📄 License
|
## 📄 License
|
||||||
|
|
||||||
MIT License - Free to use, modify, and distribute.
|
MIT License - Free to use, modify, and distribute.
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,10 @@ function noteApp() {
|
||||||
sidebarWidth: CONFIG.DEFAULT_SIDEBAR_WIDTH,
|
sidebarWidth: CONFIG.DEFAULT_SIDEBAR_WIDTH,
|
||||||
isResizing: false,
|
isResizing: false,
|
||||||
|
|
||||||
|
// Split view resize state
|
||||||
|
editorWidth: 50, // percentage
|
||||||
|
isResizingSplit: false,
|
||||||
|
|
||||||
// DOM element cache (to avoid repeated querySelector calls)
|
// DOM element cache (to avoid repeated querySelector calls)
|
||||||
_domCache: {
|
_domCache: {
|
||||||
editor: null,
|
editor: null,
|
||||||
|
|
@ -96,6 +100,7 @@ function noteApp() {
|
||||||
await this.loadNotes();
|
await this.loadNotes();
|
||||||
await this.checkStatsPlugin();
|
await this.checkStatsPlugin();
|
||||||
this.loadSidebarWidth();
|
this.loadSidebarWidth();
|
||||||
|
this.loadEditorWidth();
|
||||||
this.loadViewMode();
|
this.loadViewMode();
|
||||||
|
|
||||||
// Parse URL and load specific note if provided
|
// Parse URL and load specific note if provided
|
||||||
|
|
@ -2025,6 +2030,55 @@ function noteApp() {
|
||||||
document.addEventListener('mouseup', stopResize);
|
document.addEventListener('mouseup', stopResize);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Start resizing split panes (editor/preview)
|
||||||
|
startSplitResize(event) {
|
||||||
|
this.isResizingSplit = true;
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const container = event.target.parentElement;
|
||||||
|
|
||||||
|
const resize = (e) => {
|
||||||
|
if (!this.isResizingSplit) return;
|
||||||
|
|
||||||
|
const containerRect = container.getBoundingClientRect();
|
||||||
|
const mouseX = e.clientX - containerRect.left;
|
||||||
|
const percentage = (mouseX / containerRect.width) * 100;
|
||||||
|
|
||||||
|
// Clamp between 20% and 80%
|
||||||
|
if (percentage >= 20 && percentage <= 80) {
|
||||||
|
this.editorWidth = percentage;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const stopResize = () => {
|
||||||
|
if (this.isResizingSplit) {
|
||||||
|
this.isResizingSplit = false;
|
||||||
|
this.saveEditorWidth();
|
||||||
|
document.removeEventListener('mousemove', resize);
|
||||||
|
document.removeEventListener('mouseup', stopResize);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener('mousemove', resize);
|
||||||
|
document.addEventListener('mouseup', stopResize);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Load editor width from localStorage
|
||||||
|
loadEditorWidth() {
|
||||||
|
const saved = localStorage.getItem('editorWidth');
|
||||||
|
if (saved) {
|
||||||
|
const width = parseFloat(saved);
|
||||||
|
if (width >= 20 && width <= 80) {
|
||||||
|
this.editorWidth = width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Save editor width to localStorage
|
||||||
|
saveEditorWidth() {
|
||||||
|
localStorage.setItem('editorWidth', this.editorWidth.toString());
|
||||||
|
},
|
||||||
|
|
||||||
// Scroll to top of editor and preview
|
// Scroll to top of editor and preview
|
||||||
scrollToTop() {
|
scrollToTop() {
|
||||||
// Disable scroll sync temporarily to prevent interference
|
// Disable scroll sync temporarily to prevent interference
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
background-color: var(--border-primary);
|
background-color: var(--text-tertiary);
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -392,6 +392,21 @@
|
||||||
background-color: var(--accent-hover) !important;
|
background-color: var(--accent-hover) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Split view resize handle */
|
||||||
|
.split-resize-handle {
|
||||||
|
position: relative;
|
||||||
|
user-select: none;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.split-resize-handle:hover {
|
||||||
|
background-color: var(--accent-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.split-resize-handle:active {
|
||||||
|
background-color: var(--accent-hover) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Enhanced Shell/Bash Syntax Highlighting */
|
/* Enhanced Shell/Bash Syntax Highlighting */
|
||||||
.markdown-preview pre code.language-shell .hljs-meta,
|
.markdown-preview pre code.language-shell .hljs-meta,
|
||||||
.markdown-preview pre code.language-bash .hljs-meta,
|
.markdown-preview pre code.language-bash .hljs-meta,
|
||||||
|
|
@ -870,14 +885,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Editor/Preview -->
|
<!-- Editor/Preview -->
|
||||||
<div class="flex-1 flex" style="min-height: 0;">
|
<div class="flex-1 flex relative" style="min-height: 0;">
|
||||||
<!-- Editor -->
|
<!-- Editor -->
|
||||||
<div
|
<div
|
||||||
x-show="viewMode === 'edit' || viewMode === 'split'"
|
x-show="viewMode === 'edit' || viewMode === 'split'"
|
||||||
:class="viewMode === 'split' ? 'w-1/2' : 'w-full'"
|
|
||||||
class="flex flex-col"
|
class="flex flex-col"
|
||||||
style="min-height: 0;"
|
style="min-height: 0;"
|
||||||
:style="'border-right: ' + (viewMode === 'split' ? '1px solid var(--border-primary)' : 'none')"
|
:style="viewMode === 'split' ? `width: ${editorWidth}%;` : 'width: 100%;'"
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
x-model="noteContent"
|
x-model="noteContent"
|
||||||
|
|
@ -892,12 +906,22 @@
|
||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Split view resize handle -->
|
||||||
|
<div
|
||||||
|
x-show="viewMode === 'split'"
|
||||||
|
@mousedown="startSplitResize($event)"
|
||||||
|
class="split-resize-handle"
|
||||||
|
style="width: 4px; cursor: col-resize; background-color: transparent; transition: background-color 0.2s; position: relative; z-index: 10;"
|
||||||
|
@mouseover="$el.style.backgroundColor='var(--accent-primary)'"
|
||||||
|
@mouseout="if(!isResizingSplit) $el.style.backgroundColor='transparent'"
|
||||||
|
></div>
|
||||||
|
|
||||||
<!-- Preview -->
|
<!-- Preview -->
|
||||||
<div
|
<div
|
||||||
x-show="viewMode === 'preview' || viewMode === 'split'"
|
x-show="viewMode === 'preview' || viewMode === 'split'"
|
||||||
:class="viewMode === 'split' ? 'w-1/2' : 'w-full'"
|
|
||||||
class="overflow-y-auto overflow-x-hidden custom-scrollbar"
|
class="overflow-y-auto overflow-x-hidden custom-scrollbar"
|
||||||
style="background-color: var(--bg-primary); min-height: 0;"
|
style="background-color: var(--bg-primary); min-height: 0;"
|
||||||
|
:style="viewMode === 'split' ? `width: ${100 - editorWidth}%;` : 'width: 100%;'"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="p-6 markdown-preview"
|
class="p-6 markdown-preview"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue