Compare commits
No commits in common. "d39d7bb19dbfd63332fe46d531be13ca4b148700" and "f6bc23927fbf6f9b5e39ca78403ce50af87cc7d9" have entirely different histories.
d39d7bb19d
...
f6bc23927f
182
www/sheet.xsl
182
www/sheet.xsl
|
@ -24,100 +24,11 @@
|
|||
font-family: sans;
|
||||
}
|
||||
|
||||
input, select {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid silver;
|
||||
}
|
||||
|
||||
.input-combo {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: stretch;
|
||||
|
||||
width: 800px;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
|
||||
border: 1px solid grey;
|
||||
|
||||
padding: .5em .5em;
|
||||
background-color: #FFFAF4;
|
||||
}
|
||||
|
||||
.input-combo * {
|
||||
#url {
|
||||
background-color: rgba(255, 165, 0, 0.25);
|
||||
padding: 1% 5%;
|
||||
display: inline-block;
|
||||
line-height: 2em;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.input-combo > :not(.button) {
|
||||
max-width: 100%;
|
||||
flex-grow: 1;
|
||||
flex-shrink 0;
|
||||
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.input-combo .button {
|
||||
flex-grow: 0;
|
||||
flex-shrink 1;
|
||||
|
||||
cursor: pointer;
|
||||
min-width: 2em;
|
||||
text-align: center;
|
||||
border-left: 1px solid silver;
|
||||
color: #06f;
|
||||
}
|
||||
|
||||
[onclick_title] {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[onclick_title]::before {
|
||||
opacity: 0;
|
||||
|
||||
content: attr(onclick_title);
|
||||
font-weight: normal;
|
||||
|
||||
position: absolute;
|
||||
left: -300%;
|
||||
|
||||
z-index: 1;
|
||||
|
||||
background: grey;
|
||||
color: white;
|
||||
|
||||
border-radius: 0.5em;
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
[onclick_title]:not(:active)::before {
|
||||
transition: opacity 1s ease-in-out;
|
||||
}
|
||||
|
||||
[onclick_title]:active::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
header > form {
|
||||
text-align: center;
|
||||
margin: 1%;
|
||||
}
|
||||
|
||||
header a {
|
||||
text-decoration: inherit;
|
||||
color: #FF7B0A;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.item {
|
||||
|
@ -142,58 +53,21 @@
|
|||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.desc, .content {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.desc *, .content * {
|
||||
.content * {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>RSS feed by morss</h1>
|
||||
|
||||
<p>Your RSS feed is <strong style="color: green">ready</strong>. You
|
||||
can enter the following url in your newsreader:</p>
|
||||
|
||||
<div class="input-combo">
|
||||
<input id="url" readonly="readonly"/>
|
||||
<span class="button" onclick="copy_link()" title="Copy" onclick_title="Copied">
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" d="M4 1.5H3a2 2 0 00-2 2V14a2 2 0 002 2h10a2 2 0 002-2V3.5a2 2 0 00-2-2h-1v1h1a1 1 0 011 1V14a1 1 0 01-1 1H3a1 1 0 01-1-1V3.5a1 1 0 011-1h1v-1z" clip-rule="evenodd"/>
|
||||
<path fill-rule="evenodd" d="M9.5 1h-3a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-1a.5.5 0 00-.5-.5zm-3-1A1.5 1.5 0 005 1.5v1A1.5 1.5 0 006.5 4h3A1.5 1.5 0 0011 2.5v-1A1.5 1.5 0 009.5 0h-3z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div id="url"></div>
|
||||
|
||||
<form onchange="open_feed()">
|
||||
More options: Output the
|
||||
<select>
|
||||
<option value="">full-text</option>
|
||||
<option value=":proxy">original</option>
|
||||
<option value=":clip">original + full-text</option>
|
||||
</select>
|
||||
feed as
|
||||
<select>
|
||||
<option value="">RSS</option>
|
||||
<option value=":json:cors">JSON</option>
|
||||
<option value=":html">HTML</option>
|
||||
<option value=":csv">CSV</option>
|
||||
</select>
|
||||
and
|
||||
<select>
|
||||
<option value="">keep</option>
|
||||
<option value=":nolink:noref">remove</option>
|
||||
</select>
|
||||
links
|
||||
<input type="hidden" value="" name="extra_options"/>
|
||||
</form>
|
||||
|
||||
<p>Click <a href="/">here</a> to go back to morss</p>
|
||||
</header>
|
||||
<hr/>
|
||||
|
||||
<div id="header">
|
||||
<h1>
|
||||
|
@ -224,51 +98,11 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById("url").value = window.location.href
|
||||
document.getElementById("url").innerHTML = window.location.href.replace(/:html\/?/, '')
|
||||
|
||||
if (!/:html/.test(window.location.href))
|
||||
for (var content of document.querySelectorAll(".desc,.content"))
|
||||
content.innerHTML = (content.innerText.match(/>/g) || []).length > 10 ? content.innerText : content.innerHTML
|
||||
|
||||
var options = parse_location()[0]
|
||||
|
||||
if (options) {
|
||||
for (var select of document.forms[0].elements)
|
||||
if (select.tagName == 'SELECT')
|
||||
for (var option of select)
|
||||
if (option.value)
|
||||
if (options.match(option.value)) {
|
||||
select.value = option.value
|
||||
options = options.replace(option.value, '')
|
||||
break
|
||||
}
|
||||
|
||||
document.forms[0]['extra_options'].value = options
|
||||
}
|
||||
|
||||
function copy_content(input) {
|
||||
input.focus()
|
||||
input.select()
|
||||
document.execCommand('copy')
|
||||
}
|
||||
|
||||
function copy_link() {
|
||||
copy_content(document.getElementById("url"))
|
||||
}
|
||||
|
||||
function parse_location() {
|
||||
return (window.location.pathname + window.location.search).match(/^\/(?:(:[^\/]+)\/)?(.*$)$/).slice(1)
|
||||
}
|
||||
|
||||
function open_feed() {
|
||||
var url = parse_location()[1]
|
||||
var options = Array.from(document.forms[0].elements).map(x=>x.value).join('')
|
||||
|
||||
var target = '/' + (options ? options + '/' : '') + url
|
||||
|
||||
if (target != window.location.pathname)
|
||||
window.location.href = target
|
||||
}
|
||||
content.innerHTML = content.children.children ? content.innerHTML : content.innerText
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue