mirror of
https://github.com/bendtherules/food-app.git
synced 2026-08-18 13:52:09 +00:00
Fix tags - Make them scrollable
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
.categories-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.categories-inner {
|
|
||||||
/* width: auto; */
|
|
||||||
display: inline-flex;
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
@@ -5,8 +5,8 @@ import './categories.css';
|
|||||||
function Categories(props) {
|
function Categories(props) {
|
||||||
return (
|
return (
|
||||||
`
|
`
|
||||||
<div class="categories-wrapper">
|
<div class="swipable-outer">
|
||||||
<div class="categories-inner">
|
<div class="swipable-inner">
|
||||||
${
|
${
|
||||||
props.categories.map((category) => (
|
props.categories.map((category) => (
|
||||||
CategoryCard({
|
CategoryCard({
|
||||||
|
|||||||
@@ -14,9 +14,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.recipe-card-bottom {
|
.recipe-card-bottom {
|
||||||
padding: 8px;
|
margin: 8px;
|
||||||
padding-right: 16px;
|
padding-right: 8px;
|
||||||
height: 120px;
|
height: calc(120px - 16px);
|
||||||
|
width: calc(100% - 16px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.recipe-card-image {
|
.recipe-card-image {
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.recipe-card-logo-wrapper {
|
.recipe-card-logo-wrapper {
|
||||||
width: 25%;
|
width: 60px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,15 +78,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.recipe-card-tags {
|
.recipe-card-tags {
|
||||||
|
width: 100%;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
height: 40px;
|
height: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recipe-card-tag {
|
.recipe-card-tag {
|
||||||
margin: 0 16px;
|
margin: 4px;
|
||||||
margin-top: 4px;
|
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
|
width: max-content;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: darkgray;
|
background-color: darkgray;
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,8 @@ export default function RecipeCard(props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="recipe-card-tags">
|
<div class="recipe-card-tags swipable-outer">
|
||||||
|
<div class="swipable-inner">
|
||||||
${
|
${
|
||||||
props.recipe.tags.map(tag => (
|
props.recipe.tags.map(tag => (
|
||||||
`
|
`
|
||||||
@@ -60,7 +61,7 @@ export default function RecipeCard(props) {
|
|||||||
`
|
`
|
||||||
)).join('')
|
)).join('')
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,3 +12,14 @@ code {
|
|||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||||
monospace;
|
monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swipable-outer {
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swipable-inner {
|
||||||
|
/* width: auto; */
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import './index.css';
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
import './index.css';
|
||||||
|
|
||||||
window.addEventListener("load", function () {
|
window.addEventListener("load", function () {
|
||||||
const app = new App();
|
const app = new App();
|
||||||
|
|||||||
Reference in New Issue
Block a user