dashboard: improve: scale, flex, ...
This commit is contained in:
parent
7865373ffc
commit
7bac1ead6b
2 changed files with 104 additions and 81 deletions
|
@ -5,62 +5,64 @@
|
|||
<title>AdLin - Tableau d'avancement</title>
|
||||
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
|
||||
<style>
|
||||
.login {
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 84%;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
body {
|
||||
font-size: 13px;
|
||||
margin-top: 0.2vh;
|
||||
}
|
||||
.card-body {
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
padding: .3rem;
|
||||
}
|
||||
.card-img-top {
|
||||
.student {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 8.5rem;
|
||||
margin-bottom: -60px;
|
||||
height: calc(100vh / 5 - 0.3vh);
|
||||
margin-left: 0.2%;
|
||||
margin-bottom: 0.2vh;
|
||||
width: calc(100vw / 12 - 0.22vw);
|
||||
}
|
||||
.card-title {
|
||||
margin-bottom: 0;
|
||||
.student-title {
|
||||
width: calc(2 * (100vw / 12 - 0.22vw) + 0.2vw);
|
||||
font-size: 15px;
|
||||
}
|
||||
.student {
|
||||
margin-left: 0.3%;
|
||||
width: 16.3%;
|
||||
.student h5 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.student h5 span {
|
||||
font-size: 10px;
|
||||
}
|
||||
.student div, .student h5 {
|
||||
background-color: rgba(255,255,255,0.35);
|
||||
padding: 0.2vh 0.2vw;
|
||||
transition: background-color .5s;
|
||||
}
|
||||
.student:hover h5, .student-title h5 {
|
||||
background-color: rgba(255,255,255,0.7);
|
||||
}
|
||||
.login {
|
||||
max-width: 122px;
|
||||
}
|
||||
.badge {
|
||||
padding: .15em .35em;
|
||||
}
|
||||
</style>
|
||||
<base href="/">
|
||||
</head>
|
||||
<body>
|
||||
<div ng-controller="StudentsController" ng-cloak>
|
||||
<div class="card float-left mt-1 student" ng-controller="ProgressStatsController">
|
||||
<div class="card-img-top" style="background-image: url('https://srs.epita.fr/assets/images/logo-srs.png')"></div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
<span class="login" title="SRS" ng-cloak>ADLIN TP {{tutoid+1}}</span>
|
||||
</h5>
|
||||
<div>
|
||||
<span class="badge ml-1" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-success': stats[ch].success > 0, 'badge-warning': stats[ch].success == 0 && stats[ch].warning > 0, 'badge-danger': !stats[ch] || (stats[ch].success == 0 && stats[ch].warning == 0)}" title="{{ t.title }}: {{ stats[ch].success }} - {{ stats[ch].warning }}/{{ stats.total }}" ng-cloak>{{ stats[ch].warning * 100 / stats.total | number:0 }} %</span>
|
||||
</div>
|
||||
<div ng-controller="StudentsProgressionController" class="d-flex flex-wrap" ng-cloak>
|
||||
<div class="card student student-title d-flex flex-column justify-content-around" style="background-image: url('https://srs.epita.fr/assets/images/logo-srs.png');">
|
||||
<h5 class="text-center" title="SRS" ng-cloak>ADLIN TP {{tutoid+1}}</h5>
|
||||
<div class="d-flex flex-wrap justify-content-around" style="padding: 0">
|
||||
<span class="badge" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-success': stats[ch].success > 0 || (tutoid == 0 && stats[ch].warning > 0), 'badge-warning': tutoid != 0 && stats[ch].success == 0 && stats[ch].warning > 0, 'badge-danger': !stats[ch] || (stats[ch].success == 0 && stats[ch].warning == 0)}" title="{{ t.title }}: {{ stats[ch].success }} - {{ stats[ch].warning }}/{{ stats.total }}" ng-cloak>{{ stats[ch].warning * 100 / stats.total | number:0 }} %</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card float-left mt-1 student" ng-repeat="student in students">
|
||||
<div class="card-img-top" style="background-image: url('https://photos.cri.epita.fr/thumb/{{ student.login | lowercase }}')" ng-if="student.login != 'nemunaire'"></div>
|
||||
<div class="card-img-top" style="background-image: url('https://photos.cri.epita.fr/thumb/mercie_d')" ng-if="student.login == 'nemunaire'" ng-cloak></div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title" ng-controller="PingController">
|
||||
<span class="login" title="{{ student.login }}">{{ student.login }}</span>
|
||||
<span class="badge float-right" ng-class="{'badge-success': PING && PING < 120, 'badge-info': PING >= 120 && PING < 300, 'badge-warning': PING >= 300 && PING < 900, 'badge-danger': PING >= 900, 'badge-dark': !PING}" title="{{ PING_time }}">
|
||||
💻
|
||||
</span>
|
||||
</h5>
|
||||
<div ng-controller="ProgressionController">
|
||||
<span class="badge ml-1" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-warning': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent > 300, 'badge-info': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent <= 300 && mychallenges[ch].recent >= 120, 'badge-success': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent < 120, 'badge-danger': !mychallenges[ch]}" title="{{ t.title }} @ {{ mychallenges[ch].time | date: 'medium' }} {{ mychallenges[ch].recent }}" ng-bind="t.label"></span>
|
||||
<div class="card student d-flex flex-column justify-content-between" ng-repeat="(login, mychallenges) in students" style="background-image: url('https://photos.cri.epita.fr/square/{{ mychallenges.img | lowercase }}')">
|
||||
<h5 class="login text-truncate" title="{{ login }}">
|
||||
<span class="badge" ng-class="{'badge-success': mychallenges['ping'] && mychallenges['ping'].recent < 120, 'badge-info': mychallenges['ping'] && mychallenges['ping'].recent >= 120 && mychallenges['ping'].recent < 300, 'badge-warning': mychallenges['ping'] && mychallenges['ping'].recent >= 300 && mychallenges['ping'].recent < 900, 'badge-danger': mychallenges['ping'] && mychallenges['ping'].recent >= 900, 'badge-dark': !mychallenges['ping']}" title="{{ mychallenges['ping'].time }}">
|
||||
💻
|
||||
</span>
|
||||
{{ login }}
|
||||
</h5>
|
||||
<div class="d-flex flex-wrap justify-content-around" style="padding: 0">
|
||||
<span class="badge" style="margin-left: .07rem" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-warning': mychallenges[ch] && mychallenges[ch].recent && (tutoid != 0 && mychallenges[ch].recent > 300), 'badge-info': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent <= 300 && mychallenges[ch].recent >= 120, 'badge-success': mychallenges[ch] && mychallenges[ch].recent && (tutoid == 0 || mychallenges[ch].recent < 120), 'badge-danger': !mychallenges[ch]}" title="{{ t.title }} @ {{ mychallenges[ch].time | date: 'medium' }} {{ mychallenges[ch].recent }}" ng-bind="t.label"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue