Skip to content

Commit

Permalink
updated navbar styling
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwisdom committed Oct 11, 2024
1 parent a5e21b0 commit f0a9d41
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 53 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Copy CNAME file
run: |
echo "2024.newspeak.house" > site/CNAME
echo "2024.newspeak.house" > CNAME
working-directory: ${{ github.workspace }}

# Step 6: Confirm CNAME file is present
Expand Down
16 changes: 5 additions & 11 deletions custom_theme/header.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
<!-- block header -->
<nav class="navbar navbar-expand-xl border-bottom">
<div class="container-fluid">
<div class="container-fluid" style="display:inline">
{% if config.theme.logo %}
<img class="logo" src="{{ config.theme.logo|url }}">
{% endif %}

{% if config.theme.components and config.theme.components.site_name == False %}
{% else %}
<span class="{{ config.theme.site_name_style }} fs-4 title-color site-name" id="component-site-name" style="text-transform: uppercase;">{{ config.site_name }}</span>
{# {% else %} #}
{# <span class="{{ config.theme.site_name_style }} fs-4 title-color site-name" id="component-site-name" style="text-transform: uppercase;">{{ config.site_name }}</span> #}
{% endif %}

<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsMenu"
aria-controls="navbarsMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse flex-column ml-auto" id="navbarsMenu">
<ul class="navbar-nav">
<div class="navbar-nav flex-row flex-wrap justify-content-center">

<!-- block menu -->
<li class="nav-item">
{% include "modules/menu.html" %}
{% include "menu.html" %}
</li>
<!-- endblock -->

Expand Down
4 changes: 2 additions & 2 deletions custom_theme/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<header style="display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;">
<div style="display: flex; flex-direction: column; align-items: center;">
<img src="{{ 'images/book-logo.png'|url }}" alt="Logo" style="height: 100px; width: auto; object-fit: contain;">
{# <h1 style="margin: 0; line-height: 1.2; font-size: 20px;">
<h1 style="margin: 0; line-height: 1.2; font-size: 16px;">
2024 Newspeak House<br>
Fellowship Candidates
</h1> #}
</h1>
</div>
</header>
{% include "header.html" %}
Expand Down
16 changes: 16 additions & 0 deletions custom_theme/menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- block menu -->
{%- if nav|length > 1 %}
{% if config.theme.components and config.theme.components.menu == False %}
{% else %}
<ul class="navbar-nav p-0 m-0">
{%- for nav_item in nav %}
{%- if not nav_item.active %}
<li class="nav-item mx-2">
<a class="nav-link text-decoration-none" href="{{ nav_item.url|url }}">[{{ nav_item.title }}]</a>
</li>
{%- endif %}
{%- endfor %}
</ul>
{% endif %}
{%- endif %}
<!-- endblock -->
106 changes: 66 additions & 40 deletions docs/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -1,63 +1,89 @@
@font-face {
font-family: 'Copernicus';
src: url('/fonts/GalaxieCopernicus-Book.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'Copernicus';
src: url('/fonts/GalaxieCopernicus-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}

@font-face {
font-family: 'Copernicus';
src: url('/fonts/GalaxieCopernicus-BookItalic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}

@font-face {
font-family: 'Copernicus';
src: url('/fonts/GalaxieCopernicus-BoldItalic.ttf') format('truetype');
font-weight: bold;
font-style: italic;
}

/* Basic body styling */
body {
/* max-width: 800px; */
margin: 0 auto;
padding: 1rem;
line-height: 1.6;
/* font-family: 'Copernicus', sans-serif; */
}

/* h2, h3, h4 {
font-family: 'Copernicus', sans-serif;
} */

h2 {
clear: both;
margin-top: 2rem;
margin-bottom: 1rem;

}

p {
margin-bottom: 2rem;
}

/* General Image Styling */
img {
border-radius: 30px; /* Slightly rounded corners for images */
border-radius: 30px;
margin-bottom: 2rem;
max-width: 100%; /* Ensure images don't overflow their container */
height: auto; /* Maintain aspect ratio */
}

/* Floated Images for Larger Screens */
img.float-left {
float: left;
margin: 0 1rem 1rem 0;
}

img.float-right {
float: right;
margin: 0 0 1rem 1rem;
}

/* Navigation Styles */
.navbar-nav {
list-style: none;
padding: 0;
margin: 0;
display: flex;
justify-content: center; /* Center the nav items */
align-items: center;
}

.nav-item {
margin: 0 8px; /* Spacing between items */
}

.nav-link {
font-size: 18px;
padding: 4px 8px;
text-decoration: none;
color: #333;
line-height: normal; /* Use normal line height */
}

/* Hover and active styles */
.nav-link:hover {
text-decoration: underline;
color: #000;
}

/* Media Query for small screens */
@media (max-width: 600px) {

img {
float: none !important;
display: block;
margin: 0 auto 1rem auto !important;
float: none; /* Remove float */
display: block; /* Display as block */
margin: 1rem auto; /* Center the image */
width: 70%;
}
}

p {
display: inline-block;
}

.navbar-nav {
flex-direction: column;
padding: 0; /* Remove padding */
margin: 0; /* Remove margin */
}

.nav-item {
margin: 4px 0; /* Reduce spacing between nav items */
}
}

0 comments on commit f0a9d41

Please sign in to comment.