Git Product home page Git Product logo

Comments (6)

wp99cp avatar wp99cp commented on July 4, 2024 1

My suggestion, therefore, is to modify the HTML template such that the page title (same as nav entry) is omitted and only the Markdown title is rendered. Such an approach has the advantage, that the nav entry and the page title must not be identical.

from cevi-tools-webpage.

wp99cp avatar wp99cp commented on July 4, 2024

Currently, both titles are h1 but with different CSS style properties. This is bad practice anyway and should be changed. When you look into the HTML template it gets lear that the first h1 (the bigger one) is the "page title", i.g. the entry from the navigation, the second h1 (the smaller one) gets rendered out of the Markdown file.

<header class="post-header">
<h1 class="post-title">{{ page.title | escape }}</h1>
</header>
<div class="post-content">
{{ content }}
</div>

Therefore a page, e.g.:

---
layout: page
title: In Entwicklung
permalink: /entwicklung/
weight: 2
---


# Webtools in Entwicklung

gets rendered as:

<article class="post">

  <header class="post-header">
    <h1 class="post-title">In Entwicklung</h1>
  </header>

  <div class="post-content">
    <h1 id="webtools-in-entwicklung">Webtools in Entwicklung</h1>
<p>Hier zeigen wir euch bald, an welchen neuen spannenden Projekten wir arbeiten.</p>

  </div>

</article>

from cevi-tools-webpage.

maede97 avatar maede97 commented on July 4, 2024

I will create a PR that does this.

from cevi-tools-webpage.

maede97 avatar maede97 commented on July 4, 2024

Well... this does not fix the issue.
The H1 title from the markdown file is smaller than the H2.
Maybe we keep the title from the site however remove the ones in the markdown files?

from cevi-tools-webpage.

wp99cp avatar wp99cp commented on July 4, 2024

Just update the CSS as well. By copy past the style for the h1

.post-title {
@include relative-font-size(2.625);
letter-spacing: -1px;
line-height: 1;
@include media-query($on-laptop) {
@include relative-font-size(2.25);
}
}

into the section for rendering the markdown file

.post-content {
margin-bottom: $spacing-unit;
h2 {
@include relative-font-size(2);
@include media-query($on-laptop) {
@include relative-font-size(1.75);
}
}
h3 {
@include relative-font-size(1.625);
@include media-query($on-laptop) {
@include relative-font-size(1.375);
}
}
h4 {
@include relative-font-size(1.25);
@include media-query($on-laptop) {
@include relative-font-size(1.125);
}
}
}

from cevi-tools-webpage.

wp99cp avatar wp99cp commented on July 4, 2024

I still prefer separating page titles and navigation entries

from cevi-tools-webpage.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.