Skip to content

Commit

Permalink
First step toward moving to Bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
alshedivat committed May 1, 2020
1 parent dc14524 commit edc854a
Show file tree
Hide file tree
Showing 74 changed files with 716 additions and 5,161 deletions.
53 changes: 41 additions & 12 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# -----------------------------------------------------------------------------
# Site settings
# -----------------------------------------------------------------------------
name: Your Name

title: Your Name
email: you@example.com
description: > # this means to ignore newlines until "url:"
A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design.
Expand All @@ -12,11 +13,21 @@ footer_text: >
url: # the base hostname & protocol for your site
baseurl: /al-folio # the subpath of your site, e.g. /blog/
last_updated: # leave blank if you don't want to display last updated
last_updated: false # set to true if you want to display last updated in the footer

# -----------------------------------------------------------------------------
# Layout
# -----------------------------------------------------------------------------

navbar_fixed: true
footer_fixed: false
social_icons_pos: bottom
# TODO: add layout settings (single page vs. multi-page)

# -----------------------------------------------------------------------------
# Social integration
# -----------------------------------------------------------------------------

github_username: # your GitHub user name
twitter_username: # your Twitter handle
linkedin_username: # your LinkedIn user name
Expand All @@ -30,6 +41,7 @@ google_analytics: UA-XXXXXXXXX # out your google-analytics code
# -----------------------------------------------------------------------------
# Blog
# -----------------------------------------------------------------------------

blog_name: al-folio
blog_description: a simple whitespace theme for academics

Expand All @@ -46,14 +58,10 @@ text:
# Comments
disqus_shortname: al-folio # put your disqus shortname

# Optional features
show_social_icons: false
enable_anchorjs: false
enable_katex: true

# -----------------------------------------------------------------------------
# Collections
# -----------------------------------------------------------------------------

collections:
news:
defaults:
Expand Down Expand Up @@ -85,7 +93,10 @@ plugins:
- jekyll/scholar
- jemoji

# Jekyll-Scholar
# -----------------------------------------------------------------------------
# Jekyll Scholar
# -----------------------------------------------------------------------------

scholar:

last_name: Einstein
Expand All @@ -110,8 +121,26 @@ scholar:
query: "@*"

# -----------------------------------------------------------------------------
# Other settings
# Optional Features
# -----------------------------------------------------------------------------

enable_google_analytics: false
enable_highlight: true
enable_katex: true
enable_mansory: false
enable_progressbar: false
enable_tooltips: false
show_social_icons: true

# -----------------------------------------------------------------------------
# Library versions
# -----------------------------------------------------------------------------
jquery_version: "1.12.4"
katex_version: "0.9.0"
anchorjs_version: "3.2.2"

academicons_version: "1.8.6"
bootstrap_version: "4.4.1"
fontawesome_version: "5.11.2"
highlight_version: "9.15.10"
jquery_version: "3.4.1"
katex_version: "0.11.1"
mdb_version: "4.8.10"
popper_version: "1.15.0"
22 changes: 16 additions & 6 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
<footer>

<div class="wrapper">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.name }}.
{% if site.footer_fixed %}
<footer class="fixed-bottom">
<div class="container mt-0">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.title }}.
{{ site.footer_text }}
{% if site.last_updated %}
Last updated: {{ site.last_updated }}.
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{% endif %}
</div>

</footer>
{% else %}
<footer class="sticky-bottom mt-5">
<div class="container">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.title }}.
{{ site.footer_text }}
{% if site.last_updated %}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{% endif %}
</div>
</footer>
{% endif %}
28 changes: 18 additions & 10 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>{{ site.name }}{% if page.title and page.url != "/" %} | {{ page.title }}{% endif %}</title>
<meta name="description" content="{{ site.description }}">
<title>{{ site.title }}{% if page.title and page.url != "/" %} | {{ page.title }}{% endif %}</title>
<meta name="description" content="{{ site.description }}">

<link rel="shortcut icon" href="{{ '/assets/img/favicon.ico' | prepend: site.baseurl | prepend: site.url }}">
<!-- Bootstrap & MDB -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/{{ site.mdb_version }}/css/mdb.min.css">

<link rel="stylesheet" href="{{ '/assets/css/main.css' | prepend: site.baseurl | prepend: site.url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
</head>
<!-- Fonts & Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/{{ site.fontawesome_version }}/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/{{ site.academicons_version }}/css/academicons.min.css">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">

<!-- Styles -->
<link rel="shortcut icon" href="{{ '/assets/img/favicon.ico' | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ '/assets/css/main.css' | prepend: site.baseurl | prepend: site.url }}">

<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
98 changes: 55 additions & 43 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,58 @@
<header class="site-header">

<div class="wrapper">

{% if page.layout != "about" %}
<span class="site-title">
{% assign name = site.name | split: ' ' %}
<strong>{{ name | first }}</strong> {{ name | last }}
</span>
{% endif %}

<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
</span>
</label>

<div class="trigger">
<!-- About -->
<a class="page-link" href="{{ site.baseurl | prepend: site.url }}/">about</a>

<!-- Blog -->
<a class="page-link" href="{{ '/blog/' | prepend: site.baseurl | prepend: site.url }}">blog</a>

<!-- Pages -->
{% for page in site.pages %}
{% if page.title and page.url != "/" %}
<a class="page-link" href="{{ page.url | prepend: site.baseurl | prepend: site.url }}">{{ page.title }}</a>
{% endif %}
{% endfor %}

<!-- CV link -->
<!-- <a class="page-link" href="{{ '/assets/pdf/CV.pdf' | prepend: site.baseurl | prepend: site.url }}">vitae</a> -->

<header>

<!-- Nav Bar -->
<nav id="navbar" class="navbar navbar-light bg-white navbar-expand-sm {% if site.navbar_fixed %}fixed-top{% else %}sticky-top{% endif %}">
<div class="container">
{% if page.title != "about" %}
{% assign name = site.title | split: ' ' %}
<a class="navbar-brand title font-weight-lighter" href="{{ site.baseurl | prepend: site.url }}/"><span class="font-weight-bold">{{ name | first }}</span> {{ name | last }}</a>
{% elsif site.social_icons_pos == 'top' %}
<!-- Social Icons -->
<div class="row ml-1 ml-sm-0">
{% include social.html %}
</div>
{% endif %}
<!-- Navbar Toogle -->
<button class="navbar-toggler collapsed ml-auto" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar top-bar"></span>
<span class="icon-bar middle-bar"></span>
<span class="icon-bar bottom-bar"></span>
</button>
<div class="collapse navbar-collapse text-right" id="navbarNav">
<ul class="navbar-nav ml-auto flex-nowrap">
<li class="nav-item {% if page.title == 'about' %}navbar-active{% endif %}">
<a class="nav-link" href="{{ '/' | prepend: site.baseurl | prepend: site.url }}">
about
{% if page.title == "about" %}
<span class="sr-only">(current)</span>
{% endif %}
</a>
</li>
{% for p in site.pages %}
{% if p.title and p.url != "/" %}
<li class="nav-item {% if page.nav == p.nav %}navbar-active{% endif %}">
<a class="nav-link" href="{{ p.url | prepend: site.baseurl | prepend: site.url }}">
{{ p.title }}
{% if page.nav == p.nav %}
<span class="sr-only">(current)</span>
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</nav>

</div>
</div>
</nav>

{% if site.enable_progressbar %}
<!-- Scrolling Progress Bar -->
<progress id="progress" value="0">
<div class="progress-container">
<span class="progress-bar"></span>
</div>
</progress>
{% endif %}

</header>
46 changes: 32 additions & 14 deletions _includes/hemline.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
<!-- Load jQuery -->
<script src="//code.jquery.com/jquery-{{ site.jquery_version }}.min.js"></script>
<!-- Load Core and Bootstrap JS -->
<script src="https://code.jquery.com/jquery-{{ site.jquery_version }}.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/{{ site.popper_version }}/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/{{ site.mdb_version }}/js/mdb.min.js"></script>

<!-- Load Common JS -->
<script src="{{ '/assets/js/common.js' | prepend: site.baseurl | prepend: site.url }}"></script>

<!-- Code Syntax Highlighting -->
{% if site.enable_highlight %}
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/{{ site.highlight_version }}/highlight.min.js" integrity="sha256-1zu+3BnLYV9LdiY85uXMzii3bdrkelyp37e0ZyTAQh0=" crossorigin="anonymous"></script>
<script>hljs.initHighlightingOnLoad();</script>
{% endif %}

{% if site.enable_katex %}
<!-- Load KaTeX -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.css" integrity="sha256-V8SV2MO1FUb63Bwht5Wx9x6PVHNa02gv8BgH/uH3ung=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/{{ site.katex_version }}/katex.min.js" integrity="sha256-F/Xda58SPdcUCr+xhSGz9MA2zQBPb0ASEYKohl8UCHc=" crossorigin="anonymous"></script>
<script src="{{ '/assets/js/katex.js' | prepend: site.baseurl | prepend: site.url }}"></script>
{% endif %}

{% if site.enable_anchorjs %}
<!-- Load Anchor JS -->
<script src="//cdnjs.cloudflare.com/ajax/libs/anchor-js/{{ site.anchorjs_version }}/anchor.min.js"></script>
<script>
anchors.options.visible = 'always';
anchors.add('article h2, article h3, article h4, article h5, article h6');
</script>
{% if site.enable_mansory %}
<!-- Load Mansory -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min.js" integrity="sha256-Nn1q/fx0H7SNLZMQ5Hw5JLaTRZp0yILA/FRexe19VdI=" crossorigin="anonymous"></script>
{% endif %}

<!-- Include custom icon fonts -->
<link rel="stylesheet" href="{{ '/assets/css/fontawesome-all.min.css' | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ '/assets/css/academicons.min.css' | prepend: site.baseurl | prepend: site.url }}">
{% if site.enable_progressbar %}
<!-- Load Progress Bar -->
<script src="{{ '/assets/js/progressbar.js' | prepend: site.baseurl | prepend: site.url }}"></script>
{% endif %}

{% if site.enable_tooltips %}
<!-- Enable Tooltips -->
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
{% endif %}

{% if site.enable_google_analytics %}
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand All @@ -34,3 +51,4 @@
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
32 changes: 17 additions & 15 deletions _includes/news.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<div class="news">
<h2>news</h2>
{% if site.news %}
<table>
{% assign news = site.news | reverse %}
{% for item in news limit: site.news_limit %}
<tr>
<td class="date">{{ item.date | date: "%b %-d, %Y" }}</td>
<td class="announcement">
{% if item.inline %}
{{ item.content | remove: '<p>' | remove: '</p>' | emojify }}
{% else %}
<a class="news-title" href="{{ item.url | prepend: site.baseurl }}">{{ item.title }}</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<div class="table-responsive">
<table class="table table-sm table-borderless">
{% assign news = site.news | reverse %}
{% for item in news limit: site.news_limit %}
<tr>
<th scope="row">{{ item.date | date: "%b %-d, %Y" }}</th>
<td>
{% if item.inline %}
{{ item.content | remove: '<p>' | remove: '</p>' | emojify }}
{% else %}
<a class="news-title" href="{{ item.url | prepend: site.baseurl }}">{{ item.title }}</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<p>No news so far...</p>
{% endif %}
Expand Down
24 changes: 9 additions & 15 deletions _includes/social.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<div class="social">
<span class="contacticon center">
<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>
{% if site.orcid_id %}<a href="https://orcid.org/{{ site.orcid_id }}" target="_blank" title="ORCID"><i class="ai ai-orcid"></i></a>{% endif %}
{% if site.scholar_userid %}<a href="https://scholar.google.com/citations?user={{ site.scholar_userid }}" target="_blank" title="Google Scholar"><i class="ai ai-google-scholar"></i></a>{% endif %}
{% if site.github_username %}<a href="https://github.com/{{ site.github_username }}" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>{% endif %}
{% if site.linkedin_username %}<a href="https://www.linkedin.com/in/{{ site.linkedin_username }}" target="_blank" title="LinkedIn"><i class="fab fa-linkedin"></i></a>{% endif %}
{% if site.twitter_username %}<a href="https://twitter.com/{{ site.twitter_username }}" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a>{% endif %}
{% if site.strava_userid %}<a href="https://www.strava.com/athletes/{{ site.strava_userid }}" target="_blank" title="Strava"><i class="fab fa-strava"></i></a>{% endif %}
</span>

<div class="col three caption">
{{ site.contact_note }}
</div>
</div>
<span class="contact-icon text-center">
<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>
{% if site.orcid_id %}<a href="https://orcid.org/{{ site.orcid_id }}" target="_blank" title="ORCID"><i class="ai ai-orcid"></i></a>{% endif %}
{% if site.scholar_userid %}<a href="https://scholar.google.com/citations?user={{ site.scholar_userid }}" target="_blank" title="Google Scholar"><i class="ai ai-google-scholar"></i></a>{% endif %}
{% if site.github_username %}<a href="https://github.com/{{ site.github_username }}" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>{% endif %}
{% if site.linkedin_username %}<a href="https://www.linkedin.com/in/{{ site.linkedin_username }}" target="_blank" title="LinkedIn"><i class="fab fa-linkedin"></i></a>{% endif %}
{% if site.twitter_username %}<a href="https://twitter.com/{{ site.twitter_username }}" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a>{% endif %}
{% if site.strava_userid %}<a href="https://www.strava.com/athletes/{{ site.strava_userid }}" target="_blank" title="Strava"><i class="fab fa-strava"></i></a>{% endif %}
</span>
Loading

0 comments on commit edc854a

Please sign in to comment.