From 34deaaeefe8aaa68446ee0ffa78d37429dbaefa4 Mon Sep 17 00:00:00 2001 From: Ahmed-Ayman Date: Tue, 11 Dec 2018 14:41:57 +0200 Subject: [PATCH] add borders to the topic/item name --- src/components/SectionHeading.js | 2 +- src/components/VideoItem.js | 2 +- src/stylesheets/random-item.scss | 66 ++++++++++++++++++++++---------- src/stylesheets/video-item.scss | 16 ++++---- 4 files changed, 54 insertions(+), 32 deletions(-) diff --git a/src/components/SectionHeading.js b/src/components/SectionHeading.js index aedf4e7..7d6eb27 100644 --- a/src/components/SectionHeading.js +++ b/src/components/SectionHeading.js @@ -7,7 +7,7 @@ import React from 'react'; class SectionHeading extends React.Component { render() { return ( -

{this.props.title}

+

{this.props.title}

) } } diff --git a/src/components/VideoItem.js b/src/components/VideoItem.js index c009605..03e8641 100644 --- a/src/components/VideoItem.js +++ b/src/components/VideoItem.js @@ -12,7 +12,7 @@ class VideoItem extends React.Component {
-

{ this.props.title }

+

{ this.props.title }

) diff --git a/src/stylesheets/random-item.scss b/src/stylesheets/random-item.scss index aae482b..5d22570 100644 --- a/src/stylesheets/random-item.scss +++ b/src/stylesheets/random-item.scss @@ -1,37 +1,61 @@ @import "variables"; - /* section heading*/ .section-title { - padding: 1em; - margin-bottom: 1em; -} -.section-title::after{ - width: 100%; -} -.section-heading{ - padding-top: 1em; + padding: 1em; + margin-bottom: 1em; } + +.section-heading { + padding-top: 1em; +} +.section-title{ + margin: 0 0 2em 0; + line-height: 0.5; + text-align: center; +} +.section-title span{ + display: inline-block; + position: relative; +} +.section-title span:before, +.section-title span:after { + content: ""; + position: absolute; + height: 5px; + border-bottom: 1px solid black; + border-top: 1px solid black; + top: 0; + width: 300px; +} +.section-title span:before { + right: 100%; + margin-right: 15px; +} +.section-title span:after { + left: 100%; + margin-left: 15px; +} /* view all elements */ .view-all-parents { - color: white; - background: black; - padding: 1em; - position: relative; - top: 1em; + color: white; + background: black; + padding: 1em; + position: relative; + top: 1em; } .view-all-parents, .view-all-items { - text-decoration: none; + text-decoration: none; } .view-all-items { - color: black; - text-decoration: none; - padding: 1em; - border: 1px solid black; - position: relative; - top: 1em; + color: black; + text-decoration: none; + padding: 1em; + border: 1px solid black; + position: relative; + top: 1em; } diff --git a/src/stylesheets/video-item.scss b/src/stylesheets/video-item.scss index c5c6856..15f724e 100644 --- a/src/stylesheets/video-item.scss +++ b/src/stylesheets/video-item.scss @@ -4,17 +4,15 @@ /* Video item*/ .video-item { - background: #f6f6f6; + background: $light-gray-color; min-height: 440px; padding: 1em; } -.random-topics { - a{ - text-decoration: none; - font-size: 14px; - color: black; - } +a { + text-decoration: none; + font-size: 14px; + color: black; } .video-thumbnail { @@ -30,6 +28,6 @@ overflow: hidden; } -.video-title{ +.video-title { padding-top: 1em; -} \ No newline at end of file +}