Compare commits
No commits in common. "e93d442c7956186869ab47c5b3c841feae716116" and "dd740f71ea917f584597b1852abd2f58ceff748a" have entirely different histories.
e93d442c79
...
dd740f71ea
@ -1,16 +0,0 @@
|
|||||||
package personalpropsroute
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
"personalwebsite/websiteapp/personalprops"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Route(route *gin.RouterGroup) {
|
|
||||||
persPropsApp := personalprops.NewPersPropsApp()
|
|
||||||
route.GET("/test", func(ctx *gin.Context) {
|
|
||||||
test := persPropsApp.Render()
|
|
||||||
ctx.HTML(http.StatusOK, "personal-properties.html", gin.H{"books": test})
|
|
||||||
})
|
|
||||||
}
|
|
7
main.go
7
main.go
@ -3,7 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
personalpropsroute "personalwebsite/approutes/personalPropsRoute"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@ -18,12 +17,8 @@ func main() {
|
|||||||
router.Static("/res", "resources")
|
router.Static("/res", "resources")
|
||||||
router.GET("/", index)
|
router.GET("/", index)
|
||||||
router.GET("/getmockapp", func(ctx *gin.Context) {
|
router.GET("/getmockapp", func(ctx *gin.Context) {
|
||||||
|
ctx.HTML(http.StatusOK, "mockapp.html", nil)
|
||||||
})
|
})
|
||||||
apps := router.Group("applications")
|
|
||||||
{
|
|
||||||
personalpropsroute.Route(apps.Group("/personalproperties"))
|
|
||||||
}
|
|
||||||
// router.GET("/room/:roomid", roomGET)
|
// router.GET("/room/:roomid", roomGET)
|
||||||
// router.POST("/room-post/:roomid", roomPOST)
|
// router.POST("/room-post/:roomid", roomPOST)
|
||||||
// router.GET("/stream/:roomid", streamRoom)
|
// router.GET("/stream/:roomid", streamRoom)
|
||||||
|
@ -10,115 +10,5 @@ body{
|
|||||||
|
|
||||||
.Application{
|
.Application{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
/* background-color: antiquewhite; */
|
|
||||||
stroke: #000000;
|
|
||||||
stroke-width: 1px;
|
|
||||||
stroke-linecap: butt;
|
|
||||||
stroke-dasharray: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Frame{
|
|
||||||
width: 100%;
|
|
||||||
min-height: 200px;
|
|
||||||
height: auto;
|
|
||||||
background-color: #CCCCCC;
|
|
||||||
border: 1px solid #000000;
|
|
||||||
box-shadow: 1px 1px 0px #000,inset -1px -1px 0px rgba(0, 0, 0, 0.27), inset 1px 1px 0px #FFFFFF;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
padding: 4px;
|
|
||||||
gap:4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.WindowFrameTopBar{
|
|
||||||
/* background-color: aqua; */
|
|
||||||
width: 100%;
|
|
||||||
height: 13px;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
gap: 5px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.WindowFrameTopBarButton
|
|
||||||
{
|
|
||||||
/* box-sizing: border-box; */
|
|
||||||
|
|
||||||
width: 11px;
|
|
||||||
height: 11px;
|
|
||||||
|
|
||||||
background: #D9D9D9;
|
|
||||||
border: 1px solid #222222;
|
|
||||||
box-shadow: 0.5px 0.5px 0px 0.5px #FFFFFF, -0.5px -0.5px 0px 0.5px rgba(0, 0, 0, 0.25), inset 1px 1px 0px rgba(0, 0, 0, 0.25), inset -1px -1px 0px #FFFFFF;
|
|
||||||
|
|
||||||
/* Inside auto layout */
|
|
||||||
|
|
||||||
flex: none;
|
|
||||||
order: 0;
|
|
||||||
flex-grow: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.WindowDragArea{
|
|
||||||
background-color: antiquewhite;
|
background-color: antiquewhite;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
/* background: repeating-linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
rgb(255, 255, 255) 0px,
|
|
||||||
rgb(255, 255, 255) 1px,
|
|
||||||
#ffffff00 2px,
|
|
||||||
#ffffff00 3px
|
|
||||||
); */
|
|
||||||
/* box-shadow: 1px 1px ; */
|
|
||||||
}
|
|
||||||
.ContentFrame{
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
/* Auto layout */
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
padding: 12px;
|
|
||||||
gap:10px;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
background: #DDDDDD;
|
|
||||||
border: 1px solid #000000;
|
|
||||||
box-shadow: 0.5px 0.5px 0px 0.5px #FFFFFF, -0.5px -0.5px 0px 0.5px rgba(0, 0, 0, 0.25), inset 1px 1px 0px #FFFFFF;
|
|
||||||
|
|
||||||
|
|
||||||
/* Inside auto layout */
|
|
||||||
flex: none;
|
|
||||||
order: 0;
|
|
||||||
align-self: stretch;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Personal-properties-prop{
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border: 1px solid #888888;
|
|
||||||
box-shadow: 1px 1px 0px #FFFFFF, inset 2px 2px 0px #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.Personal-properties-prop-header{
|
|
||||||
/* width: 50px; */
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
max-width: 100%;
|
|
||||||
background-color: #DDDDDD;
|
|
||||||
left: 12px;
|
|
||||||
top: -10px;
|
|
||||||
margin-left: 2px;
|
|
||||||
|
|
||||||
/* padding: 10px; */
|
|
||||||
/* border: 1px solid #888888; */
|
|
||||||
/* box-shadow: 1px 1px 0px #FFFFFF, inset 2px 2px 0px #FFFFFF; */
|
|
||||||
}
|
}
|
@ -3,9 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="res/base.css">
|
<link rel="stylesheet" type="text/css" href="res/base.css">
|
||||||
<script src="res/wde.js"></script>
|
<script src="res/wde.js"></script>
|
||||||
<!-- <script src="res/decorat.js"></script> -->
|
<script src="res/decorat.js"></script>
|
||||||
<!-- TODO Load with app -->
|
|
||||||
<script src="res/personal-properties.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="WindowsLayer"></div>
|
<div id="WindowsLayer"></div>
|
||||||
|
5
resources/mockapp.html
Normal file
5
resources/mockapp.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<div id="Pizda" class="Application" style="width: 200px;height: 150px;">
|
||||||
|
<div id="TestWindowHeader" class="WindowDragArea" style="width: 100%;height: 22px; background-color: cornflowerblue;">
|
||||||
|
<button>Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,7 +0,0 @@
|
|||||||
<div id="prop" class="personal-properties-prop">
|
|
||||||
{{ range $book := .books }}
|
|
||||||
<h1>{{ .Title }}</h1>
|
|
||||||
<h3>{{ .Author }}</h3>
|
|
||||||
<hr/>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
@ -1,17 +0,0 @@
|
|||||||
<div id="RootWidget" class="Application" style="width: 200px;height: 200px;">
|
|
||||||
<div id="WindowBorder" class="Frame">
|
|
||||||
<div id="TestWindowHeader" class="WindowFrameTopBar">
|
|
||||||
<button class="WindowFrameTopBarButton"></button>
|
|
||||||
<div id="Drag" class="WindowDragArea"></div>
|
|
||||||
<button class="WindowFrameTopBarButton" ></button>
|
|
||||||
</div>
|
|
||||||
<div id="ContentFrame" class="ContentFrame">
|
|
||||||
{{ range $book := .books }}
|
|
||||||
<div id="prop" class="Personal-properties-prop">
|
|
||||||
<div class="Personal-properties-prop-header">{{ .Title }}</div>
|
|
||||||
<div>{{ .Author }}</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,5 +0,0 @@
|
|||||||
class PersonalProperties {
|
|
||||||
constructor(){
|
|
||||||
console.log("pprops")
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,7 +7,7 @@ class WebDesktopEnvironment{
|
|||||||
constructor(){
|
constructor(){
|
||||||
this.wc = new WindowsCompositor
|
this.wc = new WindowsCompositor
|
||||||
|
|
||||||
fetch("http://localhost:8080/applications/personalproperties/test" /*, options */)
|
fetch("http://localhost:8080/getmockapp" /*, options */)
|
||||||
.then((response) => response.text())
|
.then((response) => response.text())
|
||||||
.then((html) => {
|
.then((html) => {
|
||||||
document.getElementById("WindowsLayer").innerHTML = html;
|
document.getElementById("WindowsLayer").innerHTML = html;
|
||||||
@ -54,7 +54,7 @@ class WindowsCompositor{
|
|||||||
catchClick(event){
|
catchClick(event){
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case event.target.className == "WindowDragArea":
|
case event.target.className == "WindowDragArea":
|
||||||
this.movingElement = event.target.parentElement.parentElement.parentElement
|
this.movingElement = event.target.parentElement
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
package personalprops
|
|
||||||
|
|
||||||
type PersonalPropertiesApp struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewPersPropsApp() PersonalPropertiesApp {
|
|
||||||
newApp := PersonalPropertiesApp{}
|
|
||||||
return newApp
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *PersonalPropertiesApp) Render() []Book {
|
|
||||||
books := make([]Book, 0)
|
|
||||||
books = append(books, Book{
|
|
||||||
Title: "About person:",
|
|
||||||
Author: "General information about me",
|
|
||||||
})
|
|
||||||
books = append(books, Book{
|
|
||||||
Title: "Career:",
|
|
||||||
Author: "Inforamtion about my career",
|
|
||||||
})
|
|
||||||
books = append(books, Book{
|
|
||||||
Title: "TEST:",
|
|
||||||
Author: "QQQQQQQ",
|
|
||||||
})
|
|
||||||
books = append(books, Book{
|
|
||||||
Title: "TEST:",
|
|
||||||
Author: "QQQQQQQ",
|
|
||||||
})
|
|
||||||
books = append(books, Book{
|
|
||||||
Title: "TEST:",
|
|
||||||
Author: "QQQQQQQ",
|
|
||||||
})
|
|
||||||
return books
|
|
||||||
}
|
|
||||||
|
|
||||||
type Book struct {
|
|
||||||
Title string
|
|
||||||
Author string
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
package websiteapp
|
|
||||||
|
|
||||||
type WebDEApplication interface {
|
|
||||||
Render()
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user