Selaa lähdekoodia

Allow hiding newsletter section from footer (#48)

* Allow hiding newsletter section from footer

* Update README.md
Md. Emruz Hossain 4 vuotta sitten
vanhempi
commit
7da028e643
3 muutettua tiedostoa jossa 20 lisäystä ja 1 poistoa
  1. 12 0
      README.md
  2. 5 0
      exampleSite/config.yaml
  3. 3 1
      layouts/partials/footer.html

+ 12 - 0
README.md

@@ -81,6 +81,13 @@ params:
   # background image of the landing page
   background: "images/background.jpg"
 
+  # Provide logos for your site. The inverted logo will be used in the initial
+  # transparent navbar and the main logo will be used in the non-transparent navbar.
+  # It will be default to the theme logos if not provided.
+  logo:
+    main: /assets/images/main-logo.png
+    inverted: /assets/images/inverted-logo.png
+
   # GitHub repo URL of your site
   gitRepo: https://github.com/hossainemruz/toha-example-site
 
@@ -96,6 +103,11 @@ params:
   - name: Notes
     url: https://hossainnotes.netlify.app/docs/example/
 
+  # Provide newsletter configuration. This feature hasn't been implemented yet.
+  # Currently, you can just hide it from the footer.
+  newsletter:
+    enable: true
+
   # some information about you
   author:
     name: "Jane Doe"

+ 5 - 0
exampleSite/config.yaml

@@ -52,6 +52,11 @@ params:
   - name: Notes
     url: https://hossainnotes.netlify.app/docs/example/
 
+  # Provide newsletter configuration. This feature hasn't been implemented yet.
+  # Currently, you can just hide it from the footer.
+  newsletter:
+    enable: true
+
   # some information about you
   author:
     name: "Jane Doe"

+ 3 - 1
layouts/partials/footer.html

@@ -24,6 +24,7 @@
           {{ end }}
         </ul>
       </div>
+      {{ if .Site.Params.newsletter.enable }}
       <div class="col-md-4 col-sm-12">
         <!-- <h5>Newsletter</h5> -->
         <p>Stay up to date with email notification</p>
@@ -43,6 +44,7 @@
           <button type="submit" class="btn btn-info">Submit</button>
         </form>
       </div>
+      {{ end }}
     </div>
   </div>
   <hr />
@@ -50,7 +52,7 @@
     <div class="row text-left">
       <div class="col-md-4">
         <a id="theme" href="https://github.com/hossainemruz/toha" target="#">
-          <img src="/assets/images/logo-inverted.png">
+          <img src="/assets/images/inverted-logo.png">
           Toha
         </a>
       </div>