Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.8 Expand long quotes
#50
(2021-02-19, 06:50 PM)Alhimika Wrote: Hi!
Sorry for necro posting, but I'm trying to implement the same thing

Rakes version vorks fine , but mmadhankumar version not.

either code warapped around <script type="text/javascript"> and inserted into header include

What Am I missing with mmadhankumar verion?

Thanks

sorted since decided to use Rakes version



did you add the correct styling to global.css as well as the headerinclude snippet inclusion? * note: this is taken directly from the old devel theme that contained such back in the day since you said you were having trouble as I wanted to show you simply that it does indeed work.... Wink


ie:
[Image: Nulla-quis-placerat-auxiliary-sed.png]

[Image: Nulla-quis-placerat-auxiliary-sed-1.png]


add to headerinclude template:

<!-- Blockquote Expand/Collapse -->
<script type="text/javascript">
$(document).ready(function () {
    $('blockquote').addClass('collapsed');
        $('blockquote').click(function(){
        $(this).toggleClass("expanded collapsed");
        e.preventDefault();
    });
});
</script>


in global.css find:

blockquote {
 border: 1px solid #ccc;
 margin: 0;
 background: #fff;
 padding: 10px;
}

blockquote cite {
 font-weight: bold;
 border-bottom: 1px solid #ccc;
 font-style: normal;
 display: block;
 padding-bottom: 3px;
 margin: 0 0 10px 0;
}

blockquote cite > span {
 float: right;
 font-weight: normal;
 font-size: 12px;
 color: #666;
}

blockquote cite span.highlight {
 float: none;
 font-weight: bold;
 padding-bottom: 0;
}

.codeblock {
 background: #fff;
 border: 1px solid #ccc;
 padding: 10px;
}

.codeblock .title {
 border-bottom: 1px solid #ccc;
 font-weight: bold;
 padding-bottom: 3px;
 margin: 0 0 10px 0;
}

.codeblock code {
 overflow: auto;
 height: auto;
 max-height: 200px;
 display: block;
 font-family: Monaco, Consolas, Courier, monospace;
 font-size: 13px;
}


change to:
blockquote {
	border: 1px solid #ccc;
	margin: 0;
	background: #fff;
	padding: 10px;
}
blockquote cite {
	font-weight: bold;
	border-bottom: 1px solid #ccc;
	font-style: normal;
	display: block;
	padding-bottom: 3px;
	margin: 0 0 10px 0;
}
blockquote cite span {
	float: right;
	font-weight: normal;
	font-size: 12px;
	color: #666;
}
blockquote cite span.highlight {
	float: none;
	font-weight: bold;
	padding-bottom: 0;
}
.codeblock {
	background: #fff;
	border: 1px solid #ccc;
	padding: 10px;
}
.codeblock .title {
	border-bottom: 1px solid #ccc;
	font-weight: bold;
	padding-bottom: 3px;
	margin: 0 0 10px 0;
}
.codeblock code {
	overflow: auto;
	height: auto;
	max-height: 200px;
	display: block;
	font-family: Monaco, Consolas, Courier, monospace;
	font-size: 13px;
}

.collapsed, .expanded {
	overflow: hidden;
	border: 1px solid #D3D3D3;
	background: #FAFAFA;
	text-align: justify;
	padding: 10px;
	border-radius: 5px;
	margin: 0;
	position: relative;
}
.collapsed {
	max-height: 75px;
	opacity: 0.7;
}
.expanded {
	height: 100%;
	opacity: 1;
	padding-bottom: 35px;
}
.collapsed:after, .expanded:after {
	position: absolute;
	height: 25px;
	bottom: 0px;
	left: 1px;
	right: 1px;
	cursor: pointer;
	border: 1px solid #A5A5A5;
	background: #D3D3D3;
	color: #4A4A4A;
	text-align: center;
	line-height: 25px;
	font-weight: bold;
	font-family: Tahoma, Verdana, Arial, Sans-Serif;
	font-size: 13px;
	border-radius: 0px 0px 5px 5px;
}
.collapsed:after {
	content: 'Show More';
	opacity: 0.9;
}
.expanded:after {
	content: 'Show Less';
	opacity: 0.7;
}
.collapsed:hover:after, .expanded:hover:after {
	opacity: 1;
	background: #838383;
	color: #1A1A1A;
}



That should get it working for you...

* Now as far as say folks hoping for this as a core feature as this thread subject entails, in my opinion one factor to consider is that it would firstly need to be modified to localize the button lang (ie: show less & more ) before considering such....

Best of Luck Wink  ~ V
Reply


Messages In This Thread
Expand long quotes - by Eldenroot - 2014-12-08, 01:39 PM
RE: Expand long quotes - by mmadhankumar - 2014-12-08, 01:53 PM
RE: Expand long quotes - by Eldenroot - 2014-12-08, 01:56 PM
RE: Expand long quotes - by Rakes - 2014-12-09, 05:27 AM
RE: Expand long quotes - by CodeX Pro - 2014-12-08, 04:23 PM
RE: Expand long quotes - by Ben - 2014-12-08, 04:37 PM
RE: Expand long quotes - by Eldenroot - 2014-12-09, 06:07 AM
RE: Expand long quotes - by mmadhankumar - 2014-12-09, 07:14 AM
RE: Expand long quotes - by Eldenroot - 2014-12-09, 07:17 AM
RE: Expand long quotes - by mmadhankumar - 2014-12-09, 07:54 AM
RE: Expand long quotes - by Rakes - 2014-12-09, 08:29 AM
RE: Expand long quotes - by Eldenroot - 2014-12-09, 07:56 AM
RE: Expand long quotes - by .m. - 2014-12-09, 08:29 AM
RE: Expand long quotes - by Eldenroot - 2014-12-09, 08:35 AM
RE: Expand long quotes - by Leefish - 2014-12-09, 09:43 AM
RE: Expand long quotes - by mmadhankumar - 2014-12-09, 11:31 AM
RE: Expand long quotes - by Rakes - 2014-12-09, 11:52 AM
RE: Expand long quotes - by Leefish - 2014-12-09, 12:09 PM
RE: Expand long quotes - by Rakes - 2014-12-09, 12:10 PM
RE: Expand long quotes - by Eldenroot - 2014-12-09, 12:11 PM
RE: Expand long quotes - by Leefish - 2014-12-09, 12:32 PM
RE: Expand long quotes - by Rakes - 2014-12-09, 12:56 PM
RE: Expand long quotes - by mmadhankumar - 2014-12-09, 12:43 PM
RE: Expand long quotes - by Eldenroot - 2014-12-09, 01:01 PM
RE: Expand long quotes - by Rakes - 2015-01-15, 10:23 AM
RE: Expand long quotes - by Eldenroot - 2015-01-15, 05:48 PM
RE: Expand long quotes - by Rakes - 2015-01-15, 07:10 PM
RE: Expand long quotes - by albano - 2017-10-14, 02:00 AM
RE: Expand long quotes - by Eldenroot - 2015-01-15, 07:59 PM
RE: Expand long quotes - by Rakes - 2015-01-16, 09:01 AM
RE: Expand long quotes - by Eldenroot - 2015-02-19, 11:36 AM
RE: Expand long quotes - by Eldenroot - 2015-02-20, 10:24 PM
RE: Expand long quotes - by mmadhankumar - 2015-02-22, 01:11 PM
RE: Expand long quotes - by bekircem - 2016-04-28, 09:34 PM
RE: Expand long quotes - by Leefish - 2015-02-22, 03:04 PM
RE: Expand long quotes - by mmadhankumar - 2015-02-22, 03:41 PM
RE: Expand long quotes - by Eldenroot - 2015-02-23, 03:31 PM
RE: Expand long quotes - by Josh H. - 2015-02-23, 11:23 PM
RE: Expand long quotes - by Leefish - 2015-02-24, 02:05 AM
RE: Expand long quotes - by Josh H. - 2015-02-24, 06:37 AM
RE: Expand long quotes - by Eldenroot - 2016-04-28, 09:39 PM
RE: Expand long quotes - by bekircem - 2016-04-28, 10:18 PM
RE: Expand long quotes - by sanjay303 - 2016-11-22, 07:05 AM
RE: Expand long quotes - by Eldenroot - 2016-11-22, 03:50 PM
RE: Expand long quotes - by sanjay303 - 2016-11-22, 05:32 PM
RE: Expand long quotes - by Eldenroot - 2017-10-14, 06:55 AM
RE: Expand long quotes - by albano - 2017-10-15, 05:29 PM
RE: Expand long quotes - by Lunorian - 2017-11-13, 11:45 PM
RE: Expand long quotes - by Alhimika - 2021-02-19, 06:50 PM
RE: Expand long quotes - by censor_deeznutz - 2021-02-22, 08:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)