Commit 14c4681e by 石头

更新静态页

1 parent a696f59d
...@@ -43,8 +43,9 @@ public class WordController extends BaseController { ...@@ -43,8 +43,9 @@ public class WordController extends BaseController {
@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET) @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
public ModelAndView detail(@PathVariable Long id) { public ModelAndView detail(@PathVariable Long id) {
WordDomain wordDomain = wordService.get(id); WordDomain wordDomain = wordService.get(id);
ModelAndView mv = new ModelAndView("/portal/word/detail"); ModelAndView mv = new ModelAndView(wordDomain.getWord().length() >= 2 ? "/portal/word/detail" : "/portal/word/baike");
mv.addObject("word", wordDomain); mv.addObject("word", wordDomain);
return mv; return mv;
} }
} }
This diff could not be displayed because it is too large.

3.39 KB | W: | H:

4.67 KB | W: | H:

serverside/cihai-wechat/src/main/webapp/static/images/icons.png
serverside/cihai-wechat/src/main/webapp/static/images/icons.png
serverside/cihai-wechat/src/main/webapp/static/images/icons.png
serverside/cihai-wechat/src/main/webapp/static/images/icons.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -43,93 +43,6 @@ var topicSwiper = new Swiper('.topic-swiper', { ...@@ -43,93 +43,6 @@ var topicSwiper = new Swiper('.topic-swiper', {
} }
}); });
//关系图
var DIR = 'img/soft-scraps-icons/';
var nodes = null;
var edges = null;
var network = null;
// Called when the Visualization API is loaded.
function draw() {
// create people.
// value corresponds with the age of the person
var DIR = 'images/special-pic-0';
nodes = [
{id: 1, shape: 'circularImage', image: DIR + '1.png'},
{id: 2, shape: 'circularImage', image: DIR + '2.png'},
{id: 3, shape: 'circularImage', image: DIR + '1.png'},
{id: 4, shape: 'circularImage', image: DIR + '2.png', label: "pictures by this guy!"},
{id: 5, shape: 'circularImage', image: DIR + '1.png'},
{id: 6, shape: 'circularImage', image: DIR + '2.png'},
{id: 7, shape: 'circularImage', image: DIR + '1.png'},
{id: 8, shape: 'circularImage', image: DIR + '2.png'},
{id: 9, shape: 'circularImage', image: DIR + '1.png'},
{id: 10, shape: 'circularImage', image: DIR + '2.png'},
{id: 11, shape: 'circularImage', image: DIR + '1.png'},
{id: 12, shape: 'circularImage', image: DIR + '2.png'},
{id: 13, shape: 'circularImage', image: DIR + '1.png'},
{id: 14, shape: 'circularImage', image: DIR + '2.png'},
{
id: 15,
shape: 'circularImage',
image: DIR + 'missing.png',
brokenImage: DIR + 'missingBrokenImage.png',
label: "when images\nfail\nto load"
},
{
id: 16,
shape: 'circularImage',
image: DIR + 'anotherMissing.png',
brokenImage: DIR + '9.png',
label: "fallback image in action"
}
];
// create connections between people
// value corresponds with the amount of contact between two people
edges = [
{from: 1, to: 2},
{from: 2, to: 3},
{from: 2, to: 4},
{from: 4, to: 5},
{from: 4, to: 10},
{from: 4, to: 6},
{from: 6, to: 7},
{from: 7, to: 8},
{from: 8, to: 9},
{from: 8, to: 10},
{from: 10, to: 11},
{from: 11, to: 12},
{from: 12, to: 13},
{from: 13, to: 14},
{from: 9, to: 16}
];
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {
nodes: {
borderWidth: 4,
size: 30,
color: {
border: '#222222',
background: '#666666'
},
font: {color: '#eeeeee'}
},
edges: {
color: 'lightgray'
}
};
network = new vis.Network(container, data, options);
}
draw();
$('.js-read-more').click(function () { $('.js-read-more').click(function () {
if($(this).hasClass('active')){ if($(this).hasClass('active')){
$('.special-content .txt-content').css('height','190px'); $('.special-content .txt-content').css('height','190px');
...@@ -139,3 +52,10 @@ $('.js-read-more').click(function () { ...@@ -139,3 +52,10 @@ $('.js-read-more').click(function () {
$(this).addClass('active') $(this).addClass('active')
} }
}); });
$('.js-enable-drag').click(function () {
var $this = $(this);
$this.hasClass('active')?$this.removeClass('active'):$this.addClass('active');
var $target = $($this.data('target'));
$target.hasClass('enable')?$target.removeClass('enable'):$target.addClass('enable');
});
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
...@@ -13,6 +13,16 @@ ...@@ -13,6 +13,16 @@
<div class="statusbar"></div> <div class="statusbar"></div>
<div class="view view-main view-init ios-edges" data-url="/"> <div class="view view-main view-init ios-edges" data-url="/">
<div class="page"> <div class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="left">
<a class="link back" href="/">
<i class="iconfont icon-jiantou"></i>
<span class="ios-only">返回</span>
</a>
</div>
</div>
</div>
<div class="page-content special-content"> <div class="page-content special-content">
<!--专题简介--> <!--专题简介-->
<div class="intro-box"> <div class="intro-box">
...@@ -216,8 +226,13 @@ ...@@ -216,8 +226,13 @@
<img src="images/special-tip.png"> <img src="images/special-tip.png">
</div> </div>
<div class="title">十九大图谱</div> <div class="title">十九大图谱</div>
<div class="special-title-tools">
<a class="js-enable-drag" href="#" data-target="#relation-pic">
<span class="icon icon-drag"></span>
</a>
</div>
</div> </div>
<div id="mynetwork"></div> <div id="relation-pic"></div>
</div> </div>
<!--词云解析--> <!--词云解析-->
<div class="word-analysis"> <div class="word-analysis">
...@@ -226,10 +241,16 @@ ...@@ -226,10 +241,16 @@
<img src="images/special-tip.png"> <img src="images/special-tip.png">
</div> </div>
<div class="title">词云解析</div> <div class="title">词云解析</div>
<div class="special-title-tools">
<a class="js-refresh" href="#" data-target="#word-analysis">
<i class="iconfont icon-huanyipi"></i>
</a>
<a class="js-enable-drag" href="#" data-target="#word-analysis">
<span class="icon icon-drag"></span>
</a>
</div> </div>
<div class="inner">
<img src="images/special-pic-07.png">
</div> </div>
<div id="word-analysis"></div>
</div> </div>
<!--相关新闻--> <!--相关新闻-->
<div class="about-news"> <div class="about-news">
...@@ -260,7 +281,6 @@ ...@@ -260,7 +281,6 @@
</div> </div>
<div class="card-footer">中国共产党第十九次全国代表大会,中国特色社会主义进入新时代的关键时期召开的一次十分重要的大会。</div> <div class="card-footer">中国共产党第十九次全国代表大会,中国特色社会主义进入新时代的关键时期召开的一次十分重要的大会。</div>
</div> </div>
<div class="more-btn">加载更多</div>
</div> </div>
<!--图说十九大--> <!--图说十九大-->
<div class="pic-show"> <div class="pic-show">
...@@ -315,9 +335,81 @@ ...@@ -315,9 +335,81 @@
</div> </div>
</div> </div>
<script src="js/vendor.js"></script> <script src="js/vendor.js"></script>
<script src="js/routes.js"></script>
<script src="js/swiper.min.js"></script>
<script src="js/vis.js"></script> <script src="js/vis.js"></script>
<script src="js/special.js"></script> <script src="js/special.js"></script>
<script>
function relationPic(id, data) {
return new vis.Network(document.getElementById(id), relationPicData, {
nodes: {
shape: 'dot',
borderWidth: 3,
color: {
border: '#c6c6c6',
background: '#adadad',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
},
font: {
color: '#333'
}
}
});
};
var relationPicData = {
nodes: [{
id: 1,
label: 'Node 1',
value: 15
},
{
id: 2,
label: 'Node 2',
value: 25
},
{
id: 3,
label: 'Node 3',
value: 50
},
{
id: 4,
label: 'Node 4',
value: 30
},
{
id: 5,
label: 'Node 5',
value: 8
}
],
edges: [{
from: 1,
to: 3
},
{
from: 1,
to: 2
},
{
from: 2,
to: 4
},
{
from: 2,
to: 5
}
]
};
relationPic('relation-pic', relationPicData);
relationPicData.edges = [];
var wordAnalysis = relationPic('word-analysis', relationPicData);
$('.js-refresh').click(function() {
wordAnalysis.destroy();
wordAnalysis = relationPic('word-analysis', relationPicData);
});
</script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!