uwe-app / app

Universal web editor
https://uwe.app
0 stars 0 forks source link

HTML minification bug #484

Closed tmpfs closed 3 years ago

tmpfs commented 3 years ago

Notice the <script>>>>>!!!

The workaround is to disable minification for now:

[minify.html]
profiles = false
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><title>Deck</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="uwe/0.48.8"><meta name="version" content="1.0.0"><meta name="description" content="Deck"><meta name="keywords" content="Presentation, Deck"><meta property="og:title" content="Deck"><meta property="og:type" content="website"><meta property="og:url" content="https://localhost/"><link rel="stylesheet" href="assets/plugins/lib::reveal/styles/reveal.css"><link rel="stylesheet" href="assets/plugins/std::core/styles/standard.css"><link rel="stylesheet" href="assets/styles/deck.css"><link rel="stylesheet" href="__livereload.css"><link rel="icon" href="data:image/gif;base64,R0lGODlhEAAQAAAAACwAAAAAAQABAAACASgAOw=="><link rel="stylesheet" href="assets/styles/main.css"><link rel="canonical" href="https://localhost/"></head><body><input id="sidebar-toggle" type="checkbox"><aside id="sidebar"><ul><li><a href="welcome/" title="Welcome">Welcome</a></li><li><a href="launch/" title="01. Launch view (first run)">01. Launch view (first run)</a></li><li><a href="launch-projects/" title="02. Launch view (project list)">02. Launch view (project list)</a></li><li><a href="open-project-error/" title="03. Open project (folder select error)">03. Open project (folder select error)</a></li><li><a href="new-project/" title="04. New project">04. New project</a></li><li><a href="project-editor-toolbar/" title="05. Project editor (toolbar)">05. Project editor (toolbar)</a></li><li><a href="project-editor-elements/" title="06. Project editor (elements)">06. Project editor (elements)</a></li></ul></aside><main><header><nav><a href="/" title="Deck">UWE Editor Wireframes</a></nav><strong class="title"></strong></header><article><div class="reveal"><div class="slides"><section><span class="slide-title">Welcome</span><p>This deck shows wireframes for the <a href="https://uwe.app/" title="Universal Web Editor">UWE</a> editor UI.</p><p>Use the arrow keys to view the presentation.</p><p><strong>Best viewed on a Desktop</strong></p></section><section><span class="slide-title">01. Launch view (first run)</span><p>When the UI is opened a <em>launch view</em> is displayed.</p><p>The main toolbar runs across the top of the screen showing the branding with no further controls. An action area shows buttons to open an existing project or to create a new project.</p><div class="wireframe flex padded sml rhythm"><span>Main tool bar w/ Logo</span></div><div class="wireframe flex column padded center"><p>No projects yet</p><div class="flex spacer-x center"><button>New project</button><button>Open project</button></div></div></section><section><span class="slide-title">02. Launch view (project list)</span><p>In the <em>launch view</em> if projects have already been created or opened a list of links to each project is displayed; clicking a link proceeds to the <em>Project Editor</em> view.</p><div class="wireframe flex padded sml rhythm"><span>Main tool bar w/ Logo</span></div><div class="wireframe flex column padded center"><ul><li>My blog project</li><li>Company website</li><li>Personal portfolio</li></ul><div class="flex spacer-x center"><button>New project</button><button>Open project</button></div></div></section><section><span class="slide-title">03. Open project (folder select error)</span><p>When the <em>Open Project</em> option is selected a native dialog asks the user to choose a folder. If a folder is selected and no error occurs then the interface proceeds to the <em>Project Editor</em> view.</p><p>Otherwise an error message indicates the problem:</p><div class="wireframe flex padded sml rhythm"><span>Main tool bar w/ Logo</span></div><div class="wireframe flex column padded center error"><span>
    Folder /foo/bar/baz could not be opened.
    It is not a valid project; site settings are required in a site.toml file.
  </span></div></section><section><span class="slide-title">04. New project</span><p>In the <em>launch view</em> if a user selects the <em>New Project</em> option they are presented with a view allowing blueprint selection and controls for project fields.</p><p>When the user selects <em>Create Project</em> and it is successful they will move to the <em>Project editor</em> view. Form validation or project creation errors can be shown inline.</p><div class="wireframe flex padded sml rhythm"><span>Main tool bar w/ Logo</span></div><div class="wireframe flex column padded center"><div class="flex spacer-x center rhythm"><a href="#">&lt; Back</a></div><div class="flex column spacer-x rhythm"><small>Enter a name for the project:</small><input type="text" placeholder="Project name" /></div><div class="flex spacer-x"><small>Create project in: /Users/johndoe</small><button>Change folder</button></div><ul><li class="flex"><input checked id="basic" name="blueprint" type="radio"></input><label for="basic">Basic website</label></li><li class="flex"><input id="blog" name="blueprint" type="radio"></input><label for="blog">Blog</label></li><li class="flex"><input id="deck" name="blueprint" type="radio"></input><label for="deck">Deck</label></li></ul><div class="flex spacer-x center"><button>Create project</button></div></div></section><section><span class="slide-title">05. Project editor (toolbar)</span><p>The <em>Project Editor</em> view shows a single project and controls to manage and edit files and preview the compiled website.</p><p>The toolbar at the top of the <em>Project Editor</em> shows the branding, provides a quick project switcher control and access to the <em>Open Project</em> and <em>Create Project</em> functions via a menu button. Later, the menu should include an option to edit the project settings - the <em>Settings Editor</em>.</p><div class="wireframe flex space-between padded sml rhythm"><span>Logo</span><select><option>Company website</span><option>Personal portfolio</span><option>My blog project</span></select><button>Menu</button></div></section><section><span class="slide-title">06. Project editor (elements)</span><p>Below the toolbar for the <em>Project Editor</em> are the main elements a file manager, file editor and website preview dividing the space into three columns.</p><p>Each column has an action bar at the top and a status bar beneath.</p><p>We should design controls to minimize/maximize the file manager and file editor so it is possible to switch to a two column view (file editor/website preview) or just focus on the website preview.</p><div class="flex"><div class="wireframe flex column" style="flex: 0; flex-basis: 240px;"><div>File manager actions</div><div class="wireframe">File manager content</div><div>File manager status (eg: current directory)</div></div><div class="flex space-evenly fill" style="flex: 1;"><div class="wireframe flex column fill"><div>File editor tabs</div><div class="wireframe">File editor content</div><div>File editor status (eg: Open file name and file size)</div></div><div class="wireframe flex column fill"><div>Address bar to manually navigate</div><div class="wireframe">Website preview</div><div>Mobile/tablet/desktop preview actions</div></div></div></div></section></div></div><noscript><p>
This presentation is best viewed with Javascript enabled; view <a href="all/" title="Presentation">all the presentation</a> slides.
</p></noscript></article><footer><nav class="next-prev"></nav><div><p><a href="https://uwe.app" title="Made by Universal Web Editor" style="text-decoration: none; font-size: 12px;">MADE BY UWE</a></p><small class="slide-progress"></small><p><a href="all/" title="View slides on single page">Print</a></p></div></footer></main><script src="assets/plugins/lib::reveal/scripts/reveal.js"></script><script src="assets/plugins/std::sidebar/scripts/sidebar.js"></script><script src="__livereload.js"></script><script>>>>>
  (function() {
    if (typeof Reveal !== "undefined") {
      const deck = new Reveal(document.querySelector('article'), {
        embedded: true,
        hash: true,
        history: true,
        controls: false,
        controlsTutorial: false,
        progress: false,
        disableLayout: true,
      });

      function slideProgress(current, total) {
        let el = document.querySelector('footer .slide-progress');
        if (el) {
          el.innerText = `${current} / ${total}`;
        }
      }

      function showSlideTitle(currentSlide) {
        if (currentSlide) {
          const title = currentSlide.querySelector('.slide-title');
          if (title) {
            const headerTitle = 
              document.querySelector('main  header  .title');
            if (headerTitle) {
              const titleCopy = title.cloneNode(true);    
              titleCopy.classList.remove('slide-title');
              headerTitle.innerHTML = "";
              headerTitle.appendChild(titleCopy);
            }
          }
        }
      }

      deck.on('slidechanged', event = {
        showSlideTitle(event.currentSlide);
        slideProgress(event.indexh + 1, deck.getSlides().length)
      });

      deck.initialize()
        .then(() = {
          showSlideTitle(deck.getCurrentSlide());
        });
      slideProgress(1, deck.getSlides().length);
    }
  })();
</script><noscript><style>
    .reveal { display: none; }
    #sidebar { min-width: var(--sidebar-width); }
  </style></noscript></body></html>