-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
88 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.a8-container { | ||
display: grid; | ||
color: red; | ||
grid-template-columns: 1fr 1fr; | ||
grid-template-rows: 1fr 1fr; | ||
height: 297mm; /* A4の高さ */ | ||
width: 210mm; /* A4の幅 */ | ||
} | ||
|
||
.a8 { | ||
border: 1px solid black; /* 各A8の境界線 */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
document.addEventListener("DOMContentLoaded", function() { | ||
const video = document.getElementById('video'); | ||
const canvas = document.getElementById('canvas'); | ||
const snapBtn = document.getElementById('snap'); | ||
|
||
navigator.mediaDevices.getUserMedia({ video: true }) | ||
.then(function(stream) { | ||
video.srcObject = stream; | ||
video.play(); | ||
}) | ||
.catch(function(err) { | ||
console.log("カメラの起動に失敗しました: " + err); | ||
}); | ||
|
||
snapBtn.addEventListener('click', function() { | ||
const context = canvas.getContext('2d'); | ||
context.drawImage(video, 0, 0, canvas.width, canvas.height); | ||
|
||
// キャプチャした画像をデータURLとして取得 | ||
const imageData = canvas.toDataURL('image/jpeg'); | ||
console.log(imageData); | ||
|
||
// ここで取得したデータURLをサーバーに送信するなどの処理を行う | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 19 additions & 4 deletions
23
app/views/profiles/partial_entry_sheet/_up_left_cell.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
<div class="a8"> | ||
<div class="logo-image"> | ||
<%= image_tag "cndt2023/header_logo.png", class: "img-fluid header_logo" %> | ||
<%= image_tag "#{@conference.abbr}/header_logo.png", class: "img-fluid header_logo" %> | ||
</div> | ||
<div class="attendance"> | ||
<% if @speaker.present? %> | ||
<%= h("登壇者") %> | ||
<% else %> | ||
<%= h("一般参加") %> | ||
<% end %> | ||
</div> | ||
<div class="profile"> | ||
<div class="qrcode"> | ||
<img src=<%= "data:image/png;base64,#{@profile.qrcode_image}" %> /> | ||
<%= h("受付用QRコード") %> | ||
</div> | ||
<div class="detail"> | ||
<%= h("<Attendee>") %> | ||
<%= image_tag @profile.public_profile.avatar_url(:small) %> | ||
Name: <%= @profile.public_profile.nickname %> | ||
<% if @speaker.present? %> | ||
<%= image_tag @speaker.avatar_url(:small), class: "avatar-image" %> | ||
Name: <%= @speaker.name %> | ||
<% elsif @profile.public_profile.present? %> | ||
<%= image_tag @profile.public_profile.avatar_url(:small), class: "avatar-image" %> | ||
Name: <%= @profile.public_profile.nickname %> | ||
<% end %> | ||
<% if @profile.public_profile.present? %> | ||
</br> | ||
X(Twitter) ID: <%= @profile.public_profile.twitter_id %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> |