Skip to content

Commit

Permalink
Coco
Browse files Browse the repository at this point in the history
  • Loading branch information
Coco-cute committed Jul 13, 2021
1 parent 4ef975a commit aee3812
Show file tree
Hide file tree
Showing 89 changed files with 14,968 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Myproject

转载请标注原文链接!
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
11,992 changes: 11,992 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "myapp1",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Binary file added public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Binary file added public/ruiwen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<template>
<div id="app">
<!-- 背景颜色 -->
<div id="bagrd">
</div>
<!-- 头部导航栏 -->
<headnav :github="this.contacts[0].github" />

<!-- 主体内容 -->
<div id="content">
<!-- 左边的窗格 -->
<leftcontent />

<!-- 右边的窗格 -->
<rightcontent />

</div>

<!-- 尾部 -->
<bottomnav :contacts="contacts[0]" />

</div>
</template>

<script>
import leftcontent from './views/LeftContent.vue';
import rightcontent from './views/RightContent.vue';
import headnav from './views/Topnav.vue';
export default {
data() {
return {
contacts: [
{ phone: '2', qq: '', vx: '', github: '', address: '', 'e-mail': '' }
],
message: ['13857592916', '2936756243', 'CH-sixsixsix', 'https://github.com/Coco-cute/Myproject.git', '深圳市龙华区下油松新村45号楼' ,'cjl13857592916@163.com'],
}
},
methods: {
//初始化联系方式contacts的信息
Getcontacts: function (items) {
Object.keys(this.contacts[0]).forEach((item, index) => {
this.contacts[0][item] = items[index];
})
},
},
mounted() {
//传入后台的值message
this.Getcontacts(this.message)
},
components: {
leftcontent: leftcontent,
headnav,
bottomnav: () => import('./views/Bottomnav.vue'),
rightcontent,
}
}
</script>

<style lang="scss">
@import "./init.css";
@import "./icon.css";
#app {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
overflow: auto;
}
#bagrd {
width: 100%;
height: 100%;
position: absolute;
background-image: url('../public/ruiwen.png');
opacity: 0.9;
background-repeat: no-repeat;
background-size: 100% 100vh;
z-index: -1;
}
//头部分
//中间内容
#content {
width: 100%;
height: 68%;
margin: 10px 0;
display: flex;
flex-direction: row;
}
//底部
</style>
Binary file added src/assets/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/25.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/delect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/document.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/er.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/game.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/music.ico
Binary file not shown.
Binary file added src/assets/music.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/music_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/myself.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/txt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/上一首.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/下一首.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/单曲循环.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/基数排序.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/播放.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/暂停.png
Binary file added src/assets/终止.png
Binary file added src/assets/结构图.png
Binary file added src/assets/阿狸.jpg
Binary file added src/assets/随机播放.png
Binary file added src/assets/静音.png
Binary file added src/assets/音量.png
Binary file added src/assets/顺序播放.png
133 changes: 133 additions & 0 deletions src/components/Blog2/comment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
var address=window.location.href.split("/C");

//获取服务器网址
//var hostport=document.location.host;
var csrftoken = jQuery("[name=csrfmiddlewaretoken]").val();
window.onload=function () {Comnt2(0);
document.getElementById('btn_a').onclick=function () {
if(!document.getElementById('txt_a').value.length )
alert("请输入网名");
else
Comnt(0);};
document.getElementById('btn_b').onclick=function () {Comnt2(1);};
document.getElementById('btn_c').onclick=function () {window.location.href=address[0]+"/index/";};
document.getElementById('img_a').onclick=function () {Img("1.png");};
document.getElementById('img_b').onclick=function () {Img("2.png");};
document.getElementById('img_c').onclick=function () {Img("3.png");};
document.getElementById('img_d').onclick=function () {Img("4.gif");};
document.getElementById('img_e').onclick=function () {Img("5.png");};

//addEventListener("click",function ()
};

function Time(){
var out="";
var now =new Date();
out+=now.getFullYear();
out+="年"+(now.getMonth()+1);
out+="月"+now.getDate()+"日&emsp;";
out+=now.getHours();
out+=":"+now.getMinutes();
out+=":"+now.getSeconds();
return out;}

function Img(temporary) {
var txtValue =document.getElementById('txt_b');
var bigImg = document.createElement("img");
bigImg.src=address[0]+"/static/"+temporary;
txtValue.appendChild(bigImg);
}

function Comnt(temporary) {
var ch=new Object();
ch.name=temporary?temporary[0]:document.getElementById('txt_a').value;
ch.txtVal=temporary?temporary[1]:document.getElementById('txt_b').innerHTML;
ch.time=temporary?temporary[2]:Time();
ch.good=temporary?temporary[3]:0;
var ch_str=JSON.stringify(ch);
Create_div(ch_str);}

function Create_div(temporary) {
var c = JSON.parse(temporary);
var div = document.getElementById('div_a');
var div1 = document.createElement('div');
var div2 = document.createElement('div');
var div3 = document.createElement('div');
var div4 = document.createElement('div');
var div5 = document.createElement('div');
var div6 = document.createElement('div');
var div3$ = document.createElement('div');
div2.innerHTML = "&emsp;&emsp;&emsp;" + c.txtVal;
div3.innerHTML = "用户:" + c.name;
div3$.innerHTML = "(留下的足迹)";
div5.innerHTML = "发表时间:" + c.time;
var bigImg = document.createElement("img");
bigImg.src =address[0]+ "/static/15.png";
div6.appendChild(bigImg);
div6.innerHTML += c.good;
div3.appendChild(div3$);
div4.appendChild(div5);
div4.appendChild(div6);
div1.appendChild(div3);
div1.appendChild(div4);
div1.appendChild(div2);
div.appendChild(div1);
//设置div样式
div1.style = "border-bottom:1px dashed black;width: 100%;height:140px;";//最外层div
div2.style = "font-family: 楷体;width:88%;height: 115px;position: relative;margin:-136px 0px 0 145px; ";//内容div
div3.style = "text-align: center;font-weight: bold;font-size: 20px;width: 10%;height:140px; border-right:2px solid red;";//网名div
div3$.style = ";color: #779dbd;margin:50px 0 0 10px";
div4.style = "height: 20px;width: 80%;position:relative ;margin: -22px 0 1px 245px;";//时间点赞div
div5.style = "color: darkblue;float: left;";//时间
div6.className = "zan";
div6.style = "float: right;height: 20px;width:60px;";//点赞
div.scrollTop = div.scrollHeight;//设置自动到最底端
div6.onclick = function () {
var _txt = this.innerHTML.split(">");
this.innerHTML = _txt[0] + ">" + (++_txt[1]);
};
}

function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});

function Comnt2(flag_i) {
var name1 = $("#txt_a").val();
if(flag_i && !name1.length)alert("请输入网名:");
var txt = $("#txt_b").html();
var time=Time();
var jsondata = {"_name":name1,"_value":txt,"Time":time};
var senddata = JSON.stringify(jsondata);
$.ajaxSetup({
beforeSend:function (xhr,settings) {
if(!csrfSafeMethod(settings.type)&&!this.crossDomain){
xhr.setRequestHeader("X-CSRFToken",csrftoken);
}
}
});
$.ajax({
url:"/Comnt_run/",
data:senddata,
type:"post",
success:function (data) {
var str1=JSON.parse(data);
var str2=str1.txt_value;//[]
var len=str2.length;
document.getElementById('div_a').innerHTML="";
for(var i=0;i<len;i++){
var out="";var j=0;
for(j in str2[i])
out+=(str2[i])[j]+"|||";
var str=out.split("|||");
Comnt(str);}
}
})}
Loading

0 comments on commit aee3812

Please sign in to comment.