Skip to content

Commit c8b218a

Browse files
committed
simplify page generator
1 parent ff6e7a1 commit c8b218a

File tree

5 files changed

+50
-99
lines changed

5 files changed

+50
-99
lines changed

content/crash/intro.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Description: Thinking about neurons as electrically excitable membranes
44
weight: 20
55
---
66

7-
## Introduction
8-
97
Neurons are electrically excitable cells that typically interconnect to form complex networks with emergent properties that regulate thought, organ function, and behavior. Although networks of neurons are required to perform these advanced functions, much can be learned by studying neurons as the single cell level, and drugs designed to act on individual neurons can greatly influence function of these advanced networks.
108

119
In a simplified view, neurons sense inputs (chemical signals released from upstream neurons) and combine these signals to produce an output (chemical signal release) that may influence downstream neurons. Pharmacological modulation of any of these steps (signal sensing, integration, or signal release) at the level of the individual neuron may profoundly change the way the entire network operates. Discovering how pharmacological agents interact with pathways implicated in a disease can be an important first step toward developing therapeutics aimed at treating it.

layouts/_default/baseof.html

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,20 @@
4747

4848
<body class="m-0 p-0">
4949

50-
<header class="text-light" style="background-image: linear-gradient(#20558a, #144474);">
50+
<header class="text-light" style="background-color: #144474">
5151
<div class="container limit-width py-3">
52-
<div class="fs-1">{{ $.Title }}</div>
53-
<div class="fs-5 fw-light">{{ .Param "description" }}</div>
52+
<div class="fs-1"><a href='/patch/' class="text-light">The Patch Guide</a></div>
53+
<div class="fs-5 fw-light">A Student's Guide to Patch-Clamp Electrophysiology</div>
5454
</div>
5555
</header>
5656

5757
{{ if not .IsHome }}
58-
<nav class="border-bottom shadow-bottom shadow-sm" style="background-image: linear-gradient(#f8f9fa, #f2f2f2);">
59-
<div class="container limit-width py-2">
60-
<a href="{{ .Site.BaseURL }}">
61-
The Patch Guide
62-
</a>
63-
64-
{{ if or .IsSection .IsPage }}
65-
<span>»</span>
66-
<a href="{{ (site.GetPage .Section).Permalink }}">
67-
{{ (site.GetPage .Section).Title }}
68-
</a>
69-
{{ end }}
70-
71-
{{ if .IsPage }}
72-
<span>»</span>
73-
<a href='{{ .Permalink }}'>
74-
{{ .Title }}
75-
</a>
76-
{{ end }}
58+
<div class="container limit-width py-3">
59+
<div class="border rounded bg-light px-3 py-2 mt-3">
60+
<div class="fs-3 fw-semibold">{{ $.Title }}</div>
61+
<div class="fs-5">{{ .Param "description" }}</div>
7762
</div>
78-
</nav>
63+
</div>
7964
{{ end }}
8065

8166
<main class="bg-white">
@@ -87,32 +72,45 @@
8772
</div>
8873
</main>
8974

90-
<footer class="py-4 border-top bg-light">
91-
<div class="container limit-width text-end">
92-
93-
<div class="d-flex justify-content-between">
94-
95-
<div class="text-start text-muted">
96-
<div>
97-
Copyright {{ now.Format "2006" }} <a href='https://github.com/swharden' class="text-dark">@swharden</a>
98-
</div>
99-
<div>
100-
Built with Hugo {{ .Site.Hugo.Version }}
101-
</div>
102-
<div>
103-
{{ time now | time.Format ":date_long" }}
104-
at {{ time now "America/New_York" | time.Format ":time_short" }} EST
105-
</div>
106-
</div>
107-
108-
<div>
109-
<a href="https://github.com/swharden/patch">
110-
<img class="github-edit-button" src="/patch/img/github-edit.svg" />
111-
</a>
112-
</div>
75+
<footer class="pb-5">
76+
<div class="container limit-width">
77+
78+
<hr class="mb-4" />
79+
80+
{{ if .NextInSection }}
81+
<div>
82+
Next Article:
83+
<a href="{{.NextInSection.Permalink}}">
84+
{{.NextInSection.Title}}
85+
</a>
86+
</div>
87+
{{ end }}
88+
89+
{{ if .PrevInSection }}
90+
<div>Previous Article:
91+
<a href="{{.PrevInSection.Permalink}}">
92+
{{.PrevInSection.Title}}
93+
</a>
94+
</div>
95+
{{ end }}
96+
97+
<div>
98+
Copyright © {{ now.Format "2006" }}
99+
<a href='https://swharden.com/about'>Scott W Harden</a>
100+
</div>
101+
102+
<div>
103+
Built {{ time now | time.Format ":date_long" }}
104+
at {{ time now "America/New_York" | time.Format ":time_short" }}
105+
with <a href='https://gohugo.io/'>Hugo {{ .Site.Hugo.Version }}</a>
106+
</div>
107+
108+
<div>
109+
<a href="https://github.com/swharden/patch">
110+
Edit this page
111+
</a> on GitHub
113112
</div>
114113

115-
</div>
116114
</footer>
117115

118116
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"

layouts/_default/home.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@
44

55
{{ range $sectionPage := .Site.Sections }}
66

7-
<div class="fs-4 lh-1 pt-3">
8-
<a href="{{$sectionPage.Permalink}}" class="text-dark">
9-
{{$sectionPage.Title}}
10-
</a>
11-
</div>
7+
<div class="fs-4 lh-1 pt-3">{{$sectionPage.Title}}</div>
128
<div class="mb-2">{{$sectionPage.Description}}</div>
13-
149
<ul class="pb-2">
1510
{{ $pagesInSection := where (where .Site.Pages "Section"
1611
$sectionPage.Section) ".IsSection" "==" false }} {{ range $pagesInSection }}

layouts/_default/single.html

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,4 @@
22

33
{{ .Content | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `<a href="#${2}">${1}</a> ${3}` | safeHTML }}
44

5-
<nav>
6-
<div class="d-flex justify-content-between mt-5">
7-
{{ if .NextInSection }}
8-
<div class="text-center">
9-
<div>Previous</div>
10-
<div>
11-
<a href="{{.NextInSection.Permalink}}" class="btn btn-primary">
12-
{{.NextInSection.Title}}
13-
</a>
14-
</div>
15-
</div>
16-
{{ end }}
17-
18-
<div>
19-
<div class="text-center">&nbsp;</div>
20-
<div>
21-
<a href="{{ .Site.BaseURL }}" class="btn btn-secondary">
22-
Home
23-
</a>
24-
</div>
25-
</div>
26-
27-
{{ if .PrevInSection }}
28-
<div>
29-
<div class="text-center">Next</div>
30-
<div>
31-
<a href="{{.PrevInSection.Permalink}}" class="btn btn-primary">
32-
{{.PrevInSection.Title}}
33-
</a>
34-
</div>
35-
</div>
36-
{{ end }}
37-
</div>
38-
</nav>
39-
405
{{ end }}

layouts/shortcodes/specific.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
<div class="alert alert-primary d-flex align-items-center" role="alert">
2-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
3-
class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16" role="img" aria-label="Warning:">
4-
<path
5-
d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" />
6-
</svg>
7-
<div>
8-
Information on this page may be laboratory-specific.
9-
</div>
1+
<div class="bg-light d-inline-block border p-2 rounded">
2+
3+
<strong>Warning:</strong>
4+
This page may contain laboratory-specific information
105
</div>

0 commit comments

Comments
 (0)