Compare commits

...

7 commits

8 changed files with 152 additions and 76 deletions

View file

@ -1,6 +1,6 @@
/*
Based on Vanilla version
with some modifications similar to DOTAWO customization
with some modifications adopted from the DOTAWO customization
- remove "¶" sign from headings
*/

View file

@ -1,3 +1,9 @@
<!--
Sandpoints uses the Markdown image convention ![](image/path.png)
also for internal links, as in ![Some other page](article:article-name)
also for bib references, as in ![](bib:some-bib-id)
-->
{{- $text_link := .Text -}}
{{ $_ := newScratch }}
@ -5,16 +11,20 @@
{{ $_.Add "triads" $k }}
{{- end -}}
<!-- IMG-->
{{- if strings.HasPrefix .Destination "img:" -}}
{{- $img_params := (substr .Destination 4) -}}
{{- $img_src := index (split $img_params " ") 0 -}}
{{- $img_attr := index (split $img_params $img_src) 1 -}}
<img class="sandpoints-img" src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
<!-- VIDEO -->
{{- else if strings.HasPrefix .Destination "vid:" -}}
{{- $vid_params := (substr .Destination 4) -}}
{{- $vid_src := index (split $vid_params " ") 0 -}}
{{- $vid_attr := index (split $vid_params $vid_src) 1 -}}
<video class="sandpoints-vid" controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
<!-- BIB REFERENCE FROM LIBRARY -->
{{- else if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
@ -34,6 +44,8 @@
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span>bib:{{- $destination -}} not found</span></a>
{{- end -}}
<!-- TRIAD REFERENCE ![](article:artile-filename) -->
{{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
{{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
@ -46,6 +58,7 @@
{{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
{{- end -}}
<!-- AUDIO -->
{{- else if strings.HasPrefix .Destination "audio:" -}}
{{- $a_destination := (substr .Destination 6) -}}
{{- if findRE "^.*static" $a_destination -}}
@ -53,14 +66,41 @@
{{- else -}}
<span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
{{- end -}}
{{- else if findRE "^.*static" .Destination -}} <!-- EDITED clause for link to file in /static/ folder -->
<!-- JGDR IMAGE EDIT
edit to support the following:
![Caption text *that supports markdown*](path/to/image.png "This is mouse over text")
.Text > Text in square brackets becomes caption (CSS/figcaption), and Alt text
.Title > Title (text after image URL) becomes mouse over text
html 'title' is for mouse over pop up text
html 'alt' is for alt text
TODO:
- enclose image and caption in block
-->
<!-- Images from STATIC -->
{{- else if findRE "^.*static" .Destination -}} <!-- EDITED: clause for link to file in /static/ folder -->
<div class="imagecontainer">
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Title -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{ if .Text }}
<figcaption> {{with .Text }} {{ . }} {{end}}</figcaption> <!-- ALT becomes caption. Title becomes moouse over text.-->
{{ $x:= safeHTML .Text }}
<figcaption> {{ $x }}</figcaption> </div><!-- ALT becomes caption. Title becomes moouse over text.-->
{{ else }}
</div>
{{ end }}
{{- else -}} <!-- else; EDIT TO COVER IMGs in STATIC via link that does not include /static/-->
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
<!-- OTHER IMAGES/ or ommitting static/-->
{{- else -}} <!-- else; EDIT TO COVER IMGs files via link that does not include /static/-->
<div class="imagecontainer">
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- markdownify . -}}"{{- end -}} />
<!-- Add .Text as Image caption (figcaption)-->
{{ if .Text }}
<figcaption> {{with .Text }} {{ . }} {{end}}</figcaption> <!-- ALT becomes caption. Title becomes moouse over text.-->
{{ $x:= safeHTML .Text }} <!-- Safe HTML to support styling, e.g. italics -->
<figcaption> {{ $x }} </figcaption></div>
{{ else }}
</div>
{{ end }}
{{- end -}}

View file

@ -63,7 +63,7 @@ Tags: citation_keywords (semicolon-separated)
<meta name = "citation_title" content = "{{ .Page.Title }}"/>
<!-- DATE if available // Date: citation_date (preferred) -->
{{ with .Page.Params.publishDate }}
{{ $d:= .Format "Jan, 2 2006" }} <!-- default date format doesn't seem to work-->
{{ $d:= .Format "Jan 2, 2006" }} <!-- default date format doesn't seem to work-->
<meta name = "citation_date" content = "{{ $d }}"/>
{{ end }}
<!-- ABSTRACT -->

View file

@ -12,24 +12,29 @@
{{ $sandnameSingular := "" }}
{{ $mentionLink := "" }}
<!-- TITLE -->
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}</span>{{ .Title }}</div>
<div class="grid">
<!-- TOC -->
<div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<!-- RIGHT COLUMN -->
<div class="rightcolumn">
{{ $closeDivs := false }}
<!-- Get plurals from JSON Dictionary of item types -->
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $paramsKeys := (slice) }}
<!-- Loop Params -->
{{ range $k, $v := $currentNode.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
<!-- Loop Mentions -->
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $k, $m := index $currentNode.Params $mention }}
@ -39,6 +44,7 @@
{{ $sandnameSingular = $k }}
{{ end }}
{{ end }}
<!-- Format mention links-->
{{- with $.GetPage $mentionLink -}}
{{- with not $k -}}
{{ $closeDivs = true }}
@ -53,7 +59,7 @@
{{ end }}
{{- with $closeDivs -}}</div></div>{{ end }}
{{ end }}
<!-- MENTIONED IN -->
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has hasmentionedin">
{{ with $scratch.backlinks }}
@ -68,6 +74,7 @@
</div></div>
{{ end }}
<!-- CHILDREN (HAS) -->
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has hashas">
{{ with $scratch.has }}
@ -81,6 +88,7 @@
{{ end }}
</div></div>
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has hasin">
@ -93,13 +101,25 @@
{{ end }}
</div></div>
{{ end }}
<!-- EDIT: ADD PUBLISH DATE IF ITs AVAILABLE-->
{{ if .Page.Params.publishDate }}
<div class= "haspublishdate"> Published on {{ .Page.Params.publishDate.Format "Jan, 2 2006" }} </div>
{{ end }}
<!-- end of right column-->
</div>
</div>
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
<!-- ABSTRACT -->
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
<!-- KEYWORDS -->
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span><a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- else -}},&nbsp;<a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
<!-- CONTENT -->
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
{{ $dummy := $var.Permalink }}

View file

@ -4,12 +4,12 @@ THIS IS BASED ON THE DOTAWO CUSTOMIZATION
INCLUDING MODIFICATIONS:
- Use original Sandpoints fonts / revert to original font weight
- EDIT table: add vert line to the right
- ADD figcaption
- ADD figcaption definition (image/table captions)
- EDIT pre (font scale, line wrapping)
- ADD code (border and background)
- EDIT remove italics from abstract
all edits include a comment including the keyword anybody
*/
html,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{
@ -413,6 +413,15 @@ ol li{
.afterhas{
grid-column:2
}
/* EDIT: Make visible Frontmatter field 'publishDate' if available */
.haspublishdate{
grid-column: 3
font-family:great vibes,cursive;
font-size:.9em;
font-style:italic;
vertical-align:baseline;
position:relative
}
.content{
margin-top:4rem;
padding-left:3rem;
@ -459,8 +468,13 @@ h6{
font-weight:500;/*700;*/
font-size:1rem
}
.imagecontainer {/* test by anybody */
display: block;
/*background: grey; */
}
.abstract{
font-style:italic;
/*font-style:italic;*/ /* Remove italics from abstract*/
border-left:1px solid #000;
margin-left:5rem;
margin-right:2rem;

View file

@ -90,7 +90,62 @@ target = "data"
source = "exampleSite/content/metadata/_index.md"
target = "content/metadata/_index.md"
#################################################################################################
## JGDR THEME CUSTOMIZATIONS
#################################################################################################
# MOUNT CUSTOM FONTS
## Vanilla Fonts
[[module.imports.mounts]]
source = "customizations/jgdr/static/fonts"
target = "static/fonts"
# MOUNT CUSTOM CSS
## add figcaption, code; edit pre (font scale); eding table (vert line right)
[[module.imports.mounts]]
source = "customizations/jgdr/static/css/site.min.css"
target = "static/css/site.min.css"
# MOUNT CUSTOM SITE.CSS
## based on Vanilla version, removed paragraph sign
[[module.imports.mounts]]
source = "customizations/jgdr/assets/css/site.css"
target = "assets/css/site.css"
# MOUNT CUSTOM PRINT CSS
## B5 page size
[[module.imports.mounts]]
source = "customizations/jgdr/static/css/print.css"
target = "static/css/print.css"
# MOUNT CUSTOM RENDERER FOR IMAGE
# INCLUDE figcaption and hover text(alt)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/_default/_markup/render-image.html"
target = "layouts/_default/_markup/render-image.html"
# MOUNT CUSTOM RENDERER FOR LIST
## remove date from keyword list
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/taxonomy/list.html"
target = "layouts/taxonomy/list.html"
# MOUNT CUSTOM HEAD
# Contains Zotero-Compatible Citation Metadata
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/partials/head.html"
target = "layouts/partials/head.html"
# MOUNT CUSTOM HEADER (DOTAWO CUSTOMIZATIONS)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/partials/header.html"
target = "layouts/partials/header.html"
# MOUNT CUSTOM SINGLE BODY
# based on DOTAWO
# preview 'publishDate' if available
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/partials/singlebody.html"
target = "layouts/partials/singlebody.html"
# MOUNT CUSTOM RENDER LINK
# based on DOTAWO
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/_default/_markup/render-link.html"
target = "layouts/_default/_markup/render-link.html"
#################################################################################################
# CUSTOMIZATIONS - DOTAWO (15/8/23)
# below is the list of imports to get the svelte webapp
# which handles editing the website
@ -116,61 +171,9 @@ target = "content/metadata/_index.md"
# [[module.imports.mounts]]
# source = "customizations/Dotawo/layouts/_default/_markup/render-link.html"
# target = "layouts/_default/_markup/render-link.html"
#################################################################################################
# TEST CUSTOMIZATION ##########################
# MOUNT CUSTOM FONTS
## Vanilla Fonts
[[module.imports.mounts]]
source = "customizations/jgdr/static/fonts"
target = "static/fonts"
# MOUNT CUSTOM CSS
## add figcaption
## add code
## edit pre (font scale)
## eding table (vert line right)
[[module.imports.mounts]]
source = "customizations/jgdr/static/css/site.min.css"
target = "static/css/site.min.css"
# MOUNT CUSTOM SITE.CSS
## based on Vanilla version, removed paragraph sign
[[module.imports.mounts]]
source = "customizations/jgdr/assets/css/site.css"
target = "assets/css/site.css"
# MOUNT CUSTOM PRINT CSS
## B5 page size
[[module.imports.mounts]]
source = "customizations/jgdr/static/css/print.css"
target = "static/css/print.css"
# MOUNT CUSTOM RENDERER FOR IMAGE
## INCLUDE figcaption and hover text(alt)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/_default/_markup/render-image.html"
target = "layouts/_default/_markup/render-image.html"
# MOUNT CUSTOM RENDERER FOR LIST
## remove date from keyword list
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/taxonomy/list.html"
target = "layouts/taxonomy/list.html"
# FROM DOTAWO
# MOUNT CUSTOM HEAD (Contains Zotero-Compatible Citation Metadata)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/partials/head.html"
target = "layouts/partials/head.html"
# MOUNT CUSTOM HEADER (DOTAWO CUSTOMIZATIONS)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/partials/header.html"
target = "layouts/partials/header.html"
# MOUNT CUSTOM SINGLE BODY (DOTAWO CUSTOMIZATIONS)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/partials/singlebody.html"
target = "layouts/partials/singlebody.html"
# MOUNT CUSTOM RENDER LINK (DOTAWO CUSTOMIZATIONS)
[[module.imports.mounts]]
source = "customizations/jgdr/layouts/_default/_markup/render-link.html"
target = "layouts/_default/_markup/render-link.html"
#
[[module.imports]]

View file

@ -14,11 +14,12 @@ abstract: |
[Zotero Connector]: https://www.zotero.org/download/connectors "Browser plugin for the Citation Management Software Zotero."
# Save interactive and printable PDFs
- To browse printable content look for print items at the bottom of the [sitemap](/) page.
- Using [Chrome](https://www.google.com/chrome/), open any of the ['print' type content](/keywords/print).
- To browse printable content look for print items at the bottom of the [sitemap](/) page, or entries that have the [keyword 'print'](/keywords/print).
- Open any of these entries using [Chrome](https://www.google.com/chrome/).
- *Sandpoints* will dynamically generate a printable PDF -- larger collections, might need a few seconds for typesetting the document and populating the table of contents.
- In Chrome go to *Print* (or press `Ctr+P` or `Cmd+P`).
- Click Save the PDF in the pop-up dialogue.
- Select 'Save as PDF'
- Click Save, and set filename and location in the pop-up dialogue.
*Note: embedded media such as videos are not included in PDFs.*
@ -29,9 +30,9 @@ Get citation metadata using [Zotero Connector]. Navigate to any article and clic
- Article title
- Abstract
- Publication name and abbreviation
- URL
Not yet implemented:
- URL [needs base URL]
- Issue name
- Issue editors
- Keywords

View file

@ -35,11 +35,9 @@ It includes 3 article entries:
- citations and bibliography
View and save PDF versions of the:
- embed example article at ![Print Embedding example](print:p-playthings).
- compiled sample article at ![Print Sample Article](print:p-ex-constantinos-digra).
(open *using Chrome* and do Ctrl/Cmd+P or select Print)
View and save PDF versions of these articles open the following print entries *using Chrome* and do Ctrl/Cmd+P, or select Print:
- embed example article at ![](print:p-playthings).
- compiled sample article at ![](print:p-ex-constantinos-digra).
@ -62,5 +60,5 @@ Platform features
- Low overhead compared to other platforms (the current website is about 40mb excluding the library).
- Backup and collaboration achieved via Git.
- Fully customizable, and much easier to do so compared to Wordpress (both as styling and functionality).
- Sandpoints is a non-commercial project by developer and former academic Marcell Mars, for to open and experimental publishing; who is very supportive (providing help and support, and also is hosting the website and its repository on his server)
- Sandpoints is a non-commercial project by developer and former academic Marcell Mars, designed and developed specifically for experimental publishing. Marcell is very supportive (providing help and support, and also is hosting the website and its repository on his server)
- Sandpoints was already implemented in a few projects, including the [Journal Dotawo](https://pages.sandpoints.org/dotawo/journal/) since issue 7, and the [ACADIA conference archive](https://pages.sandpoints.org/sandpoints/acadiaarchive-46619c43/archive/acadia/) which includes 3.500 entries.