refactor(responsive): row layout for multicards on big screens

This commit is contained in:
Corentin Thomasset 2022-04-24 23:09:12 +02:00
parent 84cf1bb964
commit e21230bbd9
No known key found for this signature in database
GPG key ID: DBD997E935996158
8 changed files with 136 additions and 130 deletions

View file

@ -33,20 +33,36 @@ useHead(head);
{{ route.meta.description }} {{ route.meta.description }}
</div> </div>
</div> </div>
</div>
<div class="tool-content">
<slot /> <slot />
</div> </div>
</base-layout> </base-layout>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.tool-content {
display: flex;
flex-direction: row;
justify-content: center;
align-items: flex-start;
flex-wrap: wrap;
gap: 16px;
::v-deep(& > *) {
flex: 0 1 600px;
}
}
.tool-layout { .tool-layout {
max-width: 700px; max-width: 600px;
margin: 0 auto; margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
.tool-header { .tool-header {
padding: 40px 0; padding: 40px 0;
width: 100%;
.n-h1 { .n-h1 {
opacity: 0.9; opacity: 0.9;

View file

@ -50,8 +50,7 @@ async function onUpload({ file: { file } }: { file: UploadFileInfo }) {
<style lang="less" scoped> <style lang="less" scoped>
.n-input, .n-input,
.n-upload, .n-upload {
.n-card {
margin-bottom: 15px; margin-bottom: 15px;
} }

View file

@ -22,7 +22,6 @@
</n-space> </n-space>
</n-card> </n-card>
<br />
<n-card title="Compare string with hash"> <n-card title="Compare string with hash">
<n-form label-width="120"> <n-form label-width="120">
<n-form-item label="Your string: " label-placement="left"> <n-form-item label="Your string: " label-placement="left">

View file

@ -28,7 +28,6 @@
</n-form> </n-form>
</n-space> </n-space>
</n-card> </n-card>
<br />
<n-card> <n-card>
<pre> <pre>
[optional] seconds (0 - 59) [optional] seconds (0 - 59)

View file

@ -1,5 +1,5 @@
<template> <template>
<n-card v-for="{ name, information } in sections" :key="name" :title="name" style="margin-bottom: 15px"> <n-card v-for="{ name, information } in sections" :key="name" :title="name">
<n-grid cols="1 400:2" x-gap="12" y-gap="12"> <n-grid cols="1 400:2" x-gap="12" y-gap="12">
<n-gi v-for="{ label, value } in information" :key="label" class="information"> <n-gi v-for="{ label, value } in information" :key="label" class="information">
<n-card :bordered="false" embedded> <n-card :bordered="false" embedded>

View file

@ -1,5 +1,4 @@
<template> <template>
<div>
<n-card title="Encrypt"> <n-card title="Encrypt">
<n-space item-style="flex: 1 1 0"> <n-space item-style="flex: 1 1 0">
<n-form-item label="Your text:" :show-feedback="false"> <n-form-item label="Your text:" :show-feedback="false">
@ -37,7 +36,6 @@
/> />
</n-form-item> </n-form-item>
</n-card> </n-card>
<br />
<n-card title="Decrypt"> <n-card title="Decrypt">
<n-space item-style="flex: 1 1 0"> <n-space item-style="flex: 1 1 0">
<n-form-item label="Your encrypted text:" :show-feedback="false"> <n-form-item label="Your encrypted text:" :show-feedback="false">
@ -75,7 +73,6 @@
/> />
</n-form-item> </n-form-item>
</n-card> </n-card>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View file

@ -23,7 +23,6 @@
<n-button secondary @click="copyEscaped"> Copy </n-button> <n-button secondary @click="copyEscaped"> Copy </n-button>
</n-space> </n-space>
</n-card> </n-card>
<br />
<n-card title="Unescape html entities"> <n-card title="Unescape html entities">
<n-form-item label="Your escaped string :"> <n-form-item label="Your escaped string :">
<n-input <n-input

View file

@ -1,5 +1,4 @@
<template> <template>
<div>
<n-card title="Encode"> <n-card title="Encode">
<n-form-item <n-form-item
label="Your string :" label="Your string :"
@ -28,7 +27,6 @@
<n-button secondary @click="copyEncoded"> Copy </n-button> <n-button secondary @click="copyEncoded"> Copy </n-button>
</n-space> </n-space>
</n-card> </n-card>
<br />
<n-card title="Decode"> <n-card title="Decode">
<n-form-item <n-form-item
label="Your encoded string :" label="Your encoded string :"
@ -57,7 +55,6 @@
<n-button secondary @click="copyDecoded"> Copy </n-button> <n-button secondary @click="copyDecoded"> Copy </n-button>
</n-space> </n-space>
</n-card> </n-card>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">