Skip to content

Commit

Permalink
Merge pull request #12 from dowhilefalse/master
Browse files Browse the repository at this point in the history
update from upstream
  • Loading branch information
gsw945 committed Feb 5, 2020
2 parents 6f5fbf1 + 2fbef4f commit f693be3
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 120 deletions.
14 changes: 13 additions & 1 deletion registration/static/css/style.css
Expand Up @@ -22,7 +22,7 @@ body {

:root {
--Color_text: #fff;
--Color_tab: #658361; /* tab主要的颜色*/
--Color_tab: rgba(0, 120, 106, 1.0); /* tab主要的颜色*/
--Color_hover: #70926c;
--Color_slider: #70926c;
--Color_bottombox: #586e72;
Expand Down Expand Up @@ -1406,6 +1406,18 @@ input[type="text"] {
margin-bottom: 40px;
background-color: rgba(0, 150, 136, 0.12);
box-shadow: 2px 2px 2px rgb(192, 192, 192);

}
@media screen and (max-width: 768px) {
.unit{
transition:all 0.5s;
width: 90%;
/*border-radius: 8px;*/
margin-bottom: 40px;
background-color: rgba(0, 150, 136, 0.12);
box-shadow: 2px 2px 2px rgb(192, 192, 192);
}

}
.unit:hover{
opacity: 1;
Expand Down
10 changes: 5 additions & 5 deletions registration/templates/base-layout.html
Expand Up @@ -91,16 +91,16 @@
{% if user.is_authenticated %}
<li><a href="{% url 'registration:page_index' %}">首页</a></li>
<li class="break"><a href="{% url 'registration:page_about' %}">
<font style="color:grey">关于我们</font>
<font>关于我们</font>
</a></li>
<li><a href="{% url 'registration:page_contact' %}">
<font style="color:#009688">发布募捐信息</font>
<font style="color:#009688">发布医院信息</font>
</a></li>
<li><a href="{% url 'registration:page_contact2' %}">
<font style="color:#009688">提交团体信息</font>
<font style="color:#009688">发布团体信息</font>
</a></li>
<li class="break"><a href="{% url 'registration:page_logout' %}">
<font style="color: red">注销</font>
<font style="color: #5d726c">注销</font>
</a></li>
<li><a href="{% url 'registration:page_group11' %}">武汉医院</a></li>
<li><a href="{% url 'registration:page_group12' %}">周边医院</a></li>
Expand All @@ -113,7 +113,7 @@
<font style="color:#009688">注册/登陆</font>
</a></li>
<li class="break"><a href="{% url 'registration:page_about' %}">
<font style="color:grey">关于我们</font>
<font>关于我们</font>
</a></li>
<li><a href="{% url 'registration:page_group11' %}">武汉医院</a></li>
<li><a href="{% url 'registration:page_group12' %}">周边医院</a></li>
Expand Down
8 changes: 4 additions & 4 deletions registration/templates/pages/about.html
Expand Up @@ -27,10 +27,10 @@ <h1>关于我们</h1>
</aside>
<div id="fh5co-about">
<div class="row">
<div class="col-md-6">
<h3>我们的任务</h3>
<p>我们希望汇集海内外的力量,一同抗击疫情</p>
<p>我们不提供疫情资讯,我们只提供大家能帮助疫情的咨询/捐助/协助渠道.</p>
<div class="col-md-12">
<p>我们是一支来自五湖四海,为救助祖国疫情相识成立的小队。</p>
<p>此“医院物资实时发布平台”经过多天昼夜开发,为了解决当下最大的问题之一:各医院物资短缺情况的实时跟踪。各医院可以随时修改目前紧缺物品数量,更好地协助政府和社会根据紧急程度分配资源。此外,各公益团体可以发布募捐信息,供个人进行捐赠。</p>
<p>接下来平台会增加捐赠货物跟踪功能,争取让每一笔捐赠公开透明,请收藏转发平台让更多人受益。有意加入平台背后的团体请添加微信:15235110079</p>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions registration/templates/pages/contact.html
Expand Up @@ -82,9 +82,9 @@
<div class="col-md-3 col-md-push-8 animate-box">
<h3>我们的联系方式</h3>
<ul class="contact-info">
<li><i class="icon-phone3"></i>+ 1235 2355 98</li>
<li><i class="icon-location3"></i><a href="#">info@yoursite.com</a></li>
<li><i class="icon-globe2"></i><a href="#">www.yoursite.com</a></li>
<li><i class="icon-phone3"></i>15235110079</li>
<li><i class="icon-location3"></i><a href="#">contact@wetogether2020.com</a></li>
<li><i class="icon-globe2"></i><a href="#">www.wetogether2020.com</a></li>
</ul>
</div>
<div class="col-md-7 col-md-pull-2 animate-box">
Expand Down
6 changes: 3 additions & 3 deletions registration/templates/pages/contact2.html
Expand Up @@ -31,9 +31,9 @@
<div class="col-md-3 col-md-push-8 animate-box">
<h3>我们的联系方式</h3>
<ul class="contact-info">
<li><i class="icon-phone3"></i>+ 1235 2355 98</li>
<li><i class="icon-location3"></i><a href="#">info@yoursite.com</a></li>
<li><i class="icon-globe2"></i><a href="#">www.yoursite.com</a></li>
<li><i class="icon-phone3"></i>15235110079</li>
<li><i class="icon-location3"></i><a href="#">contact@wetogether2020.com</a></li>
<li><i class="icon-globe2"></i><a href="#">www.wetogether2020.com</a></li>
</ul>
</div>
<div class="col-md-7 col-md-pull-2 animate-box">
Expand Down
128 changes: 84 additions & 44 deletions registration/templates/pages/group2.html
Expand Up @@ -34,46 +34,80 @@ <h2 class="list-name">需求信息列表-所有城市</h2>

</div>

<div style="margin:0 auto;">
<div class="after_title">
<nav class="fh5co-nav" role="navigation">
<ul style="white-space: nowrap; margin-left:10.0px ">
<li onclick="change_show_type2(); myFunction()"><a ><font style="color:black">以框框方式展示</font></a></li>
<ul style="white-space: nowrap; margin-left:10.0px ">
<li onclick="change_show_type2(); myFunction()"><a ><font style="color:black">以框框方式展示</font></a></li>
<li onclick="change_show_type1(); myFunction()"><a ><font style="color:black">以表格方式展示</font></a></li>
</ul>
</nav>

<div class="row" style="margin-left:13px" id="category">
<a style="margin-left:10.0px; margin-right:10.0px; font-size: 15px color:black"><b><font style="color:black">选择省份/地区</font></b></a>
<a class="title" id="title_province" style="margin-right:10.0px; font-size: 15px color:black"><b><font style="color:black">选择省份/地区</font></b></a>
<select id="province" data-container="body" name="province" style=" width:95px; white-space: nowrap; display:inline; margin-left:20.0px; margin-top:-20.0px; padding:0px" onchange="selectprovince(this); myFunction()"></select>
<a style="margin-left:10.0px; margin-right:10.0px; margin-bottom:0px; font-size: 15px"><b><font style="color:black">选择城市</font></b></a>
<a class="break"></a>
<a class="title" id="title_city" style="margin-right:10.0px; margin-bottom:0px; font-size: 15px"><b><font style="color:black">选择城市</font></b></a>
<select id="city" data-container="body" name="city" style=" width:95px; white-space: nowrap; display:inline; margin-left:20.0px; margin-top:-5px; padding:0px;" onchange="myFunction()"></select>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="搜索关键词...", style="margin-left:25px; margin-bottom: 0.0px">
<a class="break"></a>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="搜索关键词...", style="margin-bottom: 0.0px">
</div>
</div>
<style>
th,td {
padding: .65em;
}
th {
background: #555 nonerepeat scroll 0 0;
border: 1px solid #777;
color: black;
<style>
th,td {
padding: .65em;
}
th {
background: #555 nonerepeat scroll 0 0;
border: 1px solid #777;
color: black;
/*color: #fff; */
}
td {
}
td {
border: 1px solid #777;
color: black;
}
color: black;
}
#myInput{
margin-left: 25px
}
#title_province{
margin-left: 50px
}
#title_city{
margin-left: 10px
}
#table{
margin-left: 44px
}
.after_title{
margin: 0 auto;
}
@media screen and (max-width: 768px) {
.break{
content: '<br>';
}
#myInput{
margin-left: 2%
}
#title_province{
margin-left: 10px
}
#table{
margin-left: 0px
}
.after_title{
margin-top: -20px
}
}
</style>

<div class="row" , style="margin-left:18px;">

<div class="unit-table organizations-table" id="form1">
</div>
</div>

<div class="unit-box organizations-box" id="form2">
</div>

</div>
</div>

Expand All @@ -93,25 +127,29 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
switch (location.pathname) {
case '/group11':
qs += 'wuhan';
list_name = '需求信息列表-武汉医院'
init_province = '湖北省'
init_city = '武汉市'
list_name = (window.screen.width > 768) ? '需求信息列表-武汉医院': '需求信息列表<br>武汉医院';
init_province = '湖北省';
init_city = '武汉市';
break;
case '/group12':
qs += 'hubei';
list_name = '需求信息列表-武汉周边城市医院'
init_province = '湖北省'
init_city = '所有'
list_name = (window.screen.width > 768) ? '需求信息列表-武汉周边城市医院' : '需求信息列表<br>武汉周边城市医院';
init_province = '湖北省';
init_city = '所有';
break;
case '/group2': ;
default:
qs += 'china';
list_name = '需求信息列表-全国医院'
list_name = (window.screen.width > 768) ? '需求信息列表-全国医院' : '需求信息列表<br>全国医院'
init_province = '所有'
init_city = '所有'
break;
}

if(window.screen.width<=768){
$(".break").append('<br>');
}

$(".list-name").html(list_name)

function get_organizations_box() {
Expand Down Expand Up @@ -180,25 +218,25 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
});
// console.log($(".unit-box"))
}

function get_organizations_table() {
var unit_table = $(".organizations-table")
var html = ""

$.get(GLOGAL.API_BASE + "organizations", function (data, status) {
if (status === 'success') {
html += ` <div style="overflow:auto; margin-left:44px">
<table onload="myFunction()" style="border-collapse: collapse;">
html += ` <div style="overflow:auto; margin-right:30px" id="table" >
<table onload="myFunction()" style="border-collapse: collapse;">
<thead>
<tr>
<th>医院名称</th>
<th>医院名称</th>
<th>省份</th>
<th>城市</th>
<th>地址</th>
<th>需求</th>
<th>联系人</th>
<th>信息已验证</th>
<th>信息验证</th>
</tr>
</thead>
<tbody>`
Expand Down Expand Up @@ -250,7 +288,7 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
}
else{
list1[list1.length] = "所有"}

    list1[list1.length] = "北京市";
    list1[list1.length] = "天津市";
    list1[list1.length] = "河北省";
Expand Down Expand Up @@ -424,7 +462,7 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
    function selectprovince(obj) {
        ddlCity.options.length = 0;//clear
        var index = indexof(list1,obj.value);
        var list2element = list2[index];
        var list2element = list2[index];
        for(var i =0;i<list2element.length; i++)
        {
            var option = document.createElement("option");
Expand All @@ -435,7 +473,7 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
// console.log(document.getElementById("city").options[0]);
document.getElementById("city").value = list2element[0];
    }

function myFunction() {
// 声明变量
if (form1.style.display != 'none'){
Expand All @@ -452,16 +490,16 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
// console.log(ul[i].getElementsByTagName("li"))
td1 = tr[i].getElementsByTagName("td")[0];
td2 = tr[i].getElementsByTagName("td")[1]; //province
td3 = tr[i].getElementsByTagName("td")[2]; //city
td3 = tr[i].getElementsByTagName("td")[2]; //city
console.log(td2.innerHTML.toUpperCase())
console.log(td2.innerHTML.toUpperCase().indexOf(filter_province) > -1)
console.log(td3.innerHTML.toUpperCase().indexOf(filter_city) > -1)
if (td1 && td2 && td3) {

if (filter_search){
var search_result = false;
for (j = 0; j < tr[i].getElementsByTagName("td").length; j++){
search_result = search_result || (tr[i].getElementsByTagName("td")[j].innerHTML.toUpperCase().indexOf(filter_search) > -1)
search_result = search_result || (tr[i].getElementsByTagName("td")[j].innerHTML.toUpperCase().indexOf(filter_search) > -1)
}
// console.log(search_result)
}
Expand Down Expand Up @@ -491,21 +529,21 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
// console.log(ul[i].getElementsByTagName("li"))
li1 = ul[i].getElementsByTagName("a")[0];
li2 = ul[i].getElementsByTagName("a")[1]; //province
li3 = ul[i].getElementsByTagName("a")[2]; //city
li3 = ul[i].getElementsByTagName("a")[2]; //city
// console.log(Boolean(filter_search))
if (li1 && li2 && li3) {

if (filter_search){
var search_result = false;
for (j = 0; j < ul[i].getElementsByTagName("a").length; j++){
search_result = search_result || (ul[i].getElementsByTagName("a")[j].innerHTML.toUpperCase().indexOf(filter_search) > -1)
search_result = search_result || (ul[i].getElementsByTagName("a")[j].innerHTML.toUpperCase().indexOf(filter_search) > -1)
}
// console.log(search_result)
}
else {
var search_result = true;
}

if (search_result && (((li2.innerHTML.toUpperCase().indexOf(filter_province) > -1) && (li3.innerHTML.toUpperCase().indexOf(filter_city) > -1 || filter_city == "所有")) || filter_province == "所有")) {
ul[i].style.display = "";
} else {
Expand All @@ -519,8 +557,10 @@ <h2 class="list-name">需求信息列表-所有城市</h2>
// 初始化

form1.style.display='none';
window.onload = myFunction;
setTimeout(function (){
myFunction();
}, 500);


</script>
{% endblock %}
{% endblock %}

0 comments on commit f693be3

Please sign in to comment.