Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions components/manage-layers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ProjectLayers extends HTMLElement {
text-align: center;
margin: 10px 0;
font-size: 20px;
color: #007bff;
color: var(--interface-primary);
font-weight: bold;
text-transform: uppercase;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
Expand All @@ -41,11 +41,11 @@ class ProjectLayers extends HTMLElement {
margin: 0 auto;
}
.layer-card, .layer-card-outer {
background: #fff;
background: var(--white);
border-radius: 8px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
padding: 15px;
border-left: 5px solid #007bff;
border-left: 5px solid var(--interface-primary);
cursor: move;
user-select: none;
margin: 0 auto;
Expand All @@ -55,7 +55,7 @@ class ProjectLayers extends HTMLElement {
.label-input {
width: 70%;
padding: 5px;
border: 1px solid #ccc;
border: 1px solid var(--gray);
border-radius: 4px;
}
.layer-page {
Expand All @@ -80,7 +80,7 @@ class ProjectLayers extends HTMLElement {
.layer-div input {
width: 70%;
padding: 5px;
border: 1px solid #ccc;
border: 1px solid var(--gray);
border-radius: 4px;
}
.layer-label-div {
Expand All @@ -102,36 +102,36 @@ class ProjectLayers extends HTMLElement {
cursor: default;
}
.delete-layer {
background: #dc3545;
color: white;
background: var(--error-color);
color: var(--white);
width: 20%;
}
.delete-layer:hover {
background: #c82333;
filter: brightness(0.85);
}
.manage-pages {
background: #007bff;
color: white;
background: var(--interface-primary);
color: var(--white);
width: 20%;
}
.manage-pages:hover {
background: #0069d9;
background: var(--interface-primary-hover);
}
.add-layer {
background: #28a745;
color: white;
background: var(--success-color);
color: var(--white);
width: 20%;
}
.add-layer:hover {
background: #1e7e34;
filter: brightness(0.85);
}
.edit-pages {
background: #ffc107;
color: white;
background: var(--warning-color);
color: var(--white);
}
.save-label {
background: #007bff;
color: white;
background: var(--interface-primary);
color: var(--white);
}
.page-id {
margin: 0 auto;
Expand All @@ -144,8 +144,8 @@ class ProjectLayers extends HTMLElement {
}
.delete-page {
margin-top: 0;
background: #dc3545;
color: white;
background: var(--error-color);
color: var(--white);
}
.layer-actions-margin {
margin-top: 20px;
Expand Down
24 changes: 12 additions & 12 deletions components/manage-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class ManagePages extends HTMLElement {
margin: 0 auto;
}
.layer-card, .layer-card-outer {
background: #fff;
background: var(--white);
border-radius: 8px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
padding: 15px;
border-left: 5px solid #007bff;
border-left: 5px solid var(--interface-primary);
cursor: move;
user-select: none;
margin: 0 auto;
Expand All @@ -42,7 +42,7 @@ class ManagePages extends HTMLElement {
.label-input {
width: 70%;
padding: 5px;
border: 1px solid #ccc;
border: 1px solid var(--gray);
border-radius: 4px;
}
.layer-page {
Expand Down Expand Up @@ -74,20 +74,20 @@ class ManagePages extends HTMLElement {
cursor: default;
}
.manage-pages {
background: #007bff;
color: white;
background: var(--interface-primary);
color: var(--white);
width: 100%;
}
.manage-pages:hover {
background: #0069d9;
background: var(--interface-primary-hover);
}
.edit-pages {
background: #ffc107;
color: white;
background: var(--warning-color);
color: var(--white);
}
.save-label {
background: #007bff;
color: white;
background: var(--interface-primary);
color: var(--white);
}
.hidden {
display: none;
Expand Down Expand Up @@ -155,7 +155,7 @@ class ManagePages extends HTMLElement {
el.style.borderLeft = "none"
}
else{
el.style.borderLeft = "5px solid #007bff"
el.style.borderLeft = "5px solid var(--interface-primary)"
}
})
})
Expand Down Expand Up @@ -353,7 +353,7 @@ class ManagePages extends HTMLElement {
// Set the current element's new index property
el.dataset.index = i
}
el.style.borderLeft = "5px solid #007bff"
el.style.borderLeft = "5px solid var(--interface-primary)"
})
layerCardOuter.querySelectorAll("button").forEach(button => button.removeAttribute("disabled"))
saveButton.innerText = "Save Pages"
Expand Down
5 changes: 5 additions & 0 deletions interfaces/manage-layers/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Manage Layers Interface Styles */
tpen-card::part(card-body) {
margin-bottom: 3.5em;
min-height: 400px;
}
35 changes: 35 additions & 0 deletions interfaces/manage-layers/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Manage Layers and Pages
permalink: /project/manage/layers
---

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manage Layers and Pages</title>
<script type="module" src="../../components/gui/site/index.js"></script>
<script type="module" src="../../components/gui/card/Card.js"></script>
<script type="module" src="../../components/manage-layers/index.js"></script>
<script type="module" src="../../components/manage-pages/index.js"></script>
<script type="module" src="../../components/check-permissions/permission-match-element.js"></script>
<script type="module" src="../../components/explanatory-guide/fixedGuideComponent.js"></script>
<link rel="stylesheet" href="../../interfaces/manage-layers/index.css">
</head>
<body>
<tpen-page>
<tpen-fixed-explanatory-guide heading="Manage Layers and Pages">
<li>TODO: Re-order layers by dragging and dropping to swap positions.</li>
<li>CANDO: Re-order the Pages of a Layer by dragging and dropping to swap positions.</li>
<li>You can also change the label of any page or layer. Click 'manage pages' on a layer to start.</li>
</tpen-fixed-explanatory-guide>
<tpen-card>
<h2 slot="header">Layers and Pages</h2>
<div slot="body">
<tpen-manage-layers></tpen-manage-layers>
</div>
</tpen-card>
</tpen-page>
</body>
</html>
2 changes: 1 addition & 1 deletion interfaces/manage-project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TPEN.eventDispatcher.on('tpen-project-loaded', () => {

const manageLayersBtn = document.getElementById('manage-layers-btn')
if (manageLayersBtn) {
manageLayersBtn.href = `/components/manage-layers/index.html?projectID=${projectID}`
manageLayersBtn.href = `/project/manage/layers?projectID=${projectID}`
}

const manageProjectOptionsBtn = document.getElementById('manage-project-options-btn')
Expand Down