layouts/shortcodes/blocks/cover.html (176 lines of code) (raw):

{{ $_hugo_config := `{ "version": 1 }` }} {{ $blockID := printf "td-cover-block-%d" .Ordinal }} {{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }} {{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }} {{ $col_id := .Get "color" | default "dark" }} {{ $image_anchor := .Get "image_anchor" | default "smart" }} {{ $logo_anchor := .Get "logo_anchor" | default "smart" }} {{/* Height can be one of: auto, min, med, max, full. */}} {{ $height := .Get "height" | default "max" }} {{ $byline := .Get "byline" | default "" }} {{ with $promo_image }} {{ $promo_image_big := (.Fill (printf "1440x640 %s" $image_anchor)) }} {{ $promo_image_medium := (.Fill (printf "1440x640 %s" $image_anchor)) }} {{ $promo_image_small := (.Fill (printf "500x500 %s" $image_anchor)) }} <link rel="preload" as="image" href="{{ $promo_image_small.RelPermalink }}" media="(max-width: 600px)"> <link rel="preload" as="image" href="{{ $promo_image_medium.RelPermalink }}" media="(min-width: 1200px)"> <link rel="preload" as="image" href="{{ $promo_image_big.RelPermalink }}" media="(min-width: 1200px)"> <style> #{{ $blockID }} { background-image: url('https://img.alicdn.com/imgextra/i3/O1CN01HxY4Fy1FWl2K8jXLn_!!6000000000495-0-tps-5760-3116.jpg'); } /* @media only screen and (min-width: 700px) { #{{ $blockID }} { background-image: url({{ $promo_image_medium.RelPermalink }}); } } @media only screen and (min-width: 1200px) { #{{ $blockID }} { background-image: url({{ $promo_image_big.RelPermalink }}); } } */ .td-cover-block { height: 100%; min-height: 500px; padding-bottom: 0; padding-top: 0; /*margin-top: 64px;*/ @media only screen and (min-width: 768px) { min-height: calc(100vh - 64px); } .container-fluid { display: flex; flex-direction: column; align-items: center; width: 100%; padding-bottom: 25px; border-bottom: 1px solid transparent; border-image-source: linear-gradient(270deg, rgba(157, 148, 243, 0.8) -26%, rgba(233, 231, 255, 0.8) 17%, rgba(176, 201, 252, 0.8) 50%); border-image-slice: 1; border-image-outset: 0; padding-left: 0px; padding-right: 0px; padding-top: 0px; @media only screen and (min-width: 768px) { width: 100%; padding-top: 128px; padding-bottom: 40px; } @media only screen and (min-width: 1100px) { width: 1016px; } } } .row { align-items: center; } .homepage_slogan { margin-top: 50px; font-size: 31px; font-weight: bold; line-height: 35px; color: #121316; @media only screen and (min-width: 768px) { font-size: 64px; line-height: 64px; } @media only screen and (min-width: 1100px) { width: 100%; font-size: 72px; } } .home_des_para1 { font-size: 12px; line-height: 24px; margin-top: 20px; @media only screen and (min-width: 768px) { font-size: 18px; } } .homepage-btn-group { /* padding-left: 15px; */ margin-top: 25px; width: auto; @media only screen and (min-width: 768px) { margin-top: 37px; } .btn { display: flex; align-items: center; justify-content: center; border-radius: 24px !important; font-size: 14px; width: 115px; height: 48px; margin-right: 8px; margin-left: 8px; @media only screen and (min-width: 768px) { width: 145px; } } .homepage-btn-primary { background: #8797F4; color: #F4F4F6; } .homepage-btn-secondary { background: #3BE4EC; color: #1E1F24 } .homepage-btn-base { background: #FFFFFF; color: #1E1F24 } } </style> <!-- Place this tag in your head or just before your close body tag. --> <script async defer src="/js/github-buttons.js"></script> {{ end }} <section id="{{ $blockID }}" class=" td-cover-block js-td-cover -bg-white"> <div class="container-fluid td-overlay__inner"> <div class="row flex align-items-center"> <div class="text-section " style="width: 100%;"> <h2 class="display-3 homepage_slogan pb-2"> {{ T "homepage_slogan" }} </h2> <p class="subtext home_des_para1"> {{ T "homepage_description_paragraph1" }} </p> </div> <!-- <div class="col-12 pt-3"> <div class="pt-3 lead text-center"> {{ .Inner | markdownify}} </div> </div> --> <div class="btn-group homepage-btn-group"> <a class="btn btn-secondary btn-lg mb-4 " href="overview/mannual/java-sdk/quick-start/starter/"> {{ T "homepage_button_2" }} </a> <a class="btn btn-lg homepage-btn-base mb-4 " href="overview/demo/"> {{ T "homepage_button_1" }} </a> </div> </div> </div> {{ if $byline }} <div class="byline"> <small>{{ $byline }}</small> </div> {{ end }} <div id="language"> <h3 class="font-weight-normal">{{ T "homepage_language_tip" }}</h3> <div class="language-content"> <a class="btn btn-lg btn-language" href='overview/mannual/java-sdk'> Java </a> <a class="btn btn-lg btn-language" href='overview/mannual/golang-sdk'> Go </a> <a class="btn btn-lg btn-language" href='overview/mannual/nodejs-sdk'> Node.js </a> <a class="btn btn-lg btn-language" href='overview/mannual/web-sdk'> Web </a> <a class="btn btn-lg btn-language" href='overview/mannual/rust-sdk'> Rust </a> <a class="btn btn-lg btn-language" href='overview/mannual/'> ... </a> </div> </div> </section>