Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.scss « sass « assets - github.com/kdevo/osprey-delight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7ec63656f64ec9f2874746925ce53562eb047e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
@import "flexboxgrid-stripped";
@import "colors";
@import "fontface";
@import "fontsizing";
@import "icons";
@import "animation";
@import "layout";
@import "base";
@import "modal";
@import "about";
@import "gallery";
{{ if (.Page.Scratch.Get "blog") -}}
@import "blog";
{{- end }}

h1,
h2,
h3 {
  margin-bottom: $vertical-rhythm;
  font-family: $font-header;
  letter-spacing: 2px;
  line-height: 1.45;

  a {
    text-decoration: none;
  }
}

.home-logo {
  max-height: 10 * $vertical-rhythm;
  margin-bottom: $vertical-rhythm;
}

{{ if .Site.Params.Feat.useTermynal -}}
$term_title: "{{ .Site.Data.terminal.title }}";
@import "termynal";
.term-content {
  max-height: calc(80vh - 20vh);
  overflow-y: auto;
}
{{- end }}

@import "nav";

// TODO(kdevo): only used in 404, refactor!
.full {
  top: 0;
  bottom: 0;
  height: 100vh;
}

@import "contact";


{{ if .Site.Params.background -}}
  {{ $scratch := newScratch }}
  {{ $imgSize := default "1920x" .Site.Params.Image.Background.resize }}
  {{ $lqipSize := default "500x" .Site.Params.Image.Background.resizeLQIP }}
  {{ $useLQIP := default true .Site.Params.Image.Background.useLQIP }}
  {{ $resizeOptions := default "jpg q90 Lanczos" .Site.Params.Image.Background.resizeOptions }}
  {{ with (resources.Get .Site.Params.background) -}}
      {{ $image := .Resize (printf "%s %s" $imgSize $resizeOptions) }}
      {{ $scratch.Set "img" $image.Permalink }}
      {{ $scratch.Set "imgW" $image.Width }}
      {{ $scratch.Set "imgH" $image.Height }}

      {{ if $useLQIP -}}
          {{ $lqip := $image.Resize (printf "%s %s" $lqipSize $resizeOptions) }}
          {{ $scratch.Set "imgPreview" $lqip.Permalink }}
          {{ $scratch.Set "imgPlaceholderRes" $lqip }}
      {{- end }}
  {{- else -}}
      {{ $scratch.Set "img" .Site.Params.background }}
  {{- end }}

  .bg {
    {{ with $scratch.Get "imgPlaceholderRes" }}
      background-image: url("{{ .Permalink }}"); 
    {{- else -}}
      background-image: url("{{ $scratch.Get "img" }}");
    {{- end }}
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
  }

  {{ with $scratch.Get "imgPlaceholderRes" -}}
  @media (min-width: {{ .Width }}px) {
      .bg.lazyloaded {
        transition: background-image 1.5s;
        background-image: url("{{ $scratch.Get "img" }}"), url("{{ .Permalink }}"); 
      }
  }
  {{- end }}
{{ end }}
@import "custom";