mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-23 00:38:42 +00:00
129 lines
28 KiB
HTML
129 lines
28 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
|
|||
|
<html lang="en" class="no-js">
|
|||
|
<head>
|
|||
|
<meta charset="utf-8">
|
|||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|||
|
|
|||
|
<title>Readmore.js: jQuery plugin for long blocks of text</title>
|
|||
|
<meta name="description" content="A smooth, lightweight jQuery plugin for collapsing and expanding long blocks of text with “Read more” and “Close” links.">
|
|||
|
<meta name="author" content="Jed Foster">
|
|||
|
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|||
|
|
|||
|
<!--[if lt IE 9]>
|
|||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.min.js"></script>
|
|||
|
<![endif]-->
|
|||
|
|
|||
|
<style media="screen">
|
|||
|
body { font: 16px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; color: #444; }
|
|||
|
code { color: #777; font-family: "Source Code Pro", "Menlo", "Courier New", monospace;}
|
|||
|
a { color: #178DB1; }
|
|||
|
.container { margin: 0 auto; max-width: 960px; }
|
|||
|
#info + .readmore-js-toggle { padding-bottom: 1.5em; border-bottom: 1px solid #999; font-weight: bold;}
|
|||
|
#demo, #ajax { width: 42%; float: left; padding: 0 8% 3em 0; }
|
|||
|
#ajax { padding-right: 0; }
|
|||
|
#ajax.loading { min-height: 64px; background: url(data:image/gif;base64,R0lGODlhQABAAKUAADQyNJyanMzOzGRmZOzq7ISChLS2tNze3HR2dExOTPT29IyOjMTCxKyqrFxaXNTW1GxubPTy9IyKjLy+vOTm5Hx+fPz+/JSWlMzKzLSytGRiZJyenNTS1GxqbOzu7ISGhLy6vOTi5Hx6fFRWVPz6/JSSlMTGxKyurFxeXNza3HRydP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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RhV/kBVIcldoRgkciIhZjUQrkIAScEZmVpZEGy+amYydRCeAsXukX3RlqwEqrkWfoAKjRHKFRQ0fqxGtu0MFsQICJ7RnRhS4dcqoEs0aDUUgV6ZFBZnjCMDXQiO+MEXCF6cbF+OIs+dEML6cQmaVRBK4Io02rDBnZIU2UUO8SROSSl4ASU4qYEhWEIPFCgRf+aJ3DwSIZ0NU4NJg50KGDA7ohbN4AkMBjEf8gELoZAMCeYtiqiCRwUD+zw9ILLo80bIANyMF/kiACWVDAlUc1hmRwKKn1QwWkIxo2VIohhEUY2yQgCHjkxUqLhAs8MKqT6sm+hQQylUoU4ZpKK4g4PNtzxQGcjpZUaBo3RNGzZLZoMHCyb5/o0rZINEwS5eKuazg8PikVRIaMsesQNQrBoidTEL2SSDsFsJDEYvW7NhqBJVpGhTGcHSXAJ8srLmiXGC2mBUsVLjuZHxM83rQo0svOKJC9evWs4/ofY7Bi+/gw39HIKiB6fN2o38YEKIDe/ft3w8YoGF3V/SFUZ9D4H5A///zz
|
|||
|
</style>
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
|
|||
|
<div class="container">
|
|||
|
<header>
|
|||
|
<h1>Readmore.js</h1>
|
|||
|
|
|||
|
<p>A smooth, responsive jQuery plugin for collapsing and expanding long blocks of text with “Read more” and “Close” links.</p>
|
|||
|
</header>
|
|||
|
|
|||
|
<h1>AJAX Demo</h1>
|
|||
|
|
|||
|
<section id="demo">
|
|||
|
|
|||
|
<article>
|
|||
|
<h2>Artisanal Narwahls</h2>
|
|||
|
|
|||
|
<p>From this distant vantage point, the Earth might not seem of any particular interest. But for us, it's different. Consider again that dot. That's here. That's home. That's us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every "superstar," every "supreme leader," every saint and sinner in the history of our species lived there – on a mote of dust suspended in a sunbeam.</p>
|
|||
|
|
|||
|
<p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p>
|
|||
|
|
|||
|
<p>Here's how it is: Earth got used up, so we terraformed a whole new galaxy of Earths, some rich and flush with the new technologies, some not so much. Central Planets, them was formed the Alliance, waged war to bring everyone under their rule; a few idiots tried to fight it, among them myself. I'm Malcolm Reynolds, captain of Serenity. Got a good crew: fighters, pilot, mechanic. We even picked up a preacher, and a bona fide companion. There's a doctor, too, took his genius sister out of some Alliance camp, so they're keeping a low profile. You got a job, we can do it, don't much care what it is.</p>
|
|||
|
|
|||
|
<p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p>
|
|||
|
</article>
|
|||
|
|
|||
|
<article>
|
|||
|
<h2>Portland Leggings</h2>
|
|||
|
|
|||
|
<p>Here's how it is: Earth got used up, so we terraformed a whole new galaxy of Earths, some rich and flush with the new technologies, some not so much. Central Planets, them was formed the Alliance, waged war to bring everyone under their rule; a few idiots tried to fight it, among them myself. I'm Malcolm Reynolds, captain of Serenity. Got a good crew: fighters, pilot, mechanic. We even picked up a preacher, and a bona fide companion. There's a doctor, too, took his genius sister out of some Alliance camp, so they're keeping a low profile. You got a job, we can do it, don't much care what it is.</p>
|
|||
|
|
|||
|
<p>I am Duncan Macleod, born 400 years ago in the Highlands of Scotland. I am Immortal, and I am not alone. For centuries, we have waited for the time of the Gathering when the stroke of a sword and the fall of a head will release the power of the Quickening. In the end, there can be only one.</p>
|
|||
|
|
|||
|
<p>From this distant vantage point, the Earth might not seem of any particular interest. But for us, it's different. Consider again that dot. That's here. That's home. That's us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every "superstar," every "supreme leader," every saint and sinner in the history of our species lived there – on a mote of dust suspended in a sunbeam.</p>
|
|||
|
|
|||
|
<p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p>
|
|||
|
</article>
|
|||
|
|
|||
|
<article>
|
|||
|
<h2>This section is shorter than the Readmore minimum</h2>
|
|||
|
|
|||
|
<p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p>
|
|||
|
</article>
|
|||
|
</section>
|
|||
|
|
|||
|
<section id="ajax" class="loading"></section>
|
|||
|
</div>
|
|||
|
|
|||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
|||
|
<script src="jquery.mockjax.js"></script>
|
|||
|
|
|||
|
<script src="readmore.js"></script>
|
|||
|
|
|||
|
<script>
|
|||
|
$('article').readmore({speed: 500});
|
|||
|
|
|||
|
var blog = {
|
|||
|
'articles': [
|
|||
|
{
|
|||
|
title: 'Post One',
|
|||
|
body: "<p>From this distant vantage point, the Earth might not seem of any particular interest. But for us, it's different. Consider again that dot. That's here. That's home. That's us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every \"superstar,\" every \"supreme leader,\" every saint and sinner in the history of our species lived there – on a mote of dust suspended in a sunbeam.</p><p>Here's how it is: Earth got used up, so we terraformed a whole new galaxy of Earths, some rich and flush with the new technologies, some not so much. Central Planets, them was formed the Alliance, waged war to bring everyone under their rule; a few idiots tried to fight it, among them myself. I'm Malcolm Reynolds, captain of Serenity. Got a good crew: fighters, pilot, mechanic. We even picked up a preacher, and a bona fide companion. There's a doctor, too, took his genius sister out of some Alliance camp, so they're keeping a low profile. You got a job, we can do it, don't much care what it is.</p><p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p><p>I am Duncan Macleod, born 400 years ago in the Highlands of Scotland. I am Immortal, and I am not alone. For centuries, we have waited for the time of the Gathering when the stroke of a sword and the fall of a head will release the power of the Quickening. In the end, there can be only one.</p>"
|
|||
|
},
|
|||
|
{
|
|||
|
title: 'Post Two',
|
|||
|
body: "<p>From this distant vantage point, the Earth might not seem of any particular interest. But for us, it's different. Consider again that dot. That's here. That's home. That's us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every \"superstar,\" every \"supreme leader,\" every saint and sinner in the history of our species lived there – on a mote of dust suspended in a sunbeam.</p><p>Here's how it is: Earth got used up, so we terraformed a whole new galaxy of Earths, some rich and flush with the new technologies, some not so much. Central Planets, them was formed the Alliance, waged war to bring everyone under their rule; a few idiots tried to fight it, among them myself. I'm Malcolm Reynolds, captain of Serenity. Got a good crew: fighters, pilot, mechanic. We even picked up a preacher, and a bona fide companion. There's a doctor, too, took his genius sister out of some Alliance camp, so they're keeping a low profile. You got a job, we can do it, don't much care what it is.</p><p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p><p>I am Duncan Macleod, born 400 years ago in the Highlands of Scotland. I am Immortal, and I am not alone. For centuries, we have waited for the time of the Gathering when the stroke of a sword and the fall of a head will release the power of the Quickening. In the end, there can be only one.</p>"
|
|||
|
},
|
|||
|
{
|
|||
|
title: 'Post Three',
|
|||
|
body: "<p>From this distant vantage point, the Earth might not seem of any particular interest. But for us, it's different. Consider again that dot. That's here. That's home. That's us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every \"superstar,\" every \"supreme leader,\" every saint and sinner in the history of our species lived there – on a mote of dust suspended in a sunbeam.</p><p>Here's how it is: Earth got used up, so we terraformed a whole new galaxy of Earths, some rich and flush with the new technologies, some not so much. Central Planets, them was formed the Alliance, waged war to bring everyone under their rule; a few idiots tried to fight it, among them myself. I'm Malcolm Reynolds, captain of Serenity. Got a good crew: fighters, pilot, mechanic. We even picked up a preacher, and a bona fide companion. There's a doctor, too, took his genius sister out of some Alliance camp, so they're keeping a low profile. You got a job, we can do it, don't much care what it is.</p><p>Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!</p><p>I am Duncan Macleod, born 400 years ago in the Highlands of Scotland. I am Immortal, and I am not alone. For centuries, we have waited for the time of the Gathering when the stroke of a sword and the fall of a head will release the power of the Quickening. In the end, there can be only one.</p>"
|
|||
|
}
|
|||
|
]
|
|||
|
};
|
|||
|
|
|||
|
$.mockjax({
|
|||
|
url: 'blog.json',
|
|||
|
responseText: blog,
|
|||
|
responseTime: 1500
|
|||
|
});
|
|||
|
|
|||
|
$.ajax({
|
|||
|
url: 'blog.json',
|
|||
|
dataType: 'json',
|
|||
|
success: function(data) {
|
|||
|
var template = function(article) {
|
|||
|
return $('<article><h2>' + article.title + '</h2>' + article.body + '</article>');
|
|||
|
};
|
|||
|
|
|||
|
$.each(data.articles, function(index, article) {
|
|||
|
$('#ajax').append(template(article));
|
|||
|
});
|
|||
|
|
|||
|
$('#ajax').removeClass('loading');
|
|||
|
|
|||
|
$('#ajax article').readmore({speed: 500});
|
|||
|
}
|
|||
|
});
|
|||
|
</script>
|
|||
|
</body>
|
|||
|
</html>
|
|||
|
|