Skip to content

Commit c0d322e

Browse files
committed
added descriptions to index
1 parent 1cf771f commit c0d322e

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

html/css/style.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ section *:last-child{
6262
}
6363

6464
/* nav */
65-
nav{
65+
nav {
6666
line-height: 42px;
6767
height: 46px;
6868
position:absolute;
@@ -148,3 +148,7 @@ nav .pull-right{
148148
font-size: 12pt;
149149
}
150150

151+
li {
152+
padding-top: 10px;
153+
padding-bottom: 10px;
154+
}

prepare_deploy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,17 @@ def convert_notebooks(selected_nb_re=None):
142142
index_listing = dict()
143143
index_listing["link_path"] = "{}.html".format(cleanbase)
144144
index_listing["link_name"] = nb['metadata']['astropy-tutorials']['link_name']
145+
index_listing["description"] = nb['metadata']['astropy-tutorials']['description']
145146
index_list.append(index_listing)
146147

147148
# Make an index of all notes
148149
entries = []
149150
for page in sorted(index_list, key=lambda x: x['link_name']): # sort on tutorial name
150-
entries.append(' <li><a href="{0[link_path]}">{0[link_name]}</a></li>'.format(page))
151+
entry_html = "<li>"
152+
entry_html += "<a href='{0[link_path]}''>{0[link_name]}</a>".format(page)
153+
entry_html += "<br/><span>{0[description]}</span>".format(page)
154+
entry_html += "</li>"
155+
entries.append(entry_html)
151156

152157
with open(os.path.join(current_directory,'html','index.html'), 'w') as f:
153158
f.write(INDEX_TEMPLATE.format(entries='\n'.join(entries)))

0 commit comments

Comments
 (0)