add WeChat to socials (#1730)
When the WeChat icon in socials is clicked, a picture of your WeChat QR code is shown in the center of the screen. The actual picture of your QR code has to be uploaded.
This commit is contained in:
parent
8883c9ddf7
commit
cba3ad27fb
|
|
@ -105,6 +105,7 @@ facebook_id: # your facebook id
|
||||||
youtube_id: # your youtube channel id (youtube.com/@<youtube_id>)
|
youtube_id: # your youtube channel id (youtube.com/@<youtube_id>)
|
||||||
discord_id: # your discord id (18-digit unique numerical identifier)
|
discord_id: # your discord id (18-digit unique numerical identifier)
|
||||||
zotero_username: # your zotero username
|
zotero_username: # your zotero username
|
||||||
|
wechat_qr: # filename of your wechat qr-code saved as an image (e.g., wechat-qr.png if saved to assets/img/wechat-qr.png)
|
||||||
|
|
||||||
contact_note: >
|
contact_note: >
|
||||||
You can even add a little note about which of these is the best way to reach you.
|
You can even add a little note about which of these is the best way to reach you.
|
||||||
|
|
@ -425,4 +426,4 @@ jsonresume:
|
||||||
- skills
|
- skills
|
||||||
- languages
|
- languages
|
||||||
- interests
|
- interests
|
||||||
- references
|
- references
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{% if site.wechat_qr %}
|
||||||
|
|
||||||
|
<!-- WeChat Modal -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var wechatModal = document.getElementById("WeChatMod");
|
||||||
|
var wechatBtn = document.getElementById("WeChatBtn");
|
||||||
|
|
||||||
|
wechatBtn.onclick = function() {
|
||||||
|
wechatModal.style.display = "block";
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onclick = function(event) {
|
||||||
|
if (event.target == wechatModal) {
|
||||||
|
wechatModal.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
@ -109,3 +109,10 @@
|
||||||
{%- if site.rss_icon -%}
|
{%- if site.rss_icon -%}
|
||||||
<a href="{{ site.baseurl }}/feed.xml" title="RSS Feed"><i class="fas fa-rss-square"></i></a>
|
<a href="{{ site.baseurl }}/feed.xml" title="RSS Feed"><i class="fas fa-rss-square"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{%- if site.wechat_qr -%}
|
||||||
|
<a id="WeChatBtn" title="WeChat"><i class="fab fa-weixin"></i></a>
|
||||||
|
<div id="WeChatMod" class="wechat-modal">
|
||||||
|
<img src="{{ site.wechat_qr | prepend: 'assets/img/' | relative_url }}" alt="WeChat QR" id="WeChatQR">
|
||||||
|
</div>
|
||||||
|
{% include scripts/wechatModal.html %}
|
||||||
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -58,5 +58,6 @@
|
||||||
{% include scripts/mathjax.html %}
|
{% include scripts/mathjax.html %}
|
||||||
{% include scripts/analytics.html %}
|
{% include scripts/analytics.html %}
|
||||||
{% include scripts/progressBar.html %}
|
{% include scripts/progressBar.html %}
|
||||||
|
{% include scripts/wechatModal.html %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -326,6 +326,36 @@ blockquote {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wechat-modal {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1;
|
||||||
|
padding-top: 100px;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
background-color: rgb(0,0,0);
|
||||||
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-modal > img {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
width: 33%;
|
||||||
|
max-width: 400px;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 400px){
|
||||||
|
.wechat-modal > img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Footer
|
// Footer
|
||||||
footer.fixed-bottom {
|
footer.fixed-bottom {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue