Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple template with good footnotes #125

Open
tlienart opened this issue Apr 12, 2021 · 8 comments
Open

simple template with good footnotes #125

tlienart opened this issue Apr 12, 2021 · 8 comments

Comments

@tlienart
Copy link
Owner

https://mzucker.github.io/2018/05/14/maptrace.html

@iuvbio
Copy link

iuvbio commented May 21, 2021

I really like this theme. Are you planning on making a template from it?

@tlienart
Copy link
Owner Author

Eventually yes. It's always faster if someone else than me picks it up and I help out on the details though :)

@iuvbio
Copy link

iuvbio commented May 24, 2021

I might have some time on the weekend to make a start. Will let you know.

@iuvbio
Copy link

iuvbio commented May 29, 2021

I've started porting this template, I think it looks pretty good already, but there's still a few things to do. Mainly to fix the nav, currently it's not responsive, the hamburger menu is always shown. Also for some reason a.visited is applied although I think the css is not different from the original there. Finally, I'm not sure what to do with the footnotes, as they are currently in a table (not sure if that's because I started off the "basic" template, or if that's always the case) and in the original they are in simple div. I kind of like the table better though.

I made you a collaborator in my fork, would be cool if you could take a look. There is also the question about the post title - the original has a header for the post title which also contains the creation date, whereas in all the Franklin templates I believe the post title is just an h1. The way I've implemented this is that you can specify a variable posttitle, in that case the header with date will be added and in the body you should then probably only use heading starting from h2. If you want the old layout, you just use h1 and don't define the posttitle var. Let me know what you think about this approach. Also is there a variable for creation time rather than last modified?

@tlienart
Copy link
Owner Author

tlienart commented Jun 3, 2021

Thanks for taking this on @iuvbio ! I'll take a look and maybe we can use your repo and open an issue there for each specific points/issue you raised?

@tlienart
Copy link
Owner Author

tlienart commented Jun 9, 2021

  • date: yes you can use fd_ctime, though I would recommend letting the user specify pubdate = ... and use that in the title as then they're sure of what they'll get and can update it
  • posttitle, I would suggest a small alternative but I'm happy for you to keep things exactly as they are
<header class="post-header">
  <h1 class="post-title" itemprop="name headline">{{ fill title }}</h1>
  {{isdef pubdate}}
    <p class="post-meta"><time datetime="{{ fill pubdate }}" itemprop="datePublished">{{ fill pubdate }}</time></p>
  {{end}}
  {{isndef pubdate}}
    <p class="post-meta"><time datetime="{{ fill fd_ctime }}" itemprop="datePublished">{{ fill fd_ctime }}</time></p>
  {{end}}
</header>

I'm looking at the CSS now. Will comment when I've figured it out.

Note: one thing you need to do is extend src/FranklinTemplates.jl to add nomplex in there. It will also need to be added to the gallery (see the README for this).

@tlienart
Copy link
Owner Author

tlienart commented Jun 9, 2021

The CSS for the nav-bar should be refactored. Here are a few changes that seem to work and help. You might want to grab the full code from an example demo that fully works though in order to reproduce a specific effect. (In the case below, the menu is always hidden unless you hover, you might want to add a smoothing effect or a delay in the hiding behaviour for it to look better, or you might want to only make the hamburger visible below 600px etc).

A few hamburger menus that can be looked at

header.html

<header class="site-header">
  <div class="wrapper">
    <a class="site-title" href="/">
      Nomplex Template
    </a>
    <nav class="site-nav">
      <div class="trigger">
        <a href="/">Home</a>
        <a href="/menu1/">Code blocks</a>
        <a href="/menu2/">More goodies</a>
        <a href="/menu3/">Tags</a>
      </div>
      <img src="/assets/hamburger.svg" id="menu-icon">
    </nav>
  </div>
</header>

in complex.css

@media screen and (max-width: 600px) {
  .site-nav {
    /* position: absolute; */
    top: 9px;
    right: 15px;
    /* background-color: #fdfdfd; */
    /* border: 1px solid #e8e8e8; */
    /* border-radius: 5px; */
    text-align: right;
  }
/*  .site-nav .menu-icon {
    /* display: block; */
    /* float: right; */
    /* width: 36px; */
    /* height: 26px; */
    /* line-height: 0; */
    /* padding-top: 0px; */
    /* text-align: center; */
  }
  .site-nav .menu-icon > svg {
    /* width: 18px; */
    /* height: 15px; */
  }
  .site-nav .menu-icon > svg path {
    /* fill: #424242; */
  }
/* ... rest of the css ... */

@iuvbio
Copy link

iuvbio commented Jun 19, 2021

@tlienart thanks a lot for reverting back, this or next weekend I should have some time to take a look at your comments and hopefully finish this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants