Skip to content

Commit

Permalink
Positioning + Minor Formatting (#7)
Browse files Browse the repository at this point in the history
* positioning header-tags

* baseurl in navbar for blog

* Update head.html

* Update default.html
  • Loading branch information
shravanngoswamii authored Oct 2, 2024
1 parent e2fccf2 commit d94defd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="{{ site.baseurl }}/assets/images/cbl.png">
<link rel="icon" type="image/x-icon" href="https://mlg.eng.cam.ac.uk/assets/logo/favicon.png">

<title>{% if page.title %}{{ page.title | escape }} · {% endif %}Cambridge MLG Blog</title>

Expand Down
20 changes: 14 additions & 6 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
.mlg-navbar a {
text-decoration: none;
}

.mlg-navbar a span:hover {
color: #193d8f;
}

.mlg-navbar-container {
display: flex;
Expand Down Expand Up @@ -111,6 +115,7 @@
display: flex;
}
}

footer {
position: absolute;
max-width: 100% !important;
Expand Down Expand Up @@ -163,25 +168,28 @@
.github-link:hover .footer-github-icon {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0,0,256,256'%3E%3Cg fill='%233a88c4' fill-rule='nonzero' stroke='none' stroke-width='1' stroke-linecap='butt' stroke-linejoin='miter' stroke-miterlimit='10' stroke-dasharray='' stroke-dashoffset='0' font-family='none' font-weight='none' font-size='none' text-anchor='none' style='mix-blend-mode: normal'%3E%3Cg transform='scale(10.66667,10.66667)'%3E%3Cpath d='M10.9,2.1c-4.6,0.5 -8.3,4.2 -8.8,8.7c-0.5,4.7 2.2,8.9 6.3,10.5c0.3,0.1 0.6,-0.1 0.6,-0.5v-1.6c0,0 -0.4,0.1 -0.9,0.1c-1.4,0 -2,-1.2 -2.1,-1.9c-0.1,-0.4 -0.3,-0.7 -0.6,-1c-0.3,-0.1 -0.4,-0.1 -0.4,-0.2c0,-0.2 0.3,-0.2 0.4,-0.2c0.6,0 1.1,0.7 1.3,1c0.5,0.8 1.1,1 1.4,1c0.4,0 0.7,-0.1 0.9,-0.2c0.1,-0.7 0.4,-1.4 1,-1.8c-2.3,-0.5 -4,-1.8 -4,-4c0,-1.1 0.5,-2.2 1.2,-3c-0.1,-0.4 -0.2,-0.9 -0.2,-1.3c0,-0.4 0,-0.9 0.2,-1.3c0,-0.2 0.2,-0.3 0.3,-0.3h0.1c0.5,0.1 1.5,0.4 2.4,1.3c0.6,-0.2 1.3,-0.3 2,-0.3c0.7,0 1.4,0.1 2,0.3c0.9,-0.9 2,-1.2 2.5,-1.3h0.1c0.2,0 0.3,0.1 0.4,0.3c0,0.4 0,0.9 0,1.3c0,0.8 -0.1,1.2 -0.2,1.4c0.7,0.8 1.2,1.8 1.2,3c0,2.2 -1.7,3.5 -4,4c0.6,0.5 1,1.4 1,2.3v2.6c0,0.3 0.3,0.6 0.7,0.5c3.7,-1.5 6.3,-5.1 6.3,-9.3c0,-6 -5.1,-10.7 -11.1,-10z'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

@media(max-width: 767.98px) {
.nav-footer-center {
margin-top: 0 !important;
}
}

header {
height: 100px;
{% unless page.url == '/posts-by-tag' or page.url == '/posts-by-tag/' %}
margin-bottom: 0px;
{% endunless %}
}

.header-tags{
text-align: right;
font-family: 'Roboto Condensed', sans-serif;
text-transform: uppercase;
font-variant: small-caps;
padding-top: .5em;
padding-bottom: .5em;
padding-bottom: 2.5em;
margin-top: -50px;
}

.header-tags a {
font-size: 1.2em;
color: white;
Expand All @@ -191,6 +199,7 @@
padding: 5px;
background: rgba(0, 0, 0, 0.5);
}

.header-tags a:hover {
border-bottom: 5px solid #3a88c4;
}
Expand All @@ -209,7 +218,7 @@
<li class="mlg-nav-item"><a class="mlg-nav-link" href="https://mlg.eng.cam.ac.uk/publications/">Publications</a></li>
<li class="mlg-nav-item"><a class="mlg-nav-link" href="https://mlg.eng.cam.ac.uk/people/">People</a></li>
<li class="mlg-nav-item"><a class="mlg-nav-link" href="https://mlg.eng.cam.ac.uk/phd_programme_in_advanced_machine_learning.html">PhD Admissions</a></li>
<li class="mlg-nav-item"><a class="mlg-nav-link" href="https://mlg.eng.cam.ac.uk/blog">Blog</a></li>
<li class="mlg-nav-item"><a class="mlg-nav-link" href="{{ site.baseurl }}">Blog</a></li>
</ul>
</div>
<script>
Expand All @@ -225,11 +234,10 @@

<!-- Main content -->
<div class="centered">
{% unless page.url == '/posts-by-tag' or page.url == '/posts-by-tag/' %}
<div class="header-tags">
<a href="{{ site.baseurl }}">posts</a>
<a href="{{ site.baseurl }}/posts-by-tag">tags</a>
</div>
{% endunless %}

<main>
{{ content }}
Expand Down

0 comments on commit d94defd

Please sign in to comment.