Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions assets/styles/print.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*--------------------------------------------------------------
print stylesheet — loaded with media="print" so the browser only
fetches it when the user actually prints (or print-previews).
--------------------------------------------------------------*/

/* ink-saving palette: theme colours are HSL channels at runtime, so
forcing them flat is enough to override every theme. */
:root {
--page-color: 0 0% 100%;
--text-color: 0 0% 0%;
--hyperlink-color: 0 0% 0%;
--accent-color: 0 0% 0%;
--text-color-inverted: 0 0% 100%;
--shadow-color: 0 0% 100%;
--blend-mode: normal;
--blend-filter: none;
}

body {
background: white;
color: black;
font-family: var(--font-serif);
}

/* single column — drop the on-screen content cap. */
body > header,
main,
body > footer {
max-width: none;
margin: 0;
}

/* hide chrome the reader doesn't need on paper. */
.gadgets,
.languages,
nav,
.taxonomy-filter,
#search__form,
.menu-social,
.share,
[data-print="hide"] {
display: none !important;
}

/* expand non-anchor hyperlinks to footnote-style URLs so they survive
the page. Skip mailto/tel and same-page anchors. */
a[href^="http"]::after,
a[href^="//"]::after {
content: " (" attr(href) ")";
font-size: 90%;
word-break: break-all;
}

/* respect page breaks. */
h1, h2, h3, h4, h5, h6 {
break-after: avoid;
}

figure,
pre,
blockquote,
.alert {
break-inside: avoid;
}

/* remove decorative effects that print poorly. */
img,
picture,
video,
svg {
mix-blend-mode: normal;
filter: none;
max-width: 100% !important;
}

article:focus-within,
article:hover > * {
outline: none;
color: black;
}
22 changes: 6 additions & 16 deletions assets/styles/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ body > footer {
--hyperlink-color: 0 0% 0%;
--accent-color: 240 100% 50%;
--text-color-inverted: 0 0% 78%;
--theme--toggle: 0;
}

.theme--blue {
Expand All @@ -551,7 +550,6 @@ body > footer {
--hyperlink-color: 0 0% 100%;
--accent-color: 60 100% 50%;
--text-color-inverted: 240 100% 50%;
--theme--toggle: 0;
}

.theme--peach {
Expand Down Expand Up @@ -863,7 +861,6 @@ sup[id^="fnref:"]:target a::before,

sup[id^="fnref:"] a::before {
line-height: calc(0.75 * (var(--icon-size) - var(--icon-margin)));
/* TODO: introduce a line-height adjust constant? */
}

code, kbd {
Expand Down Expand Up @@ -1491,8 +1488,6 @@ header aside,
border-bottom: 2px dashed;
text-overflow: ellipsis;
transition: max-height 1s 1s, border-color 1s 1s;

/*-webkit-mask-image: linear-gradient(top, rgba(0,0,0,1) 1rem, rgba(0,0,0,0) 90%);*/
}

:is(.marginalia, .entry-content aside) > *:first-child {
Expand All @@ -1505,7 +1500,6 @@ header aside,
transition-delay: 0s;

border-color: transparent;
/*-webkit-mask-image: none;*/
}

/*.marginalia::after,
Expand All @@ -1527,7 +1521,7 @@ header aside,

border-color: transparent;
transition: all 0s 0s;
-webkit-mask-image: none;
mask-image: none;
}
:is(.marginalia, .entry-content aside)::before {
display: none;
Expand Down Expand Up @@ -1564,14 +1558,13 @@ main :is(h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], a[title], a[href*='.pdf
/*backdrop-filter: blur(var(--page-blur));*/
color: hsl(var(--text-color) / 1);
cursor: help;
font-size: 1rem !important; /* TODO: move to typography section */;
font-size: 1rem !important;
font-variant: initial;
text-align: center;
text-overflow: ellipsis;
text-transform: initial;

-webkit-transition: color 0s;
transition : color 0s;
transition: color 0s;
/*outline: 1px dashed red;*/
}

Expand All @@ -1589,7 +1582,7 @@ main :is(h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], a[title], ins[datetime]
border-top: 0.5px solid;
border-bottom: 0.5px solid;

-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0, 10%, rgba(0,0,0,var(--page-transparency)) calc(var(--gutter) + var(--baseline)));
mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0, 10%, rgba(0,0,0,var(--page-transparency)) calc(var(--gutter) + var(--baseline)));
}
/* anchor links */
main :is(h1, h2, h3, h4, h5, h6)[id]::before {
Expand Down Expand Up @@ -2166,8 +2159,7 @@ article h3 {
opacity: 1;
z-index: 100;

-webkit-transition: all 0.3s linear;
transition : all 0.3s linear;
transition: all 0.3s linear;
}

[data-visibility='hidden'] {
Expand All @@ -2183,8 +2175,7 @@ article h3 {

transform-origin: center center;

-webkit-transition: all 0.3s linear;
transition : all 0.3s linear;
transition: all 0.3s linear;
}

[data-visibility='hidden'] > * {
Expand Down Expand Up @@ -2346,7 +2337,6 @@ input[type=file]::file-selector-button {
text-transform: uppercase;

box-shadow: 0px 5px 0px 0px hsl(var(--shadow-color));
-webkit-appearance: button; /* iOS and Safari fix */
}

button:hover,
Expand Down
9 changes: 6 additions & 3 deletions i18n/el.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ previous:
search:
other: Αναζήτηση

toggle-theme:
other: Εναλλαγή θέματος

scroll-top:
other: Επιστροφή στην κορυφή

play-on:
other: 'Αναπαραγωγή στο {{ .platform }}'

Expand All @@ -39,9 +45,6 @@ share-email:

## post details

description:
other: Σύνοψη

tags:
other: Ετικέτες

Expand Down
9 changes: 6 additions & 3 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ previous:
search:
other: Search

toggle-theme:
other: Toggle theme

scroll-top:
other: Scroll to top

play-on:
other: 'Play on {{ .platform }}'

Expand All @@ -39,9 +45,6 @@ share-email:

## post details

description:
other: Summary

rating:
other: Rating

Expand Down
14 changes: 7 additions & 7 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
{{ partial "head" . }}
<script>
const themes = ['scheme--dark','scheme--light','theme--peach scheme--dark','theme--peach scheme--light','theme--retro scheme--dark','theme--retro scheme--light'];
if (typeof themes !== 'undefined' && themes.length > 0) {
if (theme = localStorage.getItem('theme')) {
if (themes.indexOf(theme) == -1) {
theme = themes[0];
}
let theme;
if (themes.length > 0) {
let stored = null;
try { stored = localStorage.getItem('theme'); } catch (e) { /* Safari Private Mode throws on localStorage access */ }
if (stored && themes.indexOf(stored) !== -1) {
theme = stored;
} else {
theme = themes[0];
}
// get current theme from classList?
} else {
theme = '{{ $siteTheme }}{{ with .Params.Theme }} {{ . }}{{ end }}';
}
document.documentElement.classList.add(...theme.split(' '))
document.documentElement.classList.add(...theme.split(' '));
</script>
</head>
<body id="top" class="{{ .Kind }}"{{ with site.Params.LanguageDir }} dir="{{ . }}"{{ end }}>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/gadgets.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="gadgets">
<!-- {{ with .NextInSection }}<a id="next" class="icon" title="{{ i18n "next" }}: {{ .Title }}" href="{{ .Permalink }}">→</a>{{ end }}
{{ with .PrevInSection }}<a id="prev" class="icon" title="{{ i18n "previous" }}: {{ .Title }}" href="{{ .Permalink }}">←</a>{{ end }} -->
<a id="themer" class="icon hidden" href="#"><span></span></a>
<a id="scroller" class="icon" href="#top"><span>⊼</span></a>
<a id="themer" class="icon hidden" href="#" aria-label="{{ i18n "toggle-theme" }}"><span></span></a>
<a id="scroller" class="icon" href="#top" aria-label="{{ i18n "scroll-top" }}"><span>⊼</span></a>
</div>
3 changes: 3 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
{{- $syntaxcss := resources.Get "/styles/syntax.css" | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $syntaxcss.RelPermalink }}" integrity="{{ $syntaxcss.Data.Integrity }}" crossorigin="anonymous" media="print" onload="this.media='screen'">
<noscript><link rel="stylesheet" href="{{ $syntaxcss.RelPermalink }}" integrity="{{ $syntaxcss.Data.Integrity }}" crossorigin="anonymous"></noscript>
<!-- print stylesheet: lazy-fetched by the browser when actually printing -->
{{- $printcss := resources.Get "/styles/print.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ $printcss.RelPermalink }}" integrity="{{ $printcss.Data.Integrity }}" crossorigin="anonymous" media="print">
<!-- simple-lightbox CSS is injected by onion.js only on pages with image links -->


Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header-inner.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ <h1>
</a>
{{- with site.Params.description }}<span class="description">{{ . }}</span>{{ end -}}
</h1>
{{ partialCached "menu-main" . }}
{{ partialCached "menu-main" . .RelPermalink }}
{{- if or site.Params.show_search site.Params.showsearch }}{{ partialCached "search" . }}{{ end -}}
6 changes: 3 additions & 3 deletions layouts/partials/menu-main.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<menu>
{{- with index site.Menus.main -}}
{{- range . -}}
<li class="{{ if .HasChildren }}has-children{{ end }}">{{ .Pre }}<a href="{{ .URL }}">{{ .Name }}</a>{{ .Post }}{{ if .HasChildren -}}
<li class="{{ if .HasChildren }}has-children{{ end }}">{{ .Pre }}<a href="{{ .URL }}"{{ if eq .URL $.RelPermalink }} aria-current="page"{{ end }}>{{ .Name }}</a>{{ .Post }}{{ if .HasChildren -}}
<menu>
{{- range .Children -}}
<li><a href="{{ .URL }}">{{ .Pre }}{{ .Name }}{{ .Post }}</a></li>
<li><a href="{{ .URL }}"{{ if eq .URL $.RelPermalink }} aria-current="page"{{ end }}>{{ .Pre }}{{ .Name }}{{ .Post }}</a></li>
{{- end -}}
</menu>
{{- end -}}</li>
{{- end -}}
{{- else -}}
{{- range site.RegularPages -}}
{{ if and (eq .Section "") (ne .Params.menu_hide true) -}}
<li><a href="{{ .RelPermalink }}">{{ with .Title }}{{ . | title }}{{ else }}{{ .File.ContentBaseName | title }}{{ end }}</a></li>
<li><a href="{{ .RelPermalink }}"{{ if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end }}>{{ with .Title }}{{ . | title }}{{ else }}{{ .File.ContentBaseName | title }}{{ end }}</a></li>
{{- end }}
{{- end -}}
{{- end -}}
Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/search.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!-- layouts/partials/search.html -->
<search>
<form id="search__form" class="noscript" method="GET" action="https://duckduckgo.com/" data-language-prefix="{{ site.LanguagePrefix }}">
<div class="search__bar">
<input id="search__input" name="q" tabindex="0" autocomplete="off" {{ with site.BaseURL }}value="site:{{ . }} "{{ end }} placeholder="{{ i18n "search" }}"><!--
<input id="search__input" name="q" tabindex="0" autocomplete="off" {{ with site.BaseURL }}value="site:{{ . }} "{{ end }} placeholder="{{ i18n "search" }}"><!--
<label id="search__button" for="search__input" class="icon" type="button"><span>⌕</span></label> -->
</div>
<div id="search__results" class="articles-list"></div>
</form>
</search>
<script src="{{ "/scripts/askolonion/askolonion.js" | relURL }}"></script>
2 changes: 1 addition & 1 deletion layouts/shortcodes/articles-filter.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script type="text/javascript">
var txnm_filter = '.taxonomy-filter';
var txnm_filter__reset = '.taxonomy-filter__reset';
var txnm_filter__attr = 'data-{{ $taxi }}'; // TODO: Class attribute
var txnm_filter__attr = 'data-{{ $taxi }}';
var txnm_filter__able = '.articles-filterable [' + txnm_filter__attr + ']';
var txnm_selected = [];
document.querySelector(txnm_filter).classList.remove('noscript');
Expand Down
Loading
Loading