Skip to content

Commit

Permalink
Release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aceberg committed Jun 27, 2023
1 parent b458f00 commit de3c450
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=0.1.0
VERSION=0.2.0
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Change Log
All notable changes to this project will be documented in this file.

## [0.2.0] - 2023-06-27
### Added
- Edit everything in GUI
- Local node modules

## [0.1.0] - 2023-06-20
### Added
- Board config with web GUI
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ mod:

run:
cd cmd/miniboard/ && \
go run .
# go run . -n "http://192.168.2.3:8850"
go run . #-n "http://192.168.2.3:8850"

fmt:
go fmt ./...
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
<img src="https://raw.githubusercontent.com/aceberg/miniboard/main/assets/logo.png" width="20" />
</a>miniboard</h1>
<br/>
Dashboard WIP
Lightweight Dashboard with Tabs and online status check. Can be configured through GUI or yaml file.

![screenshot](https://raw.githubusercontent.com/aceberg/miniboard/main/assets/Screenshot%202023-06-18%20at%2013-33-20%20MiniBoard.png)
![screenshot](https://raw.githubusercontent.com/aceberg/miniboard/main/assets/Screenshot%202023-06-25%20at%2022-55-05%20MiniBoard%20-%20Docker.png)
<details>
<summary>Themes</summary>
<img src="https://raw.githubusercontent.com/aceberg/miniboard/main/assets/MiniBoard%20-%20Themes.png">
</details>

<a href="https://www.flaticon.com/free-icons/skateboard" title="skateboard icons">Skateboard icons created by Freepik - Flaticon</a>
37 changes: 37 additions & 0 deletions configs/board.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
tabs:
0: # Tab IDs (integer). Default tab has ID 0
name: Tab1 # Tab name
panels: # Panels on this tab
0: Search # Place ID (integer):Panel ID (string)
1: Panel2 # Use Place ID to sort Panels on Tab
1:
name: Tab2
panels:
0: Search
panels:
Panel2: # Panel ID (string) must be the same as Panel Name
name: Panel2 # Panel Name (string) must be the same as Panel ID
scan: false # Check if hosts of this panel are online (true or false)
hosts:
0: # Host ID (integer), use them to sort hosts on Panel
name: /r/selfhosted # Host Name (string)
addr: reddit.com # IP or DNS-name without http(s) is needed to scan if host is online (if scan=true)
port: "" # Port to scan (default: 80)
url: https://www.reddit.com/r/selfhosted # URL to click (with http(s) part)
icon: https://www.redditinc.com/assets/images/site/reddit-logo.png # Link to icon
Search:
name: Search
scan: true
hosts:
0:
name: Google
addr: google.com
port: ""
url: https://www.google.com/
icon: ""
1:
name: DuckDuckGo
addr: duckduckgo.com
port: ""
url: https://duckduckgo.com/
icon: ""
2 changes: 1 addition & 1 deletion internal/conf/getconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Get(path string) models.Conf {

viper.SetDefault("HOST", "0.0.0.0")
viper.SetDefault("PORT", "8849")
viper.SetDefault("THEME", "cyborg")
viper.SetDefault("THEME", "flatly")
viper.SetDefault("COLOR", "dark")
viper.SetDefault("COLORON", "#89ff89")
viper.SetDefault("COLOROFF", "#ff3232")
Expand Down
14 changes: 7 additions & 7 deletions internal/web/const-var.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package web

import (
// "embed"
"embed"

"github.com/aceberg/miniboard/internal/models"
)
Expand All @@ -15,11 +15,11 @@ var (

// TemplHTML - html templates
//
// //go:embed templates/*
// var TemplHTML embed.FS

// // TemplPath - path to html templates
// const TemplPath = "templates/"
//go:embed templates/*
var TemplHTML embed.FS

// TemplPath - path to html templates
const TemplPath = "../../internal/web/templates/"
const TemplPath = "templates/"

// // TemplPath - path to html templates
// const TemplPath = "../../internal/web/templates/"
4 changes: 2 additions & 2 deletions internal/web/exec-tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
)

func execTemplate(w http.ResponseWriter, tpl string, guiData models.GuiData) {
tmpl, err := template.ParseFiles(TemplPath+tpl+".html", TemplPath+"header.html", TemplPath+"footer.html")
// tmpl, err := template.ParseFS(TemplHTML, TemplPath+tpl+".html", TemplPath+"header.html", TemplPath+"footer.html")
// tmpl, err := template.ParseFiles(TemplPath+tpl+".html", TemplPath+"header.html", TemplPath+"footer.html")
tmpl, err := template.ParseFS(TemplHTML, TemplPath+tpl+".html", TemplPath+"header.html", TemplPath+"footer.html")
check.IfError(err)
err = tmpl.ExecuteTemplate(w, "header", guiData)
check.IfError(err)
Expand Down

0 comments on commit de3c450

Please sign in to comment.