Browse Source

style improvements

pull/1/head
wes 8 years ago
parent
commit
79f2dc1c17
  1. 1
      fabfile.py
  2. 3
      src/scripts/post.tag
  3. 4
      src/scripts/social.tag
  4. 25
      src/styles/riotblog.scss

1
fabfile.py

@ -56,6 +56,7 @@ def serveUp():
@task(default=True) @task(default=True)
def build(): def build():
local("rm -rf ./build")
local("mkdir -p build/{scripts,styles}") local("mkdir -p build/{scripts,styles}")
buildScss() buildScss()
buildJS() buildJS()

3
src/scripts/post.tag

@ -10,6 +10,7 @@
next={this.next} next={this.next}
> >
</div> </div>
<loading if={this.loading && !this.parent.state.loaded}></loading>
<div class="text-break"> <div class="text-break">
<div class={"animated " + (this.loading ? "invisible" : "fadeIn")}> <div class={"animated " + (this.loading ? "invisible" : "fadeIn")}>
<social <social
@ -94,7 +95,7 @@ next(ev) {
toTop() { toTop() {
jquery('html, body').stop().animate({ jquery('html, body').stop().animate({
scrollTop: jquery(".navigate").offset().top-15 scrollTop: jquery(".blog-title").offset().top-15
}, 1000); }, 1000);
} }

4
src/scripts/social.tag

@ -1,6 +1,8 @@
<social> <social>
<div class="social-wrapper">
<raw ref="button" content={this.tweetHtml}> <raw ref="button" content={this.tweetHtml}>
</raw> </raw>
</div>
<script> <script>
import './raw.tag'; import './raw.tag';
@ -16,7 +18,7 @@ updateButton(_id, title) {
} }
if (_id != self._id) { if (_id != self._id) {
self.tweetHtml = `<a style="display:none;" class="twitter-share-button" data-text="${title}" data-via="weskerfoot" data-show-count="false" data-url="https://primop.me/blog/#!posts/${_id}" ref="tweet">Tweet ${_id}</a>`; self.tweetHtml = `<a style="display:none;" data-size="large" class="btn twitter-share-button" data-text="${title}" data-via="weskerfoot" data-show-count="false" data-url="https://primop.me/blog/#!posts/${_id}" ref="tweet">Tweet ${_id}</a>`;
self._id = _id; self._id = _id;
self.update(); self.update();
} }

25
src/styles/riotblog.scss

@ -5,10 +5,22 @@ $branding3: #1b4c6c;
$menuWidth: 60px; $menuWidth: 60px;
.twitter-share-button-rendered {
font-size: 1.5em;
}
.social-wrapper {
height: 25px;
}
.social {
margin-top: 25%;
}
.branded, button { .branded, button {
border-radius: 5px; border-radius: 5px !important;
border-color: $branding2 !important; border-color: $branding2 !important;
display: block; display: block !important;
margin-top: 0; margin-top: 0;
padding: .6rem 1.2rem .4rem 1.2rem; padding: .6rem 1.2rem .4rem 1.2rem;
text-decoration: none; text-decoration: none;
@ -75,6 +87,7 @@ p, h6, h4 {
font-weight: 600; font-weight: 600;
line-height: 1.6em; line-height: 1.6em;
color: #3A4145; color: #3A4145;
text-align: center;
} }
.post-author { .post-author {
@ -170,15 +183,15 @@ p, h6, h4 {
.content { .content {
margin: auto; margin: auto;
max-width: 50%;
@media (max-width: 1000px) {
max-width: 70%; max-width: 70%;
@media (max-width: 1000px) {
max-width: 80%;
} }
@media (max-width: 800px) { @media (max-width: 800px) {
max-width: 80%; max-width: 90%;
} }
@media (max-width: 400px) { @media (max-width: 400px) {
max-width: 90%; max-width: 100%;
} }
} }

Loading…
Cancel
Save