Initial commit

This commit is contained in:
Sean Dockray 2020-06-04 10:56:12 +10:00
commit d26e775764
4805 changed files with 474522 additions and 0 deletions

15
PUBLISH.trigger.md Normal file
View File

@ -0,0 +1,15 @@
Publish the current version of the website by changing the text few lines below.
For example, add your name after the line saying: "_ _ _ New changes after this _ _ _"
Don't forget to click on "Commit Changes" to commit the changes.
- [PREVIEW WEB SITE](https://)
- [PUBLISHED WEB SITE](https://)
---
```
_ _ _ New changes after this _ _ _
```

86
README.md Normal file
View File

@ -0,0 +1,86 @@
# Syllabus
Our website (the published version of the web site is here: https://syllabus.pirate.care/) is rendered/processed into a static HTML web site by [HUGO](https://gohugo.io/) using the *Markdown files* from this [Git](https://git-scm.com/) repository served to you by [Gitea](https://gitea.io/). *Markdown files* which are rendered into web site pages can be found inside the folder 📁 **content** which is listed right below 📁 **archetypes**, and above 📁 **custom_sysadmin**, 📁 **data/books**, 📁 **public/css** etc. *Markdown files* have the extension **.md**. We **add/edit** *Markdown files* in this repository in order to have **HUGO** process/render/convert them into a regular Web Site people can access. Through that process every *Markdown file* gets transformed into an individual Web/HTML Page.
#### There are two ways to edit existing Markdown files and add new ones:
#### 1. One could edit the web site via the custom setup at https://syllabus.pirate.care/_preview/ which adds a user friendly header which looks like this:
![](static/images/preview_header_small.png)
a) To **edit** the current page one should use the button/link **edit_this**. It brings you straight into the editing *Markdown file* "responsible" for that web page.
b) To **add** a new topic one should use the button/link **add_new_topic**. In the field *Name your file...* type the new topic's name (without spaces) ending with **.md**. Make sure that the first line of the *Markdown file* has only three dashes **---** followed in the second line with **title: "A Very Good Page Title"** (*mind the quotes*). The third line start with **has_sessions: ["first_session_name.md", "second_session_name.md"]** (*mind the brackets and quotes*). The sessions listed in that line will appear in a sidebar menu for that topic. In this case the forth line will be again three dashes **---** and an empty line just before the content of the page. None of those lines will appear at the web site. That's called **header**[^1] and it carries the metadata for that *Markdown file*. Here is the example of one of the topic's header:
![](static/images/topic_header.png)
c) To **add** a new session one should use the button/link **add_new_session**. In the field *Name your file...* type the new session's name (without spaces) ending with **.md**. Make sure that the first line of the *Markdown file* has only three dashes **---** followed in the second line with **title: "A Very Good Page Title"** (*mind the quotes*). In this case the third line will be again three dashes **---** and an empty line just before the content of the page. None of those lines will appear at the web site. That's called **header**[^1] and it carries the metadata for that *Markdown file*. Here is the example of one of the session's header:
![](static/images/session_header.png)
d) After you are done with editing/adding the *Markdown files* and satisfied with the changes you should click on the button/link **publish** which would bring you straight into editing **PUBLISH.trigger.md** after which commit[^2] the web site will be published. The new changes will be visible to everyone visiting the web site.
```
~
WARNING: the rest of the document is more technical.
The user friendly header with buttons:
edit_this
add_new_topic
add_new_session
publish
should be more than enough to contribute to this web site.
ymmv....
~
```
#### 2. One could also edit the web site by using directly this Gitea instance (https://git.memoryoftheworld.org/PirateCare/Syllabus) where you just read this **README.md** file.
1. To **edit** *Markdown files* you should get inside the 📁 **content** folder where you will find two folders 📁 **topic** and 📁 **session**. All the individual *Markdown files* are saved/accessible inside those folders (you can recognize the files by their extension **.md**).
2. To **edit** a particular *Markdown file* in this repository you should click on the 🖉 (pen) in the top right corner of the Gitea toolbar which appears after you open the Gitea web page of that *Markdown file*
![](static/images/edit_page.png)
- It is very important to always keep the **header**[^1] at the top of the *Markdown file*. You can recognize it as it has three dashes ( --- ) in its first line. It is then followed by **title**, the second line starting with **has_topics** (if home page) or **has_sessions:" (if topic page). The last line of the **header**[^1] should always contain only three dashes ( --- ). So, the header's first and last line should have only those three dashes ( --- ). The names of the topics Markdown files following **has_topics:** will appear in the side bar menu. The same goes for topic page which lists its sessions Markdown files in the line starting with **has_sessions:**. The list of the names of the Markdown files looks something like this: **["first_session.md", "second_session.md"]** (Mind the brackets and the quotes.) Here is one of the **headers** from 📁 **Syllabus/content/topic/housingstruggles.md**:
![](static/images/front_matter.png)
3. To **add** a new *Markdown file* one should click the button **[New File]** in the folder where one wants the new *Markdown file* (at the moment these are 📁 **content/topic** and 📁 **content/session**)
- Every **new** *Markdown file* should have **.md** extension as the part of its name. For example: **thirdsession.md**.
- Every **new** *Markdown file* has to have a **header**[^1] at the top. The first line should start with three dashes ( **---** ), the second line should have a **title** (for example: **title: "Third reading group"**), if you want/need you should also add **weight** and/or **date** in the following lines but make sure that the **header** ends again with three dashes ( **---** ). After that last line with the three dashes you should add your actual content.
4. To **upload** images one should click the button **[Upload File]** and upload the image inside the folder 📁 **static/images**. Once inside the 📁 **static/images** there are bunch of already uploaded images. Important to note is that if you are uploading an image, make sure the file name doesn't contain spaces " " but instead has **underscores** or is made into a one-word file name. For example: *team_photo.jpg*, *teamphoto.jpg* or *TeamPhoto.jpg*.
5. To **PUBLISH** the web site with all of the latest changes one should **edit** the file **PUBLISH.trigger.md**. It is listed in the root of this repository. Once there **PUBLISH.trigger.md** should have the 🖉 (pen) in the top right corner of the Gitea page toolbar just like every other page in the repository. The published version of the web site is here: https://syllabus.pirate.care/
6. After you get familiar with the workflow you migh also try this *trick* to *quickly* **PUBLISH** the web site by adding **!publish!** as a part of the commit message just like shown in this screenshot:
![](static/images/commit_publish_small.png)
After you **PUBLISH** the web site by using the **!publish!** *trick* in the commit message you shouldn't go and **edit** **PUBLISH.trigger.md**. If you do that nothing will go wrong but you'll just trigger **HUGO** to do the processing once more.
#### NOTE: The "preview" web site at https://syllabus.pirate.care/_preview/ will show automatically all of the changes after every commit/change. The "preview" version of the web site is not supposed to be shown to the public. Once you are satisfied with the "preview" version of the latest changes you are ready to PUBLISH the changes to the "official" version of the web site (https://syllabus.pirate.care/) You can do that by adding !publish! to the commit message or by finding the PUBLISH.trigger.md file, changing it and committing the changes.
---
*If anything goes wrong these two files could help those few people who are not scared of reading logs :)*
- https://syllabus.pirate.care/last-commit-log.txt
- https://syllabus.pirate.care/_preview/last-commit-log.txt
[^1]: **Header** is called [Front Matter](https://gohugo.io/content-management/front-matter/) in HUGO's documentation.
[^2]: The phrase *commiting the changes* comes from the Git vocabulary and if this is the first time you hear about it, probably the closest well known equivalent would be to say *saving the file after it has been changed*. In our case here the file being *saved* to the Git repository will add its latest changes to the history log of all of the previous versions of that file, it will add the name of the account which made those changes together with the date when all of this happened. By doing all of this any file in the Git repository is easily reverted to any of the versions from the past, the history of who did what is kept and the whole repository is ready to be distributed, shared, and synced with any of its "clones" on other different computers.
### Library bookmarklet quickly get the Markdown link for the book reference:
```javascript
javascript:(()=>{alert(`![](bib:${location.href.replace(RegExp(".*book/"),"")})`);})()
```
...

2
archetypes/default.md Normal file
View File

@ -0,0 +1,2 @@
+++
+++

3
archetypes/session.md Normal file
View File

@ -0,0 +1,3 @@
---
title: "{{ replace .Name "-" " " | title }}"
---

View File

@ -0,0 +1,26 @@
baseURL = "https://syllabus.pirate.care"
languageCode = "en-us"
title = "Pirate Care"
theme = "piratecare"
relativeurls = true
disableKinds = ["RSS", "sitemap", "taxonomy"]
[params]
description = "Network of activists, researchers and practitioners against the criminalisation of solidarity & for a common care infrastructure."
images = ["/images/piratecaqre.png"]
title = "Pirate Care Syllabus"
giturl = "https://git.memoryoftheworld.org/PirateCare/Syllabus"
[outputFormats]
[outputFormats.js]
isPlainText = true
mediaType = "application/javascript"
[outputs]
list = ["html", "js"]
[markup]
[markup.tableOfContents]
endLevel=4
ordered = false
startLevel = 1

View File

@ -0,0 +1,2 @@
relativeurls = true
baseURL = ""

View File

@ -0,0 +1,2 @@
[params]
edit = true

8
content/_index.md Normal file
View File

@ -0,0 +1,8 @@
---
title: "title of your syllabus"
has_topics: []
---
# Syllabus, a syllabus
This is a beginning...

View File

@ -0,0 +1,22 @@
---
title: "Syllabus"
---
# How-to access and use the Syllabus
We encourage everyone to freely use this Syllabus to learn and organise processes of learning and to freely adapt, rewrite and expand it to reflect their own experience and serve their own pedagogies. You can do that in the following manner:
## Download
You can download a standalone version of the Pirate Care Syllabus that you can store on your computer, a thumb drive or a server, and open from your browser. The download contains the latest version of all of the topics and sessions in the Syllabus and the library collection with most of the texted references in the Syllabus.
[DOWNLOAD PORTABLE STANDALONE SYLLABUS (~1.6 GB) ](https://syllabus.pirate.care/library/PortablePirateCareSyllabus.tgz)
## Browse
You can obviously peruse the Syllabus on our server. To do so proceed here:
[BROWSE: https://syllabus.pirate.care](https://syllabus.pirate.care)
## Write
You can also edit, extend or remix the existing Pirate Care Syllabus. Its source files (Markdown content files, templates, graphic files and the library collection) are stored in a [git repository](https://git.memoryoftheworld.org/PirateCare/Syllabus/) that can be cloned, forked and developed further. The syllabus is built on [Hugo static site generator](https://gohugo.io/), the library collection in [Calibre](https://calibre-ebook.com/) and everything is integrated and built with [Gitea](https://gitea.io/en-us/). The syllabus is in the public domain.
If you encounter a problem, you can reach us at: info@pirate.care

View File

@ -0,0 +1,4 @@
---
title: "meta"
outputs: js
---

4
content/print/_index.md Normal file
View File

@ -0,0 +1,4 @@
---
title: "syllabus"
---

View File

View File

@ -0,0 +1,140 @@
#! python
import os
import argparse
import random
import string
import subprocess
import shutil
import stat
from datetime import datetime
# format for dates
date_format = "%m/%d/%Y, %H:%M:%S"
# Set the variables we'll be allowing for (as CL arg or environment variable)
vars = {
'oldrev': False, # set programmatically by git hook
'newrev': False, # set programmatically by git hook
'ref': False, # set programmatically by git hook
'library': '_library',
'website': '_website',
'website_preview': '_websitepreview',
'git_repo': False,
'base_url': False, #override the site's base
'git_url': False,
'git_path': 'git',
'hugo_path': 'hugo',
'tmp_dir': '/tmp',
'force': False,
}
# logging time
start_time = datetime.now().strftime(date_format)
def random_string(length=3):
""" Generates a random string """
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(length))
def get_value(name, default=False):
""" Variables can be set as environment variable or in command line """
if hasattr(args, name.lower()) and getattr(args, name.lower()) is not None:
print('CLI:', name, getattr(args, name.lower()))
return getattr(args, name.lower())
elif name.upper() in os.environ:
print('env:', name, os.environ[name.upper()])
return os.environ[name.upper()]
else:
print('default:', name, default)
return default
def cmd(parts, cwd=None, env=None):
""" Executes a shell command and returns the output """
print(f"Command: {' '.join(parts)} ({cwd})")
return subprocess.check_output(parts, cwd=cwd, env=env, universal_newlines=True).strip()
def rmrf(path):
""" Use safe-rm for recursive removal """
""" @TODO: make it safer """
def remove_readonly(func, path, excinfo):
os.chmod(path, stat.S_IWRITE)
func(path)
# Try removal
if os.path.exists(path) and len(os.path.realpath(path)) > 1:
shutil.rmtree(path, onerror=remove_readonly)
else:
print("Either the path doesn't exist or you are trying to delete the root directory(?!):", path)
def clobber(filepath, data, append=False):
""" Equivalent of > or >> when append is True """
mode = 'a' if append else 'w'
with open(filepath, mode) as f:
f.write(data)
def build_site(dest, tmp, hugo_environment='gitea'):
""" builds the website to "dest" using "tmp" as an intermediate location """
global GIT_PATH, GIT_REPO, HUGO_PATH
cmd([GIT_PATH, 'clone', '.', tmp], cwd=GIT_REPO)
rmrf(dest)
try:
os.makedirs(dest, exist_ok=True)
except:
print(f"Error creating the directory: {dest}")
lcl = f'{tmp}/last-commit-log.txt'
# overriding hugo config for development environments
env = os.environ.copy()
if BASE_URL:
env["HUGO_PARAMS_BASEURL"] = BASE_URL
if GIT_URL:
env["HUGO_PARAMS_GITURL"] = GIT_URL
# run the hugo command
hugo_output = cmd([HUGO_PATH, '-e', hugo_environment, '-d', dest], cwd=tmp, env=env)
clobber(lcl, hugo_output)
now_time = datetime.now().strftime(date_format)
clobber(lcl, f"\n{start_time}\n{now_time}", append=True)
shutil.move(lcl, dest)
rmrf(tmp)
# Parsing command line arguments
parser = argparse.ArgumentParser()
for v in vars:
parser.add_argument(f"--{v.lower()}")
args = parser.parse_args()
# Load all variables from command line arguments or environment variables
for v in vars:
globals()[v.upper()] = get_value(v.lower(), vars[v])
# set up directories
os.makedirs(WEBSITE, exist_ok=True)
os.makedirs(WEBSITE_PREVIEW, exist_ok=True)
TMP_WEBSITE = os.path.join(TMP_DIR, 'website', random_string())
TMP_WEBSITE_PREVIEW = os.path.join(TMP_DIR, 'websitepreview', random_string())
os.makedirs(TMP_WEBSITE, exist_ok=True)
os.makedirs(TMP_WEBSITE_PREVIEW, exist_ok=True)
# start working
# Check if someone edited the publish trigger
published = False
refs = cmd([GIT_PATH, 'diff-tree', '--no-commit-id', '--name-only', REF], cwd=GIT_REPO).split("\n")
for r in refs:
if FORCE or r == "PUBLISH.trigger.md":
build_site(WEBSITE, TMP_WEBSITE)
published = True
# Check if there is a !publish!
if not published:
refs = cmd([GIT_PATH, 'show', '--format="%s"', '-s'], cwd=GIT_REPO).split(' ')
for r in refs:
if r == "!publish!":
build_site(WEBSITE, TMP_WEBSITE)
published = True
# create preview version
build_site(WEBSITE_PREVIEW, TMP_WEBSITE_PREVIEW, hugo_environment='preview')
# @TODO: link the library

View File

@ -0,0 +1,12 @@
#!/bin/sh
read oldrev newrev ref
python "D:\dev\websites\pirate-care-syllabus\Syllabus\custom_syadmin\git_hooks_post-receive.py" \
--git_repo "D:\dev\websites\pirate-care-syllabus\gitea\gitea-repositories\gitea\pirate-care-syllabus.git" \
--website "D:\dev\websites\pirate-care-syllabus\_website" \
--website_preview "D:\dev\websites\pirate-care-syllabus\_websitepreview" \
--hugo_preview_url https://syllabus.pirate.care/_preview/ \
--library "D:\dev\websites\pirate-care-syllabus\_library" \
--tmp_dir "D:\tmp\tmp"
--oldrev $oldrev \
--newrev $newrev \
--ref $ref

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,19 @@
/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}a{background-color:transparent}b{font-weight:bolder}img{border-style:none}input{font-family:inherit;font-size:100%;line-height:1.15;margin:0}input{overflow:visible}[type=checkbox]{box-sizing:border-box;padding:0}template{display:none}p{margin:0}ul{list-style:none;margin:0;padding:0}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol,noto color emoji;line-height:1.5}*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}img{border-style:solid}input::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder{color:#a0aec0}input:-ms-input-placeholder{color:#a0aec0}input::-ms-input-placeholder{color:#a0aec0}input::placeholder{color:#a0aec0}table{border-collapse:collapse}a{color:inherit;text-decoration:inherit}input{padding:0;line-height:inherit;color:inherit}img,svg{display:block;vertical-align:middle}img{max-width:100%;height:auto}.bg-CoconutCream{background-color:#f2f6d5}.bg-AuChico{background-color:#996561}.border-CoconutCream{border-color:#f2f6d5}.border-b-8{border-bottom-width:8px}.cursor-pointer{cursor:pointer}.block{display:block}.flex{display:-webkit-box;display:flex}.table{display:table}.justify-between{-webkit-box-pack:justify;justify-content:space-between}.font-vg5000{font-family:vg5000-regular,sans}.font-playfair{font-family:playfairdisplay regular,sans}.font-bold{font-weight:700}.h-full{height:100%}.leading-none{line-height:1}.mx-4{margin-left:1rem;margin-right:1rem}.mb-1{margin-bottom:.25rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mt-8{margin-top:2rem}.mb-12{margin-bottom:3rem}.p-1{padding:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pr-4{padding-right:1rem}.pt-6{padding-top:1.5rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pt-16{padding-top:4rem}.pt-32{padding-top:8rem}.static{position:static}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0}.text-CoconutCream{color:#f2f6d5}.text-xs{font-size:.75rem}.text-base{font-size:1rem}.italic{font-style:italic}.z-10{z-index:10}@font-face{font-family:playfairdisplay regular;font-weight:400;src:url(../fonts/PlayfairDisplay-Regular.woff) format('woff')}@font-face{font-family:vg5000-regular;font-weight:400;src:url(../fonts/VG5000-Regular_web.woff) format('woff')}html{font-size:1.2em;background-color:#f2f6d5}img{padding-top:.5rem;padding-bottom:.5rem}h1{font-size:1.875rem;-webkit-column-break-after:avoid;-moz-column-break-after:avoid;break-after:avoid}h2{font-size:1.5rem;-webkit-column-break-after:avoid;-moz-column-break-after:avoid;break-after:avoid}h3{font-size:1.25rem;-webkit-column-break-after:avoid;-moz-column-break-after:avoid;break-after:avoid}blockquote{font-style:italic}p{padding-bottom:.5rem;line-height:1.25}footer{font-family:vg5000-regular,sans;font-size:.75rem;color:#29102f}article ul{position:relative;list-style-type:none;margin-left:0;padding-left:.75rem}article ul li:before{font-family:vg5000-regular,sans;color:#996561;font-size:.75rem;left:0;position:absolute;padding-top:.5rem;padding-bottom:.5rem;content:"•"}article li{padding-left:.5rem}a{color:#996561}a:hover{text-decoration:underline}.edit-button{border-bottom-width:4px;border-color:#f2f6d5;padding-left:.25rem;padding-right:.25rem;background-color:#996561;margin-bottom:.5rem;font-family:vg5000-regular,sans;color:#f2f6d5}.edit-button:hover{background-color:#f2f6d5;color:#996561;border-bottom-width:2px;border-color:#996561}.title-text{font-family:playfairdisplay regular,sans;font-size:2.25rem;color:#996561}.title-pretext{font-family:vg5000-regular,sans;font-size:1rem;color:#996561}.content-text{font-family:playfairdisplay regular,sans;font-size:1.25rem;color:#29102f}.sidebar-title{font-family:vg5000-regular,sans;font-size:1rem;color:#996561}.sidebar-list{font-family:vg5000-regular,sans;font-size:1.25rem;color:#996561}.logo{font-family:vg5000-regular,sans;font-size:1.25rem;color:#996561;padding-top:.5rem}.ddmenu .sidebar-title{cursor:pointer}.ddmenu input{display:none}.ddmenu .hiddendiv{padding-bottom:.25rem;display:none}.ddmenu input:not(:checked)~.hiddendiv{display:block;padding-bottom:1rem}#TableOfContents{font-family:vg5000-regular,sans;font-size:1.25rem;color:#996561;margin-left:-.5rem}#TableOfContents ul{margin-left:.5rem}#TableOfContents li:before{content:"> "}@page{size:A4}@page:first{@bottom{content: none;
}}@page{margin-bottom:5mm;@top{color: #996561;
font-size: 1rem;
font-family: 'VG5000-Regular';
content: -moz-element(topic);
content: element(topic);
}@bottom{color: #996561;
font-size: 0.5rem;
font-family: 'VG5000-Regular';
content: "▒▒ 🐟 ▒ ▒▒▒ 🐙 ▒▒▒🏃 ▒▒☄▒ PAGE: " counter(page) " ▒ ▒▒▒▒ ⚡ ▒🔍▒ ☠ ▒ ▒▒▒";
}}@page topic:first{@top{content: none;
}}@media print{body{background-color:#f2f6d5;color:#29102f;font-family:playfairdisplay regular,sans}.runningTopic{position:running(topic)}.topic{-webkit-column-break-before:page;-moz-column-break-before:page;break-before:page;page:topic}.title-text{font-family:playfairdisplay regular,sans;font-size:4rem;color:#996561;margin-bottom:5rem}.title-pretext{font-family:vg5000-regular,sans;font-size:1.5rem;color:#996561}.topic-text{font-family:playfairdisplay regular,sans;font-size:2.25rem;color:#996561;margin-bottom:5rem}.topic-pretext{font-family:vg5000-regular,sans;font-size:1.5rem;color:#996561}article ul li:before{content:""}.toc::after{text-align:right;float:right;content:target-counter(attr(href url),page,decimal-leading-zero)}}@media(max-width:767px){.md\:flex-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.md\:w-full{width:100%}}@media(min-width:768px){.lg\:flex{display:-webkit-box;display:flex}.lg\:static{position:static}.lg\:sticky{position:-webkit-sticky;position:sticky}.lg\:top-0{top:0}.lg\:w-2\/5{width:40%}.lg\:w-3\/5{width:60%}}

View File

@ -0,0 +1 @@
{"Target":"css/styles.min.bd69c2227c9b9dc24bf9577d1195528370cd93ac1927454575dd15732871f130.css","MediaType":"text/css","Data":{"Integrity":"sha256-vWnCInybncJL+Vd9EZVSg3DNk6wZJ0VFdd0Vcyhx8TA="}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
static/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

9
static/browserconfig.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

View File

@ -0,0 +1,104 @@
/* CSS for Paged.js interface */
/* Change the look */
:root {
--color-background: whitesmoke;
--color-pageBox: #666;
--color-paper: white;
--color-marginBox: transparent;
}
/* To define how the book look on the screen: */
@media screen {
body {
background-color: var(--color-background);
}
.pagedjs_pages {
display: flex;
width: calc(var(--pagedjs-width) * 2);
flex: 0;
flex-wrap: wrap;
margin: 0 auto;
}
.pagedjs_page {
background-color: var(--color-paper);
box-shadow: 0 0 0 1px var(--color-pageBox);
margin: 0;
flex-shrink: 0;
flex-grow: 0;
margin-top: 10mm;
}
.pagedjs_first_page {
margin-left: var(--pagedjs-width);
}
.pagedjs_page:last-of-type {
margin-bottom: 10mm;
}
/* show the margin-box */
.pagedjs_margin-top-left-corner-holder,
.pagedjs_margin-top,
.pagedjs_margin-top-left,
.pagedjs_margin-top-center,
.pagedjs_margin-top-right,
.pagedjs_margin-top-right-corner-holder,
.pagedjs_margin-bottom-left-corner-holder,
.pagedjs_margin-bottom,
.pagedjs_margin-bottom-left,
.pagedjs_margin-bottom-center,
.pagedjs_margin-bottom-right,
.pagedjs_margin-bottom-right-corner-holder,
.pagedjs_margin-right,
.pagedjs_margin-right-top,
.pagedjs_margin-right-middle,
.pagedjs_margin-right-bottom,
.pagedjs_margin-left,
.pagedjs_margin-left-top,
.pagedjs_margin-left-middle,
.pagedjs_margin-left-bottom {
box-shadow: 0 0 0 1px inset var(--color-marginBox);
}
/* uncomment this part for recto/verso book : ------------------------------------ */
.pagedjs_pages {
flex-direction: column;
width: 100%;
}
.pagedjs_first_page {
margin-left: 0;
}
.pagedjs_page {
margin: 0 auto;
margin-top: 10mm;
}
/*--------------------------------------------------------------------------------------*/
/* uncomment this par to see the baseline : -------------------------------------------*/
/*
.pagedjs_pagebox {
--pagedjs-baseline: 11px;
--pagedjs-baseline-position: -4px;
--pagedjs-baseline-color: cyan;
background: linear-gradient(var(--color-paper) 0%, var(--color-paper) calc(var(--pagedjs-baseline) - 1px), var(--pagedjs-baseline-color) calc(var(--pagedjs-baseline) - 1px), var(--pagedjs-baseline-color) var(--pagedjs-baseline)), transparent;
background-size: 100% var(--pagedjs-baseline);
background-repeat: repeat-y;
background-position-y: var(--pagedjs-baseline-position);
}
*/
/*--------------------------------------------------------------------------------------*/
}

19
static/css/styles.css Normal file
View File

@ -0,0 +1,19 @@
/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}a{background-color:transparent}b{font-weight:bolder}img{border-style:none}input{font-family:inherit;font-size:100%;line-height:1.15;margin:0}input{overflow:visible}[type=checkbox]{box-sizing:border-box;padding:0}template{display:none}p{margin:0}ul{list-style:none;margin:0;padding:0}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol,noto color emoji;line-height:1.5}*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}img{border-style:solid}input::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder{color:#a0aec0}input:-ms-input-placeholder{color:#a0aec0}input::-ms-input-placeholder{color:#a0aec0}input::placeholder{color:#a0aec0}table{border-collapse:collapse}a{color:inherit;text-decoration:inherit}input{padding:0;line-height:inherit;color:inherit}img,svg{display:block;vertical-align:middle}img{max-width:100%;height:auto}.bg-CoconutCream{background-color:#f2f6d5}.bg-AuChico{background-color:#996561}.border-CoconutCream{border-color:#f2f6d5}.border-b-8{border-bottom-width:8px}.cursor-pointer{cursor:pointer}.block{display:block}.flex{display:-webkit-box;display:flex}.table{display:table}.justify-between{-webkit-box-pack:justify;justify-content:space-between}.font-vg5000{font-family:vg5000-regular,sans}.font-playfair{font-family:playfairdisplay regular,sans}.font-bold{font-weight:700}.h-full{height:100%}.leading-none{line-height:1}.mx-4{margin-left:1rem;margin-right:1rem}.mb-1{margin-bottom:.25rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mt-8{margin-top:2rem}.mb-12{margin-bottom:3rem}.p-1{padding:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pr-4{padding-right:1rem}.pt-6{padding-top:1.5rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pt-16{padding-top:4rem}.pt-32{padding-top:8rem}.static{position:static}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0}.text-CoconutCream{color:#f2f6d5}.text-xs{font-size:.75rem}.text-base{font-size:1rem}.italic{font-style:italic}.z-10{z-index:10}@font-face{font-family:playfairdisplay regular;font-weight:400;src:url(../fonts/PlayfairDisplay-Regular.woff)format('woff')}@font-face{font-family:vg5000-regular;font-weight:400;src:url(../fonts/VG5000-Regular_web.woff)format('woff')}html{font-size:1.2em;background-color:#f2f6d5}img{padding-top:.5rem;padding-bottom:.5rem}h1{font-size:1.875rem;-webkit-column-break-after:avoid;-moz-column-break-after:avoid;break-after:avoid}h2{font-size:1.5rem;-webkit-column-break-after:avoid;-moz-column-break-after:avoid;break-after:avoid}h3{font-size:1.25rem;-webkit-column-break-after:avoid;-moz-column-break-after:avoid;break-after:avoid}blockquote{font-style:italic}p{padding-bottom:.5rem;line-height:1.25}footer{font-family:vg5000-regular,sans;font-size:.75rem;color:#29102f}article ul{position:relative;list-style-type:none;margin-left:0;padding-left:.75rem}article ul li:before{font-family:vg5000-regular,sans;color:#996561;font-size:.75rem;left:0;position:absolute;padding-top:.5rem;padding-bottom:.5rem;content:"•"}article li{padding-left:.5rem}a{color:#996561}a:hover{text-decoration:underline}.edit-button{border-bottom-width:4px;border-color:#f2f6d5;padding-left:.25rem;padding-right:.25rem;background-color:#996561;margin-bottom:.5rem;font-family:vg5000-regular,sans;color:#f2f6d5}.edit-button:hover{background-color:#f2f6d5;color:#996561;border-bottom-width:2px;border-color:#996561}.title-text{font-family:playfairdisplay regular,sans;font-size:2.25rem;color:#996561}.title-pretext{font-family:vg5000-regular,sans;font-size:1rem;color:#996561}.content-text{font-family:playfairdisplay regular,sans;font-size:1.25rem;color:#29102f}.sidebar-title{font-family:vg5000-regular,sans;font-size:1rem;color:#996561}.sidebar-list{font-family:vg5000-regular,sans;font-size:1.25rem;color:#996561}.logo{font-family:vg5000-regular,sans;font-size:1.25rem;color:#996561;padding-top:.5rem}.ddmenu .sidebar-title{cursor:pointer}.ddmenu input{display:none}.ddmenu .hiddendiv{padding-bottom:.25rem;display:none}.ddmenu input:not(:checked)~.hiddendiv{display:block;padding-bottom:1rem}#TableOfContents{font-family:vg5000-regular,sans;font-size:1.25rem;color:#996561;margin-left:-.5rem}#TableOfContents ul{margin-left:.5rem}#TableOfContents li:before{content:"> "}@page{size:A4}@page:first{@bottom{content: none;
}}@page{margin-bottom:5mm;@top{color: #996561;
font-size: 1rem;
font-family: 'VG5000-Regular';
content: -moz-element(topic);
content: element(topic);
}@bottom{color: #996561;
font-size: 0.5rem;
font-family: 'VG5000-Regular';
content: "▒▒ 🐟 ▒ ▒▒▒ 🐙 ▒▒▒🏃 ▒▒☄▒ PAGE: " counter(page) " ▒ ▒▒▒▒ ⚡ ▒🔍▒ ☠ ▒ ▒▒▒";
}}@page topic:first{@top{content: none;
}}@media print{body{background-color:#f2f6d5;color:#29102f;font-family:playfairdisplay regular,sans}.runningTopic{position:running(topic)}.topic{-webkit-column-break-before:page;-moz-column-break-before:page;break-before:page;page:topic}.title-text{font-family:playfairdisplay regular,sans;font-size:4rem;color:#996561;margin-bottom:5rem}.title-pretext{font-family:vg5000-regular,sans;font-size:1.5rem;color:#996561}.topic-text{font-family:playfairdisplay regular,sans;font-size:2.25rem;color:#996561;margin-bottom:5rem}.topic-pretext{font-family:vg5000-regular,sans;font-size:1.5rem;color:#996561}article ul li:before{content:""}.toc::after{text-align:right;float:right;content:target-counter(attr(href url),page,decimal-leading-zero)}}@media(max-width:767px){.md\:flex-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.md\:w-full{width:100%}}@media(min-width:768px){.lg\:flex{display:-webkit-box;display:flex}.lg\:static{position:static}.lg\:sticky{position:-webkit-sticky;position:sticky}.lg\:top-0{top:0}.lg\:w-2\/5{width:40%}.lg\:w-3\/5{width:60%}}

BIN
static/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
static/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
static/images/cat.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
static/images/edit_page.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
static/images/tockice.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

30231
static/js/paged.polyfill.js Normal file

File diff suppressed because it is too large Load Diff

BIN
static/mstile-150x150.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

View File

@ -0,0 +1,28 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M420 655 c0 -32 -2 -35 -30 -35 l-30 0 0 -95 0 -95 -35 0 c-33 0 -35
2 -35 35 0 32 -2 35 -30 35 -28 0 -30 -3 -30 -35 0 -32 2 -35 30 -35 l30 0 0
-95 0 -95 -30 0 c-27 0 -30 3 -30 30 0 27 -3 30 -30 30 -27 0 -30 -3 -30 -30
0 -27 3 -30 30 -30 27 0 30 -3 30 -30 0 -27 3 -30 30 -30 27 0 30 3 30 30 0
28 3 30 35 30 l35 0 0 95 0 95 30 0 30 0 0 -125 0 -125 -30 0 c-28 0 -30 -3
-30 -35 0 -32 2 -35 30 -35 28 0 30 3 30 35 0 33 2 35 35 35 l35 0 0 125 0
125 30 0 30 0 0 -125 0 -125 29 0 c26 0 30 -4 33 -32 3 -29 7 -33 36 -36 32
-3 33 -2 30 30 -3 29 -7 33 -35 36 l-33 3 0 125 0 124 35 0 35 0 0 -95 0 -95
30 0 c27 0 30 -3 30 -30 0 -28 3 -30 35 -30 32 0 35 2 35 30 0 27 3 30 30 30
27 0 30 3 30 30 0 27 -3 30 -30 30 -27 0 -30 -3 -30 -30 0 -28 -3 -30 -35 -30
l-35 0 0 94 0 95 33 3 c28 3 32 6 32 33 0 27 -3 30 -30 30 -27 0 -30 -4 -33
-32 -3 -29 -7 -33 -33 -33 l-29 0 0 94 0 95 -32 3 c-29 3 -33 7 -36 36 l-3 32
-95 0 -94 0 0 -35z m70 -125 c0 -28 -3 -30 -35 -30 -32 0 -35 2 -35 30 0 28 3
30 35 30 32 0 35 -2 35 -30z m120 0 c0 -27 -3 -30 -30 -30 -27 0 -30 3 -30 30
0 27 3 30 30 30 27 0 30 -3 30 -30z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

14
static/site.webmanifest Normal file
View File

@ -0,0 +1,14 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

20
themes/piratecare/LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2020 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,3 @@
---
title: "{{ replace .Name "-" " " | title }}"
---

View File

@ -0,0 +1,3 @@
---
title: "{{ replace .Name "-" " " | title }}"
---

View File

@ -0,0 +1,4 @@
---
title: "{{ replace .Name "-" " " | title }}"
has_sessions:
---

View File

@ -0,0 +1,11 @@
const themeDir = __dirname + '/../../../';
module.exports = {
plugins: [
require('postcss-import')({
path: [themeDir]
}),
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'),
require('autoprefixer'),
]
}

View File

@ -0,0 +1,28 @@
const themeDir = __dirname + '/../../';
module.exports = {
plugins: [
require('postcss-import')({
path: [themeDir]
}),
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'),
// Configuration of purgecss for Tailwindcss
// see https://tailwindcss.com/docs/controlling-file-size/#setting-up-purgecss
require('@fullhuman/postcss-purgecss')({
// Specify the paths to all of the template files in your project
content: [
themeDir + 'layouts/**/*.html',
themeDir + 'exampleSite/content/**/*.html',
'layouts/**/*.html',
'content/**/*.html',
],
// Include any special characters you're using in this regular expression
defaultExtractor: content => content.match(/[A-Za-z0-9-_:\/]+/g) || [],
fontFace: true
}),
require('autoprefixer')({
grid: true
}),
require('postcss-reporter'),
]
}

View File

@ -0,0 +1,75 @@
/* paged.js style */
@page {
size: A4;
}
@page :first {
@bottom {
content: none;
}
}
@page {
margin-bottom: 5mm;
@top {
color: #996561;
font-size: 1rem;
font-family: 'VG5000-Regular';
content: element(topic);
}
@bottom {
color: #996561;
font-size: 0.5rem;
font-family: 'VG5000-Regular';
content: "▒▒ 🐟 ▒ ▒▒▒ 🐙 ▒▒▒🏃 ▒▒☄▒ PAGE: " counter(page) " ▒ ▒▒▒▒ ⚡ ▒🔍▒ ☠ ▒ ▒▒▒";
}
}
@page topic:first {
@top {
content: none;
}
}
@media print {
body {
@apply bg-CoconutCream text-Revolver font-playfair;
}
.runningTopic {
position: running(topic);
}
.topic {
break-before: page;
page: topic;
}
.title-text {
@apply font-playfair text-6xl text-AuChico mb-20;
}
.title-pretext {
@apply font-vg5000 text-2xl text-AuChico;
}
.topic-text {
@apply font-playfair text-4xl text-AuChico mb-20;
}
.topic-pretext {
@apply font-vg5000 text-2xl text-AuChico;
}
article ul li:before {
content: "";
}
.toc::after {
text-align: right;
float: right;
content: target-counter(attr(href url), page, decimal-leading-zero);
}
}

View File

@ -0,0 +1,173 @@
@font-face {
font-family: 'PlayfairDisplay Black';
font-weight: 400;
src: url("../fonts/PlayfairDisplay-Black.woff") format('woff');
}
@font-face {
font-family: 'PlayfairDisplay Italic';
font-weight: 400;
src: url("../fonts/PlayfairDisplay-Italic.woff") format('woff');
}
@font-face {
font-family: 'PlayfairDisplay BlackItalic';
font-weight: 400;
src: url("../fonts/PlayfairDisplay-BlackItalic.woff") format('woff');
}
@font-face {
font-family: 'PlayfairDisplay Bold';
font-weight: 400;
src: url("../fonts/PlayfairDisplay-Bold.woff") format('woff');
}
@font-face {
font-family: 'PlayfairDisplay BoldItalic';
font-weight: 400;
src: url("../fonts/PlayfairDisplay-BoldItalic.woff") format('woff');
}
@font-face {
font-family: 'PlayfairDisplay Regular';
font-weight: 400;
src: url("../fonts/PlayfairDisplay-Regular.woff") format('woff');
}
@font-face {
font-family: 'PlayfairDisplay SC-Regular';
font-weight: 400;
src: url("../fonts/PlayfairDisplaySC-Regular.woff") format('woff');
}
@font-face {
font-family: 'VG5000-Regular';
font-weight: 400;
src: url("../fonts/VG5000-Regular_web.woff") format('woff');
}
button, [type=button] {
-webkit-appearance: none;
}
html {
font-size: 1.2em;
@apply bg-CoconutCream;
}
img {
@apply py-2;
}
/* purgecss ignore */
h1 {
@apply text-3xl;
break-after: avoid;
}
/* purgecss ignore */
h2 {
@apply text-2xl;
break-after: avoid;
}
/* purgecss ignore */
h3 {
@apply text-xl;
break-after: avoid;
}
/* purgecss ignore */
blockquote {
@apply italic;
}
p {
@apply pb-2 leading-tight;
}
footer {
@apply font-vg5000 text-xs text-Revolver;
}
article ul {
@apply relative list-none ml-0 pl-3;
}
article ul li:before {
@apply font-vg5000 text-AuChico text-xs left-0 absolute pt-2 pb-2;
content: "•";
}
article li {
@apply pl-2;
}
a {
@apply text-AuChico;
}
a:hover {
@apply underline;
}
.edit-button {
@apply border-b-4 border-CoconutCream px-1 bg-AuChico mb-2 font-vg5000 text-CoconutCream;
}
.edit-button:hover {
@apply bg-CoconutCream text-AuChico border-b-2 border-AuChico;
}
.title-text {
@apply font-playfair text-4xl text-AuChico;
}
.title-pretext {
@apply font-vg5000 text-base text-AuChico;
}
.content-text {
@apply font-playfair text-xl text-Revolver;
}
.sidebar-title {
@apply font-vg5000 text-base text-AuChico;
}
.sidebar-list {
@apply font-vg5000 text-xl text-AuChico;
}
.logo {
@apply font-vg5000 text-xl text-AuChico pt-2;
}
/* dropdown menu */
.ddmenu .sidebar-title {
cursor: pointer;
}
.ddmenu input {
display: none;
}
.ddmenu .hiddendiv {
@apply pb-1 hidden;
}
.ddmenu input:not(:checked) ~ .hiddendiv {
@apply block pb-4;
}
#TableOfContents {
@apply font-vg5000 text-xl text-AuChico -ml-2;
}
#TableOfContents ul {
@apply ml-2;
}
#TableOfContents li:before {
content: "> ";
}

View File

@ -0,0 +1,6 @@
/* Tailwind base - put variables under: tailwind.config.js */
@import "node_modules/tailwindcss/base";
@import "node_modules/tailwindcss/components";
@import "node_modules/tailwindcss/utilities";
@import "assets/css/site.css";
@import "assets/css/print.css";

View File

@ -0,0 +1,20 @@
module.exports = {
theme: {
screens: {
'md': {'max': '767px'},
'lg': {'min': '768px'}
},
fontFamily: {
'vg5000': ['"VG5000-Regular"', 'sans'],
'playfair': ['"PlayfairDisplay Regular"', 'sans']
},
colors: {
CoconutCream: '#F2F6D5',
AuChico: '#996561',
Revolver: '#29102F'
},
extend: {}
},
variants: {},
plugins: []
};

View File

@ -0,0 +1,3 @@
{{ define "main" }}
<p>404 - page not found</p>
{{ end }}

View File

@ -0,0 +1,42 @@
{{- $text_link := .Text -}}
{{- if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}}
{{- if index $.Page.Site.Data.books.piratecarecollection $destination -}}
{{- $b := index $.Page.Site.Data.books.piratecarecollection $destination -}}
{{- if not $text_link -}}
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="/library/BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><i>{{- $b.title -}}</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}}
<a href="/library/BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="/library/BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
{{- end -}}
{{- else if strings.HasPrefix .Destination "session:" -}}
{{- $s_destination := printf "/session/%s" (substr .Destination 8) -}}
{{- if $.Page.Site.GetPage $s_destination -}}
{{- $session := $.Page.Site.GetPage $s_destination -}}
{{- if not $text_link -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $session.Title}} title="{{- $session.Title -}}"{{- end -}}>{{- $session.Title -}}</a>
{{- else -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="{{- $s_destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{- $s_destination -}} not found</span></a>
{{- end -}}
{{- else if strings.HasPrefix .Destination "topic:" -}}
{{- $t_destination := printf "/topic/%s" (substr .Destination 6) -}}
{{- if $.Page.Site.GetPage $t_destination -}}
{{- $topic := $.Page.Site.GetPage $t_destination -}}
{{- if not $text_link -}}
<a href="{{- $topic.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $topic.Title}} title="{{- $topic.Title -}}"{{- end -}}>{{- $topic.Title -}}</a>
{{- else -}}
<a href="{{- $topic.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="{{- $t_destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{- $t_destination -}} not found</span></a>
{{- end -}}
{{- else if findRE "^.*static" .Destination -}}
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- else -}}
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- end -}}

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
{{- $filePath := .File -}}
{{- $gitUrl := .Site.Params.giturl -}}
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
{{- partial "head.html" . -}}
{{ partialCached "css.html" . }}
<body class="mx-4">
{{ with .Site.Params.edit }}
<div class="flex justify-between sticky top-0 static border-b-8 z-10 border-CoconutCream bg-AuChico px-1 pt-2">
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/content/{{ $filePath }}">edit_this</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/topic/">add_new_topic</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/session/">add_new_session</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/PUBLISH.trigger.md">publish</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}"> ? </a>
</div>
{{ end }}
{{- partial "header.html" . -}}
<main class="lg:flex mb-4 pt-2 justify-between md:flex-row">
<aside class="lg:w-2/5 pr-4 pt-16 lg:sticky lg:top-0 lg:static h-full mb-6 md:w-full">
{{- block "sidebar" . }}{{- end }}
</aside>
<article class="lg:w-3/5 pt-32 md:w-full">
{{- block "main" . }}{{- end }}
</article>
</main>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,36 @@
{{ define "sidebar" }}
{{$currentNode := . }}
<div class="leading-none mb-12">
<span class="title-pretext">syllabus ⦚ </span><span class="title-text pt-6">{{ .Title }}</span>
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
<div class="ddmenu">
<input id="toggly-toc" type="checkbox" >
<label for="toggly-toc" class="sidebar-title" tabindex="1">▒▒ table of contents ▽</label>
<div class="hiddendiv">
<div class="mt-4">
{{ .Page.TableOfContents }}
</div>
</div>
</div>
{{ end }}
<div class="ddmenu">
<input id="toggly" type="checkbox">
<label for="toggly" class="sidebar-title mb-1" tabindex="1">▒▒ has topics ▽</label>
<div class="hiddendiv">
<ul class="mt-4">
{{ range .Params.has_topics }}
{{ with $.GetPage (printf "%s%s" "/topic/" . ) }}
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ define "main" }}
<div class="content-text">{{ .Content }}</div>
{{ end }}

View File

@ -0,0 +1,6 @@
{{ define "main" }}
<article>
<div class="font-vg5000"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
<div class="font-playfair">{{ .Content }}</div>
</article>
{{ end }}

View File

@ -0,0 +1,42 @@
{{ $text_link := .Text }}
{{ if strings.HasPrefix .Destination "bib:" }}
{{ $destination := (substr .Destination 4) }}
{{ if index $.Page.Site.Data.books.piratecarecollection $destination }}
{{ $b := index $.Page.Site.Data.books.piratecarecollection $destination }}
{{ if not $text_link }}
<span>{{ delimit $b.authors ", " " & " }}{{ with $b.pubdate }}, {{ substr . 0 4}}{{ end }}.<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank"><i>{{ $b.title }}</i></a>. {{ with $b.publisher }}{{ . }}.{{ end }}</span>
{{ else }}
<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank">{{ $text_link }}</a>
{{ end }}
{{ else }}
<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{ $destination }} not found</span></a>
{{ end }}
{{ else if strings.HasPrefix .Destination "session:" }}
{{ $s_destination := (substr .Destination 8) }}
{{ if $.Page.Site.GetPage $s_destination }}
{{ $session := $.Page.Site.GetPage $s_destination }}
{{ if not $text_link }}
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $session.Title}} title="{{ $session.Title }}"{{ end }}>{{ $session.Title }}</a>
{{ else }}
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a>
{{ end }}
{{ else }}
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{ $s_destination }} not found</span></a>
{{ end }}
{{ else if strings.HasPrefix .Destination "topic:" }}
{{ $t_destination := (substr .Destination 6) }}
{{ if $.Page.Site.GetPage $t_destination }}
{{ $topic := $.Page.Site.GetPage $t_destination }}
{{ if not $text_link }}
<a href="/topic/{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $topic.Title}} title="{{ $topic.Title }}"{{ end }}>{{ $topic.Title }}</a>
{{ else }}
<a href="/topic/{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a>
{{ end }}
{{ else }}
<a href="/topic/{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{ $t_destination }} not found</span></a>
{{ end }}
{{ else if findRE "^.*static" .Destination }}
<img src="{{ (replaceRE "^.*static" "" .Destination ) | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
{{ else }}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
{{ end }}

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
{{- $filePath := .File -}}
{{- $gitUrl := .Site.Params.giturl -}}
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
{{- partial "head.html" . -}}
{{ partialCached "css.html" . }}
<body class="mx-4">
{{ with .Site.Params.edit }}
<div class="flex justify-between sticky top-0 static border-b-8 z-10 border-CoconutCream bg-AuChico px-1 pt-2">
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/content/{{ $filePath }}">edit_this</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ $filePath.Dir }}">{{ $filePath.Dir }}add_new</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content">add_new</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/PUBLISH.trigger.md">publish</a>
<a class="edit-button" target="_blank" href="{{ $gitUrl }}"> ? </a>
</div>
{{ end }}
{{- partial "header.html" . -}}
<main class="lg:flex mb-4 pt-2 justify-between md:flex-row">
<aside class="lg:w-2/5 pr-4 pt-16 lg:sticky lg:top-0 lg:static h-full mb-6 md:w-full">
{{- block "sidebar" . }}{{- end }}
</aside>
<article class="lg:w-3/5 pt-32 md:w-full">
{{- block "main" . }}{{- end }}
</article>
</main>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,22 @@
{{ define "sidebar" }}
{{$currentNode := . }}
<div class="leading-none mb-12">
<span class="title-pretext">download ⦚ </span><span class="title-text pt-6">{{ .Title }}</span>
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
<div class="ddmenu">
<input id="toggly-toc" type="checkbox" >
<label for="toggly-toc" class="sidebar-title" tabindex="1">▒▒ table of contents ▽</label>
<div class="hiddendiv">
<div class="mt-4">
{{ .Page.TableOfContents }}
</div>
</div>
</div>
{{ end }}
{{ end }}
{{ define "main" }}
<div class="content-text">{{ .Content }}</div>
{{ end }}

View File

@ -0,0 +1,6 @@
{{ define "main" }}
<article>
<div class="font-vg5000"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
<div class="font-playfair">{{ .Content }}</div>
</article>
{{ end }}

View File

@ -0,0 +1 @@
{{ block "main" . }}{{ end }}

View File

@ -0,0 +1 @@
{{ define "main" }}SECTIONS=[{{ range .Site.Sections }}{"section": "{{ trim .File.Dir "/" }}", "items": [{{ range .Pages }}"{{ .File.BaseFileName }}", {{ end }}]}, {{ end }}];{{ end }}

View File

@ -0,0 +1,27 @@
{{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }}
<link rel="stylesheet" href="/css/styles.css">
{{ else if .Site.IsServer }}
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ else }}
{{ $flist := newScratch }}
{{ $flist.Set "initial" "nop" }}
{{ range (readDir "public/css") }}
{{ $finfo := os.Stat (printf "%s%s" "public/css/" .Name) }}
{{ $flist.SetInMap "css_files" (printf "%s" $finfo.ModTime) .Name }}
{{ $flist.Set "initial" "yay" }}
{{ end }}
{{ $css := "nop" }}
{{ if eq ($flist.Get "initial") "yay" }}
{{ $css = (index (last 1 ( $flist.GetSortedMapValues "css_files" )) 0) }}
{{ end }}
{{ if in $css "css" }}
<link rel="stylesheet" href="{{ "/css/" }}{{ $css }}">
{{ else }}
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ end }}
{{ end }}

View File

@ -0,0 +1,4 @@
<footer>
▒▒▒ ▒ <a href="https://creativecommons.org/licenses/by-sa/4.0/"></a> 2019-2020 <a href="mailto:info@pirate.care">Piratecare</a> ▒Markdown♻HTML ✈ <a href="https://gohugo.io/" rel="nofollow">Hugo</a> ▒Commits♻<a href="https://git-scm.com/">Git</a> 🐟 <a href="https://gitea.io/">Gitea</a> ▒▒ 🐟 ▒ Print &#9879 <a href="https://pagedjs.org">paged.js</a> ▒▒▒&nbsp🐙&nbsp ▒▒▒▒▒▒🏃 &nbsp▒▒☄▒▒▒▒ &nbsp&nbsp▒&nbsp⚡ &nbsp▒▒▒ &nbsp▒▒▒▒▒▒&nbsp▒▒▒▒🔍▒ &nbsp☠&nbsp▒&nbsp▒▒▒&nbsp▒▒▒▒▒▒▒▒▒▒ 🐟▒ ☄ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒ ▒ ▒ ▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒ ▲ ▒▒▒▒▒▒ ▒▒ ▒ ▒ ▒ ▒▒&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp▒&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒ ▒ ▒ ▒▒▒▒▒▒▒▒▒▒ ⚧ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ◎ ▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒ ♻ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 🏃 ▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒ ▒ ▒ ▒▒▒▒▒▒▒ 🌑 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp▒▒ ▒▒▒▒▒▒▒▒▒ ⚡ ▒▒▒▒▒▒▒▒Design 🖼 <a href="https://www.maddalenafragnito.com">Maddu</a> 🐈▒▒▒▒▒▒ ◎
</footer>

View File

@ -0,0 +1,29 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
{{ if .Description }}
<meta name="description" content="{{ .Description }}" />
{{ end }}
{{ if .Keywords }}
<meta name="keywords" content="{{ delimit .Keywords "," }}" />
{{ end }}
{{ if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" />
{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
{{ hugo.Generator }}
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#996561">
<title>{{ block "title" . }}{{- .Title }} - {{ .Site.Title -}}{{ end }}</title>
</head>

View File

@ -0,0 +1,5 @@
<header class="flex justify-between bg-CoconutCream">
<a href="{{ .Site.Home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}" class="logo pt-3 cursor-pointer">pirate.care.syllabus&nbsp&nbsp▒▒▒&nbsp🐙&nbsp&nbsp</a>
<a href="/library/BROWSE_LIBRARY.html" target="_blank" class="logo pt-3 cursor-pointer">library.</a>
</div>
</header>

View File

@ -0,0 +1,2 @@
<link href="/css/paged_interface.css" rel="stylesheet" type="text/css">
<script src="/js/paged.polyfill.js"></script>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
{{- partial "head.html" . -}}
{{- partial "pagedjs.html" . -}}
{{ partial "css.html" . }}
<body>
<article>
{{- block "main" . }}{{- end }}
</article>
</body>
</html>

View File

@ -0,0 +1,53 @@
{{ define "main" }}
<div class="frontpage">
<div class="pb-6"> <span class="title-pretext">syllabus ⦚ </span><span class="title-text">{{ .Site.Home.Title }}</span></div>
<div class="sidebar-title mb-1 pt-16 mb-4">▒▒ has topics ▽</div>
<ul class="mt-8">
{{ range .Site.Home.Params.has_topics }}
{{ with $.GetPage (printf "%s%s" "/topic/" . ) }}
<li><a class="sidebar-list text-base toc" href="#{{ .File.LogicalName }}">> {{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ range .Site.Home.Params.has_topics }}
{{ with $.GetPage (printf "%s%s" "/topic/" . ) }}
<div class="topic" id="{{ .File.LogicalName }}"><div class="runningTopic"><a href="#{{ .File.LogicalName }}"> topic ⦚ {{ .Title }}</a></div>
<div><span class="topic-pretext">topic ⦚ </span><span class="topic-text pt-6">{{ .Title }}</span></div>
<div class="sidebar-title mb-1 pt-16">▒▒ has sessions ▽</div>
<ul class="mt-4">
{{ range .Params.has_sessions }}
{{ with $.GetPage (printf "%s%s" "/session/" . ) }}
<li><a class="sidebar-list text-base toc" href="#{{ .File.LogicalName }}">> {{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
<div>{{ .Content }}</div>
{{ range .Params.has_sessions }}
{{ with $.GetPage (printf "%s%s" "/session/" . ) }}
{{ $session := . }}
<div class="topic" id="{{ .File.LogicalName }}"><div class="runningTopic"><a href="#{{ .File.LogicalName }}">session ⦚ {{ .Title }}</a></div>
<div><span class="topic-pretext">session ⦚ </span><span class="topic-text pt-6">{{ .Title }}</span></div>
<div class="sidebar-title mb-1 pt-16">▒▒ is in ▽</div>
<ul class="mt-4">
{{ range where $.Site.RegularPages ".Section" "topic" }}
{{ if in .Params.has_sessions $session.File.LogicalName }}
<li><a class="sidebar-list text-base" href="#{{ .File.LogicalName }}">↖ topic ⦚ {{ .Title }}</a></li>
{{ else if in .Params.is_in $session.File.LogicalName }}
<li><a class="sidebar-list text-base" href="#{{ .File.LogicalName }}">↖ topic ⦚ {{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
<div class="pt-16">{{ .Content }} </div>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,7 @@
{{ define "main" }}
<div class="sidebar-title mb-1 pb-8">▒▒ all sessions:</div>
{{ range .Data.Pages }}
<div><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></div>
{{ end }}
<div class="pb-8"></div>
{{ end }}

View File

@ -0,0 +1,40 @@
{{ define "sidebar" }}
<div class="leading-none mb-12">
<span class="title-pretext">session ⦚ </span><span class="title-text pt-6">{{ .Title }}</span>
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
<div class="ddmenu">
<input id="toggly-toc" type="checkbox" >
<label for="toggly-toc" class="sidebar-title" tabindex="1">▒▒ table of contents ▽</label>
<div class="hiddendiv">
<div class="mt-4">
{{ .Page.TableOfContents }}
</div>
</div>
</div>
{{ end }}
<div class="ddmenu">
<input id="toggly-isin" type="checkbox">
<label for="toggly-isin" class="sidebar-title mt-4 mb-1" tabindex="1">▒▒ is in ▽</label>
<div class="hiddendiv">
<ul class="mt-4">
{{ $currentSession := . }}
{{ range where $.Site.RegularPages ".Section" "topic" }}
{{ if in .Params.has_sessions $currentSession.File.LogicalName }}
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">↖ topic ⦚ {{ .Title }}</a></li>
{{ else if in $currentSession.Params.is_in .File.LogicalName }}
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">↖ topic ⦚ {{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{define "main" }}
<article>
<div class="content-text">{{ .Content }}</div>
</article>
{{ end }}

View File

@ -0,0 +1,7 @@
{{ define "main" }}
<div class="sidebar-title mb-1 pb-8">▒▒ all topics:</div>
{{ range .Data.Pages }}
<div><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></div>
{{ end }}
<div class="pb-8"></div>
{{ end }}

View File

@ -0,0 +1,55 @@
{{ define "sidebar" }}
{{ $currentNode := . }}
<div class="leading-none mb-12">
<span class="title-pretext">topic ⦚ </span><span class="title-text pt-6">{{ .Title }}</span>
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
<div class="ddmenu">
<input id="toggly-toc" type="checkbox" >
<label for="toggly-toc" class="sidebar-title" tabindex="1">▒▒ table of contents ▽</label>
<div class="hiddendiv">
<div class="mt-4">
{{ .Page.TableOfContents }}
</div>
</div>
</div>
{{ end }}
<div class="ddmenu">
<input id="toggly-sessions" type="checkbox">
<label for="toggly-sessions" class="sidebar-title mb-1" tabindex="1">▒▒ has sessions ▽</label>
<div class="hiddendiv">
<ul class="mt-4">
{{ range .Params.has_sessions }}
{{ with $.GetPage (printf "%s%s" "/session/" . ) }}
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
<div class="ddmenu">
<input id="toggly-isin" type="checkbox">
<label for="toggly-isin" class="sidebar-title mt-4 mb-1" tabindex="1">▒▒ is in ▽</label>
<div class="hiddendiv">
<ul class="mt-4">
<li><a class="sidebar-list text-base" href="{{ .Site.Home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">↖ syllabus ⦚ {{ .Site.Home.Title }}</a></li>
</ul>
</div>
</div>
{{ end }}
{{define "main" }}
<article>
{{ if eq .Params.last_modified "top" }}
<div class="font-playfair italic text-base">Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}</div>
{{ end }}
<div class="content-text">{{ .Content }}</div>
{{ if eq .Params.last_modified "bottom" }}
<div class="font-playfair italic text-base">Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}</div>
{{ end }}
</article>
{{ end }}

1
themes/piratecare/node_modules/.bin/acorn generated vendored Symbolic link
View File

@ -0,0 +1 @@
../acorn/bin/acorn

1
themes/piratecare/node_modules/.bin/autoprefixer generated vendored Symbolic link
View File

@ -0,0 +1 @@
../autoprefixer/bin/autoprefixer

1
themes/piratecare/node_modules/.bin/browserslist generated vendored Symbolic link
View File

@ -0,0 +1 @@
../browserslist/cli.js

1
themes/piratecare/node_modules/.bin/cssesc generated vendored Symbolic link
View File

@ -0,0 +1 @@
../cssesc/bin/cssesc

1
themes/piratecare/node_modules/.bin/detective generated vendored Symbolic link
View File

@ -0,0 +1 @@
../detective/bin/detective.js

1
themes/piratecare/node_modules/.bin/esparse generated vendored Symbolic link
View File

@ -0,0 +1 @@
../esprima/bin/esparse.js

1
themes/piratecare/node_modules/.bin/esvalidate generated vendored Symbolic link
View File

@ -0,0 +1 @@
../esprima/bin/esvalidate.js

1
themes/piratecare/node_modules/.bin/js-yaml generated vendored Symbolic link
View File

@ -0,0 +1 @@
../js-yaml/bin/js-yaml.js

1
themes/piratecare/node_modules/.bin/postcss generated vendored Symbolic link
View File

@ -0,0 +1 @@
../postcss-cli/bin/postcss

1
themes/piratecare/node_modules/.bin/purgecss generated vendored Symbolic link
View File

@ -0,0 +1 @@
../purgecss/bin/purgecss

1
themes/piratecare/node_modules/.bin/tailwind generated vendored Symbolic link
View File

@ -0,0 +1 @@
../tailwindcss/lib/cli.js

1
themes/piratecare/node_modules/.bin/tailwindcss generated vendored Symbolic link
View File

@ -0,0 +1 @@
../tailwindcss/lib/cli.js

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Full Human
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,89 @@
# PostCSS Purgecss
![David (path)](https://img.shields.io/david/FullHuman/purgecss?path=packages%2Fpostcss-purgecss&style=for-the-badge)
![Dependabot](https://img.shields.io/badge/dependabot-enabled-%23024ea4?style=for-the-badge)
![npm](https://img.shields.io/npm/v/@fullhuman/postcss-purgecss?style=for-the-badge)
![npm](https://img.shields.io/npm/dw/@fullhuman/postcss-purgecss?style=for-the-badge)
![GitHub](https://img.shields.io/github/license/FullHuman/purgecss?style=for-the-badge)
[PostCSS] plugin for PurgeCSS.
[PostCSS]: https://github.com/postcss/postcss
## Installation
```
npm i -D @fullhuman/postcss-purgecss
```
## Usage
```js
const purgecss = require('@fullhuman/postcss-purgecss')
postcss([
purgecss({
content: ['./src/**/*.html']
})
])
```
See [PostCSS] docs for examples for your environment.
## Options
All of the options of purgecss are available to use with the plugins.
You will find below the main options available. For the complete list, go to the [purgecss documentation website](https://www.purgecss.com/configuration.html#options).
### `content` (**required**)
Type: `string | Object`
You can specify content that should be analyzed by Purgecss with an array of filenames or globs. The files can be HTML, Pug, Blade, etc.
### `extractors`
Type: `Array<Object>`
Purgecss can be adapted to suit your needs. If you notice a lot of unused CSS is not being removed, you might want to use a custom extractor.
More information about extractors [here](https://www.purgecss.com/extractors.html).
### `whitelist`
Type: `Array<string>`
You can whitelist selectors to stop Purgecss from removing them from your CSS. This can be accomplished with the options whitelist and whitelistPatterns.
### `whitelistPatterns`
Type: `Array<RegExp>`
You can whitelist selectors based on a regular expression with whitelistPatterns.
### `rejected`
Type: `boolean`
Default value: `false`
If true, purged selectors will be captured and rendered as PostCSS messages.
Use with a PostCSS reporter plugin like [`postcss-reporter`](https://github.com/postcss/postcss-reporter)
to print the purged selectors to the console as they are processed.
### `keyframes`
Type: `boolean`
Default value: `false`
If you are using a CSS animation library such as animate.css, you can remove unused keyframes by setting the keyframes option to true.
#### `fontFace`
Type: `boolean`
Default value: `false`
If there are any unused @font-face rules in your css, you can remove them by setting the fontFace option to true.
## Contributing
Please read [CONTRIBUTING.md](./../../CONTRIBUTING.md) for details on our code of
conduct, and the process for submitting pull requests to us.
## Versioning
postcss-purgecss use [SemVer](http://semver.org/) for versioning.
## License
This project is licensed under the MIT License - see the [LICENSE](./../../LICENSE) file
for details.

View File

@ -0,0 +1,31 @@
import postcss from "postcss";
interface RawContent {
extension: string;
raw: string;
}
interface RawCSS {
raw: string;
}
type ExtractorFunction = (content: string) => string[];
interface Extractors {
extensions: string[];
extractor: ExtractorFunction;
}
interface UserDefinedOptions {
content: Array<string | RawContent>;
css: Array<string | RawCSS>;
defaultExtractor?: ExtractorFunction;
extractors?: Array<Extractors>;
fontFace?: boolean;
keyframes?: boolean;
output?: string;
rejected?: boolean;
stdin?: boolean;
stdout?: boolean;
variables?: boolean;
whitelist?: string[];
whitelistPatterns?: Array<RegExp>;
whitelistPatternsChildren?: Array<RegExp>;
}
declare const purgeCSSPlugin: postcss.Plugin<Pick<UserDefinedOptions, "keyframes" | "content" | "extractors" | "defaultExtractor" | "fontFace" | "output" | "rejected" | "stdin" | "stdout" | "variables" | "whitelist" | "whitelistPatterns" | "whitelistPatternsChildren">>;
export { purgeCSSPlugin as default };

Some files were not shown because too many files have changed in this diff Show More