Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Single page website with everything on display, organized by category

Single page website with everything on display, organized by category

Scheduled Pinned Locked Moved General Discussion
14 Posts 2 Posters 642 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • RichardR Offline
    RichardR Offline
    Richard
    Global Moderator
    wrote on last edited by
    #4

    Dear Andrea @and

    This is a very interesting question,

    The issue is that each project is really its own page:
    Screen Shot 2020-10-07 at 4.28.09 PM.png

    Existing outside of the home page, not being loaded yet. you cant merge two permalinks together so content cannot be merged either.

    I can think of a few options moving forwards but i apologise that i cannot offer a definite solution.

    1. Creating all content within one whole page ( one permalink ).
      Creating the whole wireframe. ( however i can see why this may be unappealing especially if you have already created the projects.

    2. Using JS.
      This would require some good knowledge of JS -
      Create a page that is based on your wireframe & add your category area's with the Project Thumbnail inserts:

    Screen Shot 2020-10-07 at 4.43.18 PM.png

    Screen Shot 2020-09-14 at 2.50.29 PM.png

    This will give us the necessary data and links!
    Using Custom CSS that can be added in "lay-options - Custom CSS & HTML"

    Screen Shot 2020-09-14 at 2.51.54 PM.png
    You can set the <img> image of the project thumbnail and caption to 'Display:None' ( but we now have the information )

    Then by adding Custom Javascript we need to ask for the link - and ask for all the Content within that Link:
    This gets difficult and unsure how plausible it is...

    1. Using Iframe's. Basically in that last option this is what was being attempted.
      So using an Iframe you could create a window into each project that would sit on this main page you have created. There are lots of iframe Generator's to choose from. You could add this Iframe code into your page through the "+ More - HTML " Option and then use CSS if extra styling is needed.
      Screen Shot 2020-09-14 at 2.50.29 PM.png

    Without Actually just making one page as you wish to with all the content of the project's, these are 3 options i can think of.

    Sorry once again that i cannot pursue this deeper

    Best wishes, Thank you for using Lay Theme

    Sincerely
    Richard

    1 Reply Last reply
    0
    • A Offline
      A Offline
      and
      wrote on last edited by
      #5

      Dear @Richard-Keith,
      Thank you very much for your feedback. I ended up creating all content within one single page and it actually works fine.

      I do have one last issue to solve, however, before I can finally go public. Two scripts I added in the <head> work fine on desktop, but don't seem to work on mobile. Any idea what the reason might be?

      The first script creates a "Read More / Read Less" button that shows/hides extra text like an accordion; the second makes the anchors in the navbar scroll smoothly to their targets.

      You can find my code in the screenshot attached.
      Thanks in advance,
      Andrea

      Screen Shot 2020-11-06 at 16.06.01.png

      1 Reply Last reply
      0
      • RichardR Offline
        RichardR Offline
        Richard
        Global Moderator
        wrote on last edited by
        #6

        Dear Andrea

        Do you need to wrap your code in a Newpage event like this?

        <script>
        window.laytheme.on("newpageshown", function(layoutObj, type, obj){
        
        ---INSERT YOUR CODE HERE---
            
          });
        </script>
        

        http://laytheme.com/documentation.html#custom-javascript

        Hope this helps! :)

        Best
        Richard

        1 Reply Last reply
        0
        • A Offline
          A Offline
          and
          wrote on last edited by and
          #7

          Hi Richard.
          Thanks for your answer.
          I tried but it doesn't look like it makes any difference.
          There must be something else I'm doing wrong...

          1 Reply Last reply
          0
          • RichardR Offline
            RichardR Offline
            Richard
            Global Moderator
            wrote on last edited by
            #8

            Dear @and

            For me both Scripts work on both Desktop and mobile layout, i cant find issue with your code at the moment?

            Apologies that i am not seeing the issue! :)
            The Accordion works for me, and the Scroll works for me? Maybe the scroll is meant to be smoother and this is the issue.

            Have a wonderful day & thank you for being a user of Lay Theme
            Sincerely
            Richard

            1 Reply Last reply
            0
            • A Offline
              A Offline
              and
              wrote on last edited by
              #9

              Dear Richard,
              Thanks for your answer.
              The accordion works now.

              The menu, on the other hand, works well only on the desktop layout. On the mobile layout it doesn't work at all (if you click on the anchors nothing happens).

              If you could have a last look I would be very grateful. It's literally the last thing I need to solve.

              Thanks a lot,
              Andrea

              1 Reply Last reply
              0
              • RichardR Offline
                RichardR Offline
                Richard
                Global Moderator
                wrote on last edited by
                #10

                Dear Andrea @and

                I am unable to reach your page at the moment:
                Screen Shot 2020-11-23 at 2.10.34 PM.png

                Sorry for any inconvenience
                Richard

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  and
                  wrote on last edited by
                  #11

                  I forgot to forward you the updated link: https://www.tudorbratu.com/

                  Have a nice day,
                  Andrea

                  1 Reply Last reply
                  0
                  • RichardR Offline
                    RichardR Offline
                    Richard
                    Global Moderator
                    wrote on last edited by
                    #12

                    Hi Andrea

                    I think it centres round the .on('click') event - i don't believe this click event is possible on mobile as 'click' doesnt really exist on mobile - that is why your scroll code doesn't register. I hope i am right! :)

                    https://stackoverflow.com/questions/43220776/jquery-onclick-not-working-on-mobile

                    Take a look at this and see if you can alter your code accordingly

                    Good luck and best wishes

                    Sincerely
                    Richard

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      and
                      wrote on last edited by
                      #13

                      Dear Richard,
                      Sorry to bother again but I just realised the problem is not about javascript at all.
                      There appears to be some sort of conflict between navbar and custom phone layout, and this has nothing to do with my custom code.

                      I made a test by creating a new page and, as you can see, the navbar here works perfectly: it makes you scroll smoothly to the targets, on both desktop and phone layout.

                      As soon as I create a custom phone layout in the gridder, however (namely: click on the phone icon in the top right corner of the gridder), it immediately stops working on mobiles (you click on the anchors and nothing happens). And this is true whether I start by ‘stacking elements’, by ‘copying the same layout’, or with an ‘empty layout’: I tried them all.

                      This is the original page with the custom phone layout—which isn’t working—in case you want to check.

                      Then again, as soon as I delete my custom phone layout, the navbar starts working again.

                      I’m not sure what the conflict is about but it seems strange, and it’s not caused by my custom code anyway. To be completely sure about this I even removed my own script and adopted an alternative way to create the smooth scrolling effect (by adding “html{scroll-behavior: smooth;}” in the custom CSS). The result is exactly the same.

                      Is there any way I can customise my phone layout without interfering with the navbar functioning?
                      If you could help me that would be very much appreciated, and I sincerely hope this whole conversation will be useful for future LayTheme users.

                      Many thanks in advance,
                      Andrea

                      1 Reply Last reply
                      0
                      • RichardR Offline
                        RichardR Offline
                        Richard
                        Global Moderator
                        wrote on last edited by
                        #14

                        Dear Andrea

                        Not a bother at all! :) Great rundown of the bugs behaviour,
                        A new update has been released for the theme, does the issue remain?

                        http://laythemeforum.com:4567/topic/6244/anchor-link-in-mobile-not-working-anymore/5
                        Armin also mentions that LayTheme has built in anchor scrolling

                        Best wishes Andrea and have a lovely day

                        Richard

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        I also code custom websites or custom Lay features.
                        💿 Email me here: 💿
                        info@laytheme.com

                        Before you post:
                        1. When using a WordPress Cache plugin, disable it or clear your cache.
                        2. Update Lay Theme and all Lay Theme Addons
                        3. Disable all Plugins
                        4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                        This often solves issues you might run into

                        When you post:
                        1. Post a link to where the problem is
                        2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                        3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                        Online Users
                        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                        laytheme.com
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Search