<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分享梦想页</title>
    <script src="/base/js/jquery-2.1.1.min.js"></script>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <style>
        body{
            padding: 0;
            margin: 0;
        }
        p{
            -webkit-margin-before: 0.1em;
            -webkit-margin-after: 0.1em;
        }
    </style>
</head>
<body>
<img style="width: 100%; height: 100%;" src="{{!empty($dream->img) ? $dream->img->pic : ''}}

">
<p style="font-size: 17px; padding: 0 10px">{{$dream->name}}</p>
<div style="border-bottom: 1px solid #DEDEDE">
    <p id="about" style="font-size: 13px; padding: 0 10px; color: #919191;white-space: nowrap;overflow:hidden;text-overflow:ellipsis">
        {{$dream->about}}
    </p>
    <p style="text-align: center">
        <img src="/base/img/down.svg" alt="" id="down">
        <img src="/base/img/up.svg" alt="" id="up">
    </p>
</div>
<div style="border-bottom: 1px solid #DEDEDE; height: 50px; padding: 5px 10px;">
    <div style="float:left;">
        <p>{{$days}}</p>
        <p style="font-size: 13px; color: #919191">剩余时间</p>
    </div>
    <div style="float:right;">
        <p style="text-align: right">{{$dream->mark}}</p>
        <p style="font-size: 13px;; color: #919191">当前获得梦想分数</p>
    </div>
</div>
<div style="clear:both; height: 50px; padding: 5px 10px;">
    <div style="float:left;">
        <p>{{$dream->get_coin}}</p>
        <p style="font-size: 13px; color: #919191">目前已获梦想币</p>
    </div>
    <div style="float:right;">
        <p style="text-align: right">{{$dream->coin}}</p>
        <p style="font-size: 13px; color: #919191">我要求的梦想币</p>
    </div>
</div>
<div style="padding: 0 10px 20px  10px">
    <div style="background-color:#E6E6E6; width: 100%;">
        <div style="width: {{($dream->get_coin / $dream->coin)*100}}%; background: #FF6600; height: 5px">
        </div>
    </div>
</div>
</body>
</html>
<script>
    $(function () {
        $('#up').hide();
        var str = $('#about').html();
        new_str = str.replace(/\n/g,"<br/>");
        $('#about').html(new_str);
        $('#up').click(function () {
            $(this).hide();
            $('#down').show();
            $('#about').css('white-space','nowrap');
        });
        $('#down').click(function () {
            $(this).hide();
            $('#up').show();
            $('#about').css('white-space','normal');
        });
    });
</script>