From 51a987b3071a8334057cb29ab38fd129e4bd682e Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Wed, 19 Apr 2023 12:15:21 +0200 Subject: [PATCH] update right alignment --- content/home/index.md | 2 +- templates/shortcodes/row.html | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/content/home/index.md b/content/home/index.md index cc764f5..42f6982 100644 --- a/content/home/index.md +++ b/content/home/index.md @@ -32,7 +32,7 @@ with the World’s First Truly Decentralized Smartphone. -{% row(style="reverse" margin="withContainer" padding="top") %} +{% row(style="right" reverse="rightreserve" margin="withContainer" padding="top") %} # Secure
Every Click diff --git a/templates/shortcodes/row.html b/templates/shortcodes/row.html index 22aa092..b16348b 100644 --- a/templates/shortcodes/row.html +++ b/templates/shortcodes/row.html @@ -85,15 +85,15 @@ Parameters: {% if "none" in margin %} {% set margin_class = " mx-0" %} {% elif "wide" in margin %} - {% set margin_class = " mx-4 sm:mx-8 md:mx-12 lg:mx-16 xl:mx-20" %} + {% set margin_class = " mx-8 sm:mx-8 md:mx-12 lg:mx-16 xl:mx-20 " %} {% elif "moderate" in margin %} {% set margin_class = " mx-8 sm:mx-16 md:mx-20 lg:mx-28" %} {% elif "narrow" in margin %} - {% set margin_class = " mx-12 sm:mx-20 md:mx-28 lg:mx-40" %} + {% set margin_class = " mx-8 sm:mx-20 md:mx-28 lg:mx-40" %} {% elif "tight" in margin %} - {% set margin_class = " mx-20 sm:mx-32 md:mx-40 lg:mx-80 xl:mx-96" %} + {% set margin_class = " mx-8 sm:mx-32 md:mx-40 lg:mx-80 xl:mx-96" %} {% elif "header" in margin %} - {% set margin_class = " mx-12 sm:mx-20 md:mx-28 lg:mx-40 my-10" %} + {% set margin_class = " mx-8 sm:mx-20 md:mx-28 lg:mx-40 my-10" %} {% elif "withContainer" in margin %} {% set margin_class = " mx-8 " %} {% endif %} @@ -118,23 +118,37 @@ Parameters: {% set row_class = row_class ~ margin_class %} + + + + {% if reverse %} + {% if "rightreserve" in reverse %} + {% set row_class = "flex flex-col-reverse md:flex-row items-center mx-8" %} + {% elif "leftreserve" in reverse %} + {% set row_class = "flex flex-col md:flex-row items-center mx-8" %} + + {% endif %} + {% endif %} + {% if style %} {% if "center" in style %} - {% set row_class = row_class ~ " text-center items-center mx-auto " %} + {% set row_class = row_class ~ " text-center items-center " %} {% set col_class = col_class ~ " flex-1 " %} {% endif %} + {% if "right" in style %} + {% set row_class = row_class ~ " text-center lg:text-right md:text-right justify-center " %} + {% set col_class = col_class ~ " flex-1 m-4 lg:m-0 mx-8" %} +{% endif %} + + {% if "items-end" in style %} {% set row_class = row_class ~ " lg:items-end" %} {% set col_class = col_class ~ " flex-1 " %} {% endif %} - - {% if "reverse" in style %} - {% set row_class = "flex flex-col-reverse md:flex-row items-center mx-8" %} - {% endif %}