Skip to content
Open
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
29 changes: 27 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
.PHONY: all css serve-dev
.PHONY: all css js serve-dev

define update_cache_buster
hash=$$(sha256sum "$(1)" | cut -c1-8); \
perl -0pi -e "s|(^[[:space:]]*$(2):.*?url: '/)[^']*(')|\$$1$(1)?v=$$hash\$$2|ms" _config.yml
endef

define update_sri
hash=$$(openssl dgst -sha384 -binary "$(1)" | openssl base64 -A); \
perl -0pi -e "s|(^[[:space:]]*$(2):.*?sri: ')[^']*(')|\$$1sha384-$$hash\$$2|ms" _config.yml
endef

all:
@echo '# These are the available make targets'
@grep '^[^#[:space:]\.].*:' Makefile | grep -v all: | tr -d :

css:
npm install
npx less --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css
npx lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css
$(call update_cache_buster,styles/styles.min.css,css)
$(call update_sri,styles/styles.min.css,css)

js:
npm install
@for file in js/*.js; do \
case "$$file" in \
*.min.js) continue ;; \
esac; \
minified="$${file%.js}.min.js"; \
name="$$(basename "$$file" .js)"; \
npx uglifyjs "$$file" -c -m -o "$$minified"; \
$(call update_cache_buster,$$minified,$$name); \
$(call update_sri,$$minified,$$name); \
done

serve-dev:
docker run -it -p 4000:4000 -v $(PWD):/site -w /site library/ruby:3 bash -c 'bundle install && bundle exec jekyll serve -H 0.0.0.0'
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ The pages are rendered with Jekyll and kindly hosted by github.
## Build CSS

To build the stylesheets run `make css`.

## Build JS

To build the stylesheets run `make js`.
77 changes: 47 additions & 30 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,55 @@
safe: true
encoding: UTF-8
url: https://roundcube.net
enforce_ssl: roundcube.net
hostname: "https://roundcube.net"
permalink: news/:year/:month/:day/:title
exclude: [vendor]
plugins: [jekyll-paginate]
paginate: 10
paginate_path: "/news/page:num/"
environment: "production"
paginate_path: '/news/page:num/'
environment: 'production'
num_related_items: 5
libs: {
fonts: {
roboto: 'https://fonts.googleapis.com/css?family=Roboto&display=swap',
},
less: {
url: 'https://cdn.jsdelivr.net/npm/less@4.6.4/dist/less.min.js',
sri: 'sha384-WR+iiQT+XSq8wDUutASKAXx1pZTJCLRyHfpwqBiL1ji4qd2BsJIPhn8k/s72NkPj'
},
css: '/styles/styles.min.css?v=2026051000',
bootstrap: {
css: {
url: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css',
sri: 'sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB'
},
js: {
url: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js',
sri: 'sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI'
}
},
fontawesome: {
css: {
url: 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7.2.0/css/all.min.css',
sri: 'sha384-EXatlQyrOJgDaM9/a74ArMzy7/2bTMSrZj8ID1IPeVmc3GncfCugefCFWSLj8JL/'
},
}
}
exclude:
- Gemfile
- Gemfile.lock
- node_modules/
- Makefile
- package.json
- package-lock.json
- README.md
- stylelint.config.mjs
libs:
css:
url: '/styles/styles.min.css?v=9bf32423'
sri: 'sha384-yb8/IfPlNNl8SDmdqLJ/CA5xbgQHXyHb2ehtoAamh+bLbMmu/tW+EBvF2BdzkzLv'
js:
banner:
url: '/js/banner.min.js?v=f44c2f56'
sri: 'sha384-zF0W4VZ06nGXgt2nFDiPoMhn5+UK+WaAIX1cprNGHkcURqccwGD+fXRZiu77TZ+b'
copy:
url: '/js/copy.min.js?v=ebb9b310'
sri: 'sha384-9TlbtUpnP3OoI5QMwNcfEMbkzjHOvlpeDEjVJCPWHJPxwCA5K2dXqlKZrb07rYVa'
theme:
url: '/js/theme.min.js?v=17d30fbf'
sri: 'sha384-VhNYv2z6f3ZriTjr7a9xelQKHZilrphb/xj36CtPT1McEdLSIPrMG4L+IJkgC1+T'
viewer:
url: '/js/viewer.min.js?v=df6dc21d'
sri: 'sha384-Gn/Zio1YIE6O7P0MXgTN8GECQMnPDd8MYeXQbJV5hk4+6O6aWhkBHcFUFs+DpNDL'
less:
js:
url: 'https://cdn.jsdelivr.net/npm/less@4.9.1/dist/less.min.js'
sri: 'sha256-QoOydTeDccOLjcHMHS1oOUe0QaqHXh2XFuki4s/zSXc='
roboto:
css:
url: 'https://cdn.jsdelivr.net/npm/@fontsource/roboto@5.3.0/400.css'
sri: 'sha256-aYPEXwxOBquazL7uNzcM57whskXEvU0X84EZ2lI41yk='
bootstrap:
css:
url: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css'
sri: 'sha256-2FMn2Zx6PuH5tdBQDRNwrOo60ts5wWPC9R8jK67b3t4='
js:
url: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js'
sri: 'sha256-5P1JGBOIxI7FBAvT/mb1fCnI5n/NhQKzNUuW7Hq0fMc='
fontawesome:
css:
url: 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7.3.1/css/all.min.css'
sri: 'sha256-4Lad8m4ZWW1Lgb9+sMVLYEfnIh7BjV1NQMEe79Pviks='
105 changes: 14 additions & 91 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<span class="fa-solid fa-palette me-1"></span> Switch theme
</a>
<ul class="dropdown-menu py-1">
<li><a class="dropdown-item px-2 pe-3 py-1 rc-icon light-mode" href="#" onclick="switch_color_mode('light'); return false;">Light theme</a></li>
<li><a class="dropdown-item px-2 pe-3 py-1 rc-icon dark-mode" href="#" onclick="switch_color_mode('dark'); return false;">Dark theme</a></li>
<li><a class="dropdown-item px-2 pe-3 py-1 rc-icon auto-mode current-theme" href="#" onclick="switch_color_mode('auto'); return false;">Auto detect</a></li>
<li><a class="dropdown-item px-2 pe-3 py-1 rc-icon light-mode" href="#" data-rc-color-mode="light">Light theme</a></li>
<li><a class="dropdown-item px-2 pe-3 py-1 rc-icon dark-mode" href="#" data-rc-color-mode="dark">Dark theme</a></li>
<li><a class="dropdown-item px-2 pe-3 py-1 rc-icon auto-mode current-theme" href="#" data-rc-color-mode="auto">Auto detect</a></li>
</ul>
</div>
</li>
Expand All @@ -41,91 +41,14 @@

<script src="{{ site.libs.bootstrap.js.url }}" integrity="{{ site.libs.bootstrap.js.sri }}" crossorigin="anonymous"></script>

<script>
var color_mode = 'auto';
if (typeof(Storage) !== "undefined" && window.localStorage.getItem("color-mode") !== null) {
color_mode = window.localStorage.getItem("color-mode");
}
switch_color_mode(color_mode, true);

function switch_color_mode(mode, onload) {
var color_mode = mode;

if (mode == 'auto') {
color_mode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}

document.getElementsByTagName('html')[0].setAttribute('data-bs-theme', color_mode)
document.querySelector('div.color-modes > ul.dropdown-menu a.current-theme').classList.remove('current-theme');
document.querySelector('div.color-modes > ul.dropdown-menu a.' + mode + '-mode').classList.add('current-theme');

if (!onload && typeof(Storage) !== "undefined") {
if (mode == 'auto') {
window.localStorage.removeItem('color-mode');
}
else {
window.localStorage.setItem('color-mode', mode);
}
}

var event = new Event('switch-color-mode');
document.dispatchEvent(event);
}

var copytext = "Copy to clipboard";
var copycomplete = "Copied";
var copyerror = "Copy failed";

document.querySelectorAll('a.copy-popover-link').forEach((sumbtn) => {
var popover = new bootstrap.Popover(sumbtn, {
content: sumbtn.closest('td').querySelector('.copy-popover-target').innerHTML,
html: true,
customClass: 'copy-popover'
});

sumbtn.addEventListener('shown.bs.popover', () => {
document.querySelectorAll('div.popover a.copy-link').forEach((copybtn) => {
var tooltipInstance = new bootstrap.Tooltip(copybtn, {'title': copytext});
copybtn.addEventListener("click", function(e) { clipboard(this, tooltipInstance, e); }, false);
});
});
});

if (document.querySelectorAll('a.copy-popover-link').length > 0) {
document.addEventListener("click", function(e) {
document.querySelectorAll('a.copy-popover-link').forEach((sumbtn) => {
var popover = bootstrap.Popover.getInstance(sumbtn);
if (popover.tip && event.target.closest('.popover.show') == null && popover.tip.classList.contains('show')) {
popover.hide();
}
});
}, false);
}

document.querySelectorAll('a.copy-link').forEach((copybtn) => {
var tooltipInstance = new bootstrap.Tooltip(copybtn, {'title': copytext});
copybtn.addEventListener("click", function(e) { clipboard(this, tooltipInstance, e); }, false);
});

async function clipboard(copybtn, tooltipInstance, e) {
e.preventDefault();
var payload = copybtn.closest('p,td,div').querySelector('.copy-target').textContent.trimEnd();

try {
await navigator.clipboard.writeText(payload);
copybuttonupdate(copybtn, tooltipInstance, 'complete', copycomplete);
}
catch (err) {
copybuttonupdate(copybtn, tooltipInstance, 'error', copyerror);
}
}

function copybuttonupdate(copybtn, tooltipInstance, css, text) {
tooltipInstance.setContent({'.tooltip-inner': text});
copybtn.classList.add(css);
window.setTimeout(function() {
tooltipInstance.setContent({'.tooltip-inner': copytext});
copybtn.classList.remove(css);
}, 2500);
}
</script>
{% assign scripts = "theme" | split: "," %}
{% if page.scripts %}{% assign scripts = scripts | concat: page.scripts %}{% endif %}
{% for script in scripts %}
{% assign js = site.libs.js[script] %}

{% if site.environment == "dev" %}
<script type="module" src="{{ js.url | replace: '.min.', '.' }}" crossorigin="anonymous"></script>
{% else %}
<script type="module" src="{{ js.url }}" integrity="{{ js.sri }}" crossorigin="anonymous"></script>
{% endif %}
{% endfor %}
14 changes: 4 additions & 10 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@
<meta name="theme-color" content="#343a40">
<meta name="msapplication-navbutton-color" content="#343a40">
<link rel="canonical" href="{{ site.url }}{{ page.url }}">
<link href="{{ site.libs.fonts.roboto }}" rel="stylesheet">
<link rel="stylesheet" href="{{ site.libs.roboto.css.url }}" integrity="{{ site.libs.roboto.css.sri }}" crossorigin="anonymous">
<link rel="stylesheet" href="{{ site.libs.bootstrap.css.url }}" integrity="{{ site.libs.bootstrap.css.sri }}" crossorigin="anonymous">
<link rel="stylesheet" href="{{ site.libs.fontawesome.css.url }}" integrity="{{ site.libs.fontawesome.css.sri }}" crossorigin="anonymous">
{% if site.environment == "dev" %}
<link rel="stylesheet/less" href="/styles/styles.less">
<script src="{{ site.libs.less.url }}" integrity="{{ site.libs.less.sri }}" crossorigin="anonymous"></script>
<link rel="stylesheet/less" href="/styles/styles.less" crossorigin="anonymous">
<script src="{{ site.libs.less.js.url }}" integrity="{{ site.libs.less.js.sri }}" crossorigin="anonymous"></script>
{% else %}
<link rel="stylesheet" href="{{ site.libs.css }}">
<link rel="stylesheet" href="{{ site.libs.css.url }}" integrity="{{ site.libs.css.sri }}" crossorigin="anonymous">
{% endif %}
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="alternate" type="application/rss+xml" title="Roundcube News Feed" href="/feeds/atom.xml">
<script>
var host = '{{ site.enforce_ssl }}';
if ((host == window.location.host) && (window.location.protocol != 'https:')) {
window.location.protocol = 'https';
}
</script>
20 changes: 20 additions & 0 deletions _includes/viewer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div id="viewer" class="modal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered modal-xl mx-auto">
<div class="modal-content bg-transparent">
<div class="modal-body text-center p-0 loading">
<div class="modal-loading text-center py-5"><span class="fa-solid fa-circle-notch fa-spin"></span></div>
<img src="data:," class="img-fluid mx-auto" data-bs-dismiss="modal" alt="">
<button type="button" class="modal-arrow left-arrow" data-rc-navigation="previous"></button>
<button type="button" class="modal-arrow right-arrow" data-rc-navigation="next"></button>
</div>
<div class="modal-footer bg-footer d-block border-top-0">
<div class="nav float-end ps-2 mb-0" data-bs-theme="dark">
<button type="button" data-rc-navigation="previous" class="fa-solid fa-circle-chevron-left nav-link previous p-0 pe-1"></button>
<button type="button" data-rc-navigation="next" class="fa-solid fa-circle-chevron-right nav-link next p-0"></button>
<button type="button" data-bs-dismiss="modal" class="fa-solid fa-circle-xmark nav-link p-0 ps-1"></button>
</div>
<p class="m-0"></p>
</div>
</div>
</div>
</div>
13 changes: 7 additions & 6 deletions download/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
title: Roundcube Webmail Downloads
navtitle: Download
lastmod: 2019-08-28T12:32:00Z
scripts:
- copy
---
<h1>Download your version of Roundcube</h1>

Expand Down Expand Up @@ -37,9 +39,9 @@ <h2 id="{{ id }}">{{ params.title }}{% if params.titleVersion %} - {{ params.pac
<td class="size text-nowrap">{{ package.size }}</td>
<td class="checksum font-monospace text-nowrap text-center text-md-start pe-3">
<span class="d-none d-md-inline copy-popover-target">
<span class="copy-target d-block d-md-inline-block text-nowrap text-truncate align-middle py-3 py-md-0">{{ package.checksum }}</span><span class="py-3 py-md-0"><a class="copy-link" href="#" aria-label="Copy text"></a></span>
<span class="copy-target d-block d-md-inline-block text-nowrap text-truncate align-middle py-3 py-md-0">{{ package.checksum }}</span><span class="py-3 py-md-0 d-flex d-md-inline"><button type="button" class="btn btn-link p-0 text-decoration-none copy-link" aria-label="Copy text"></button></span>
</span>
<a class="d-inline d-md-none copy-popover-link checksum" href="#" aria-label="SHA-256 checksum" onclick="return false;" data-bs-title="SHA-256 checksum" data-bs-placement="left"></a>
<button type="button" class="btn btn-link d-inline d-md-none p-0 text-decoration-none copy-popover-link checksum" aria-label="SHA-256 checksum" data-bs-title="SHA-256 checksum" data-bs-placement="left"></button>
</td>
</tr>
{% endfor %}
Expand Down Expand Up @@ -115,7 +117,7 @@ <h2 id="pgp">PGP signatures for package verification <a class="anchor" href="#pg

<p>After downloading the <a href="/download/pubkey.asc" class="rc-icon asc-link">pubkey</a> and the signature file, verify packages with</p>
<p class="bg-quote px-3 pe-2 font-monospace d-flex">
<span class="copy-target d-block text-nowrap overflow-auto py-3 flex-grow-1">gpg --verify roundcubemail-&lt;version&gt;.tar.gz{.asc,}</span><span class="py-3"><a class="copy-link" href="#" aria-label="Copy text"></a></span>
<span class="copy-target d-block text-nowrap overflow-auto py-3 flex-grow-1">gpg --verify roundcubemail-&lt;version&gt;.tar.gz{.asc,}</span><span class="py-3"><button type="button" class="btn btn-link p-0 text-decoration-none copy-link" aria-label="Copy text"></button></span>
</p>

<h2 id="installation">Installation and upgrading <a class="anchor" href="#installation" aria-label="Link to this section: Installation and upgrading"></a></h2>
Expand All @@ -141,13 +143,12 @@ <h2 id="integrations">Integrations <a class="anchor" href="#integrations" aria-l
</div>
<div class="card-body">
<p>
<a href="https://apps.nextcloud.com/apps/mail_roundcube" target="_blank"><img src="/images/nextcloud-roundcube-main-window.png" style="max-width: 100%;" /></a>
<a href="https://apps.nextcloud.com/apps/mail_roundcube" target="_blank"><img src="/images/nextcloud-roundcube-main-window.png" class="w-100" alt="Nextcloud webmail"></a>
The Nextcloud app <a href="https://apps.nextcloud.com/apps/mail_roundcube" target="_blank">"Roundcube Mail"</a> integrates an existing Roundcube standalone email-webapp into Nextcloud, with optional SSO.
</p>
</div>
</div>
</div>

</div>


Expand All @@ -161,7 +162,7 @@ <h2 id="packages">Complete email server packages with Roundcube <a class="anchor
</div>
<div class="card-body">
<p><a href="https://nextcloud.com/roundcube/" class="fw-bold" target="_blank">Roundcube for Enterprises</a>
is a stand-alone, all-in-one email solution for service providers by Nextcloud. Your customers need a reliable, dependable and performant email service. The Nextcloud Roundcube Enterprise subscription helps you deliver exactly that.
is a stand-alone, all-in-one email solution for service providers by Nextcloud. Your customers need a reliable, dependable and performant email service. The Nextcloud Roundcube Enterprise subscription helps you deliver exactly that.</p>
</div>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions google2ae4ba011e8a69d4.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<!DOCTYPE html>
<html>
<head></head>
<head>
<title>roundcube</title>
</head>
<body></body>
</html>
</html>
Loading