Commit 0c233ef6 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

show query source vs result on frontpage

parent 6ee14bc9
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -718,3 +718,15 @@ p + .fancybutton {
  background-repeat: no-repeat;
  background-position: center center;
}

.fm_preview .output {
  display: none;
}

.fm_preview.show_output .output {
  display: block;
}

.fm_preview.show_output .input {
  display: none;
}
+68.2 KiB
Loading image diff...
+11 −2
Original line number Diff line number Diff line
@@ -63,8 +63,10 @@ webpage without writing a single line of code. It gives you maximum flexiblitiy
control over layout and style with HTML and CSS.
    -->

    <div style="margin: 40px auto; width: 600px;">
<pre class="prettyprint" style="margin-top: 0; text-align:left;"><code>IMPORT TABLE city_temperatures
    <div style="margin: 40px auto; width: 600px;" class="fm_preview">
      <img src="/img/simple_line_chart.png" style="width:600px;" class="output" />
      <div class="input">
<pre class="prettyprint" class="input" style="margin-top: 0; text-align:left;"><code>IMPORT TABLE city_temperatures
   FROM 'csv:examples/data/city_temperatures.csv?headers=true';

DRAW LINECHART WITH
@@ -74,6 +76,13 @@ SELECT city AS series, month AS x, temperature AS y
   FROM city_temperatures;
</code></pre>
      </div>
    </div>
    <div style="text-align: center; margin-top: -15px; margin-bottom: 40px;">
      Show:
      <a style="color:#2980b9;" href="#" onclick="javascript:document.querySelector('.fm_preview').className = 'fm_preview'; return false;">Source</a> |
      <a style="color:#2980b9" href="#" onclick="javascript:document.querySelector('.fm_preview').className = 'fm_preview show_output'; return false;">Output</a>
    </div>


    <p>
      You can execute ChartSQL queries from the command line against a number of