Skip to content
Snippets Groups Projects
Unverified Commit a725ace5 authored by Dmitri Naumov's avatar Dmitri Naumov Committed by GitHub
Browse files

Merge pull request #2442 from bilke/web-stuff

Web improvements
parents 632613c5 39ddd5bf
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env groovy #!/usr/bin/env groovy
@Library('jenkins-pipeline@1.0.19') _ @Library('jenkins-pipeline@1.0.21') _
def stage_required = [build: false, data: false, full: false, docker: false] def stage_required = [build: false, data: false, full: false, docker: false]
def build_shared = 'ON' def build_shared = 'ON'
...@@ -30,7 +30,7 @@ pipeline { ...@@ -30,7 +30,7 @@ pipeline {
sh "git config core.whitespace -blank-at-eof" sh "git config core.whitespace -blank-at-eof"
sh "git diff --check `git merge-base origin/master HEAD` HEAD -- . ':!*.md' ':!*.pandoc' ':!*.asc'" sh "git diff --check `git merge-base origin/master HEAD` HEAD -- . ':!*.md' ':!*.pandoc' ':!*.asc'"
dir('scripts/jenkins') { stash(name: 'known_hosts', includes: 'known_hosts') } dir('scripts/jenkins') { stash(name: 'known_hosts', includes: 'known_hosts') }
ciSkip action: 'check' // Check for [ci skip] commit message. ciSkip action: 'check' // Check for [ci skip] or [web] commit message.
// ********* Check changesets for conditional stage execution ********** // ********* Check changesets for conditional stage execution **********
script { script {
......
...@@ -7,4 +7,23 @@ $(document).ready(function(){ ...@@ -7,4 +7,23 @@ $(document).ready(function(){
autoplaySpeed: 3000, autoplaySpeed: 3000,
}); });
$('.carousel-play').slick('slickPlay'); $('.carousel-play').slick('slickPlay');
// wrap all img elements in fancybox wrapper
var imgs = document.querySelectorAll("img");
for(var index=0; index < imgs.length; index++) {
var img = imgs[index];
// Check for other fancybox
if(img.parentNode.hasAttribute("data-fancybox")) {
continue;
}
var wrapper = document.createElement("a");
wrapper.setAttribute("data-fancybox", "");
if(img.hasAttribute("alt")) {
wrapper.setAttribute("data-caption", img.getAttribute("alt"));
}
wrapper.setAttribute("href", img.getAttribute("src"));
img.parentNode.insertBefore(wrapper, img);
wrapper.appendChild(img);
}
}); });
...@@ -222,6 +222,19 @@ a.btn-inverse:hover { ...@@ -222,6 +222,19 @@ a.btn-inverse:hover {
color: config('mycolors.text-accent'); color: config('mycolors.text-accent');
} }
/* -------------------------------- Images ---------------------------------- */
body {
counter-reset: figcaption;
}
figcaption::before {
counter-increment: figcaption;
content: "Fig. " counter(figcaption) ": "
}
figcaption {
@apply .text-center;
@apply .mb-6;
}
/* ------------------------------- Components ------------------------------- */ /* ------------------------------- Components ------------------------------- */
.btn { .btn {
@apply text-grey-darkest; @apply text-grey-darkest;
......
...@@ -27,7 +27,7 @@ features: ...@@ -27,7 +27,7 @@ features:
Parametrize the model with material parameters, boundary conditions and source terms. Parametrize the model with material parameters, boundary conditions and source terms.
visual: visual:
permalink: "/docs/tools/meshing/extract-surface/TopBottomSideSurface.png" permalink: "/docs/tools/meshing-submeshes/extract-surface/TopBottomSideSurface.png"
alt: Extracted surfaces alt: Extracted surfaces
links: links:
- text: See Docs - text: See Docs
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
</div> </div>
<div class="w-full md:w-1/2 md:px-4"> <div class="w-full md:w-1/2 md:px-4">
{{ if .feature.visual }} {{ if .feature.visual }}
<a data-fancybox data-caption="{{ .feature.visual.alt | default ""}}" href="{{ .feature.visual.permalink }}"> <img class="{{ if .feature.visual.rounded }}rounded shadow-lg{{ end }}" src="{{ .feature.visual.permalink }}" alt="{{ .feature.visual.alt }}">
<img class="{{ if .feature.visual.rounded }}rounded shadow-lg{{ end }}" src="{{ .feature.visual.permalink }}" alt="{{ .feature.visual.alt }}">
</a>
{{ end }} {{ end }}
{{ if .feature.carousel }} {{ if .feature.carousel }}
{{ partial "components/carousel" (dict "carousel" .feature.carousel "page" .page) }} {{ partial "components/carousel" (dict "carousel" .feature.carousel "page" .page) }}
......
No preview for this file type
{"Target":"bundle.min.cdaa95be2c953bb3c7fa6b71864b8ff07f823120c380311532f319f7fae436ee.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-zaqVviyVO7PH+mtxhkuP8H+CMSDDgDEVMvMZ9/rkNu4="}} {"Target":"bundle.min.66f99318de88f6d8f1b19886d32881654c1f339439987a23e5c765ba2b2782cd.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-ZvmTGN6I9tjxsZiG0yiBZUwfM5Q5mHoj5cdluisngs0="}}
\ No newline at end of file \ No newline at end of file
No preview for this file type
{"Target":"main.min.2ae350b937be7c2840ce93fd86eff932de7f1c643a0dd9f1be580575e9b4a61c.css","MediaType":"text/css","Data":{"Integrity":"sha256-KuNQuTe+fChAzpP9hu/5Mt5/HGQ6DdnxvlgFdem0phw="}} {"Target":"main.min.a87dd5842d01ae39d018d113a1eb50ddc1b7fe92bcaec5b15119dbdff230805f.css","MediaType":"text/css","Data":{"Integrity":"sha256-qH3VhC0BrjnQGNEToetQ3cG3/pK8rsWxURnb3/IwgF8="}}
\ No newline at end of file \ No newline at end of file
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment