Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
273 changed files
with
553 additions
and
729 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
node_modules | ||
.sass-cache | ||
.idea | ||
bower | ||
dist | ||
|
||
.vagrant/ | ||
node_modules/ | ||
.sass-cache/ | ||
.idea/ | ||
vendor/ | ||
bower/ | ||
dist/ | ||
composer.phar | ||
.DS_Store | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AddDefaultCharset UTF-8 | ||
RewriteEngine on | ||
|
||
RewriteRule ^([a-z]+)$ index.php?lang=$1 [QSA] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#-*- mode: ruby -*- | ||
#vi: set ft=ruby : | ||
|
||
Vagrant.configure(2) do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
config.vm.network "private_network", ip: "188.166.18.208" | ||
config.vm.hostname = "filimonow.ru" | ||
config.vm.synced_folder "~/Documents/Projects/Frontend/Watermark-Generator", "/var/www/WatermarkGen", :mount_options => ["dmode=777", "fmode=666"] | ||
config.vm.provision :shell, path: "confs/provision.sh" | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"authors": [ | ||
{ | ||
"name": "andrefilimono", | ||
"email": "andrefilimono@gmail.com" | ||
} | ||
], | ||
"require": { | ||
"smottt/wideimage": ">=1.1.1" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
sudo su | ||
apt-get update | ||
apt-get upgrade | ||
apt-get install -y git | ||
apt-get install -y apache2 | ||
apt-get install -y php5 | ||
apt-get install -y libapache2-mod-php5 | ||
apt-get install -y php5-mcrypt | ||
apt-get install -y php5-gd | ||
apt-get install -y ruby | ||
apt-get install -y ruby-dev | ||
apt-get install -y nodejs | ||
apt-get install -y npm | ||
ln -s /usr/bin/nodejs /usr/bin/node | ||
npm install -g bower | ||
|
||
# Install php requirement | ||
cd /var/www/WatermarkGen/ | ||
curl -sS https://getcomposer.org/installer | php | ||
php composer.phar install | ||
|
||
# Install frontend requirements | ||
npm install | ||
bower install --allow-root | ||
gem install compass | ||
|
||
# Setup apache | ||
cp confs/watermarkGen.conf /etc/apache2/sites-available/watermarkGen.conf | ||
ln -s /etc/apache2/sites-available/watermarkGen.conf /etc/apache2/sites-enabled/watermarkGen.conf | ||
apachectl restart | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<VirtualHost *:80> | ||
ServerAdmin admin@watergen.com | ||
ServerName filimonow.ru | ||
ServerAlias www.filimonow.ru | ||
DocumentRoot /var/www/WatermarkGen/ | ||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
</VirtualHost> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?php | ||
session_start(); | ||
include_once 'php/config.php'; | ||
include_once 'php/functions.php'; | ||
include_once 'php/lang.php'; | ||
|
||
$lang_param = $_GET['lang']; | ||
if($lang_param) { | ||
$_SESSION['lang'] = $lang_param; | ||
} | ||
|
||
$current_language = $_SESSION['lang']; | ||
if(!$current_language || !$lang[$current_language]) { | ||
$_SESSION['lang'] = $default_language; | ||
$current_language = $default_language; | ||
} | ||
|
||
$text = $lang[$current_language]; | ||
?> | ||
|
||
<html lang="ru-RU"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="description" content="Сервис для генерации водяных знаков"> | ||
<title><?php echo $text['title'] ?></title> | ||
</head> | ||
<body> | ||
<!-- Заголовок --> | ||
<div><?php echo $text['title'] ?></div> | ||
|
||
<!-- Настройки --> | ||
<div class="controls-title"><?php echo $text['settings'] ?> | ||
|
||
<form class="form" method="post" action="php/download.php" enctype="multipart/form-data"> | ||
|
||
<!-- Исходное изображение --> | ||
<div class="form__group"> | ||
<label class="form__label original-image"> | ||
<?php echo $text['image'] ?> | ||
<input name="original-image" type="file"> | ||
</label> | ||
</div> | ||
|
||
<!-- Водяной знак --> | ||
<div class="form__group"> | ||
<label class="form__label watermark-image"> | ||
<?php echo $text['watermark'] ?> | ||
<input name="watermark-image" type="file"> | ||
</label> | ||
</div> | ||
|
||
<!-- Позиция --> | ||
<div class="form__group"> | ||
<div class="placement"> | ||
<label class="form__label place-title"><?php echo $text['position'] ?></label> | ||
<input name="origin-x" type="text" placeholder="<?php echo $text['origin-x'] ?>"> | ||
<input name="origin-y" type="text" placeholder="<?php echo $text['origin-y'] ?>"> | ||
</div> | ||
</div> | ||
|
||
<!-- Прозрачность --> | ||
<div class="form__group"> | ||
<label class="input-group__label transparency-title"><?php echo $text['transparency'] ?></label> | ||
<input name="transparency" type="text" placeholder="<?php echo $text['transparency'] ?>"> | ||
</div> | ||
|
||
<!-- Замощение: да/нет --> | ||
<div class="form__group"> | ||
<input type="radio" name="is-pattern" value="true"> Pattern | ||
<input type="radio" name="is-pattern" value="false"> Non pattern | ||
</div> | ||
|
||
<!-- Сабмит/Ресет --> | ||
<div class="btn__box"> | ||
<button type="reset" class="btn btn__clear"><?php echo $text["reset"] ?></button> | ||
<button type="submit" class="btn btn__save"><?php echo $text["download"] ?></button> | ||
</div> | ||
|
||
</form> | ||
|
||
</div> | ||
|
||
<!-- Смена языка --> | ||
<a href="ru">RU</a> | ||
<a href="en">EN</a> | ||
|
||
<!-- Лайк --> | ||
<a id="vk-share" href="">VK</a> | ||
<a id="fb-share" href="">FB</a> | ||
<a id="tw-share" href="">TW</a> | ||
|
||
<!-- Футер --> | ||
<footer class="footer"> | ||
<div class="footer-wrap"> | ||
<div class="footer-copi">© 2015, <?php echo $text["copyright"] ?></div> | ||
</div> | ||
</footer> | ||
|
||
<script src="bower/jquery/jquery.min.js"></script> | ||
<script src="js/share.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
;var share = (function(){ | ||
'use strict'; | ||
|
||
var _options = { | ||
'url': 'http://www.filimonow.ru', | ||
'title': document.title, | ||
'description': $('meta[name="description"]').attr('content'), | ||
'image': 'http://www.filimonow.ru/img/site.jpg', | ||
'noparse': true, | ||
'display': 'page', | ||
'fb_id': '964296000282885' | ||
|
||
}; | ||
|
||
var _encode = function () { | ||
for(var key in _options) { | ||
_options[key] = encodeURIComponent(_options[key]); | ||
} | ||
}; | ||
|
||
var _setUpListeners = function () { | ||
$('#vk-share').on('click', _vkShare); | ||
$('.fb-share').on('click', _fbShare); | ||
$('#tw-share').on('click', _twShare); | ||
}; | ||
|
||
var _vkShare = function (event) { | ||
event.preventDefault(); | ||
|
||
var url = 'http://vk.com/share.php?'; | ||
url += ('url=' + _options['url']); | ||
url += ('&title=' + _options['title']); | ||
url += ('&description=' + _options['description']); | ||
url += ('&image=' + _options['image']); | ||
url += ('&noparse=' + _options['noparse']); | ||
_openWindow(url); | ||
}; | ||
|
||
var _fbShare = function (event) { | ||
event.preventDefault(); | ||
|
||
var url = 'https://www.facebook.com/dialog/feed?'; | ||
url += ('app_id=' + _options['fb_id']); | ||
url += ('&display=' + _options['display']); | ||
url += ('&link=' + _options['url']); | ||
url += ('&name=' + _options['title']); | ||
url += ('&description=' + _options['description']); | ||
url += ('&picture=' + _options['image']); | ||
url += ('&redirect_uri=' + _options['url']); | ||
_openWindow(url); | ||
}; | ||
|
||
var _twShare = function (event) { | ||
event.preventDefault(); | ||
|
||
var url = 'https://twitter.com/share?'; | ||
url += ('url=' + _options['url']); | ||
url += ('&text=' + _options['description']); | ||
_openWindow(url); | ||
}; | ||
|
||
var _openWindow = function (url) { | ||
window.open(url, '_blank'); | ||
}; | ||
|
||
return { | ||
init: function(options) { | ||
_options = options || _options; | ||
_setUpListeners(); | ||
_encode(); | ||
} | ||
} | ||
})(); | ||
|
||
if ($('a[id^="share"]')) { | ||
share.init(); | ||
} | ||
|
||
|
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
Empty file.
Oops, something went wrong.