Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Memorekall Member New
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Commits
2de7a3d0
Verified
Commit
2de7a3d0
authored
Feb 8, 2022
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Group items by category with background color in mosaic
parent
f3dd4b72
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!55
demo version for Clarisse workshop
,
!50
Open edit popup on click on mosaic
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
capsule-prototype/create.zip
+0
-0
0 additions, 0 deletions
capsule-prototype/create.zip
capsule-prototype/css/online-theme.css
+5
-1
5 additions, 1 deletion
capsule-prototype/css/online-theme.css
capsule-prototype/js/online-script.js
+4
-6
4 additions, 6 deletions
capsule-prototype/js/online-script.js
with
9 additions
and
7 deletions
capsule-prototype/create.zip
+
0
−
0
View file @
2de7a3d0
No preview for this file type
This diff is collapsed.
Click to expand it.
capsule-prototype/css/online-theme.css
+
5
−
1
View file @
2de7a3d0
...
@@ -321,10 +321,13 @@ html, body {
...
@@ -321,10 +321,13 @@ html, body {
margin
:
2vh
0
1.5vh
0
;
margin
:
2vh
0
1.5vh
0
;
}
}
#popupMosaicMosaic
{
.mosaic_category
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fit
,
minmax
(
125px
,
1fr
));
grid-template-columns
:
repeat
(
auto-fit
,
minmax
(
125px
,
1fr
));
grid-auto-rows
:
150px
;
grid-auto-rows
:
150px
;
border-radius
:
3px
;
padding
:
1.0em
1vw
;
margin
:
2vh
0
1.5vh
0
;
}
}
.mosaic_item
img
{
.mosaic_item
img
{
...
@@ -335,6 +338,7 @@ html, body {
...
@@ -335,6 +338,7 @@ html, body {
text-align
:
center
;
text-align
:
center
;
/* The width of the container also implies margin around the images. */
/* The width of the container also implies margin around the images. */
width
:
100px
;
width
:
100px
;
margin
:
2vh
0
1.5vh
0
;
}
}
.mosaic_item
.caption
{
.mosaic_item
.caption
{
display
:
block
;
display
:
block
;
...
...
This diff is collapsed.
Click to expand it.
capsule-prototype/js/online-script.js
+
4
−
6
View file @
2de7a3d0
...
@@ -819,11 +819,6 @@ function openMosaic() {
...
@@ -819,11 +819,6 @@ function openMosaic() {
let
path
=
Utils
.
getPreviewPath
(
tagOrDoc
);
let
path
=
Utils
.
getPreviewPath
(
tagOrDoc
);
let
name
=
tagOrDoc
.
getMetadata
(
"
Rekall->Name
"
);
let
name
=
tagOrDoc
.
getMetadata
(
"
Rekall->Name
"
);
let
type
=
tagOrDoc
.
getMetadata
(
"
Rekall->Type
"
);
let
type
=
tagOrDoc
.
getMetadata
(
"
Rekall->Type
"
);
let
color
=
tagOrDoc
.
color
;
console
.
log
(
name
);
console
.
log
(
type
);
console
.
log
(
color
);
console
.
log
(
path
);
if
(
typeof
path
===
'
undefined
'
)
{
if
(
typeof
path
===
'
undefined
'
)
{
if
(
type
==
'
rekall/link
'
)
{
if
(
type
==
'
rekall/link
'
)
{
url
=
"
../shared/css/images/img-link.png
"
;
url
=
"
../shared/css/images/img-link.png
"
;
...
@@ -833,7 +828,7 @@ function openMosaic() {
...
@@ -833,7 +828,7 @@ function openMosaic() {
}
else
{
}
else
{
url
=
path
;
url
=
path
;
}
}
return
'
<div class="mosaic_item
style="background:
'
+
color
+
'
"><img src="
'
+
url
+
'
"></img><span class="caption">
'
+
name
+
'
</span></div>
'
;
return
'
<div class="mosaic_item "><img src="
'
+
url
+
'
"></img><span class="caption">
'
+
name
+
'
</span></div>
'
;
return
'
<div class="mosaic_item"><img src="../shared/css/images/img-
'
+
type
+
'
.png"></img><span class="caption">
'
+
text
+
'
</span></div>
'
;
return
'
<div class="mosaic_item"><img src="../shared/css/images/img-
'
+
type
+
'
.png"></img><span class="caption">
'
+
text
+
'
</span></div>
'
;
}
}
...
@@ -841,9 +836,12 @@ function openMosaic() {
...
@@ -841,9 +836,12 @@ function openMosaic() {
$
(
"
#popupMosaicSpace
"
).
show
();
$
(
"
#popupMosaicSpace
"
).
show
();
// TODO is there a better way to iterate over tags or documents ?
// TODO is there a better way to iterate over tags or documents ?
for
(
[
k
,
v
]
of
Object
.
entries
(
rekall
.
sortings
.
colors
.
categories
))
{
for
(
[
k
,
v
]
of
Object
.
entries
(
rekall
.
sortings
.
colors
.
categories
))
{
let
color
=
v
.
color
;
html
+=
'
<div class="mosaic_category" style="background:
'
+
color
+
'
">
'
;
for
(
let
i
in
v
.
tags
){
for
(
let
i
in
v
.
tags
){
html
+=
getMosaicItemHtml
(
v
.
tags
[
i
]);
html
+=
getMosaicItemHtml
(
v
.
tags
[
i
]);
}
}
html
+=
'
</div>
'
;
}
}
console
.
log
(
html
);
console
.
log
(
html
);
$
(
'
#popupMosaicMosaic
'
).
html
(
html
);
$
(
'
#popupMosaicMosaic
'
).
html
(
html
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment