Browse Source

fix links

pull/1/head
wes 7 years ago
parent
commit
10968a546d
  1. 22
      src/scripts/app.tag
  2. 3
      src/scripts/categorymodal.tag
  3. 21
      src/scripts/githubsocial.tag

22
src/scripts/app.tag

@ -11,7 +11,22 @@
>
<div class="container">
<div class="columns">
<div class="col-2"></div>
<div class="col-2">
<section
class="text-center nav navbar centered navbar-section header-social"
style={
{
"margin-left" : "5px",
"margin-right" : "5px",
"float" : "left"
}
}
>
<githubsocial
link="https://github.com/nisstyre56"
>
</githubsocial>
</div>
<div class="col-8">
<section
style={{"margin-top" : page !== "posts" ? "15px" : "5px"}}
@ -120,6 +135,7 @@ import './about.tag';
import './links.tag';
import './browse.tag';
import './headersocial.tag';
import './githubsocial.tag';
import route from 'riot-route';
import lens from './lenses.js';
@ -263,10 +279,8 @@ self.on("mount", () => {
self.one("updated", () => {
document.addEventListener("click", function(event) {
console.log("detected click");
event.preventDefault();
if (!event.target.closest('#categorymodal')) {
window.RiotControl.trigger("closecategories");
window.RiotControl.trigger("closecategories", event);
}
});
});

3
src/scripts/categorymodal.tag

@ -62,7 +62,7 @@ self.toggle = (ev) => {
}
self.on("mount", () => {
RiotControl.on("closecategories", () => {
RiotControl.on("closecategories", (ev) => {
if (self.active && self.opened) {
self.update({
"active" : false,
@ -70,6 +70,7 @@ self.on("mount", () => {
});
}
else if (self.active && !self.opened) {
ev.preventDefault();
self.update({"opened" : true});
}
});

21
src/scripts/githubsocial.tag

@ -0,0 +1,21 @@
<githubsocial>
<div class="btn-group btn-group-block">
<a
href={opts.link}
target="_blank"
class="social-brand tooltip tooltip-right"
data-tooltip="My Github"
style={
{
"background-color" : "#FBFCFD",
"color" : "black !important",
"padding-right" : "10px",
"padding-left" : "10px",
"font-size" : "3em",
}
}
>
<i class="fa fa-github" aria-hidden="true"></i>
</a>
</div>
</githubsocial>
Loading…
Cancel
Save