BB tag more with images #7

Merged
alpha6 merged 1 commit from more_bb_tag into master 2017-08-03 08:48:50 +03:00
4 changed files with 53 additions and 18 deletions

View file

@ -1,16 +1,40 @@
.progress-bar {
height: 18px;
background: green;
}
.foto-block {
/* border: 1px solid black; */
}
.foto-block .image {
padding: 5px;
}
.foto-block .foto-notes {
padding: 5px;
}
.copy-img {
content:url(/img/copy_icon.png);
content: url(/img/copy_icon.png);
width: 32px;
height: 32px;
overflow: hidden;
cursor: pointer;
position: relative;
}
.copy-bb-more {
content: url(/img/more_icon.ico);
width: 32px;
height: 32px;
overflow: hidden;
cursor: pointer;
position: relative;
}
.image-scale {
float: left;
padding-right: 5px;
position: relative;
}

BIN
public/img/more_icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

View file

@ -28,7 +28,7 @@
</div>
<div id="progress">
<div class="bar" style="width: 0%;"></div>
<div class="progress-bar" style="width: 0%;"></div>
</div>
<div id="lastUploadLog"></div>
</div>
@ -39,15 +39,33 @@
<div class="foto-block row" v-for="image in imagesList">
<div class="image col-md-3">
<img v-bind:src="image.thumbnail_url">
<div class="image_title">{{ image.filename }}</div>
<div class="image_title">
{{ image.filename }}
</div>
</div>
<div class="foto-notes col-md-3">
<ul>
<li><a v-bind:href="image.original_url">Original</a> <div @click="copyText" class="copy-img">{{ hostname+image.original_url }}</div></li>
<li v-for="scale in image.scales">
<a v-bind:href="scale.url">{{ scale.size }}</a> <div @click="copyText" class="copy-img">{{ hostname+scale.url }}</div>
</li>
</ul>
<div class="image-scale image-original">
<div class="image-scale-url">
<a v-bind:href="image.original_url">Original</a>
</div>
<div @click="copyText" class="copy-img">
&lt;img src={{ hostname+image.original_url }}&gt;
</div>
<div @click="copyText" class="copy-bb-more">
[MORE=&lt;img src={{ hostname+image.thumbnail_url }}&gt;]&lt;img src={{ hostname+image.original_url }}&gt;[/MORE]
</div>
</div>
<div class="image-scale" v-for="scale in image.scales">
<div class="image-scale-url">
<a v-bind:href="scale.url">{{ scale.size }}</a>
</div>
<div @click="copyText" class="copy-img">
&lt;img src={{ hostname+scale.url }}&gt;
</div>
<div @click="copyText" class="copy-bb-more">
[MORE=&lt;img src={{ hostname+image.thumbnail_url }}&gt;]&lt;img src={{ hostname+scale.url }}&gt;[/MORE]
</div>
</div>
</div>
</div>
</div>
@ -83,7 +101,7 @@
//TODO: rewrite it to vue/JS from jquery
var $temp = $("<input>");
$("body").append($temp);
$temp.val("<img src="+$(event.target).text()+">").select();
$temp.val($(event.target).text()).select();
document.execCommand("copy");
$temp.remove();
},

View file

@ -15,13 +15,6 @@
<link rel="stylesheet" href="/css/main.css">
<script src="https://vuejs.org/js/vue.min.js"></script>
<style>
.bar {
height: 18px;
background: green;
}
</style>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">