mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2025-11-09 06:21:35 +00:00
feat(base-divider): initializing component
This commit is contained in:
@@ -3,7 +3,10 @@
|
|||||||
************************************************************************* -->
|
************************************************************************* -->
|
||||||
|
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
|
.c-base-divider
|
||||||
|
span.c-base-divider__category {{ category }}
|
||||||
|
|
||||||
|
hr.c-base-divider__line
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- *************************************************************************
|
<!-- *************************************************************************
|
||||||
@@ -11,11 +14,38 @@
|
|||||||
************************************************************************* -->
|
************************************************************************* -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {};
|
export default {
|
||||||
|
props: {
|
||||||
|
category: {
|
||||||
|
name: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- *************************************************************************
|
<!-- *************************************************************************
|
||||||
STYLE
|
STYLE
|
||||||
************************************************************************* -->
|
************************************************************************* -->
|
||||||
|
|
||||||
<style lang="scss"></style>
|
<style lang="scss">
|
||||||
|
$c: ".c-base-divider";
|
||||||
|
|
||||||
|
#{$c} {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
#{$c}__category {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #ffffff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#{$c}__line {
|
||||||
|
flex: 1;
|
||||||
|
color: #313d4f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -28,7 +28,7 @@ $c: ".c-the-copyright";
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 5px 5px 5px 15px;
|
padding: 5px 5px 5px 10px;
|
||||||
border-top: 1px solid #313d4f;
|
border-top: 1px solid #313d4f;
|
||||||
border-left: 1px solid #313d4f;
|
border-left: 1px solid #313d4f;
|
||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 4px;
|
||||||
|
|||||||
@@ -9,9 +9,16 @@
|
|||||||
srcset="/images/common/logo@2x.png"
|
srcset="/images/common/logo@2x.png"
|
||||||
class="c-index__logo"
|
class="c-index__logo"
|
||||||
)
|
)
|
||||||
p(
|
p.c-index__description
|
||||||
v-html="description"
|
| Awesome cheatsheets for popular programming languages, frameworks and development tools.<br/>
|
||||||
class="c-index__description"
|
| They include everything you should know in one single file. 👩💻👨💻
|
||||||
|
|
||||||
|
section(
|
||||||
|
v-for="(category, index) in categories"
|
||||||
|
class="c-index__category"
|
||||||
|
)
|
||||||
|
base-divider(
|
||||||
|
:category="'0' + (index + 1) + '. ' + category.name"
|
||||||
)
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -20,13 +27,32 @@
|
|||||||
************************************************************************* -->
|
************************************************************************* -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BaseDivider from "@/components/BaseDivider";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
BaseDivider
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: `
|
categories: [
|
||||||
Awesome cheatsheets for popular programming languages, frameworks and development tools.<br/>
|
{
|
||||||
They include everything you should know in one single file. 👩💻👨💻
|
name: "Languages"
|
||||||
`
|
},
|
||||||
|
{
|
||||||
|
name: "Backend"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Frontend"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Databases"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Tools"
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -52,5 +78,9 @@ $c: ".c-index";
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#{$c}__category {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user