Last active
February 12, 2022 20:06
-
-
Save davit312/23cc65609c923b55a3ab15759afbc886 to your computer and use it in GitHub Desktop.
Գրառման կաղապար films-hy.blogspot.com ֊ի համար
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Post maker</title> | |
<style> | |
*{ | |
font-size: 18px; | |
} | |
span{ | |
min-width: 180px; | |
display: inline-block; | |
} | |
input{ | |
width: 480px; | |
} | |
textarea{ | |
width: 60%; | |
height: 280px; | |
display: block; | |
} | |
</style> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js"></script> | |
</head> | |
<body> | |
<div id="app"> | |
<span>Անուն։</span> <input type="text" v-model="name" placeholder="Անուն"> <br> | |
<span>Տարի։</span> <input type="text" v-model="year" placeholder="Տարի"> <br> | |
<span>Նկար</span> <input type="text" v-model="image" placeholder="Նկար"> <br> | |
<span>IMDB</span> <input type="text" v-model="imdb" placeholder="imdb"> <a href="https://imdb.com/plugins" target="_blank">imdb</a> <br> | |
<span>Նվագարկիչ</span> <input type="text" v-model="player" placeholder="Տեսանյութ"> <br> | |
<span>Ներբեռնել</span> <input type="text" v-model="download" placeholder="Հասցե"> <br> | |
<button v-on:click="makeResult()" style="margin-left:575px">Կառուցել</button> | |
<div id="res" v-show="false"> | |
<div class="separator" style="clear: both; text-align: center;"> | |
<img border="0" :src="image" style="max-width:260px;max-height:320px;margin-left: 1em; margin-right: 1em;"/> | |
</div> | |
<br> | |
<b>Անուն</b>։ <span>{{name}}</span> <span v-html="imdb"></span> | |
<br> | |
<b>Տարի</b>։ {{year}} <br> | |
<br> | |
--more--<br> | |
<div v-html="player"></div> | |
<div v-if="download"><a :href="download" target="_blank">Ներբեռնել</a></div> | |
</div> | |
<textarea readonly v-html="result" v-show="result"></textarea> | |
</div> | |
<script> | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
name: '', | |
year: '', | |
image: '', | |
imdb: '', | |
player: '', | |
download: '', | |
result: '' | |
}, | |
methods: { | |
onPlayer: function(){ | |
console.log(55) | |
}, | |
makeResult: function(){ | |
this.player = this.player.replace(/width='.*?'/, 'width="100%"') | |
setTimeout(function(self){ | |
self.result = $('#res').html().trim() | |
self.result = self.result.replace('--more--', '<!--more-->') | |
self.result = self.result.replace('<', '<') | |
self.result = self.result.replace('>', '>') | |
}, 200, this) | |
} | |
} | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment