close £6
parent
a170e8797e
commit
fb4118f0d4
|
@ -693,14 +693,28 @@ header div:nth-child(2) {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#listing .item:hover .checkbox {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
#listing .item .checkbox {
|
#listing .item .checkbox {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: -.9em;
|
||||||
right: 0;
|
right: -.9em;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #000;
|
background: #fff;
|
||||||
border: 0;
|
border: 0;
|
||||||
-webkit-appearance: initial;
|
-webkit-appearance: initial;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .12);
|
||||||
|
line-height: 0;
|
||||||
|
padding: .4em;
|
||||||
|
transition: .2s ease all;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#listing .checkbox i {
|
||||||
|
font-size: 1em;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item:hover {
|
.item:hover {
|
||||||
|
|
|
@ -286,14 +286,15 @@ var backEvent = function(event) {
|
||||||
|
|
||||||
// Handles the click event
|
// Handles the click event
|
||||||
var itemClickEvent = function(event) {
|
var itemClickEvent = function(event) {
|
||||||
var url = this.getElementsByTagName('a')[0].getAttribute('href');
|
var url = this.dataset.href;
|
||||||
|
var el = document.getElementById(url);
|
||||||
|
|
||||||
if (selectedItems.length != 0) event.preventDefault();
|
if (selectedItems.length != 0) event.preventDefault();
|
||||||
if (selectedItems.indexOf(url) == -1) {
|
if (selectedItems.indexOf(url) == -1) {
|
||||||
this.classList.add('selected');
|
el.classList.add('selected');
|
||||||
selectedItems.push(url);
|
selectedItems.push(url);
|
||||||
} else {
|
} else {
|
||||||
this.classList.remove('selected');
|
el.classList.remove('selected');
|
||||||
selectedItems.removeElement(url);
|
selectedItems.removeElement(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +413,7 @@ document.addEventListener('listing', event => {
|
||||||
document.getElementById("view").addEventListener("click", viewEvent);
|
document.getElementById("view").addEventListener("click", viewEvent);
|
||||||
|
|
||||||
// Add event to items
|
// Add event to items
|
||||||
let items = document.getElementsByClassName('item');
|
let items = document.getElementsByClassName('checkbox');
|
||||||
Array.from(items).forEach(link => {
|
Array.from(items).forEach(link => {
|
||||||
link.addEventListener('click', itemClickEvent);
|
link.addEventListener('click', itemClickEvent);
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{{ if ne $lnk ""}}
|
{{ if ne $lnk ""}}
|
||||||
<a href="{{ $lnk }}">
|
<a href="{{ $lnk }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="action{{ if eq $lnk " "}} disabled{{ end }}" id="prev">
|
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
|
||||||
<i class="material-icons">subdirectory_arrow_left</i>
|
<i class="material-icons">subdirectory_arrow_left</i>
|
||||||
</div>
|
</div>
|
||||||
{{ if ne $lnk ""}}
|
{{ if ne $lnk ""}}
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ if eq .Config.BaseURL " " }}/{{ else }}{{ .Config.BaseURL }}{{ end }}">
|
<a href="{{ if eq .Config.BaseURL "" }}/{{ else }}{{ .Config.BaseURL }}{{ end }}">
|
||||||
{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}
|
{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}
|
||||||
</a>
|
</a>
|
||||||
{{ if ne .Name "/"}}
|
{{ if ne .Name "/"}}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<span class="checkbox"></div>
|
<span class="checkbox" data-href="{{.URL}}"><i class="material-icons">check</i></div>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue