Browse Source

Header Color now accept hex value + Navigation Color Option added + Make font size smaller for mobile devices for landing page

refactoring
_ahmedbilal 3 years ago
parent
commit
a5c4ad4a60
  1. 25
      assets/u/static/generic-header.css
  2. 4
      content/u/products/zero-carbon-cloud/contents.lr
  3. 14
      flowblocks/generic-header.ini
  4. 2
      templates/blocks/generic-header.html
  5. 11
      templates/layout-2020.html

25
assets/u/static/generic-header.css

@ -1,7 +1,30 @@
:root {
font-size: 16px;
font-size: 14px;
}
h3 {
font-size: 1.5rem;
}
h2 {
font-size: 1.75rem;
}
.mb-5 {
margin-bottom: 1.5rem !important;
}
/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
:root {
font-size: 16px;
}
.mb-5 {
margin-bottom: 3rem !important;
}
}
.blue-bg {
background-color: #40a9e3;
}

4
content/u/products/zero-carbon-cloud/contents.lr

@ -126,6 +126,8 @@ don't offset
go zero carbon
zero carbon cloud
----
primary_color: blue
primary_color: #40a9e3
----
header_color: text-light
----
nav_link_color: navbar-dark

14
flowblocks/generic-header.ini

@ -8,10 +8,7 @@ type = strings
[fields.primary_color]
name = Landing Page Primary Color
label = primary_color
type = select
choices = blue, black, red, green
choice_labels = Blue, Black, Red, Green
default = blue
type = string
[fields.header_color]
name = Header Color
@ -19,4 +16,11 @@ label = header_color
type = select
choices = text-light, text-dark
choice_labels = light, dark
default = text-light
default = text-light
[fields.nav_link_color]
name = Navigation Link Color
type = select
choices = navbar-light, navbar-dark
choice_labels = dark, light
default = dark

2
templates/blocks/generic-header.html

@ -1,4 +1,4 @@
<div class="jumbotron jumbotron-fluid {{this.primary_color}}-bg">
<div class="jumbotron jumbotron-fluid" style="background-color: {{this.primary_color}};">
<div class="container-fluid">
{% for h in this.headers %}
<h1 class="display-1 generic-header {{this.header_color}}" style="font-weight: bolder;">{{h}}</h1>

11
templates/layout-2020.html

@ -28,17 +28,14 @@
</head>
<body>
{% if this.header %}
{% set nav_classes = this.header.blocks[0].primary_color + '-bg' %}
{% if this.header.blocks[0].primary_color != 'Black' %}
{% set nav_classes = nav_classes + ' navbar-dark' %}
{% else %}
{% set nav_classes = nav_classes + ' navbar-light' %}
{% endif %}
{% set nav_style = 'background-color:' + this.header.blocks[0].primary_color + ';' %}
{% set nav_classes = this.header.blocks[0].nav_link_color %}
{% else %}
{% set nav_classes = 'navbar-light bg-light' %}
{% endif %}
<nav class="navbar navbar-expand-lg {{ nav_classes }}">
<nav class="navbar navbar-expand-lg {{ nav_classes }}" style="{{ nav_style }}">
<a class="navbar-brand" href="https://ungleich.ch">ungleich</a>
<button class="navbar-toggler" type="button"
data-toggle="collapse"

Loading…
Cancel
Save