`
jgsj
  • 浏览: 963186 次
文章分类
社区版块
存档分类
最新评论

Bootstrap+Timeliner+Github+JQUERY创建程序员的简历(一)---Timeliner

 
阅读更多

最后效果见:http://gmszone.github.io/RESUME

源码可见:https://github.com/gmszone/RESUME/tree/master/Web


Github GP-Pages

这个就不再说了,直接网上找就有了

为项目启用项目主页很简单,只需要在项目版本库中创建一个名为gh-pages的分支,并向其中添加静态网页即可。也就是说如果项目的Git版本库中包含了名为gh-pages分支的话,则表明该项目提供静态网页构成的主页,可以通过网址http://<user-id>.github.io/<project-name>访问到。
下面以用户gotgithub的项目helloworld为例,介绍如何维护项目主页。
如果本地尚未从GitHub克隆helloworld版本库,执行如下命令。
$ git clone git@github.com:gotgithub/helloworld.git
$ cd helloworld
当前版本库只有一个名为master的分支,如果直接从master分支创建gh-pages分支操作非常简单,但是作为保存网页的gh-pages分支中的内容和master分支中的可能完全不同。如果不希望gh-pages分支继承master分支的历史和文件,即想要创建一个干净的gh-pages分支,需要一点小技巧。
若使用命令行创建干净的gh-pages分支,可以从下面三个方法任选一种。
第一种方法用到两个Git底层命令:git write-tree和git commit-tree。步骤如下:
基于master分支建立分支gh-pages。
$ git checkout -b gh-pages
删除暂存区文件,即相当于清空暂存区。
$ rm .git/index
创建项目首页index.html。
$ printf "hello world.\n" > index.html
添加文件index.html到暂存区。
$ git add index.html
用Git底层命令创建新的根提交,并将分支gh-pages重置。
$ git reset --hard $(echo "branch gh-pages init." | git commit-tree $(git write-tree))
执行推送命令,在GitHub远程版本库创建分支gh-pages。
$ git push -u origin gh-pages

Bootstrap

Bootstrap简介

Bootstrap是Twitter推出的一个开源的用于前端开发的工具包。它由Twitter的设计师Mark Otto和Jacob Thornton合作开发,是一个CSS/HTML框架。Bootstrap提供了优雅的HTML和CSS规范,它即是由动态CSS语言Less写成。Bootstrap一经推出后颇受欢迎,一直是GitHub上的热门开源项目,包括NASA的MSNBC(微软全国广播公司)的Breaking News都使用了该项目。

(转载自Phodal's Blog)

下载Bootstrap

项目首页:getbootstrap.com
解压后,我们就可以利用bootstrap创建一个简单的项目

BootStrap HelloWorld

<!DOCTYPE html>
<html>
  <head>
    <title>Bootstrap 101 Template</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../../assets/js/html5shiv.js"></script>
      <script src="../../assets/js/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="//code.jquery.com/jquery.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

Timeliner



添加示例代码:

$.timeliner({
    timelineContainer: '#timelineContainer', // value: selector of the main element holding the timeline's content, default to #timelineContainer
    startState: 'closed', // value: closed | open, default to closed; determines whether the timeline is initially collapsed or fully expanded
    startOpen: [], // value: array of IDs of single timelineEvents, default to empty; determines the minor event that you want to display open by default on page load
    baseSpeed: 200, // value: any integer, default to 200; determines the base speed, some animations are a multiple (4x) of the base speed
    speed: 4, // value: numeric, defalut to 4; a multiplier applied to the base speed that sets the speed at which an event's conents are displayed and hidden
    fontOpen: '1.2em', // value: any valid CSS font-size value, defaults to 1em; sets the font size of an event after it is opened
    fontClosed: '1em', // value: any valid CSS font-size value, defaults to 1em; sets the font size of an event after it is closed
    expandAllText: '+ expand all', // value: string; defaults to '+ expand all'
    collapseAllText: '- collapse all' // value: string; defaults to '- collapse all'
});

我的代码如下
		<div id="timelineContainer">
				<br class="clear">
				<div class="timelineMajor">
				<h2 class="timelineMajorMarker"><span>2010</span></h2>
				<dl class="timelineMinor">
					<dt id="201009"><a>墨颀多媒体文学社•社长</a></dt>
					<dd class="timelineEvent" id="201009EX" style="display:none;">
						<h3>09, 2010</h3>
						<blockquote>
							<p class="alert alert-info"> 社团创始人之一兼第一任社长</p>
						</blockquote>
						<br class="clear">
					</dd><!-- /.timelineEvent -->
				</dl><!-- /.timelineMinor -->
			</div><!-- /.timelineMajor -->

			<div class="timelineMajor">
				<h2 class="timelineMajorMarker"><span>2012</span></h2>
				<dl class="timelineMinor">
					<dt id="201212"><a> 西安文理学院 挑战杯科技制作大赛特等奖</a></dt>
					<dd class="timelineEvent" id="201212EX" style="display:none;">
						<h3>12, 2012</h3>
						<blockquote>
							 <p class="alert alert-info">名称:《基于Android与Arduino的远程智能家居控制系统》</p>
							 <p class="alert alert-info">职责: Android客户端编写、服务端编程、网站制作及运营、项目规划</p>
					    </blockquote>
						<br class="clear">
					</dd><!-- /.timelineEvent -->
				</dl><!-- /.timelineMinor -->
			</div>
		    <div class="timelineMajor">
		    	<h2 class="timelineMajorMarker"><span>2013</span></h2>
		        <dl class="timelineMinor">
		            <dt id="201306"><a class="list-group-item">第九届 陕西省大学生课外学术科技作品竞赛二等奖</a></dt>
		            <dd class="timelineEvent" id="201306EX" style="display: none; ">
		            	<div class="media">
							<a href="#inline-2013" class="CBmodal"><img src="images/tiaozhanbei.jpg" width="240" height="180" alt="TiaoZhanbei"></a>
							<p class="mediaLink"><a href="#inline-2013" class="CBmodal" title="获奖证书">获奖证书</a></p>
							<div style="display:none">
								<div id="inline-2013" class="modalBox">
									<img src="images/tiaozhanbei2.jpg" alt="TiaoZhanbei">
								</div>
							</div>
						</div><!-- /.media -->
					<blockquote>
		                <p class="alert alert-info">名称:《远程控制的智能云家居系统》</p>
						<p class="alert alert-info">职责: Android客户端编写、服务端编程、网站制作及运营、项目规划、文档编写</p>
					</blockquote>
						<br class="clear">
		            </dd><!-- /.timelineEvent -->
		        </dl><!-- /.timelineMinor -->

		        <dl class="timelineMinor">		    
		            <dt id="201307"><a class="list-group-item"></span> 第八届全国大学生“飞思卡尔”杯 西部赛区 电磁组三等奖</a></dt>
		            <dd class="timelineEvent" id="201307EX" style="display: none; ">
		            <blockquote>
		                <p class="alert alert-info">职责:编程、项目规划、文档编写</p>
		                <br class="clear">
		            </blockquote>

		            </dd><!-- /.timelineEvent -->
		        </dl><!-- /.timelineMinor -->
		    </div><!-- /.timelineMajor -->
		    			<br class="clear">

		</div><!-- /#timelineContainer -->

修改完代码最后不要忘记
git push -u 


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics