<!DOCTYPE html>
<html>

<head>
    <title>
        Abizeitung FAG
    </title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
    <link rel="apple-touch-icon" sizes="180x180" href="/img/shortcut.png">

    <script src="https://code.jquery.com/jquery-3.1.1.min.js"
        integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.js"></script>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <style type="text/css">
        .blur-bg::before {
            content: "";
            position: fixed;
            left: -1%;
            right: 0;
            z-index: -1;

            display: block;
            background-image: url("/img/schule.jpg");
            background-size: cover !important;
            width: 105%;
            height: 105%;

            -webkit-filter: blur(5px);
            -moz-filter: blur(5px);
            -o-filter: blur(5px);
            -ms-filter: blur(5px);
            filter: blur(5px);
        }

        body>.grid {
            height: 100%;
        }

        .image {
            margin-top: -100px;
        }

        .column {
            max-width: 450px;
        }
    </style>
</head>

<body>
    <div class="ui middle aligned center aligned grid blur-bg">
        <div class="column">
            <div class="ui segment">
                <h1 class="ui header"><a href="/"><i class="angle left icon" ></i></a>Alle Zitate</h1>
            </div>

            <% quotes.forEach(quote => { %>
            <div class="ui segment">
                <h3 class="ui header"><%= quote.class %>, <%= quote.submittedBy %></h3>
                <p>
                    <%= quote.text %>
                </p>
                <div class="ui action input clipboard-container">
                    <input type="text" id="link-<%= quote._id %>" value="https://abizeitungfag.de/quote/<%= quote._id %>">
                    <button class="ui icon button clipboard-link" data-clipboard-target="#link-<%= quote._id %>">
                        <i class="copy icon"></i>
                    </button>
                  </div>
            </div>
            <% }) %>

        </div>
    </div>

    <script>
        new ClipboardJS('.clipboard-link');
        if (!ClipboardJS.isSupported()) {
            $(".clipboard-container").hide();
        }
    </script>
</body>
</html>