Display QRCODE in deveco studio 2.1 - qr-code

QRCODE is not displayed in Previewer even if I write the index.hml file as shown below in deveco studio 2.1.
Please tell me what to do. The API Version is 5.
index.hml
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
<!--<button class="first" type="capsule" value="capsule button">
</button>
-->
<qrcode value="https://www.yahoo.co.jp/" type="rect"
style="color: #000000;background-color: #ffffff;width: 300px;height: 300px;margin-bottom: 70px;"></qrcode>
</div>

Related

Why I get this broken Bootstrap carousel in the VStudio 2019 standard project template?

When I create a new Web MVC project in VisualStudio 2019 (v16.11) I get this strange effect on carousel buttons. In particular, they are shaded and bordered.
I've checked, Visual Studio is using Bootstrap v4.3.1 in this template.
Down below the code I copied & pasted from the standard Bootstrap 4 carousel template.
Why carousel buttons are not rendering correctly?
Original Home/Index.cshtml page screenshot:
After copying & pasting the relevant Bootstrap 4 carousel code screenshot:
The final page source:
#{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about building Web apps with ASP.NET Core.</p></div>
#* Copied carousel code starts here *#
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class=""></li>
<li data-target="#myCarousel" data-slide-to="1" class=""></li>
<li data-target="#myCarousel" data-slide-to="2" class="active"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item">
<svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" role="img" aria-label=" : " preserveAspectRatio="xMidYMid slice" focusable="false"><title> </title><rect width="100%" height="100%" fill="#777"></rect><text x="50%" y="50%" fill="#777" dy=".3em"> </text></svg>
<div class="container">
<div class="carousel-caption text-left">
<h1>Example headline.</h1>
<p>Some representative placeholder content for the first slide of the carousel.</p>
<p><a class="btn btn-lg btn-primary" href="#">Sign up today</a></p>
</div>
</div>
</div>
<div class="carousel-item">
<svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" role="img" aria-label=" : " preserveAspectRatio="xMidYMid slice" focusable="false"><title> </title><rect width="100%" height="100%" fill="#777"></rect><text x="50%" y="50%" fill="#777" dy=".3em"> </text></svg>
<div class="container">
<div class="carousel-caption">
<h1>Another example headline.</h1>
<p>Some representative placeholder content for the second slide of the carousel.</p>
<p><a class="btn btn-lg btn-primary" href="#">Learn more</a></p>
</div>
</div>
</div>
<div class="carousel-item active">
<svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" role="img" aria-label=" : " preserveAspectRatio="xMidYMid slice" focusable="false"><title> </title><rect width="100%" height="100%" fill="#777"></rect><text x="50%" y="50%" fill="#777" dy=".3em"> </text></svg>
<div class="container">
<div class="carousel-caption text-right">
<h1>One more for good measure.</h1>
<p>Some representative placeholder content for the third slide of this carousel.</p>
<p><a class="btn btn-lg btn-primary" href="#">Browse gallery</a></p>
</div>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-target="#myCarousel" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-target="#myCarousel" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</button>
EDIT: This is the header of the wwwroot\lib\bootstrap\dist\css\boostrap.css file
/*!
* Bootstrap v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT
(https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
Bootstrap v4.3.1 is used in the template but you copied carousel from v4.6.x example:
https://getbootstrap.com/docs/4.6/examples/carousel/
Instead copy carousel from v4.3.x example:
https://getbootstrap.com/docs/4.3/examples/carousel/
I have tried to reproduce the issue on Visual Studio 2019. I created an Asp.Net Core MVC project that has 4.3.1 JQuery by default.
When I added the carousel code then it generates the result you shared in the question.
It looks like the issue is caused by some missing file references.
To fix the issue, I suggest you add the code below in the Head part of the _Layout.cshtml page.
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.1/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery#3.6.0/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.1/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.6.1/dist/js/bootstrap.bundle.min.js"></script>
After that try to run the project.
Output:
Later, you could save those files and add them to your project.

How to do a responsive text in label with tailwind css

Today I add a text in my password label, but when I change de resolution the text don't stay in the same place, please help me. My code:
<div class="flex">
<BreezeLabel for="password" value="Password" />
<Link
:href="route('password.request')"
class="text-sm text-purple-600 hover:text-purple-800 ml-48"
>
Forgot your password?
</Link>
</div>
Some omg to ilustrasse the situation:
fullsize
md
sm
I don't know how Breeze works.
But I think you could use flex in your favor.
If you want the link always on the right side, you can use something like this,
<div class="flex justify-between">
<BreezeLabel for="password" value="Password" />
<Link
:href="route('password.request')"
class="text-sm text-purple-600 hover:text-purple-800"
>Forgot your password?</Link>
</div>
You can check here if this is what you need: https://play.tailwindcss.com/CXsdrXwDDq.

Moving carousel item to a new component produces weird space

I'm using vue-slick-carousel in my app. I have the following code:
<template>
<div id="app">
<div class="banner-container">
<div>
<VueSlickCarousel v-bind="settings">
<div v-for="item in items" :key="item.id">
<!-- ALTERNATIVE 1 (WORKS) -->
<div>
<a href="abc" target="_blank">
<img id="picture1" src="./assets/carouse-item.png" />
<div class="position-relative">
<div class="banner-description">
<span class="banner-title">
<a v-bind:href="'#'" class="header-anchor">#</a>
TITLE<br />
</span>
<span class="banner-alternative-text">
<a v-bind:href="'#'" class="header-anchor">#</a>
DESCRIPTION<br />
</span>
</div>
</div>
</a>
</div>
<!-- ALTERNATIVE 2 (DOESN'T WORK) -->
<!-- <Child :item="item"/> -->
</div>
</VueSlickCarousel>
</div>
</div>
</div>
</template>
There are 2 alternatives. Alternative 1 works fine:
Alternative 2 is basically the code under Alternative 2 extracted into a new component - Child. It produces this output:
I can't understand why just extracting the part of code into a new component changes the layout like that.
The source code of the app is available at https://github.com/marcinjahn/vue-carousel-issue.

URL images sometimes load sometimes not vue js

I have this problem in which i generate images by classical foreach method.
<div v-for="messageGroup in conversation" class="messagegroup" :class="{ recieved: messageGroup.recieved }">
<div v-if="messageGroup.recieved" class="iconcontainer">
<div class="iconcontainerinner">
<img class='usericoncontacts' :src="selectedContact.userPhotoURL" alt="">
</div>
</div>
<div class="textmessages" :class="{ recieved: messageGroup.recieved }">
<div class="message" v-for="message in messageGroup.messages">
<span>{{ message }}</span>
</div>
</div>
</div>
The images then have it's source at Google repo which looks for an example like this
The images then either or sometimes don't like
My guess is that it has something to do with vue rendering.
Thanks in advance

Position buttons on bottom of card group in Bootstrap4

I have the following code:
<h2 id="yachts" class="mt-0">Our Yachts</h2>
<div class="card-group">
{{ $pages := sort (where $.Site.RegularPages "Section" "boats") "Weight" "asc" }}
{{ range $pages }}
<div class="card">
<img src="{{ .RelPermalink | safeCSS }}{{ .Params.heroimage | safeCSS }}" class="card-img-top" alt="...">
<div class="card-body clearfix">
<h4 class="card-title">{{ .LinkTitle }}</h4>
<p class="card-text border-light border-top border-bottom">
<span class="row">
<span class="col-6 text-muted text-left">
{{- partialCached "icons/users.svg" . -}}{{ .Params.pax }}
</span>
<span class="col-6 text-muted text-right">
{{- partialCached "icons/bed.svg" . -}}{{ .Params.bunks }}
</span>
</span>
</p>
<p class="card-text">{{ .Description }}</p>
Learn More
</div>
</div>
{{ end }}
</div>
(The logic stuff inside of the {{ tags is Hugo templating markup (Golang) which is irrelevant at this point).
The result of this code looks like this in one of the uses:
I would like to position the buttons on the same level (bottom right of each card).
I tried doing it via position relative on the card and position absolute on the buttons, but that positions them at their current location, not the real bottom of the card. What would be the "flex way" to tell these buttons where they belong?
Try min-height for .card-text
.card-text{
min-height:250px;
}
It turns out that Bootstrap offers the card-footer class that does exactly what I wanted to achieve. Using bg-light or our own class for styling then can make it look right.
<div class="card-footer bg-light">
Learn More
</div>
From the documentation:
When using card groups with footers, their content will automatically line up.

Resources