telegram-crawler/data/instantview.telegram.org/templates.html

254 lines
13 KiB
HTML
Raw Normal View History

2022-02-24 19:51:11 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Templates - Instant View</title>
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="alternate icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
2022-03-18 20:48:38 +01:00
<link href="/css/telegram.css?224" rel="stylesheet">
2022-02-24 19:51:11 +01:00
<link href="/css/instantview.css?115" rel="stylesheet">
</head>
<body class="no-transition">
<header>
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="header-wrap">
<div id="header-panel" class="header-panel">
<div class="header-breadcrumb header-breadcrumb-simple">
<ol id="breadcrumb" class="header-nav breadcrumb"><li class="iv-logo"><a href="/"><i class="iv-icon"></i><span class="iv-logo-title">Instant View</span></a></li><li class="active">Templates</li></ol>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<main class="rules container">
<div class="row">
<div class="col-sm-3 col-sm-push-9 col-lg-offset-1 col-lg-3 col-lg-push-7">
<section class="nav-menu">
<ul class="nav nav-pills nav-stacked"><li><a href="/">Intro</a></li><li class="active"><a href="/templates">Templates</a><div id="dev_side_nav_cont"></div></li><li><a href="/checklist">Checklist</a></li><li><a href="/contest/winners2017">2017 Contest Winners</a></li><li><a href="/contest/winners2019">2019 Contest Winners</a></li><li class="divider"></li><li><a href="/samples/">Sample Templates</a></li><li><a href="/my/" data-need-auth>My Templates</a></li><li><a href="/docs">Manual</a></li></ul>
<div class="nav-footer">
<a class="logged-link" href="/auth" data-need-auth>Login</a>
<span class="logged">
<span class="logged-label">Hello, anonymous&#33;</span>
</span>
</div>
</section>
</div>
<div class="col-sm-9 col-sm-pull-3 col-lg-7 col-lg-pull-3">
<div class="content">
<section>
<h3>Templates</h3>
<p class="about-text">Enter any article URL to check the currently active Instant View template for issues or create a new template if Instant View is not yet supported for the website.</p>
</section>
<div class="list-group-contest">
<div class="list-group-contest-header">
<div class="contest-item-domain"><span class="cell-sort sort-active sort-asc" data-sort-by="domain">Domain<span class="sort-marker"></span></span>
</div>
<div class="contest-item-info has-candidate has-info">
<span class="contest-item-cell contest-item-templates">Template</span><!--
--><span class="contest-item-cell templates-item-date"><span class="cell-sort" data-sort-by="date">Last Update<span class="sort-marker"></span></span></span>
</div>
</div>
<div class="domain-filter-wrap templates-filter-wrap">
<form class="templates-filter-form" novalidate>
<input class="form-control templates-filter-input input-lg" type="url" name="url" placeholder="Enter domain name or link to any article..." autocomplete="off"/>
</form>
</div>
<div class="list-group-contest-rows templates-list">
2022-03-24 12:19:10 +01:00
<div class="list-group-contest-item-empty">No active domains found</div>
2022-02-24 19:51:11 +01:00
</div>
</div>
</div>
</div>
</div>
</main><div class="popup-container login-popup-container hide" id="login-popup-container">
<div class="popup">
<div class="popup-body">
<section>
<h2>Log In</h2>
<p>Log in here to create Instant View templates. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
<div id="login-alert"></div>
<form id="send-form" class="login-form" onsubmit="return requestConfirmation(event);">
<div class="form-group">
<input type="tel" class="form-control iv-form-control input-lg" id="phone-number" placeholder="+12223334455" autocomplete="off"/>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><!--
--><button type="submit" class="btn btn-link btn-lg">Next</button>
</div>
</form>
<div id="login-form" class="hide">
<div class="form-group">
<span class="form-control iv-form-control input input-lg input-disabled"><strong id="phone-number-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
<p class="help-block dots-animated">We&#39;ve just sent you a message.<br/>Please confirm access via Telegram</p>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><!--
--><a class="btn btn-link btn-lg login-back">Back</a>
</div>
</div>
</section>
</div>
</div>
</div>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery-ex.js?11"></script>
<script src="/js/instantview.js?72"></script>
<script>App={"baseUrl":"\/api\/templates?hash=telegram-crawler","frameOrigin":"https:\/\/ivwebcontent.telegram.org","lang":{"delete_url_confirmation":"Are you sure you want to stop tracking this URL?","delete_url_confirm_button":"Delete","not_ready_for_contest_alert":"Sorry, this template covers too few article URLs that generate <b>valid Instant View pages<\/b> to enter the contest.<br\/><br\/>Please add at least <b>10 different URLs<\/b> from this website to your template and press <b>Track Changes<\/b> on each of them to make sure they are <a href=\"https:\/\/instantview.telegram.org\/checklist\">processed correctly<\/a> and generate valid pages.","submit_for_contest_confirmation":"Are you sure you want to submit this template for the contest?<br\/><br\/><b>NEW&#33;<\/b> Check out the <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/contest\/\/links\">list of potentially problematic links<\/a> for <b><\/b> and make sure that your template satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.<br\/><br\/>You can resubmit a fixed version later, but it will lose its place at the top of the list. All resubmissions will be considered new templates for the purposes of determining the winner.","submit_for_contest_confirm_button":"Confirm","submit_template_confirmation":"Are you sure you want to submit this template? <br\/>Make sure that your template satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.<br\/><br\/>Note that it will <b>not<\/b> participate in contest.","submit_template_confirm_button":"Confirm","revoke_from_contest_confirmation":"Are you sure you want to revoke this template from the contest? You can resubmit a new version later, but your template will lose its place at the top of the list.","revoke_from_contest_confirm_button":"Revoke","revoke_template_confirmation":"Are you sure you want to revoke this template?<br\/><br\/>Note that it does <b>not<\/b> participate in contest.","revoke_template_confirm_button":"Revoke","resubmit_for_contest_confirmation":"Are you sure you want to resubmit this template for the contest? Your previous template will lose its place at the top of the list. <br\/><br\/><b>NEW&#33;<\/b> Check out the <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/contest\/\/links\">list of potentially problematic links<\/a> for <b><\/b> and make sure that your new version satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.","resubmit_for_contest_confirm_button":"Confirm","resubmit_template_confirmation":"Are you sure you want to resubmit this template? <br\/>Make sure that your template satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.<br\/><br\/>Note that it will <b>not<\/b> participate in contest.","resubmit_template_confirm_button":"Confirm"}};
$(window).resize(updateNavBar);updateNavBar();
initTemplatesList({
2022-03-24 12:19:10 +01:00
init_items: {"items":[],"next_offset":false},
2022-02-24 19:51:11 +01:00
prepareItem: function(item) {}
}, {
itemClass: 'list-group-contest-item',
onEnter: function(query) {
if (query) {
location.href = '/templates/?url=' + encodeURIComponent(query);
}
},
renderItem: function(item, query) {
var section_name = item.domain;
var rules_num = item.num;
var template_str = "Template #{n}".replace('{n}', rules_num);
var date_str = ivFormatDate(item.date);
return '<div class="contest-item-domain"><a href="/templates/' + section_name + '/">' + section_name + '</a></div><div class="contest-item-info"><span class="contest-item-cell contest-item-templates"><a href="/templates/' + section_name + '/template' + rules_num + '">' + template_str + '</a></span><span class="contest-item-cell templates-item-date">' + date_str + '</span></div>';
},
renderLoading: function() {
return '<div class="list-group-contest-item-empty dots-animated">Loading</div>';
},
renderNoItems: function(query) {
if (App.templatesListIsLoading) {
return '<div class="list-group-contest-item-empty dots-animated">Loading</div>';
}
return '<div class="list-group-contest-item-empty">No active domains found</div>';
},
appendToItems: function(query, result_count) {
if (App.templatesListIsLoading && result_count > 0) {
return '<div class="list-group-contest-item-empty dots-animated">Loading</div>';
}
return '';
}
});
$('.domain-filter').keydown(function(e) {
var filter = $(this);
var group = filter.parents('.list-group-contest');
setTimeout(function() {
var value = filter.val().toLowerCase();
var matches = value.match(/^(https?:\/\/)?(.*?)(\/|$)/i);
if (matches && matches[2]) {
value = matches[2];
}
var count = 0;
$('.list-group-contest-item', group).map(function() {
var el = $(this);
var domain = el.attr('data-domain').toLowerCase();
var filtered = !value || (domain.indexOf(value) >= 0);
el.toggleClass('hide', !filtered);
if (filtered) count++;
});
$('.list-group-contest-item-empty', group).toggleClass('hide', !!count);
}, 10);
});
$('.domain-order').click(function(e) {
e.preventDefault();
var btn = $(this);
var group = btn.parents('.list-group-contest');
group.toggleClass('order-desc');
});
function showLoginError(error_text) {
$('#login-alert').html('<div class="alert alert-danger"> <a class="close" data-dismiss="alert" href="#">×</a>' + error_text + ' </div>').show();
}
function requestConfirmation(event) {
event.preventDefault();
$('#login-alert').hide();
var phone = $('#phone-number').val();
$.ajax({
type: 'POST',
url: '/auth/request',
data: {
phone: phone
},
success: function(result) {
$('#phone-number-field').text(phone);
$('#send-form').addClass('hide');
$('#login-form').removeClass('hide');
checkAuth(result.temp_session);
},
error: function(xhr) {
showLoginError(xhr.responseText || 'Server error');
},
dataType: 'json'
});
return false;
}
function cancelConfirmation(event) {
event && event.preventDefault();
$('#login-alert').hide();
$('#phone-number-field').text('');
$('#send-form').removeClass('hide');
$('#login-form').addClass('hide');
$('#phone-number').focus();
clearTimeout(window.authTimeout);
return false;
}
function checkAuth(temp_session) {
clearTimeout(window.authTimeout);
window.authTimeout = setTimeout(function doCheckAuth() {
$.ajax({
type: 'POST',
url: '/auth/login',
data: {
temp_session: temp_session
},
success: function(result) {
if (result) {
location.reload();
} else {
checkAuth(temp_session);
}
},
error: function (xhr) {
showLoginError(xhr.responseText || 'Server error');
},
dataType: 'json'
});
}, 700);
}
$('#login-popup-container').on('popup:open', function() {
$('#phone-number').focus();
});
$('#login-popup-container').on('popup:close', function() {
cancelConfirmation();
if (location.pathname == '/auth') {
window.history && history.replaceState(null, null, '/');
}
});
App.unauth = true;
$('a[data-need-auth]').click(function(e) {
e.preventDefault();
openPopup('#login-popup-container');
});
$('#login-popup-container .login-cancel-btn').click(function(e) {
e.preventDefault();
closePopup('#login-popup-container');
});
$('.login-back').click(cancelConfirmation);
</script>
</body>
</html>