-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NOISSUE - Implement muuri grid system (#91)
* implement muuri grid system Signed-off-by: ianmuchyri <[email protected]> * enable removal of a widget from the dashboard Signed-off-by: ianmuchyri <[email protected]> * add modal for collecting details Signed-off-by: ianmuchyri <[email protected]> * add license header Signed-off-by: ianmuchyri <[email protected]> * add validation to dashboard endpoint Signed-off-by: ianmuchyri <[email protected]> * fix logging.go error Signed-off-by: ianmuchyri <[email protected]> * add json object sample Signed-off-by: ianmuchyri <[email protected]> * add modals for linechart and gauge Signed-off-by: ianmuchyri <[email protected]> * enable edit and disable edit of canvas Signed-off-by: ianmuchyri <[email protected]> * move content to separate files move javascript and css to separate files Signed-off-by: ianmuchyri <[email protected]> * remove unused argument Signed-off-by: ianmuchyri <[email protected]> * add empty line Signed-off-by: ianmuchyri <[email protected]> --------- Signed-off-by: ianmuchyri <[email protected]>
- Loading branch information
1 parent
380d8c4
commit fe4c36f
Showing
13 changed files
with
706 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// To be Deleted. This is simulating the charts that we are going to get from the backend. | ||
package ui | ||
|
||
type Item struct { | ||
Id int `json:"id"` | ||
Title string `json:"title"` | ||
Content string `json:"content"` | ||
Image string `json:"image"` | ||
Widget string `json:"widget"` | ||
} | ||
|
||
func CreateItem() []Item { | ||
items := []Item{ | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image1.jpg", | ||
Widget: "lineChart", | ||
}, | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image2.jpg", | ||
Widget: "lineChart", | ||
}, | ||
{ | ||
Title: "Guage", | ||
Content: "This is a small sentence about a guage", | ||
Image: "https://example.com/image3.jpg", | ||
Widget: "gauge", | ||
}, | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image4.jpg", | ||
Widget: "lineChart", | ||
}, | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image5.jpg", | ||
Widget: "lineChart", | ||
}, | ||
{ | ||
Title: "Guage", | ||
Content: "This is a small sentence about a guage", | ||
Image: "https://example.com/image6.jpg", | ||
Widget: "gauge", | ||
}, | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image7.jpg", | ||
Widget: "lineChart", | ||
}, | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image8.jpg", | ||
Widget: "lineChart", | ||
}, | ||
{ | ||
Title: "Guage", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image9.jpg", | ||
Widget: "gauge", | ||
}, | ||
{ | ||
Title: "Line Chart", | ||
Content: "This is a small sentence about a line chart", | ||
Image: "https://example.com/image10.jpg", | ||
Widget: "lineChart", | ||
}, | ||
} | ||
|
||
return items | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* Copyright (c) Abstract Machines | ||
SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
.grid { | ||
position: relative; | ||
} | ||
|
||
.item { | ||
display: block; | ||
position: absolute; | ||
margin: 5px; | ||
z-index: 1; | ||
background: #d2cece; | ||
padding: 1rem; | ||
} | ||
|
||
.item.muuri-item-dragging { | ||
z-index: 3; | ||
} | ||
|
||
.item.muuri-item-releasing { | ||
z-index: 2; | ||
} | ||
|
||
.item.muuri-item-hidden { | ||
z-index: 0; | ||
} | ||
|
||
.item-content { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.no-opacity { | ||
opacity: 0 !important; | ||
} | ||
|
||
.item-editable { | ||
border: 1px solid #000000; | ||
} |
Oops, something went wrong.