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

viewer-360.pug « experimentals « src « docs - github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fb7e142e29e7c57d08bcb6e6454420a163caad56 (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
extends ../_layout/_docs-layout.pug

block variables
  - var slug = 'viewer-360'
  - var parent = 'experimentals'
  - var title = '360-Degree Viewer - Experimentals - Spectre.css CSS Framework'
  - var description = '360-Degree Viewer is an interactive product photo viewer. It is built in pure CSS. Spectre.css CSS Framework is a lightweight, responsive and modern CSS framework for faster and extensible development.'

block docs-content
  +docs-heading('viewer-360', '360-Degree Viewer')
    p
      small.label.label-primary.mr-2 CSS ONLY

    include ../_layout/_ad-g.pug

    p
      | 360-Degree Viewer is an interactive product photo viewer. It is built in pure CSS. 

    .docs-demo.columns
      .column.col-12
        .viewer-360
          input.viewer-slider.slider(type="range" min="1" max="36" value="1" oninput="this.setAttribute('value', this.value);")
          figure.viewer-image(style="background-image:url('https://i.loli.net/2018/11/25/5bfa45b4b3f27.jpg');padding-bottom:37.5%;width:100%;")

    p.text-center
      | Photo credits: 
      a(href="https://microsoft.msafflnk.net/c/1272791/433017/7593?u=https://www.microsoft.com/en-us/p/surface-pro-6/8zcnc665slq5" target="_blank") Microsoft Surface Pro 6

    .docs-demo.columns
      .column.col-12
        .viewer-360
          input.viewer-slider.slider(type="range" min="1" max="30" value="1" oninput="this.setAttribute('value', this.value);")
          figure.viewer-image(style="background-image:url('https://i.loli.net/2018/11/25/5bfaa0b4ba850.jpg');padding-bottom:37.5%;width:100%;")

    p.text-center
      | Photo credits: 
      a(href="https://microsoft.msafflnk.net/c/1272791/433017/7593?u=https://www.xbox.com/en-us/xbox-one-x" target="_blank") Microsoft Xbox One X

    p
      | You will need to use your own product image sprite (all angle of photos in one image) and set the attribute #[code max] to the image numbers to use this component.
    
    pre.code(data-lang='HTML')
      code
        :highlight(lang="html")
          <div class="viewer-360">
            <input class="viewer-slider slider" type="range" min="1" max="36" value="1" oninput="this.setAttribute('value', this.value);">
            <figure class="viewer-image" style="background-image:url('...');"></figure>
          </div>

    p
      | The default image numbers in CSS are #[code 36] and #[code 30]. You can copy the mixin and add more numbers in #[code _viewer-360.scss] and re-compiling the CSS.

    pre.code(data-lang='SCSS')
      code
        :highlight(lang="scss")
          @include viewer-slider-size(36);
          @include viewer-slider-size(30);

    include ../_layout/_ad-c.pug

  include ../_layout/_footer.pug