master
string1995 5 years ago
parent 442eda7b3b
commit b443b2d49c
  1. 5
      cv/pjax_cv.html
  2. 17
      functions.php
  3. 8
      test/change.php
  4. 3
      test/green.html
  5. 4
      test/index.php
  6. 43
      test/pjax.html
  7. 2
      test/red.html

@ -0,0 +1,5 @@
<meta charset=utf-8>
<link href=./static/css/app.121ce650a966130fb0f2ffacb130b3de.css rel=stylesheet>
<div id=app></div>
<script type=text/javascript src=./static/js/manifest.4c9b38ff9e55227eeaef.js></script><script type=text/javascript src=./static/js/vendor.1238791dbc82476562b4.js></script><script type=text/javascript src=./static/js/app.8475796382bd29594a13.js></script>
<script>$('title').html('Yimian Resume');</script>

@ -39,7 +39,9 @@ function yimian__header($title="Yimian",$keywords="yimian",$description="Yimian
//jquery install
function js__jquery()
{
echo "<script src=\"https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js\"></script>";
echo "<!-- Include js Jquery and Pjax -->
<script type=\"text/javascript\" src=\"https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js\"></script>
<script type=\"text/javascript\" src=\"https://cdn.bootcss.com/jquery.pjax/2.0.1/jquery.pjax.js\"></script>";
$GLOBALS['jquery']=1;
}
@ -58,13 +60,21 @@ function yimian__headerEnd()
function yimian__footer($wordColor="#C7C7C7",$backgroundColor="#2B2B2B",$urlColor="#87CEEB")
{
echo " <style>/*footer theme*/footer{padding:1.5rem 1rem;color:".$wordColor.";font-size:1.2rem;line-height:1.4;text-align:center;background:".$backgroundColor.";border-top:1px solid #C7C7C7}a.footera:link{color: ".$urlColor." ; text-decoration:none;}a.footera:visited {color:#79CDCD}</style>
<footer class=\"footer\">Copyright © 2018.<a class=\"footera\" href=\"https://cn.yimian.xyz/cv\">Yimian LIU</a> All rights reserved.</footer>";
<script>function openwin(){window.open(\"https://cn.yimian.xyz/cv\");}</script>
<footer class=\"footer\">Copyright © 2018.<a class=\"footera\" target=\"_blank\" onclick=\"openwin()\" href=\"#\">Yimian LIU</a> All rights reserved.</footer>";
echo "</body>
</html>";
}
/**functions for aplayer**/
//put this function to where you want the aplayer to dispaly
@ -136,8 +146,7 @@ function aplayer__add($name="",$artist="unknown",$url="",$coverurl="",$lrcurl=""
//play a netease playlist
function aplayer__netease($playlistid="2012006204",$loadStart=0,$numLimit=10,$theme="#ebd0c2")
{
if(!$GLOBALS['jquery'])echo "<script src=\"https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js\"></script>";
$GLOBALS['jquery']=1;
if(!$GLOBALS['jquery']) js__jquery();
echo "<script> $.ajax({
type: \"GET\",
url: 'https://api.bzqll.com/music/netease/songList',

@ -0,0 +1,8 @@
<?php
$color=$_GET['color'];
if($color) {
$path = $color . '.html';
include($path);
}
?>

@ -0,0 +1,3 @@
<div id="color" style="background-color:green;width:1000px;height:500px;margin: 0px auto"></div>

@ -1,7 +1,9 @@
<?php include '../functions.php'?>
<?php yimian__header("Yimian Test","yimian test","This is the test place of Yimian web.");?>
<?php js__jquery()?>
<?php yimian__headerEnd()?>
</br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br>
<div id="content"></div>
<script>$(document).pjax('a', '#content');</script>
<?php aplayer__element()?>
<?php aplayer__setup_mini()?>
<?php $rand=rand(0,300);aplayer__netease(808097971,$rand,$rand+10);?>

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>pjax测试</title>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery.pjax/2.0.1/jquery.pjax.js"></script>
<style type="text/css">
.main{border:1px solid red;width: 1000px;height: 500px;margin: 0px auto}
.click{margin: 0px auto;text-align: middle;width: 1000px;margin-top: 20px;}
</style>
</head>
<body>
<div class="main" style="text-align: center">1111</div>
<div class="click">
<button class="red">红色模板</button>
<button class="green">绿色模板</button>
</div>
<div class="main" style="text-align: center">222</div>
<div class="click">
<button class="red">红色模板</button>
<button class="green">绿色模板</button>
</div>
<div class="main" style="text-align: center">333</div>
<div class="click">
<button class="red">红色模板</button>
<button class="green">绿色模板</button>
</div>
<div id="hhh"></div>
<script type="text/javascript">
$('button').bind('click',function(){
var color=$(this).attr('class');
$.pjax({
url: 'change.php?color='+color,
container: '#hhh'
})
});
</script>
</body>
</html>

@ -0,0 +1,2 @@
<div id="color" style="background-color:red;width:1000px;height:500px;margin: 0px auto"></div>
Loading…
Cancel
Save