Skip to content
Snippets Groups Projects
Commit aef1906d authored by Shale XIONG's avatar Shale XIONG
Browse files

Add a news page.

Now only show 5 latest news in the home page, and put all the news in
the new page.
Change the css of news to the same as the publication.
parent fe187393
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ collections: ...@@ -20,6 +20,8 @@ collections:
output: true output: true
research: research:
output: true output: true
teaching:
output: true
defaults: defaults:
- -
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<nav class="nav"> <nav class="nav">
{% for menu_index in (1..10) %} {% for menu_index in (1..10) %}
{% assign menu_items = site.pages | where:"menu",true | where: "menu_order",menu_index %} {% assign menu_items = site.pages | where:"menu",true | where: "menu_order",menu_index | sort:"sub_menu_order" %}
{% if menu_items.size > 0 %} {% if menu_items.size > 0 %}
{% if menu_items.first.parent_menu %} {% if menu_items.first.parent_menu %}
{% assign check_url = menu_items.first.parent_menu | downcase | prepend: '/' | append: '/' %} {% assign check_url = menu_items.first.parent_menu | downcase | prepend: '/' | append: '/' %}
<li class="dropdown"> <li class="dropdown">
<a class="nav-link {% if page.url contains check_url %}active{% endif %} dropbtn" href="">{{ menu_items.first.parent_menu }}</a> <a class="nav-link {% if page.url contains check_url %}active{% endif %} ">{{ menu_items.first.parent_menu }}</a>
<div class="dropdown-content"> <div class="dropdown-content">
{% for item in menu_items %} {% for item in menu_items %}
<a class="nav-link {% if item.url == page.url %}active{% endif %}" href="{{ item.url | prepend: site.baseurl }}">{{ item.title }}</a> <a class="nav-link {% if item.url == page.url %}active{% endif %}" href="{{ item.url | prepend: site.baseurl }}">{{ item.title }}</a>
......
{% unless include.max %}
{% assign include.max = site.posts | size %}
{% endunless %}
<div class="posts">
{% for post in site.posts limit:include.max %}
<li class="post-preview">
<h4><a href="{{ post.url }}">{{ post.title }}</a></h4>
<p>{{ post.date | date: "%b %-d, %Y" }}</p>
{{ post.excerpt }}
<p><a href="{{ post.url }}">more...</a></p>
</li>
{% endfor %}
</div>
...@@ -14,18 +14,12 @@ layout: default ...@@ -14,18 +14,12 @@ layout: default
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h2>News</h2> <h2><a href="{{ site.url }}/news.html">Recent News</a></h2>
{% for post in site.posts %} {% include news-page.html max=5 %}
<div class="post-preview">
<h3 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h3>
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</p>
{{ post.excerpt}}
</div>
{% endfor %}
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<h2>Recent Publications</h2> <h2><a href="{{ site.url }}/publications.html">Recent Publications</a></h2>
{% bibliography --max 5 %} {% bibliography --max 5 %}
</div> </div>
</div> </div>
...@@ -79,9 +79,9 @@ h6, .h6 { ...@@ -79,9 +79,9 @@ h6, .h6 {
.dropdown-content { .dropdown-content {
display: none; display: none;
position: absolute; position: absolute;
//min-width: 160px;
background-color: $primary_colour; background-color: $primary_colour;
min-width: 160px; z-index:10;
background-color: $primary_colour;
-webkit-box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.2); -webkit-box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.2);
box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.2); box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.2);
} }
...@@ -99,7 +99,7 @@ h6, .h6 { ...@@ -99,7 +99,7 @@ h6, .h6 {
.nav-link { .nav-link {
position: relative; position: relative;
padding: 1rem; padding: 1rem;
font-weight: 500; //font-weight: 500;
color: $highlight_colour; color: $highlight_colour;
} }
.nav-link:hover, .nav-link:hover,
...@@ -163,6 +163,8 @@ h6, .h6 { ...@@ -163,6 +163,8 @@ h6, .h6 {
} }
} }
.bibliography { .bibliography {
padding: 0; padding: 0;
...@@ -279,7 +281,6 @@ h6, .h6 { ...@@ -279,7 +281,6 @@ h6, .h6 {
margin-bottom: 4rem; margin-bottom: 4rem;
.post-title { .post-title {
margin-bottom: .75rem; margin-bottom: .75rem;
font-size: 2.5rem;
} }
.post-meta { .post-meta {
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
...@@ -293,6 +294,19 @@ h6, .h6 { ...@@ -293,6 +294,19 @@ h6, .h6 {
} }
} }
.posts {
padding: 0;
> li {
list-style: none;
border-top: 1px solid #eee;
padding: 1em;
}
h4 a {
color: black;
}
}
.site-card-list { .site-card-list {
list-style-position: inside; list-style-position: inside;
......
---
title: News
menu: true
menu_order: 2
layout: page
---
{% include news-page.html posts=site.posts %}
--- ---
title: People title: People
menu: true menu: true
menu_order: 2 menu_order: 3
--- ---
{% include person-cards.html people=site.people %} {% include person-cards.html people=site.people %}
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
title: Publications title: Publications
menu: true menu: true
layout: toc layout: toc
menu_order: 6
--- ---
{% bibliography -g year %} {% bibliography -g year %}
...@@ -3,7 +3,8 @@ title: Concurrency ...@@ -3,7 +3,8 @@ title: Concurrency
project_id: concurrency project_id: concurrency
menu: true menu: true
parent_menu: Research parent_menu: Research
menu_order: 3 menu_order: 4
sub_menu_order: 1
--- ---
We develop formal reasoning techniques for concurrent programs, with a We develop formal reasoning techniques for concurrent programs, with a
......
...@@ -3,7 +3,8 @@ title: JavaScript ...@@ -3,7 +3,8 @@ title: JavaScript
project_id: web project_id: web
menu: true menu: true
parent_menu: Research parent_menu: Research
menu_order: 3 menu_order: 4
sub_menu_order: 2
--- ---
We study the mechanised specification of the JavaScript language We study the mechanised specification of the JavaScript language
......
...@@ -4,6 +4,7 @@ project_id: infer ...@@ -4,6 +4,7 @@ project_id: infer
menu: true menu: true
parent_menu: Teaching parent_menu: Teaching
menu_order: 5 menu_order: 5
sub_menu_order: 2
--- ---
The [Separation Logic](https://psvg.doc.ic.ac.uk/teaching/separationlogic.html) course is a a 4th-year MEng and MSc course The [Separation Logic](https://psvg.doc.ic.ac.uk/teaching/separationlogic.html) course is a a 4th-year MEng and MSc course
...@@ -43,4 +44,4 @@ You can see Lorenzo’s [pull request here.](https://github.com/connectbot/conne ...@@ -43,4 +44,4 @@ You can see Lorenzo’s [pull request here.](https://github.com/connectbot/conne
![Infer Lab](/images/images/Infer-lab-2-small.jpg) ![Infer Lab](/images/images/Infer-lab-2-small.jpg)
To follow the Infer team, check their [blog](http://fbinfer.com/blog/) or [Twitter](https://twitter.com/fbinfer). To follow the Infer team, check their [blog](http://fbinfer.com/blog/) or [Twitter](https://twitter.com/fbinfer).
For more details on the Infer lab or the Separation Logic course, contact the Imperial team below. For more details on the Infer lab or the Separation Logic course, contact the Imperial team below.
\ No newline at end of file
...@@ -4,6 +4,7 @@ project_id: moc ...@@ -4,6 +4,7 @@ project_id: moc
menu: true menu: true
parent_menu: Teaching parent_menu: Teaching
menu_order: 5 menu_order: 5
sub_menu_order: 3
--- ---
This is a 2nd year MEng compulsory course at the [Department of Computing](http://www.imperial.ac.uk/computing), [Imperial College London](http://www.imperial.ac.uk). This is a 2nd year MEng compulsory course at the [Department of Computing](http://www.imperial.ac.uk/computing), [Imperial College London](http://www.imperial.ac.uk).
......
...@@ -4,6 +4,7 @@ project_id: sl ...@@ -4,6 +4,7 @@ project_id: sl
menu: true menu: true
parent_menu: Teaching parent_menu: Teaching
menu_order: 5 menu_order: 5
sub_menu_order: 1
--- ---
The Separation Logic course is a 4th year MEng and MSc course on local reasoning about programs that manipulate the heap at the [Department of Computing](http://www.imperial.ac.uk/computing), [Imperial College London](http://www.imperial.ac.uk). The Separation Logic course is a 4th year MEng and MSc course on local reasoning about programs that manipulate the heap at the [Department of Computing](http://www.imperial.ac.uk/computing), [Imperial College London](http://www.imperial.ac.uk).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment