Entry tags:
Question thread #122
It's time for another question thread!
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
Make a theme mobile friendly?
How difficult is this to do? My CSS knowledge is at the point where I can copy and paste it and mess around with variables, but I do not feel confident in writing anything out from scratch.
Re: Make a theme mobile friendly?
Re: Make a theme mobile friendly?
Re: Make a theme mobile friendly?
Re: Make a theme mobile friendly?
<meta name="viewport" content="width=device-width, initial-scale=1">
...and it should go in the
<head>
tag, but apparently user layers aren't allowed to add meta tags in the advanced layout customization. Which is why someone's writing a patch for it in the DW codebase like right now, I think, ahahaRe: Make a theme mobile friendly?
no subject
Novice barely-knows-how-to-code question here.
I'm trying to scrape comments from a community with an HTTPS call, using the URL:
https://www.dreamwidth.org/export_comments?get=comment_body&startid=0&authas=COMMNAME
This works if I'm logged in to the browser, no problem. But what I'm struggling with is how to send that request as part of a script. So for example, I put together what I thought would be a simple Python script:
import requests
from requests.auth import HTTPBasicAuth
auth=HTTPBasicAuth('USERNAME', 'APIKEY')
r = requests.get('https://www.dreamwidth.org/export_comments?get=comment_body&startid=0&authas=COMMNAME', auth=auth)
print(r.text)
What I get back is the Dreamwidth login page. I'm sure there's something extremely obvious that I'm missing here, but dammit Jim, I'm a docs writer, not a developer.
Re: Make a theme mobile friendly?
Re: Make a theme mobile friendly?
no subject
no subject
There's a way to auth through the old XML-RPC api but I would have to look it up - you have to pass an MD5-hashed version of your username and API key to a specific endpoint and you get an auth cookie back.