1
0
Fork 0

initial upload, v1.1

This commit is contained in:
ryliejamesthomas 2024-02-09 03:33:27 +11:00
parent 913dafe297
commit d6813c0d28
26 changed files with 559 additions and 2 deletions

View File

View File

@ -1,2 +0,0 @@
# textpattern-theme-musuc
A simple theme, focused on presenting videos and brief notes.

37
README.textile Normal file
View File

@ -0,0 +1,37 @@
h1. textpattern-theme-musuc
A simple theme, focused on presenting videos with brief notes.
It's based on a theme I made for an extinct Tumblr blog, which was based on ????
I don't give a fuck about schema.org whatever, so I've stripped that stuff out. Google and DIVs and Js gone too.
h2. Installation
h2. Usage
h2. File Explainer
forms/
article/
article_listing.txp .........
comment/
file/
link/
misc/
article_breaktime.txp
body_footer.txp ............. Header section, with blog name and subtitle
body_header.txp ............. Foor section, with link to colophon
media_audio_bandcamp.txp .... For Bandcamp embeds
media_audio_file.txp ........ For audio file embeds (can include image)
media_audio_soundcloud.txp .. For Sound embeds
media_video_youtube.txp ..... For Youtube embeds
text_nobreak.txp ............ For stopping text breaking when unwanted
pages/
default.txp ..................... Layout used for all pages.
error_default.txp ............... Error page, for 404s, etc.
styles/
default.css ..................... Theme's stylesheet
LICENCE ............................. Licence (Unlicence)
manifest.json ....................... Theme metadata
README.textile ...................... This file

View File

@ -0,0 +1,8 @@
<article>
<txp:body />
<footer>
<txp:smd_tag_list>
<txp:smd_tag_name link="1" /> <txp:smd_tag_count wrapcount="[:]" wraptag="span" />
</txp:smd_tag_list>
</footer>
</article>

75
forms/article/default.txp Executable file
View File

@ -0,0 +1,75 @@
<article>
<txp:body />
<p><txp:text item="posted" />
</strong>
<time datetime="<txp:posted format="iso8601" />" itemprop="datePublished">
<txp:posted />
</time>
<meta itemprop="dateModified" content="<txp:modified format="iso8601" />" />
<!-- only display comments count if comments posted, or if new comments allowed -->
<txp:if_comments>
<br>
<strong>
<txp:text item="comments" />
</strong>
<a href="<txp:permlink />#comments-head" title="<txp:text item="view" />" itemprop="discussionUrl">
<span itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="https://schema.org/CommentAction" />
<span itemprop="userInteractionCount"><txp:comments_count /></span>
</span>
</a>
<txp:else />
<txp:if_comments_allowed>
<br>
<strong>
<txp:text item="comments" />
</strong>
<a href="<txp:permlink />#comments-head" title="<txp:text item="view" />" itemprop="discussionUrl">
<span itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="https://schema.org/CommentAction" />
<span itemprop="userInteractionCount">0</span>
</span>
</a>
</txp:if_comments_allowed>
</txp:if_comments>
</p>
<txp:if_article_image>
<txp:images form="images" />
</txp:if_article_image>
<p>
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">
<txp:author link this_section />
</span>
</span>
<!-- only display categories if they are actually set for an article, otherwise omit -->
<txp:if_article_category>
<br>
<strong>
<txp:text item="categories" />
</strong>
<span itemprop="keywords">
<txp:if_article_category number="1">
<txp:if_article_category number="2">
<txp:category1 title link />,
<txp:category2 title link />
<txp:else />
<txp:category1 title link />
</txp:if_article_category>
<txp:else />
<txp:category2 title link />
</txp:if_article_category>
</span>
</txp:if_article_category>
</p>
<!-- if this is an individual article then add the comments section via form: comments_display.article.txp -->
<txp:if_individual_article>
<txp:output_form form="comments_display" />
</txp:if_individual_article>
</article>

View File

@ -0,0 +1,33 @@
<li class="article" itemscope itemtype="https://schema.org/Article">
<h4 itemprop="headline">
<a href="<txp:permlink />" itemprop="url mainEntityOfPage" title="<txp:text item="read_more" />">
<txp:title />
</a>
</h4>
<!-- if the article has an excerpt, display that, otherwise show highlighted keywords in context of article -->
<txp:if_excerpt>
<div itemprop="description">
<txp:excerpt />
</div>
<txp:else />
<p>
<txp:search_result_excerpt />
</p>
</txp:if_excerpt>
<p class="footnote">
<txp:text item="posted" />
<time datetime="<txp:posted format="iso8601" />" itemprop="datePublished">
<txp:posted />
</time>
<meta itemprop="dateModified" content="<txp:modified format="iso8601" />" />
&#183;
<txp:text item="author" />
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">
<txp:author link this_section />
</span>
</span>
</p>
</li>

4
forms/article/tag_listing.txp Executable file
View File

@ -0,0 +1,4 @@
<article>
<txp:body />
</article>

69
forms/file/files.txp Executable file
View File

@ -0,0 +1,69 @@
<div itemscope itemtype="https://schema.org/DataDownload">
<!-- ...if exists, use the file title, otherwise use file name -->
<a href="<txp:file_download_link />" itemprop="url contentUrl">
<strong itemprop="name">
<txp:evaluate>
<txp:file_download_name title />
<txp:else />
<txp:file_download_name />
</txp:evaluate>
</strong>
</a>
<!-- ...if exists, use the file description, otherwise omit that line -->
<txp:evaluate test>
<div itemprop="description">
<txp:file_download_description />
</div>
</txp:evaluate>
<div class="footnote">
<!-- ...if exists, use the file category, otherwise omit that line -->
<txp:evaluate test="file_download_category">
<strong>
<txp:text item="category" />
</strong>
<span itemprop="keywords">
<txp:file_download_category title />
</span>
&#183;
</txp:evaluate>
<strong>
<txp:text item="author" />
</strong>
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">
<txp:file_download_author link />
</span>
</span>
&#183;
<strong>
<txp:text item="file_size" />
</strong>
<span itemprop="contentSize">
<txp:file_download_size />
</span>
&#183;
<strong>
<txp:text item="last_modified" />
</strong>
<time datetime="<txp:file_download_modified format="iso8601" />" itemprop="dateModified">
<txp:file_download_modified />
</time>
&#183;
<strong>
<txp:text item="download_count" />
</strong>
<span itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="https://schema.org/DownloadAction" />
<span itemprop="userInteractionCount">
<txp:file_download_downloads />
</span>
</span>
</div>
</div>

2
forms/link/plainlinks.txp Executable file
View File

@ -0,0 +1,2 @@
<!-- This is being used as an external links form, therefore rel is set to 'external' -->
<txp:linkdesctitle rel="external" />

View File

@ -0,0 +1 @@
<p class="breaktime"><txp:yield name="text" /></p>

3
forms/misc/body_footer.txp Executable file
View File

@ -0,0 +1,3 @@
<ul>
<li><a href="colophon">Colophon</a></li>
</ul>

2
forms/misc/body_header.txp Executable file
View File

@ -0,0 +1,2 @@
<h1><a href="<txp:site_url />"><txp:site_name /></a></h1>
<p><txp:site_slogan /></p>

View File

@ -0,0 +1,4 @@
<figure>
<iframe class="embed-bandcamp" src="https://bandcamp.com/EmbeddedPlayer/track=<txp:yield name="track" />/size=large/minimal=true/" seamless></iframe>
<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>
</figure>

View File

@ -0,0 +1,10 @@
<figure>
<txp:if_yield name="img">
<img alt="<txp:yield name="alt" />" src="https://files.ryliejamesthomas.net/media/images/music/<txp:yield name="dir" />/<txp:yield name="img" />.jpg">
</txp:if_yield>
<audio controls>
<source src="https://files.ryliejamesthomas.net/media/music/<txp:yield name="dir" />/<txp:yield name="file" />.ogg" type="audio/ogg">
<source src="https://files.ryliejamesthomas.net/media/music/<txp:yield name="dir" />/<txp:yield name="file" />.mp3" type="audio/mp3">
</audio>
<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>
</figure>

View File

@ -0,0 +1,4 @@
<figure>
<iframe class="embed-soundcloud" src="https://bandcamp.com/EmbeddedPlayer/track=<txp:yield name="track" />/size=large/minimal=true/" seamless></iframe>
<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>
</figure>

View File

@ -0,0 +1,6 @@
<figure>
<video controls>
<source src="https://files.ryliejamesthomas.net/media/music_video/<txp:yield name="dir" />/<txp:yield name="file" />.mp4" type="video/mp4">
</video>
<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>
</figure>

View File

@ -0,0 +1,4 @@
<figure>
<iframe class="embed-youtube" src="https://www.youtube-nocookie.com/embed/<txp:if_yield name="vid"><txp:yield name="vid" /></txp:if_yield><txp:if_yield name="plid">videoseries?list=<txp:yield name="plid" /></txp:if_yield>"></iframe>
<figcaption><cite><txp:yield name="title" /></cite> <span class="title-artist-separator"></span> <span class="artist"><txp:yield name="artist" /></span></figcaption>
</figure>

42
forms/misc/search_display.txp Executable file
View File

@ -0,0 +1,42 @@
<h1 itemprop="name"><txp:text item="search_results" /></h1>
<txp:if_search_results>
<!-- if search result count greater than 200 then display excessive results message, otherwise show search result count -->
<txp:if_search_results max="200">
<h3>
<txp:search_result_count />
<txp:text item="matching_search_request" />
<q><txp:search_term /></q>
</h3>
<txp:else />
<h3>
<txp:text item="too_common_search_term" />
<q><txp:search_term /></q>
</h3>
</txp:if_search_results>
<!-- if no search results, then display no search results message -->
<txp:else />
<h3>
<txp:text item="no_search_matches" />
</h3>
</txp:if_search_results>
<!-- display resulting articles (10 per page; default setting) -->
<txp:article class="article-list" wraptag="ul" />
<!-- check if there are further results and provide pagination links depending on the result -->
<txp:if_search_results min="11">
<nav class="paginator" aria-label="<txp:text item="page_nav" />">
<txp:evaluate>
<txp:newer rel="prev">
<txp:text item="prev" />
</txp:newer>
<txp:older rel="next">
<txp:text item="next" />
</txp:older>
</txp:evaluate>
</nav>
</txp:if_search_results>

7
forms/misc/search_input.txp Executable file
View File

@ -0,0 +1,7 @@
<div class="search" aria-label="<txp:text item="search" />" itemscope itemtype="https://schema.org/WebSite">
<meta itemprop="url" content="<txp:site_url />">
<form role="search" method="get" action="<txp:site_url />" itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
<meta itemprop="target" content="<txp:site_url />?q={q}">
<input name="q" type="search" itemprop="query-input" placeholder="<txp:text item="search" />"<txp:if_search> value="<txp:search_term />"</txp:if_search>>
</form>
</div>

View File

@ -0,0 +1 @@
<span class="no-break"><txp:yield name="text" /></span>

8
manifest.json Normal file
View File

@ -0,0 +1,8 @@
{
"title":"m~u~s~u~c",
"version":"1.1",
"description":"A simple theme, focused on presenting media embeds with brief notes and tags.",
"author":"Rylie James Thomas",
"author_uri":"https://www.ryliejamesthomas.net/",
"txp-type":"textpattern-theme"
}

33
pages/default.txp Executable file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="<txp:lang />">
<head>
<meta charset="utf-8">
<title><txp:page_title /></title>
<link rel="stylesheet" href="<txp:page_url type="theme_path" />/styles/default.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/pngs" href="images/favicon.png">
<txp:feed_link flavor="atom" format="link" label="Atom" />
<txp:feed_link flavor="rss" format="link" label="RSS" />
</head>
<body>
<header>
<txp:output_form form="body_header" />
</header>
<main>
<txp:article form="article_listing" limit="11" wraptag="ol" break="li" />
<txp:evaluate test="newer,older">
<nav>
<txp:newer rel="prev">
<txp:text item="newer" />
</txp:newer>
<txp:older rel="next">
<txp:text item="older" />
</txp:older>
</nav>
</txp:evaluate>
</main>
<footer>
<txp:output_form form="body_footer" />
</footer>
</body>
</html>

22
pages/error_default.txp Executable file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="<txp:lang />">
<head>
<meta charset="utf-8">
<title><txp:error_status /></title>
<link rel="stylesheet" href="<txp:page_url type="theme_path" />/styles/default.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<header>
<h1><a href="<txp:site_url />"><txp:site_name /></a></h1>
<p><txp:site_slogan /></p>
</header>
<main>
<h2 class="error-status"><txp:error_status /></h2>
<p class="error-msg"><txp:error_message /></p>
</main>
<footer>
<txp:output_form form="body_footer" />
</footer>
</body>
</html>

33
pages/tag.txp Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="<txp:lang />">
<head>
<meta charset="utf-8">
<title><txp:page_title /></title>
<link rel="stylesheet" href="<txp:page_url type="theme_path" />/styles/default.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/pngs" href="images/favicon.png">
<txp:feed_link flavor="atom" format="link" label="Atom" />
<txp:feed_link flavor="rss" format="link" label="RSS" />
</head>
<body>
<header>
<txp:output_form form="body_header" />
</header>
<main>
<smd::if_tag_list>
<smd::tag_list wraptag="" break="">
<h2># <smd::tag_name /></h2>
<smd::related_tags form="tag_listing" type="article" section="articles" wraptag="ol" break="li" />
</smd::tag_list>
<smd::else />
<smd::tag_list showall>
<smd::tag_name link /> <smd::tag_count />
</smd::tag_list>
</smd::if_tag_list>
</main>
<footer>
<txp:output_form form="body_footer" />
</footer>
</body>
</html>

BIN
resources/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

151
styles/default.css Normal file
View File

@ -0,0 +1,151 @@
/* TODO
hr
q
rounded corners a bit smaller?
*/
a:hover,
a:focus {
text-decoration-style:dashed
}
a[href^="https://wiki.ryliejamesthomas"] {
color: #008800;
}
body {
background-color:#b9ac9a;
font-family:sans-serif;
font-size:1.2em;
/* centre */
margin-left:auto;
margin-right:auto;
width:30em
}
article {
background-color:#ffffff;
border-radius:0 0 0.3em 0.3em;
box-shadow:0px 3px 2px rgba(0,0,0,0.3);
margin-bottom:2em;
padding-bottom:1em
}
article > footer,
article > h2,
article > p,
article> ul { margin:1em }
article > h2 { padding-top:1em }
article > footer {
text-align:left;
margin-top:2em
}
article > footer > ul.smd_tag_list {
list-style-type:none;
padding-left:0
}
article > footer > ul.smd_tag_list > li {
display:inline;
font-size:smaller
}
article > footer > ul.smd_tag_list > li:first-child::before { content:'#' }
article > footer > ul.smd_tag_list > li > span.smd_tag_count {
color:gray;
font-size:small;
font-variant-caps:small-caps;
}
article > p.breaktime {
font-style:italic;
padding-top: 3em;
text-align:center
}
cite { font-style:italic }
figure { margin:0 }
figure > audio,
figure > img,
figure > video { width:30em }
figure > figcaption { margin:0.5em 1em 2em 1em }
figure > figcaption > cite { font-style:italic }
figure > figcaption > span.artist {}
figure > figcaption > span.title-artist-separator::after { content:" ~ " }
figure > iframe.embed-bandcamp {
border:none;
height:30em;
width:30em
}
figure > iframe.embed-youtube {
border:none;
height:16.87em;
width:30em
}
figure > img { vertical-align:text-bottom }
footer {
margin-top:3em;
text-align:center
}
footer > ul {
list-style-type:none;
padding:0
}
footer > ul > li { display:inline }
footer a { color:#519ecd }
h1 {
font-size:3.7em;
margin:0
}
header {
color:#519ecd;
margin-bottom:2em;
text-align:center
}
header > p { margin:0 }
header a {
color:#519ecd;
text-decoration:none
}
header a:hover {
text-decoration:underline dashed;
text-decoration-thickness:1px
}
main > ol,
main > li /* catch for single-post pages I should fix peoperly in the template */ {
list-style-type:none;
margin:0;
padding:0
}
nav { text-align:center }
nav a {
color:black;
margin:0 2em
}
span.no-break { white-space:nowrap }