既存のファイル化されているフロントコードを全てassetsに移動し、mixビルドの準備
This commit is contained in:
99
public/css/tissue.css
vendored
99
public/css/tissue.css
vendored
@@ -1,99 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
.tis-footer {
|
||||
color: #a2a2a2;
|
||||
font-size: small;
|
||||
border-top: 1px solid #eee;
|
||||
background: linear-gradient(to bottom, #f8f9fa, #fff)
|
||||
}
|
||||
|
||||
.tis-word-wrap {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.tis-contribution-graph {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.tis-need-agecheck .container {
|
||||
filter: blur(45px);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.container {
|
||||
transition: filter .15s linear;
|
||||
}
|
||||
|
||||
.list-group-item.no-side-border {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-item.border-bottom-only:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.list-group-item.border-bottom-only {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.list-group-item.border-bottom-only:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.timeline-action-item {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.tis-global-count-graph {
|
||||
height: 90px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .125);
|
||||
}
|
||||
|
||||
.tis-page-selector {
|
||||
margin-left: -1px;
|
||||
width: calc(100% + 2px);
|
||||
height: 100%;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.tis-sidebar-info {
|
||||
font-size: small;
|
||||
}
|
||||
}
|
||||
|
||||
#navbarNav > .d-lg-none > .row > div:first-of-type {
|
||||
padding-left: 15px;
|
||||
padding-right: 7.5px;
|
||||
}
|
||||
|
||||
#navbarNav > .d-lg-none > .row > div {
|
||||
padding-left: 7.5px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#navbarNav > .d-lg-none > .row > .col .btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#navbarAccountDropdownSp {
|
||||
max-width: calc(100vw - 5em);
|
||||
}
|
||||
|
||||
.card-img-left {
|
||||
width: 100%;
|
||||
border-top-left-radius: calc(.25rem - 1px);
|
||||
border-bottom-left-radius: calc(.25rem - 1px);
|
||||
}
|
||||
|
||||
.card-img-right {
|
||||
width: 100%;
|
||||
border-top-right-radius: calc(.25rem - 1px);
|
||||
border-bottom-right-radius: calc(.25rem - 1px);
|
||||
}
|
58
public/js/tissue.js
vendored
58
public/js/tissue.js
vendored
@@ -1,58 +0,0 @@
|
||||
// app.jsの名はモジュールバンドラーを投入する日まで予約しておく。CSSも同じ。
|
||||
|
||||
(function ($) {
|
||||
|
||||
$.fn.linkCard = function (options) {
|
||||
var settings = $.extend({
|
||||
endpoint: '/api/checkin/card'
|
||||
}, options);
|
||||
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
$.ajax({
|
||||
url: settings.endpoint,
|
||||
method: 'get',
|
||||
type: 'json',
|
||||
data: {
|
||||
url: $this.find('a').attr('href')
|
||||
}
|
||||
}).then(function (data) {
|
||||
var $metaColumn = $this.find('.col-12:last-of-type');
|
||||
var $imageColumn = $this.find('.col-12:first-of-type');
|
||||
var $title = $this.find('.card-title');
|
||||
var $desc = $this.find('.card-text');
|
||||
var $image = $imageColumn.find('img');
|
||||
|
||||
if (data.title === '') {
|
||||
$title.hide();
|
||||
} else {
|
||||
$title.text(data.title);
|
||||
}
|
||||
|
||||
if (data.description === '') {
|
||||
$desc.hide();
|
||||
} else {
|
||||
$desc.text(data.description);
|
||||
}
|
||||
|
||||
if (data.image === '') {
|
||||
$imageColumn.hide();
|
||||
$metaColumn.removeClass('col-md-6');
|
||||
} else {
|
||||
$image.attr('src', data.image);
|
||||
}
|
||||
|
||||
if (data.title !== '' || data.description !== '' || data.image !== '') {
|
||||
$this.removeClass('d-none');
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.pageSelector = function () {
|
||||
return this.on('change', function () {
|
||||
location.href = $(this).find(':selected').data('href');
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
Reference in New Issue
Block a user